svn rev #24700: trunk/src/lib/crypto/nss/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Mar 11 12:47:21 EST 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=24700
Commit By: ghudson
Log Message:
Fix NSS PBKDF2 in the v4 salt (i.e. empty salt) case.
Changed Files:
U trunk/src/lib/crypto/nss/pbkdf2.c
Modified: trunk/src/lib/crypto/nss/pbkdf2.c
===================================================================
--- trunk/src/lib/crypto/nss/pbkdf2.c 2011-03-11 04:20:17 UTC (rev 24699)
+++ trunk/src/lib/crypto/nss/pbkdf2.c 2011-03-11 17:47:21 UTC (rev 24700)
@@ -62,8 +62,9 @@
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
More information about the cvs-krb5
mailing list