aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2009-02-18 19:41:33 +0000
committerTobias Brunner <tobias@strongswan.org>2009-02-18 19:41:33 +0000
commitb8fa437fb74ff57a3983356af85bc90ff24d1259 (patch)
tree25e7edb0a604247ac3ac3168d59364c9f7efb180
parentd2ac1443d39331df9e559a7a681b5a7cf68465d3 (diff)
downloadstrongswan-b8fa437fb74ff57a3983356af85bc90ff24d1259.tar.bz2
strongswan-b8fa437fb74ff57a3983356af85bc90ff24d1259.tar.xz
adding MD4 and DES (ECB) to openssl plugin
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_crypter.c3
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_hasher.c3
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_plugin.c4
3 files changed, 9 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_crypter.c b/src/libstrongswan/plugins/openssl/openssl_crypter.c
index fafe23850..6d4de2698 100644
--- a/src/libstrongswan/plugins/openssl/openssl_crypter.c
+++ b/src/libstrongswan/plugins/openssl/openssl_crypter.c
@@ -224,6 +224,9 @@ openssl_crypter_t *openssl_crypter_create(encryption_algorithm_t algo,
return NULL;
}
break;
+ case ENCR_DES_ECB:
+ this->cipher = EVP_des_ecb();
+ break;
default:
{
char* name = lookup_algorithm(encryption_algs, algo, &key_size);
diff --git a/src/libstrongswan/plugins/openssl/openssl_hasher.c b/src/libstrongswan/plugins/openssl/openssl_hasher.c
index b70b9da9b..b819b6a15 100644
--- a/src/libstrongswan/plugins/openssl/openssl_hasher.c
+++ b/src/libstrongswan/plugins/openssl/openssl_hasher.c
@@ -69,7 +69,8 @@ static openssl_algorithm_t integrity_algs[] = {
{HASH_SHA1, "sha1"},
{HASH_SHA256, "sha256"},
{HASH_SHA384, "sha384"},
- {HASH_SHA512, "sha512"},
+ {HASH_SHA512, "sha512"},
+ {HASH_MD4, "md4"},
{END_OF_LIST, NULL},
};
diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c
index 952697b60..26f8e27a4 100644
--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
+++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
@@ -226,6 +226,8 @@ plugin_t *plugin_create()
(crypter_constructor_t)openssl_crypter_create);
lib->crypto->add_crypter(lib->crypto, ENCR_DES,
(crypter_constructor_t)openssl_crypter_create);
+ lib->crypto->add_crypter(lib->crypto, ENCR_DES_ECB,
+ (crypter_constructor_t)openssl_crypter_create);
lib->crypto->add_crypter(lib->crypto, ENCR_NULL,
(crypter_constructor_t)openssl_crypter_create);
@@ -234,6 +236,8 @@ plugin_t *plugin_create()
(hasher_constructor_t)openssl_hasher_create);
lib->crypto->add_hasher(lib->crypto, HASH_MD2,
(hasher_constructor_t)openssl_hasher_create);
+ lib->crypto->add_hasher(lib->crypto, HASH_MD4,
+ (hasher_constructor_t)openssl_hasher_create);
lib->crypto->add_hasher(lib->crypto, HASH_MD5,
(hasher_constructor_t)openssl_hasher_create);
lib->crypto->add_hasher(lib->crypto, HASH_SHA256,