diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-03-12 21:14:28 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-03-12 21:14:28 +0000 |
commit | 8931b30d8478b0bd24af251fac64e7b0bf121369 (patch) | |
tree | 04d17028c745633b40b997699bc580c7b4cc600d /crypto/rsa/rsa_ameth.c | |
parent | 27dc105f51361fc71f556e927f621218883b0c26 (diff) |
And so it begins...
Initial support for CMS.
Add zlib compression BIO.
Add AES key wrap implementation.
Generalize S/MIME MIME code to support CMS and/or PKCS7.
Diffstat (limited to 'crypto/rsa/rsa_ameth.c')
-rw-r--r-- | crypto/rsa/rsa_ameth.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index a1e717f6c9..39fa9ec104 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -61,6 +61,9 @@ #include <openssl/asn1t.h> #include <openssl/x509.h> #include <openssl/rsa.h> +#ifndef OPENSSL_NO_CMS +#include <openssl/cms.h> +#endif #include "asn1_locl.h" static int rsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) @@ -286,6 +289,17 @@ static int rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) V_ASN1_NULL, 0); } return 1; +#ifndef OPENSSL_NO_CMS + case ASN1_PKEY_CTRL_CMS_SIGN: + if (arg1 == 0) + { + X509_ALGOR *alg; + CMS_SignerInfo_get0_algs(arg2, NULL, NULL, NULL, &alg); + X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaEncryption), + V_ASN1_NULL, 0); + } + return 1; +#endif case ASN1_PKEY_CTRL_DEFAULT_MD_NID: *(int *)arg2 = NID_sha1; |