Loading CHANGES +5 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,11 @@ Changes between 0.9.8a and 0.9.9 [xx XXX xxxx] *) Remove algorithm specific dependencies when setting PKCS7_SIGNER_INFO structures for PKCS7_sign(). They are now set up by the relevant public key ASN1 method. [Steve Henson] *) Add provisional EC pkey method with support for ECDSA and ECDH. [Steve Henson] Loading crypto/asn1/ameth_lib.c +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, } void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, void (*pkey_ctrl)(EVP_PKEY *pkey, int op, int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2)) { ameth->pkey_ctrl = pkey_ctrl; Loading crypto/asn1/asn1_locl.h +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ struct evp_pkey_asn1_method_st ASN1_PCTX *pctx); void (*pkey_free)(EVP_PKEY *pkey); void (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2); int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2); /* Legacy functions for old PEM */ Loading crypto/dsa/dsa_ameth.c +24 −1 Original line number Diff line number Diff line Loading @@ -528,6 +528,29 @@ static int old_dsa_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) return i2d_DSAPrivateKey(pkey->pkey.dsa, pder); } static int dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) { switch (op) { case ASN1_PKEY_CTRL_PKCS7_SIGN: if (arg1 == 0) { X509_ALGOR *alg1, *alg2; PKCS7_SIGNER_INFO_get0_algs(arg2, NULL, &alg1, &alg2); X509_ALGOR_set0(alg1, OBJ_nid2obj(NID_sha1), V_ASN1_NULL, 0); X509_ALGOR_set0(alg2, OBJ_nid2obj(NID_dsaWithSHA1), V_ASN1_UNDEF, 0); } return 1; default: return -2; } } /* NB these are sorted in pkey_id order, lowest first */ const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[] = Loading Loading @@ -585,7 +608,7 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[] = dsa_param_print, int_dsa_free, 0, dsa_pkey_ctrl, old_dsa_priv_decode, old_dsa_priv_encode } Loading crypto/ec/ec_ameth.c +24 −1 Original line number Diff line number Diff line Loading @@ -570,6 +570,29 @@ static int old_ec_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) return i2d_ECPrivateKey(pkey->pkey.ec, pder); } static int ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) { switch (op) { case ASN1_PKEY_CTRL_PKCS7_SIGN: if (arg1 == 0) { X509_ALGOR *alg1, *alg2; PKCS7_SIGNER_INFO_get0_algs(arg2, NULL, &alg1, &alg2); X509_ALGOR_set0(alg1, OBJ_nid2obj(NID_sha1), V_ASN1_NULL, 0); X509_ALGOR_set0(alg2, OBJ_nid2obj(NID_ecdsa_with_SHA1), V_ASN1_NULL, 0); } return 1; default: return -2; } } EVP_PKEY_ASN1_METHOD eckey_asn1_meth = { EVP_PKEY_EC, Loading Loading @@ -598,7 +621,7 @@ EVP_PKEY_ASN1_METHOD eckey_asn1_meth = eckey_param_print, int_ec_free, 0, ec_pkey_ctrl, old_ec_priv_decode, old_ec_priv_encode }; Loading
CHANGES +5 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,11 @@ Changes between 0.9.8a and 0.9.9 [xx XXX xxxx] *) Remove algorithm specific dependencies when setting PKCS7_SIGNER_INFO structures for PKCS7_sign(). They are now set up by the relevant public key ASN1 method. [Steve Henson] *) Add provisional EC pkey method with support for ECDSA and ECDH. [Steve Henson] Loading
crypto/asn1/ameth_lib.c +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, } void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, void (*pkey_ctrl)(EVP_PKEY *pkey, int op, int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2)) { ameth->pkey_ctrl = pkey_ctrl; Loading
crypto/asn1/asn1_locl.h +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ struct evp_pkey_asn1_method_st ASN1_PCTX *pctx); void (*pkey_free)(EVP_PKEY *pkey); void (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2); int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2); /* Legacy functions for old PEM */ Loading
crypto/dsa/dsa_ameth.c +24 −1 Original line number Diff line number Diff line Loading @@ -528,6 +528,29 @@ static int old_dsa_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) return i2d_DSAPrivateKey(pkey->pkey.dsa, pder); } static int dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) { switch (op) { case ASN1_PKEY_CTRL_PKCS7_SIGN: if (arg1 == 0) { X509_ALGOR *alg1, *alg2; PKCS7_SIGNER_INFO_get0_algs(arg2, NULL, &alg1, &alg2); X509_ALGOR_set0(alg1, OBJ_nid2obj(NID_sha1), V_ASN1_NULL, 0); X509_ALGOR_set0(alg2, OBJ_nid2obj(NID_dsaWithSHA1), V_ASN1_UNDEF, 0); } return 1; default: return -2; } } /* NB these are sorted in pkey_id order, lowest first */ const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[] = Loading Loading @@ -585,7 +608,7 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[] = dsa_param_print, int_dsa_free, 0, dsa_pkey_ctrl, old_dsa_priv_decode, old_dsa_priv_encode } Loading
crypto/ec/ec_ameth.c +24 −1 Original line number Diff line number Diff line Loading @@ -570,6 +570,29 @@ static int old_ec_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) return i2d_ECPrivateKey(pkey->pkey.ec, pder); } static int ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) { switch (op) { case ASN1_PKEY_CTRL_PKCS7_SIGN: if (arg1 == 0) { X509_ALGOR *alg1, *alg2; PKCS7_SIGNER_INFO_get0_algs(arg2, NULL, &alg1, &alg2); X509_ALGOR_set0(alg1, OBJ_nid2obj(NID_sha1), V_ASN1_NULL, 0); X509_ALGOR_set0(alg2, OBJ_nid2obj(NID_ecdsa_with_SHA1), V_ASN1_NULL, 0); } return 1; default: return -2; } } EVP_PKEY_ASN1_METHOD eckey_asn1_meth = { EVP_PKEY_EC, Loading Loading @@ -598,7 +621,7 @@ EVP_PKEY_ASN1_METHOD eckey_asn1_meth = eckey_param_print, int_ec_free, 0, ec_pkey_ctrl, old_ec_priv_decode, old_ec_priv_encode };