[network-manager-openvpn/NETWORKMANAGER_0_7] core: add support for RIPEMD-160 HMAC authentication (bgo #611597) (lp:526690)



commit bb094f7b299496613b7ddfd8a8477a402a3ae319
Author: Jörg Hundertmarck <joerg hundertmarck de>
Date:   Thu Mar 4 18:36:35 2010 -0800

    core: add support for RIPEMD-160 HMAC authentication (bgo #611597) (lp:526690)

 properties/auth-helpers.c |    3 +++
 src/nm-openvpn-service.c  |    3 ++-
 src/nm-openvpn-service.h  |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 6c5ad22..11cfc56 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1032,6 +1032,7 @@ populate_hmacauth_combo (GtkComboBox *box, const char *hmacauth)
 		NM_OPENVPN_AUTH_NONE,
 		NM_OPENVPN_AUTH_MD5,
 		NM_OPENVPN_AUTH_SHA1,
+		NM_OPENVPN_AUTH_RIPEMD160,
 		NULL
 	};
 
@@ -1054,6 +1055,8 @@ 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_RIPEMD160))
+			name = _("RIPEMD-160");
 		else
 			g_assert_not_reached ();
 
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 3a71dab..4546056 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -557,7 +557,8 @@ validate_auth (const char *auth)
 	if (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_SHA1)
+		    || !strcmp (auth, NM_OPENVPN_AUTH_RIPEMD160))
 			return TRUE;
 	}
 	return FALSE;
diff --git a/src/nm-openvpn-service.h b/src/nm-openvpn-service.h
index b8dcb3e..31a532e 100644
--- a/src/nm-openvpn-service.h
+++ b/src/nm-openvpn-service.h
@@ -73,6 +73,7 @@
 #define NM_OPENVPN_AUTH_NONE "none"
 #define NM_OPENVPN_AUTH_MD5  "MD5"
 #define NM_OPENVPN_AUTH_SHA1 "SHA1"
+#define NM_OPENVPN_AUTH_RIPEMD160 "RIPEMD160"
 
 #define NM_OPENVPN_CONTYPE_TLS          "tls"
 #define NM_OPENVPN_CONTYPE_STATIC_KEY   "static-key"



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