diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-09-23 10:12:36 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-11-08 16:48:10 +0100 |
commit | 5ae3f5cea86fde54d4f52c7da93432992fbc06e3 (patch) | |
tree | 362d0d869f8736fe24ed1eebae12a4946781eb23 /src/libstrongswan/plugins/openssl/openssl_hasher.h | |
parent | a994407d507b7bc57348ae208d24d35e32af3236 (diff) | |
download | strongswan-5ae3f5cea86fde54d4f52c7da93432992fbc06e3.tar.bz2 strongswan-5ae3f5cea86fde54d4f52c7da93432992fbc06e3.tar.xz |
openssl: Add helper to determine EVP_MD from hash_algorithm_t
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_hasher.h')
-rw-r--r-- | src/libstrongswan/plugins/openssl/openssl_hasher.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_hasher.h b/src/libstrongswan/plugins/openssl/openssl_hasher.h index b03f6891b..66b9b505e 100644 --- a/src/libstrongswan/plugins/openssl/openssl_hasher.h +++ b/src/libstrongswan/plugins/openssl/openssl_hasher.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2008 Tobias Brunner - * Hochschule fuer Technik Rapperswil + * Copyright (C) 2008-2017 Tobias Brunner + * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -25,6 +25,8 @@ typedef struct openssl_hasher_t openssl_hasher_t; #include <crypto/hashers/hasher.h> +#include <openssl/evp.h> + /** * Implementation of hashers using OpenSSL. */ @@ -37,6 +39,14 @@ struct openssl_hasher_t { }; /** + * Determine EVP_MD for the given hash algorithm + * + * @param hash hash algorithm + * @return EVP_MD or NULL if not found/supported + */ +const EVP_MD *openssl_get_md(hash_algorithm_t hash); + +/** * Constructor to create openssl_hasher_t. * * @param algo algorithm |