Commit a20d9422 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

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: default avatarAndy Polyakov <appro@openssl.org>
(cherry picked from commit 4ec36aff)
parent bf9d61d1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ 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:
            if (EVP_CIPHER_CTX_nid(c) == NID_id_smime_alg_CMS3DESwrap)
                ASN1_TYPE_set(type, V_ASN1_NULL, NULL);
            ret = 1;
            break;