adding MD4 and DES (ECB) to openssl plugin
authorTobias Brunner <tobias@strongswan.org>
Wed, 18 Feb 2009 19:41:33 +0000 (19:41 -0000)
committerTobias Brunner <tobias@strongswan.org>
Wed, 18 Feb 2009 19:41:33 +0000 (19:41 -0000)
src/libstrongswan/plugins/openssl/openssl_crypter.c
src/libstrongswan/plugins/openssl/openssl_hasher.c
src/libstrongswan/plugins/openssl/openssl_plugin.c

index fafe238..6d4de26 100644 (file)
@@ -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);
index b70b9da..b819b6a 100644 (file)
@@ -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},
 };
 
index 952697b..26f8e27 100644 (file)
@@ -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,