]> tinc-vpn.org Git - tinc/blobdiff - src/openssl/digest.h
Add support for OpenSSL 3.0+
[tinc] / src / openssl / digest.h
index 420b11e04ba4edb7104f35eb75978eaeed4a5c50..d6efacfa47a5f37da0163e450dd18fef42e53c91 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
     digest.h -- header file digest.c
-    Copyright (C) 2013 Guus Sliepen <guus@tinc-vpn.org>
+    Copyright (C) 2013-2022 Guus Sliepen <guus@tinc-vpn.org>
 
     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
 
 struct digest {
        const EVP_MD *digest;
+#if OPENSSL_VERSION_MAJOR < 3
        HMAC_CTX *hmac_ctx;
+#else
+       EVP_MAC_CTX *hmac_ctx;
+#endif
        EVP_MD_CTX *md_ctx;
-       int maclength;
+       size_t maclength;
 };
 
 #endif