diff options
Diffstat (limited to 'crypto/evp/p5_crpt.c')
-rw-r--r-- | crypto/evp/p5_crpt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/evp/p5_crpt.c b/crypto/evp/p5_crpt.c index d06ab90a3e..921006caeb 100644 --- a/crypto/evp/p5_crpt.c +++ b/crypto/evp/p5_crpt.c @@ -82,7 +82,6 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, PBEPARAM *pbe; int saltlen, iter; unsigned char *salt; - const unsigned char *pbuf; int mdsize; int rv = 0; EVP_MD_CTX_init(&ctx); @@ -94,8 +93,8 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, return 0; } - pbuf = param->value.sequence->data; - if (!(pbe = d2i_PBEPARAM(NULL, &pbuf, param->value.sequence->length))) { + pbe = ASN1_TYPE_unpack_sequence(ASN1_ITEM_rptr(PBEPARAM), param); + if (pbe == NULL) { EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN, EVP_R_DECODE_ERROR); return 0; } |