Fix for EVP_PBE_alg_add().
authorDr. Stephen Henson <steve@openssl.org>
Fri, 27 Jun 2014 21:56:37 +0000 (22:56 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 27 Jun 2014 21:59:13 +0000 (22:59 +0100)
In EVP_PBE_alg_add don't use the underlying NID for the cipher
as it may have a non-standard key size.

PR#3206
(cherry picked from commit efb7caef637a1de8468ca109efd355a9d0e73a45)

crypto/evp/evp_pbe.c

index c9d932d2053a204883f8ded317c6d7435788aabe..aa67ab39319ea32b923f60e636efe56ebac10360 100644 (file)
@@ -254,7 +254,7 @@ int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
        {
        int cipher_nid, md_nid;
        if (cipher)
-               cipher_nid = EVP_CIPHER_type(cipher);
+               cipher_nid = EVP_CIPHER_nid(cipher);
        else
                cipher_nid = -1;
        if (md)