[PATCH 3/3] openssl: Support unencrypted PKCS#8 private keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is verified working with the output from
"openssl pkcs12 -in foo.p12 -nodes" (v1.0.1).

Signed-off-by: Kevin Cernekee <cernekee at gmail.com>
---
 openssl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/openssl.c b/openssl.c
index 67432d9..39db88e 100644
--- a/openssl.c
+++ b/openssl.c
@@ -761,7 +761,8 @@ static int load_certificate(struct openconnect_info *vpninfo)
 				break;
 			} else if (!strcmp(buf, "-----BEGIN RSA PRIVATE KEY-----\n") ||
 				   !strcmp(buf, "-----BEGIN DSA PRIVATE KEY-----\n") ||
-				   !strcmp(buf, "-----BEGIN ENCRYPTED PRIVATE KEY-----\n")) {
+				   !strcmp(buf, "-----BEGIN ENCRYPTED PRIVATE KEY-----\n") ||
+				   !strcmp(buf, "-----BEGIN PRIVATE KEY-----\n")) {
 				vpninfo->cert_type = CERT_TYPE_PEM;
 				break;
 			}
-- 
1.7.9.5




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux