From a78568b7e9c2759a5dfc70eddf9a0d4eee451266 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 27 Apr 2006 18:20:34 +0000 Subject: Replace RSA specific PKCS7_RECIP_INFO set up with an public key algorithm ctrl. --- crypto/rsa/rsa_ameth.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crypto/rsa/rsa_ameth.c') diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index 1f913d79dc..917b376caa 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -266,6 +266,7 @@ static int rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) { switch (op) { + case ASN1_PKEY_CTRL_PKCS7_SIGN: if (arg1 == 0) { @@ -276,6 +277,16 @@ static int rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) } return 1; + case ASN1_PKEY_CTRL_PKCS7_ENCRYPT: + if (arg1 == 0) + { + X509_ALGOR *alg; + PKCS7_RECIP_INFO_get0_alg(arg2, &alg); + X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaEncryption), + V_ASN1_NULL, 0); + } + return 1; + default: return -2; -- cgit v1.2.3