diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-10-12 21:14:04 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-10-13 22:57:47 +0100 |
commit | 4ec36aff2a3c221b640dafa56ac838312e6724f4 (patch) | |
tree | 9d103e191ac760406a4cf0c40566dabd2716b011 /crypto | |
parent | 6220acf887546709bfd583dea4fccffc95da99fc (diff) |
RFC5753 compliance.
RFC5753 requires that we omit parameters for AES key wrap and set them
to NULL for 3DES wrap. OpenSSL decrypt uses the received algorithm
parameters so can transparently handle either form.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/evp_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index 5ee3dcb700..319eede5ac 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -70,7 +70,8 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type) else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) { switch (EVP_CIPHER_CTX_mode(c)) { case EVP_CIPH_WRAP_MODE: - ASN1_TYPE_set(type, V_ASN1_NULL, NULL); + if (EVP_CIPHER_CTX_nid(c) == NID_id_smime_alg_CMS3DESwrap) + ASN1_TYPE_set(type, V_ASN1_NULL, NULL); ret = 1; break; |