mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 08:40:50 +02:00
Refactor: remove incorrect check against NULL , passwd and cipher can be NULL
This commit is contained in:
@@ -6351,11 +6351,6 @@ int wolfSSL_PEM_write_PrivateKey(XFILE fp, WOLFSSL_EVP_PKEY* key,
|
||||
err = 1;
|
||||
}
|
||||
|
||||
if ((!err) && ((cipher != NULL) || (passwd != NULL) || (len != 0) ||
|
||||
(cb != NULL) || (arg != NULL))) {
|
||||
WOLFSSL_MSG("PEM private key encryption not supported here");
|
||||
}
|
||||
|
||||
if (!err) {
|
||||
/* Set PEM type based on key type, inverse of PEM_read_PrivateKey. */
|
||||
switch (key->type) {
|
||||
@@ -6394,6 +6389,7 @@ int wolfSSL_PEM_write_PrivateKey(XFILE fp, WOLFSSL_EVP_PKEY* key,
|
||||
fp, type, NULL) != 1)) {
|
||||
err = 1;
|
||||
}
|
||||
|
||||
|
||||
WOLFSSL_LEAVE("wolfSSL_PEM_write_PrivateKey", err);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user