Oh, you're talking about two different numbers. The serialNumber field in TBScertificate a number assigned to the certificate by the issuer, and only serves as an index to that specific certificate in the CA's database. Incidently, together with the issuer name, it also provides a unique identity for that same certificate.
The serialNumber attribute is a different beast, and may very well be part of a DN. That number has nothing to do with the CA's administration, and may actually come from a completely different authority, or may be used to distinguish between two subjects that would otherwise have undistinguishable subject names. For example, you may have two different John Doe's, who would maybe get the subject name "C=US,CN=John Doe", and would therefore be undistinguishable from each other. Adding a serial number helps, you'd get "C=US,CN=John Doe,serialNumber=1" and "C=US,CN=John Doe,serialNumber=2". As another example, each Swedish resident gets a so called personal number, which is approximately used as the american SSN. A typical DN using that number would for example be "C=SE, SN=Andersson,GN=Anders,serialNumber=6512019999". In message <[EMAIL PROTECTED]> on Wed, 16 Jul 2003 13:31:57 -0400 (EDT), Alicia da Conceicao <[EMAIL PROTECTED]> said: alicia> Why would you do that when the serialNumber *HAS TO BE PLACED IN ITS alicia> OWN FIELD* in the TBSCertificate SEQUENCE, the same way the Validity alicia> (start & expiry times) are placed? If you place the serialNumber in alicia> the subject, then it would only be a second copy of the required alicia> serialNumber in the TBSCertificate SEQUENCE and would not serve any alicia> additional functionality. alicia> alicia> RFC-2459 provides the required format for all X509 certificates. alicia> alicia> Alicia. alicia> alicia> > add serialNumber to [ req_distinguished_name ] section should work. alicia> > e.g. alicia> > ------------------------------------------------------------ alicia> > [ req_distinguished_name ] alicia> > countryName = Country Name (2 letter code) alicia> > countryName_default = AU alicia> > countryName_min = 2 alicia> > countryName_max = 2 alicia> > alicia> > serialNumber = Serial Number alicia> > alicia> > stateOrProvinceName = State or Province Name (full name) alicia> > ------------------------------------------------------------ alicia> > Regards alicia> > Christian alicia> > On Wed, Jul 16, 2003 at 04:57:38PM +0200, Tomasz Sniezynski wrote: alicia> > > Hi alicia> > > I've got a little problem. alicia> > > How to force openssl to generate certificate with serialNumber inside alicia> > > Subject. (C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, <something alicia> > > representing serialNumber>,CN=1222) alicia> > > Thanks for Your help alicia> ______________________________________________________________________ alicia> OpenSSL Project http://www.openssl.org alicia> User Support Mailing List [EMAIL PROTECTED] alicia> Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
