Set password to NULL instead of empty string "" so GNU TLS assumes it is not
encrypted.edge.strict_endians
parent
3b7afbc6f6
commit
d0dd037463
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue