[ 
https://issues.apache.org/jira/browse/NIFI-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15431193#comment-15431193
 ] 

ASF GitHub Bot commented on NIFI-2621:
--------------------------------------

GitHub user brosander opened a pull request:

    https://github.com/apache/nifi/pull/909

    NIFI-2621 - Generating unique serial numbers for certificates

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/brosander/nifi NIFI-2621

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/909.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #909
    
----
commit 52015e66396a1ac8c58de2c8818a2779754975b0
Author: Bryan Rosander <[email protected]>
Date:   2016-08-22T16:57:37Z

    NIFI-2621 - Generating unique serial numbers for certificates

----


> NiFi CertificateUtils can reuse serial numbers in issued certificates if 
> multiple calls are made in the same millisecond
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-2621
>                 URL: https://issues.apache.org/jira/browse/NIFI-2621
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Bryan Rosander
>            Assignee: Bryan Rosander
>
> Serial numbers on certificates should be unique.  CertificateUtils currently 
> uses System.currentTimeMillis() to generate them.
> Proposed solution:
> 1. Use the current time in millis as the most significant part of the serial 
> number
> 2. Shift it left 32 bits to make room in the BigInteger for an incrementor 
> value
> 3. Reset the incrementor every time a the generator function is called and 
> the millisecond is different from before



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to