2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Add thin openssl shim for OpenSSL 1.1.x and LibreSSL compatibility functions

This commit is contained in:
Ondřej Surý
2018-06-13 13:42:25 +02:00
parent be8a607341
commit 302c6cbe7f
5 changed files with 142 additions and 3 deletions

36
lib/isc/openssl_shim.h Normal file
View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef ISC_OPENSSL_P_H
#define ISC_OPENSSL_P_H
#include <config.h>
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#include <openssl/engine.h>
#include <openssl/hmac.h>
void *OPENSSL_zalloc(size_t size);
EVP_CIPHER_CTX* EVP_CIPHER_CTX_new(void);
void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx);
EVP_MD_CTX *EVP_MD_CTX_new(void);
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
HMAC_CTX *HMAC_CTX_new(void);
void HMAC_CTX_free(HMAC_CTX *ctx);
int HMAC_CTX_reset(HMAC_CTX *ctx);
#endif /* ISC_OPENSSL_P_H */
#endif /* ISC_OPENSSL_P_H */