pike.git / lib / modules / SSL.pmod / Context.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Context.pike:752:   //! and @[certs], and throws errors if the validation fails.   //!   //! @seealso   //! @[find_cert()]   void add_cert(Crypto.Sign.State key, array(string(8bit)) certs,    array(string(8bit))|void extra_name_globs)   {    CertificatePair cp = CertificatePair(key, certs, extra_name_globs);    add_cert(cp);   } + variant void add_cert(string(8bit) key, array(string(8bit)) certs, +  array(string(8bit))|void extra_name_globs) + { +  Crypto.Sign.State _key = Standards.PKCS.RSA.parse_private_key(key) || +  Standards.PKCS.DSA.parse_private_key(key) || + #if constant(Crypto.ECC.Curve) +  Standards.PKCS.ECDSA.parse_private_key(key) || + #endif +  0; +  add_cert(_key, certs, extra_name_globs); + }   variant void add_cert(CertificatePair cp)   {    void add(string what, mapping(string:array(CertificatePair)) to)    {    if( !to[what] )    to[what] = ({cp});    else    to[what] = sort( to[what]+({cp}) );    };