<div dir="ltr"><div>Certificate serial numbers must be unique.  They need not be sequential or increasing.  (Mozilla's NSS will complain and refuse to work if there are duplicate serial numbers.)</div><div><br></div><div>I tend not to re-use keys, so I've found that putting 20 bytes (while clearing the high bit) of a digest of the SubjectPublicKeyInfo as the serial number works in that circumstance.  [if you leave the high bit set, then DER mandates that it be encoded with a leading 0x00 byte, which makes it 21 bytes... which can cause problems with things built for PKIX.]</div><div><br></div><div>-Kyle H<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 16, 2017 at 6:24 AM, Tom Browder <span dir="ltr"><<a href="mailto:tom.browder@gmail.com" target="_blank">tom.browder@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Many years ago I started a CA for one group I manage for a private website, and now I want to update members' client certs for the stricter requirements for browsers.</div><div dir="auto"><br></div><div dir="auto">My original cert generation was entirely automated including the following:</div><div dir="auto"><br></div><div dir="auto">+ CN for each is an e-mail address for the member</div><div dir="auto"><br></div><div dir="auto">+ the passphrase for each member's cert is determined from a pre-generated list by me, it will not change</div><div dir="auto"><br></div><div dir="auto">I plan to tidy my automation before the issue of new certs, but I wonder how critical it is to ensure unique certificate serial numbers given that the certs are only used for us.  I'm not even sure I'll ever revoke any cert (they were issued to expire sometime in 2030).</div><div dir="auto"><br></div><div dir="auto">So, in summary, do I need to ensure cert serial numbers are unique for my CA?</div><div dir="auto"><br></div><div dir="auto">With warmest regards,</div><div dir="auto"><br></div><div dir="auto">-Tom</div>
<br>--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
<br></blockquote></div><br></div>