Branch: Tag:

2013-10-28

2013-10-28 14:23:17 by Martin Nilsson <nilsson@opera.com>

Allow serial number to be set explicitly.

206:      //!   string make_selfsigned_dsa_certificate(Crypto.DSA dsa, int ttl, array name, -  array|void extensions) +  array|void extensions, void|int serial)   { -  int serial = -  (int)Gmp.bignum(Standards.UUID.make_version1(-1)->encode(), 256); +  if(!serial) +  serial = (int)Gmp.mpz(Standards.UUID.make_version1(-1)->encode(), 256);       Sequence dn = Certificate.build_distinguished_name(@name);   
237:   //!   //! @param issuer   //! Distinguished name for the issuer. + //! See @[Standards.PKCS.Certificate.build_distinguished_name].   //!   //! @param rsa   //! RSA parameters for the issuer. -  + //! See @[Crypto.RSA].   //!   //! @param subject   //! Distinguished name for the issuer. -  + //! See @[Standards.PKCS.Certificate.build_distinguished_name].   //!   //! @param public_key   //! DER-encoded RSAPublicKey structure.
278:      //!   string make_selfsigned_rsa_certificate(Crypto.RSA rsa, int ttl, array name, -  array|void extensions) +  array|void extensions, void|int serial)   { -  int serial = -  (int)Gmp.bignum(Standards.UUID.make_version1(-1)->encode(), 256); +  if(!serial) +  serial = (int)Gmp.mpz(Standards.UUID.make_version1(-1)->encode(), 256);       Sequence dn = Certificate.build_distinguished_name(@name);