diff options
author | Martin Willi <martin@revosec.ch> | 2010-08-13 16:08:25 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-08-13 17:11:54 +0200 |
commit | c03b0d7e6bd2e23fe2f219103ce52cdff629bea7 (patch) | |
tree | cb6825727a81d91fa70001faf39a344c9a91f957 /src/libstrongswan | |
parent | c7776e0aa804789cf33c4c491be4d31211efd910 (diff) | |
download | strongswan-c03b0d7e6bd2e23fe2f219103ce52cdff629bea7.tar.bz2 strongswan-c03b0d7e6bd2e23fe2f219103ce52cdff629bea7.tar.xz |
Added support for Camellia cipher to xcbc
Diffstat (limited to 'src/libstrongswan')
-rw-r--r-- | src/libstrongswan/plugins/xcbc/xcbc_plugin.c | 12 | ||||
-rw-r--r-- | src/libstrongswan/plugins/xcbc/xcbc_prf.c | 3 | ||||
-rw-r--r-- | src/libstrongswan/plugins/xcbc/xcbc_signer.c | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/src/libstrongswan/plugins/xcbc/xcbc_plugin.c b/src/libstrongswan/plugins/xcbc/xcbc_plugin.c index 57be90a93..8c25a5ecf 100644 --- a/src/libstrongswan/plugins/xcbc/xcbc_plugin.c +++ b/src/libstrongswan/plugins/xcbc/xcbc_plugin.c @@ -36,9 +36,9 @@ METHOD(plugin_t, destroy, void, private_xcbc_plugin_t *this) { lib->crypto->remove_prf(lib->crypto, - (prf_constructor_t)xcbc_prf_create); + (prf_constructor_t)xcbc_prf_create); lib->crypto->remove_signer(lib->crypto, - (signer_constructor_t)xcbc_signer_create); + (signer_constructor_t)xcbc_signer_create); free(this); } @@ -54,9 +54,13 @@ plugin_t *xcbc_plugin_create() ); lib->crypto->add_prf(lib->crypto, PRF_AES128_XCBC, - (prf_constructor_t)xcbc_prf_create); + (prf_constructor_t)xcbc_prf_create); + lib->crypto->add_prf(lib->crypto, PRF_CAMELLIA128_XCBC, + (prf_constructor_t)xcbc_prf_create); lib->crypto->add_signer(lib->crypto, AUTH_AES_XCBC_96, - (signer_constructor_t)xcbc_signer_create); + (signer_constructor_t)xcbc_signer_create); + lib->crypto->add_signer(lib->crypto, AUTH_CAMELLIA_XCBC_96, + (signer_constructor_t)xcbc_signer_create); return &this->public.plugin; } diff --git a/src/libstrongswan/plugins/xcbc/xcbc_prf.c b/src/libstrongswan/plugins/xcbc/xcbc_prf.c index c661ce6c6..33a6c4baf 100644 --- a/src/libstrongswan/plugins/xcbc/xcbc_prf.c +++ b/src/libstrongswan/plugins/xcbc/xcbc_prf.c @@ -94,6 +94,9 @@ xcbc_prf_t *xcbc_prf_create(pseudo_random_function_t algo) case PRF_AES128_XCBC: xcbc = xcbc_create(ENCR_AES_CBC, 16); break; + case PRF_CAMELLIA128_XCBC: + xcbc = xcbc_create(ENCR_CAMELLIA_CBC, 16); + break; default: return NULL; } diff --git a/src/libstrongswan/plugins/xcbc/xcbc_signer.c b/src/libstrongswan/plugins/xcbc/xcbc_signer.c index 01f5a19b6..ad7e2f4e9 100644 --- a/src/libstrongswan/plugins/xcbc/xcbc_signer.c +++ b/src/libstrongswan/plugins/xcbc/xcbc_signer.c @@ -131,6 +131,10 @@ xcbc_signer_t *xcbc_signer_create(integrity_algorithm_t algo) xcbc = xcbc_create(ENCR_AES_CBC, 16); trunc = 12; break; + case AUTH_CAMELLIA_XCBC_96: + xcbc = xcbc_create(ENCR_CAMELLIA_CBC, 16); + trunc = 12; + break; default: return NULL; } |