X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fdigest.h;h=d6efacfa47a5f37da0163e450dd18fef42e53c91;hb=344c632c7a9f8047a412239dcd22ba1531bdfda5;hp=542c63cbaa6e93c8b84f999e67b18631020dee69;hpb=9b9230a0a79c670b86f54fadd2807b864ff9d91f;p=tinc diff --git a/src/openssl/digest.h b/src/openssl/digest.h index 542c63cb..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 -typedef struct digest { +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