diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2008-07-10 12:47:56 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2008-07-10 12:47:56 +0000 |
commit | eb841c5ef668a48782ef1154fda65cb6048f5885 (patch) | |
tree | 00dd0cb4313bf2291d94ed511fe51f0b4bc7ea7a /src/pluto/alg_info.c | |
parent | 738206039047924ae7e4762a53d121be1ca43000 (diff) | |
download | vyos-strongswan-eb841c5ef668a48782ef1154fda65cb6048f5885.tar.gz vyos-strongswan-eb841c5ef668a48782ef1154fda65cb6048f5885.zip |
- Updated to new upstream.
Diffstat (limited to 'src/pluto/alg_info.c')
-rw-r--r-- | src/pluto/alg_info.c | 12 |
1 files changed, 8 insertions, 4 deletions
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 <stddef.h> @@ -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) |