From db67c87db3c9089ea8d2e14f617bf3d9e2af261f Mon Sep 17 00:00:00 2001 From: Rene Mayrhofer Date: Wed, 9 Jul 2008 21:02:41 +0000 Subject: [svn-upgrade] Integrating new upstream version, strongswan (4.2.4) --- src/pluto/alg_info.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/pluto/alg_info.c') diff --git a/src/pluto/alg_info.c b/src/pluto/alg_info.c index 145e492d4..cd02d2358 100644 --- a/src/pluto/alg_info.c +++ b/src/pluto/alg_info.c @@ -12,7 +12,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * - * RCSID $Id: alg_info.c 3253 2007-10-06 21:39:00Z andreas $ + * RCSID $Id: alg_info.c 3846 2008-04-18 17:01:45Z andreas $ */ #include @@ -96,8 +96,8 @@ alg_info_esp_sadb2aa(int sadb_aalg) int auth = 0; switch(sadb_aalg) { - case SADB_AALG_MD5_HMAC: - case SADB_AALG_SHA1_HMAC: + case SADB_AALG_MD5HMAC: + case SADB_AALG_SHA1HMAC: auth = sadb_aalg - 1; break; /* since they are the same ... :) */ @@ -195,7 +195,11 @@ aalg_getbyname_esp(const char *const str, int len) /* interpret 'SHA' as 'SHA1' */ if (strncasecmp("SHA", str, len) == 0) - return enum_search(&auth_alg_names, "AUTH_ALGORITHM_HMAC_SHA1"); + return AUTH_ALGORITHM_HMAC_SHA1; + + /* interpret 'AESXCBC' as 'AES_XCBC_MAC' */ + if (strncasecmp("AESXCBC", str, len) == 0) + return AUTH_ALGORITHM_AES_XCBC_MAC; ret = enum_search_prefix(&auth_alg_names,"AUTH_ALGORITHM_HMAC_", str ,len); if (ret >= 0) -- cgit v1.2.3