X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fdigest.h;h=d6efacfa47a5f37da0163e450dd18fef42e53c91;hb=dcf9e6c3e444fd39318f8d5b261bdc22e5031f67;hp=0a32707eadbf9de4785299d505a41f1200a454e6;hpb=6aa864baa626b366f5bba1f1b349a870b68d7c01;p=tinc diff --git a/src/openssl/digest.h b/src/openssl/digest.h index 0a32707e..d6efacfa 100644 --- a/src/openssl/digest.h +++ b/src/openssl/digest.h @@ -1,6 +1,9 @@ +#ifndef TINC_OPENSSL_DIGEST_H +#define TINC_OPENSSL_DIGEST_H + /* digest.h -- header file digest.c - Copyright (C) 2013 Guus Sliepen + Copyright (C) 2013-2022 Guus Sliepen 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 @@ -17,16 +20,18 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_OPENSSL_DIGEST_H__ -#define __TINC_OPENSSL_DIGEST_H__ - #include +#include struct digest { const EVP_MD *digest; - int maclength; - int keylength; - char *key; +#if OPENSSL_VERSION_MAJOR < 3 + HMAC_CTX *hmac_ctx; +#else + EVP_MAC_CTX *hmac_ctx; +#endif + EVP_MD_CTX *md_ctx; + size_t maclength; }; #endif