mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
4714. [port] openbsd/libressl: add support for building with
--enable-openssl-hash. [RT #45982]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
4714. [port] openbsd/libressl: add support for building with
|
||||
--enable-openssl-hash. [RT #45982]
|
||||
|
||||
--- 9.12.0a1 released ---
|
||||
|
||||
4713. [func] Added support for the DNS Response Policy Service
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define EVP_CIPHER_CTX_new() &(_context), EVP_CIPHER_CTX_init(&_context)
|
||||
#define EVP_CIPHER_CTX_free(c) RUNTIME_CHECK(EVP_CIPHER_CTX_cleanup(c) == 1)
|
||||
#endif
|
||||
@@ -34,7 +34,7 @@ void
|
||||
isc_aes128_crypt(const unsigned char *key, const unsigned char *in,
|
||||
unsigned char *out)
|
||||
{
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_CIPHER_CTX _context;
|
||||
#endif
|
||||
EVP_CIPHER_CTX *c;
|
||||
@@ -54,7 +54,7 @@ void
|
||||
isc_aes192_crypt(const unsigned char *key, const unsigned char *in,
|
||||
unsigned char *out)
|
||||
{
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_CIPHER_CTX _context;
|
||||
#endif
|
||||
EVP_CIPHER_CTX *c;
|
||||
@@ -74,7 +74,7 @@ void
|
||||
isc_aes256_crypt(const unsigned char *key, const unsigned char *in,
|
||||
unsigned char *out)
|
||||
{
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_CIPHER_CTX _context;
|
||||
#endif
|
||||
EVP_CIPHER_CTX *c;
|
||||
|
@@ -32,7 +32,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define HMAC_CTX_new() &(ctx->_ctx), HMAC_CTX_init(&(ctx->_ctx))
|
||||
#define HMAC_CTX_free(ptr) HMAC_CTX_cleanup(ptr)
|
||||
#endif
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define HMAC_CTX_new() &(ctx->_ctx), HMAC_CTX_init(&(ctx->_ctx))
|
||||
#define HMAC_CTX_free(ptr) HMAC_CTX_cleanup(ptr)
|
||||
#endif
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
typedef struct {
|
||||
HMAC_CTX *ctx;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
HMAC_CTX _ctx;
|
||||
#endif
|
||||
} isc_hmacmd5_t;
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
typedef struct {
|
||||
HMAC_CTX *ctx;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
HMAC_CTX _ctx;
|
||||
#endif
|
||||
} isc_hmacsha_t;
|
||||
|
@@ -51,7 +51,7 @@
|
||||
|
||||
typedef struct {
|
||||
EVP_MD_CTX *ctx;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_MD_CTX _ctx;
|
||||
#endif
|
||||
} isc_md5_t;
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
typedef struct {
|
||||
EVP_MD_CTX *ctx;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_MD_CTX _ctx;
|
||||
#endif
|
||||
} isc_sha1_t;
|
||||
|
@@ -70,13 +70,17 @@
|
||||
|
||||
/*** SHA-256/384/512 Context Structures *******************************/
|
||||
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if defined(ISC_PLATFORM_OPENSSLHASH)
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/evp.h>
|
||||
#endif
|
||||
|
||||
#if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
|
||||
|
||||
typedef struct {
|
||||
EVP_MD_CTX *ctx;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_MD_CTX _ctx;
|
||||
#endif
|
||||
} isc_sha2_t;
|
||||
|
@@ -45,7 +45,7 @@
|
||||
#include <isc/util.h>
|
||||
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define EVP_MD_CTX_new() &(ctx->_ctx)
|
||||
#define EVP_MD_CTX_free(ptr) EVP_MD_CTX_cleanup(ptr)
|
||||
#endif
|
||||
|
@@ -39,7 +39,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define EVP_MD_CTX_new() &(context->_ctx)
|
||||
#define EVP_MD_CTX_free(ptr) EVP_MD_CTX_cleanup(ptr)
|
||||
#endif
|
||||
|
@@ -58,7 +58,7 @@
|
||||
#include <pk11/pk11.h>
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#define EVP_MD_CTX_new() &(context->_ctx)
|
||||
#define EVP_MD_CTX_free(ptr) EVP_MD_CTX_cleanup(ptr)
|
||||
@@ -1604,7 +1604,7 @@ isc_sha224_end(isc_sha224_t *context, char buffer[]) {
|
||||
}
|
||||
*buffer = (char)0;
|
||||
} else {
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_MD_CTX_reset(context->ctx);
|
||||
#elif PKCS11CRYPTO
|
||||
pk11_return_session(context);
|
||||
@@ -1645,7 +1645,7 @@ isc_sha256_end(isc_sha256_t *context, char buffer[]) {
|
||||
}
|
||||
*buffer = (char)0;
|
||||
} else {
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_MD_CTX_reset(context->ctx);
|
||||
#elif PKCS11CRYPTO
|
||||
pk11_return_session(context);
|
||||
@@ -1686,7 +1686,7 @@ isc_sha512_end(isc_sha512_t *context, char buffer[]) {
|
||||
}
|
||||
*buffer = (char)0;
|
||||
} else {
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_MD_CTX_reset(context->ctx);
|
||||
#elif PKCS11CRYPTO
|
||||
pk11_return_session(context);
|
||||
@@ -1727,7 +1727,7 @@ isc_sha384_end(isc_sha384_t *context, char buffer[]) {
|
||||
}
|
||||
*buffer = (char)0;
|
||||
} else {
|
||||
#ifdef ISC_PLATFORM_OPENSSLHASH
|
||||
#if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
EVP_MD_CTX_reset(context->ctx);
|
||||
#elif PKCS11CRYPTO
|
||||
pk11_return_session(context);
|
||||
|
Reference in New Issue
Block a user