[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Dr. Stephen Henson steve at openssl.org
Tue Oct 13 22:03:16 UTC 2015


The branch OpenSSL_1_0_2-stable has been updated
       via  a20d9422cf7a516cd576be8f91fe90738459ef42 (commit)
      from  bf9d61d1abfc4d36562aa799cd9dc59c7bb46e57 (commit)


- Log -----------------------------------------------------------------
commit a20d9422cf7a516cd576be8f91fe90738459ef42
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Mon Oct 12 21:14:04 2015 +0100

    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 at openssl.org>
    (cherry picked from commit 4ec36aff2a3c221b640dafa56ac838312e6724f4)

-----------------------------------------------------------------------

Summary of changes:
 crypto/evp/evp_lib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c
index d2c9ae4..7e0bab9 100644
--- a/crypto/evp/evp_lib.c
+++ b/crypto/evp/evp_lib.c
@@ -74,7 +74,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;
 


More information about the openssl-commits mailing list