[network-manager-openconnect/NM_0_8: 14/55] Recognise '-----BEGIN PRIVATE KEY-----' as a private key tag



commit 5f846418cf5589da11ec8fb1b64ed125614446a3
Author: David Woodhouse <David Woodhouse intel com>
Date:   Fri Nov 12 16:02:16 2010 +0000

    Recognise '-----BEGIN PRIVATE KEY-----' as a private key tag

 properties/auth-helpers.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index a6bb0dc..b7a8be2 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -168,6 +168,7 @@ find_tag (const char *tag, const char *buf, gsize len)
 
 static const char *pem_rsa_key_begin = "-----BEGIN RSA PRIVATE KEY-----";
 static const char *pem_dsa_key_begin = "-----BEGIN DSA PRIVATE KEY-----";
+static const char *pem_key_begin = "-----BEGIN PRIVATE KEY-----";
 static const char *pem_enc_key_begin = "-----BEGIN ENCRYPTED PRIVATE KEY-----";
 static const char *pem_tss_keyblob_begin = "-----BEGIN TSS KEY BLOB-----";
 static const char *pem_cert_begin = "-----BEGIN CERTIFICATE-----";
@@ -219,6 +220,11 @@ tls_default_filter (const GtkFileFilterInfo *filter_info, gpointer data)
 		goto out;
 	}
 
+	if (find_tag (pem_key_begin, (const char *) contents, bytes_read)) {
+		show = TRUE;
+		goto out;
+	}
+
 	if (find_tag (pem_enc_key_begin, (const char *) contents, bytes_read)) {
 		show = TRUE;
 		goto out;



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