projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix ABI break with HMAC
[oweals/openssl.git]
/
crypto
/
pkcs12
/
p12_crpt.c
diff --git
a/crypto/pkcs12/p12_crpt.c
b/crypto/pkcs12/p12_crpt.c
index 3a166e6130036573e0bcf1b74cb26790132773ae..08be40c61ffd486703e5f371cd1c4423af3174d8 100644
(file)
--- a/
crypto/pkcs12/p12_crpt.c
+++ b/
crypto/pkcs12/p12_crpt.c
@@
-58,7
+58,7
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
-#include "cryptlib.h"
+#include "
internal/
cryptlib.h"
#include <openssl/pkcs12.h>
/* PKCS#12 PBE algorithms now in static table */
#include <openssl/pkcs12.h>
/* PKCS#12 PBE algorithms now in static table */
@@
-74,18
+74,12
@@
int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
PBEPARAM *pbe;
int saltlen, iter, ret;
unsigned char *salt;
PBEPARAM *pbe;
int saltlen, iter, ret;
unsigned char *salt;
- const unsigned char *pbuf;
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;
- }
- pb
uf = param->value.sequence->data
;
- if (
!(pbe = d2i_PBEPARAM(NULL, &pbuf, param->value.sequence->length))
) {
+ pb
e = ASN1_TYPE_unpack_sequence(ASN1_ITEM_rptr(PBEPARAM), param)
;
+ if (
pbe == NULL
) {
PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN, PKCS12_R_DECODE_ERROR);
return 0;
}
PKCS12err(PKCS12_F_PKCS12_PBE_KEYIVGEN, PKCS12_R_DECODE_ERROR);
return 0;
}