Skip to content

Commit 99b778d

Browse files
committed
conf: fix support for private key PEM files other than PKCS#8
The Mbed TLS bug being worked around (Mbed-TLS/mbedtls#3896) affects _all_ PEM inputs. `conf_set_pem` only applied the workaround to certificates and PKCS#8 encoded keys.
1 parent 509717f commit 99b778d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

common/commandline.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ void conf_set_pem(const struct storage_parse_info *info, void *raw_dest, const v
303303
ret < 0 ? strerror(errno) : "Short read");
304304
dest->iov_len = ret;
305305
if (strstr(dest_str, "-----BEGIN CERTIFICATE-----") ||
306-
strstr(dest_str, "-----BEGIN PRIVATE KEY-----"))
306+
strstr(dest_str, "-----BEGIN PRIVATE KEY-----") ||
307+
strstr(dest_str, "-----BEGIN EC PRIVATE KEY-----") ||
308+
strstr(dest_str, "-----BEGIN RSA PRIVATE KEY-----"))
307309
dest->iov_len++;
308310
close(fd);
309311
}

0 commit comments

Comments
 (0)