X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fdigest.h;h=7081f5ce3a9093bd7de917ccc7c6ac064f31722b;hb=28be4baae016a5a771d0d9ec6e97ef38a4fc9e46;hp=542c63cbaa6e93c8b84f999e67b18631020dee69;hpb=9b9230a0a79c670b86f54fadd2807b864ff9d91f;p=tinc diff --git a/src/openssl/digest.h b/src/openssl/digest.h index 542c63cb..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 -typedef struct digest { +#include "../legacy.h" + +struct digest { const EVP_MD *digest; - int maclength; - int keylength; - char *key; -} digest_t; +#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