Branch: Tag:

2014-02-21

2014-02-21 15:52:01 by Martin Nilsson <nilsson@opera.com>

With not only RSA certificates working, and the API made cipher-agnostic, there is no need to access crypto primitives directly. Deprecate the direct access (though it appears the neither prototypes nor getters/setters can actually use deprecation attributes).

99:   class Verifier {    constant type = "none";    Crypto.Sign pkc; -  optional Crypto.RSA rsa; -  optional Crypto.DSA dsa; - #if constant(Crypto.ECC.Curve) -  optional Crypto.ECC.SECP_521R1.ECDSA ecdsa; - #endif +  optional /* __deprecated__ */ Crypto.RSA rsa; +  optional /* __deprecated__ */ Crypto.DSA dsa;       //! Verifies the @[signature] of the certificate @[msg] using the    //! indicated hash @[algorithm].
130:    pkc = RSA.parse_public_key(key);    }    -  Crypto.RSA `rsa() { return [object(Crypto.RSA)]pkc; } +  __deprecated__ Crypto.RSA `rsa() { return [object(Crypto.RSA)]pkc; }   }      protected class DSAVerifier
143:    pkc = DSA.parse_public_key(key, p, q, g);    }    -  Crypto.DSA `dsa() { return [object(Crypto.DSA)]pkc; } +  __deprecated__ Crypto.DSA `dsa() { return [object(Crypto.DSA)]pkc; }   }      #if constant(Crypto.ECC.Curve)
165: Inside #if constant(Crypto.ECC.Curve)
   DBG("ECC Curve: %O (DER: %O)\n", curve, curve_der);    pkc = curve->ECDSA()->set_public_key(key);    } -  -  Crypto.ECC.SECP_521R1.ECDSA `ecdsa() -  { -  return [object(Crypto.ECC.SECP_521R1.ECDSA)]pkc; +    } - } +    #endif      protected Verifier make_verifier(Object _keyinfo)