support of AES_XCBC and CAMELLIA ESP cipher by pluto

This commit is contained in:
Andreas Steffen
2008-04-18 17:01:45 +00:00
parent 855c9a9089
commit 1da277f045
4 changed files with 65 additions and 72 deletions
+7 -3
View File
@@ -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)