[network-manager-openvpn] core: add more HMAC authentication algorithms (bgo #611866)



commit 35d3319e021b0e18a380d9a2346d731509e787a4
Author: Huzaifa S. Sidhpurwala <huzaifas redhat com>
Date:   Fri Mar 5 22:50:09 2010 -0800

    core: add more HMAC authentication algorithms (bgo #611866)

 properties/auth-helpers.c |   12 ++++++++++++
 src/nm-openvpn-service.c  |    4 ++++
 src/nm-openvpn-service.h  |    4 ++++
 3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 11cfc56..ba6b0fe 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1032,6 +1032,10 @@ populate_hmacauth_combo (GtkComboBox *box, const char *hmacauth)
 		NM_OPENVPN_AUTH_NONE,
 		NM_OPENVPN_AUTH_MD5,
 		NM_OPENVPN_AUTH_SHA1,
+		NM_OPENVPN_AUTH_SHA224,
+		NM_OPENVPN_AUTH_SHA256,
+		NM_OPENVPN_AUTH_SHA384,
+		NM_OPENVPN_AUTH_SHA512,
 		NM_OPENVPN_AUTH_RIPEMD160,
 		NULL
 	};
@@ -1055,6 +1059,14 @@ populate_hmacauth_combo (GtkComboBox *box, const char *hmacauth)
 			name = _("MD-5");
 		else if (!strcmp (*item, NM_OPENVPN_AUTH_SHA1))
 			name = _("SHA-1");
+		else if (!strcmp (*item, NM_OPENVPN_AUTH_SHA224))
+			name = _("SHA-224");
+		else if (!strcmp (*item, NM_OPENVPN_AUTH_SHA256))
+			name = _("SHA-256");
+		else if (!strcmp (*item, NM_OPENVPN_AUTH_SHA384))
+			name = _("SHA-384");
+		else if (!strcmp (*item, NM_OPENVPN_AUTH_SHA512))
+			name = _("SHA-512");
 		else if (!strcmp (*item, NM_OPENVPN_AUTH_RIPEMD160))
 			name = _("RIPEMD-160");
 		else
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 4546056..e1e21ba 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -558,6 +558,10 @@ validate_auth (const char *auth)
 		if (   !strcmp (auth, NM_OPENVPN_AUTH_NONE)
 		    || !strcmp (auth, NM_OPENVPN_AUTH_MD5)
 		    || !strcmp (auth, NM_OPENVPN_AUTH_SHA1)
+		    || !strcmp (auth, NM_OPENVPN_AUTH_SHA224)
+		    || !strcmp (auth, NM_OPENVPN_AUTH_SHA256)
+		    || !strcmp (auth, NM_OPENVPN_AUTH_SHA384)
+		    || !strcmp (auth, NM_OPENVPN_AUTH_SHA512)
 		    || !strcmp (auth, NM_OPENVPN_AUTH_RIPEMD160))
 			return TRUE;
 	}
diff --git a/src/nm-openvpn-service.h b/src/nm-openvpn-service.h
index 31a532e..f9678f1 100644
--- a/src/nm-openvpn-service.h
+++ b/src/nm-openvpn-service.h
@@ -73,6 +73,10 @@
 #define NM_OPENVPN_AUTH_NONE "none"
 #define NM_OPENVPN_AUTH_MD5  "MD5"
 #define NM_OPENVPN_AUTH_SHA1 "SHA1"
+#define NM_OPENVPN_AUTH_SHA224 "SHA224"
+#define NM_OPENVPN_AUTH_SHA256 "SHA256"
+#define NM_OPENVPN_AUTH_SHA384 "SHA384"
+#define NM_OPENVPN_AUTH_SHA512 "SHA512"
 #define NM_OPENVPN_AUTH_RIPEMD160 "RIPEMD160"
 
 #define NM_OPENVPN_CONTYPE_TLS          "tls"



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