Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32074
Modified Files:
ntfsdecrypt.c
Log Message:
Set password to NULL instead of empty string "" so GNU TLS assumes it is not
encrypted.
Index: ntfsdecrypt.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsdecrypt.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- ntfsdecrypt.c 5 Aug 2005 23:41:52 -0000 1.9
+++ ntfsdecrypt.c 6 Aug 2005 06:11:56 -0000 1.10
@@ -1139,10 +1139,14 @@ int main(int argc, char *argv[])
ntfs_crypto_deinit();
return 1;
}
+ /* If password is empty string set it to NULL. */
+ if (!strlen(password))
+ password = NULL;
/* Obtain the user's private RSA key from the key file. */
rsa_key = ntfs_pkcs12_extract_rsa_key(pfx_buf, pfx_size, password);
/* Destroy the password. */
- memset(password, 0, strlen(password));
+ if (password)
+ memset(password, 0, strlen(password));
/* No longer need the pfx file contents. */
free(pfx_buf);
if (!rsa_key) {
|