pike.git / lib / modules / Standards.pmod / X509.pmod

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:143: Inside #if constant(Crypto.SHA512)
  #endif   #if constant(Crypto.SHA512)    .PKCS.Identifiers.ecdsa_sha512_id : Crypto.SHA512,   #endif    ]);   }      class Verifier {    constant type = "none";    Crypto.Sign.State pkc; -  optional __deprecated__(Crypto.RSA) rsa; -  optional __deprecated__(Crypto.DSA) dsa; +        //! Verifies the @[signature] of the certificate @[msg] using the    //! indicated hash @[algorithm].    int(0..1) verify(Sequence algorithm, string(8bit) msg, string(8bit) signature)    {    DBG("Verify hash %O\n", algorithm[0]);    Crypto.Hash hash = algorithms[algorithm[0]];    if (!hash) return 0;    return pkc && pkc->pkcs_verify(msg, hash, signature);    }
pike.git/lib/modules/Standards.pmod/X509.pmod:176:   }      protected class RSAVerifier   {    inherit Verifier;    constant type = "rsa";       protected void create(string key) {    pkc = .PKCS.RSA.parse_public_key(key);    } -  -  __deprecated__ Crypto.RSA.State `rsa() { -  return pkc; +    } - } +       protected class DSAVerifier   {    inherit Verifier;    constant type = "dsa";       protected void create(string key, Gmp.mpz p, Gmp.mpz q, Gmp.mpz g)    {    pkc = .PKCS.DSA.parse_public_key(key, p, q, g);    } -  -  __deprecated__ Crypto.DSA.State `dsa() { -  return pkc; +    } - } +       #if constant(Crypto.ECC.Curve)   protected class ECDSAVerifier   {    inherit Verifier;    constant type = "ecdsa";       protected void create(string(8bit) key, Identifier curve_id)    {    Crypto.ECC.Curve curve;