diff options
author | Tobias Brunner <tobias@strongswan.org> | 2016-04-08 15:54:08 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2016-04-15 10:32:52 +0200 |
commit | 77df573a9551c5a344ad00b901b1bbd47cd57134 (patch) | |
tree | bef41268f80b85a6e57e3e51d7f7b354779d46da /src | |
parent | 9b85a6853b644d72a56319647ca2f45d456818b7 (diff) | |
download | strongswan-77df573a9551c5a344ad00b901b1bbd47cd57134.tar.bz2 strongswan-77df573a9551c5a344ad00b901b1bbd47cd57134.tar.xz |
openssl: Use proper EVP macro to determine size of a hash
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/plugins/openssl/openssl_hasher.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/plugins/openssl/openssl_util.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_hasher.c b/src/libstrongswan/plugins/openssl/openssl_hasher.c index 8f7df0f8a..96ee230c9 100644 --- a/src/libstrongswan/plugins/openssl/openssl_hasher.c +++ b/src/libstrongswan/plugins/openssl/openssl_hasher.c @@ -43,7 +43,7 @@ struct private_openssl_hasher_t { METHOD(hasher_t, get_hash_size, size_t, private_openssl_hasher_t *this) { - return this->hasher->md_size; + return EVP_MD_size(this->hasher); } METHOD(hasher_t, reset, bool, diff --git a/src/libstrongswan/plugins/openssl/openssl_util.c b/src/libstrongswan/plugins/openssl/openssl_util.c index 2f9813701..914060358 100644 --- a/src/libstrongswan/plugins/openssl/openssl_util.c +++ b/src/libstrongswan/plugins/openssl/openssl_util.c @@ -51,7 +51,7 @@ bool openssl_hash_chunk(int hash_type, chunk_t data, chunk_t *hash) goto error; } - *hash = chunk_alloc(hasher->md_size); + *hash = chunk_alloc(EVP_MD_size(hasher)); if (!EVP_DigestFinal_ex(ctx, hash->ptr, NULL)) { chunk_free(hash); |