projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8720a1
)
Fix NSS PBKDF2 in the v4 salt (i.e. empty salt) case
author
Greg Hudson
<ghudson@mit.edu>
Fri, 11 Mar 2011 17:47:21 +0000
(17:47 +0000)
committer
Greg Hudson
<ghudson@mit.edu>
Fri, 11 Mar 2011 17:47:21 +0000
(17:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24700
dc483132
-0cff-0310-8789-
dd5450dbe970
src/lib/crypto/nss/pbkdf2.c
patch
|
blob
|
history
diff --git
a/src/lib/crypto/nss/pbkdf2.c
b/src/lib/crypto/nss/pbkdf2.c
index 9a0d4fd6691b1ddc02ee168e87e81fc48b0a882f..10272c8d2a68551d0a4fe660cf98e2cb52afd52e 100644
(file)
--- a/
src/lib/crypto/nss/pbkdf2.c
+++ b/
src/lib/crypto/nss/pbkdf2.c
@@
-62,8
+62,9
@@
krb5int_pbkdf2_hmac_sha1(const krb5_data *out, unsigned long count,
if (slot == NULL)
return k5_nss_map_last_error();
+ /* NSS treats a null saltItem.data as a request for a random salt. */
saltItem.type = siBuffer;
- saltItem.data = (unsigned char *)salt->data;
+ saltItem.data = (
salt->data == NULL) ? "" : (
unsigned char *)salt->data;
saltItem.len = salt->length;
/* PKCS 5 was designed to be DER encoded. Algid's carry all the