Skip to content

Commit 00ffde8

Browse files
committed
Refactor: remove incorrect check against NULL , passwd and cipher can be NULL
1 parent b49b886 commit 00ffde8

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/pk.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6234,11 +6234,6 @@ int wolfSSL_PEM_write_PrivateKey(XFILE fp, WOLFSSL_EVP_PKEY* key,
62346234
err = 1;
62356235
}
62366236

6237-
if ((!err) && ((cipher != NULL) || (passwd != NULL) || (len != 0) ||
6238-
(cb != NULL) || (arg != NULL))) {
6239-
WOLFSSL_MSG("PEM private key encryption not supported here");
6240-
}
6241-
62426237
if (!err) {
62436238
/* Set PEM type based on key type, inverse of PEM_read_PrivateKey. */
62446239
switch (key->type) {
@@ -6277,6 +6272,7 @@ int wolfSSL_PEM_write_PrivateKey(XFILE fp, WOLFSSL_EVP_PKEY* key,
62776272
fp, type, NULL) != 1)) {
62786273
err = 1;
62796274
}
6275+
62806276

62816277
WOLFSSL_LEAVE("wolfSSL_PEM_write_PrivateKey", err);
62826278

0 commit comments

Comments
 (0)