aboutsummaryrefslogtreecommitdiff
path: root/crypto/pkcs12/p12_key.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-01-14 14:07:10 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-01-14 14:07:10 +0000
commit6308af199d97d1163d4317557e2d655d7aa211ae (patch)
treeb51511bb05522efb3853cad6b75f4a4332cc5ba1 /crypto/pkcs12/p12_key.c
parent8e5b6314ef3dd6de9188614ff356c0388fc37134 (diff)
downloadopenssl-6308af199d97d1163d4317557e2d655d7aa211ae.zip
openssl-6308af199d97d1163d4317557e2d655d7aa211ae.tar.gz
openssl-6308af199d97d1163d4317557e2d655d7aa211ae.tar.bz2
Change PKCS#12 key derivation routines to cope with
non null terminated passwords.
Diffstat (limited to 'crypto/pkcs12/p12_key.c')
-rw-r--r--crypto/pkcs12/p12_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pkcs12/p12_key.c b/crypto/pkcs12/p12_key.c
index b042dcf..a9b4b8c 100644
--- a/crypto/pkcs12/p12_key.c
+++ b/crypto/pkcs12/p12_key.c
@@ -84,7 +84,7 @@ int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt,
if(!pass) {
unipass = NULL;
uniplen = 0;
- } else if (!asc2uni(pass, &unipass, &uniplen)) {
+ } else if (!asc2uni(pass, passlen, &unipass, &uniplen)) {
PKCS12err(PKCS12_F_PKCS12_KEY_GEN_ASC,ERR_R_MALLOC_FAILURE);
return 0;
}