projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PR: 1943
[oweals/openssl.git]
/
crypto
/
pkcs12
/
p12_crpt.c
diff --git
a/crypto/pkcs12/p12_crpt.c
b/crypto/pkcs12/p12_crpt.c
index bbc13e50dd9f068cf008ee6c72932e1851159faa..f8b952e27eedb8c7ff711c4aa149b8984e7c2ee7 100644
(file)
--- a/
crypto/pkcs12/p12_crpt.c
+++ b/
crypto/pkcs12/p12_crpt.c
@@
-1,5
+1,5
@@
/* p12_crpt.c */
/* p12_crpt.c */
-/* Written by Dr Stephen N Henson (s
henson@bigfoot.com
) for the OpenSSL
+/* Written by Dr Stephen N Henson (s
teve@openssl.org
) for the OpenSSL
* project 1999.
*/
/* ====================================================================
* project 1999.
*/
/* ====================================================================
@@
-94,9
+94,14
@@
int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH];
/* Extract useful info from parameter */
unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH];
/* Extract useful info from parameter */
+ if (param == NULL || param->type != V_ASN1_SEQUENCE ||
+ param->value.sequence == NULL) {
+ PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN,PKCS12_R_DECODE_ERROR);
+ return 0;
+ }
+
pbuf = param->value.sequence->data;
pbuf = param->value.sequence->data;
- if (!param || (param->type != V_ASN1_SEQUENCE) ||
- !(pbe = d2i_PBEPARAM (NULL, &pbuf, param->value.sequence->length))) {
+ if (!(pbe = d2i_PBEPARAM(NULL, &pbuf, param->value.sequence->length))) {
PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN,PKCS12_R_DECODE_ERROR);
return 0;
}
PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN,PKCS12_R_DECODE_ERROR);
return 0;
}