X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fdigest.h;h=7081f5ce3a9093bd7de917ccc7c6ac064f31722b;hb=3d787920d51a35e74e442c7265be3b13b69ad8e4;hp=0a32707eadbf9de4785299d505a41f1200a454e6;hpb=6aa864baa626b366f5bba1f1b349a870b68d7c01;p=tinc diff --git a/src/openssl/digest.h b/src/openssl/digest.h index 0a32707e..7081f5ce 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,20 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_OPENSSL_DIGEST_H__ -#define __TINC_OPENSSL_DIGEST_H__ - #include +#include + +#include "../legacy.h" 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