Set password to NULL instead of empty string "" so GNU TLS assumes it is not

encrypted.
edge.strict_endians
antona 2005-08-06 06:11:56 +00:00
parent 3b7afbc6f6
commit d0dd037463
1 changed files with 5 additions and 1 deletions

View File

@ -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) {