2018-06-13 13:42:25 +02:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2018-06-14 23:54:48 +02:00
|
|
|
#pragma once
|
2018-06-13 13:42:25 +02:00
|
|
|
|
2018-10-26 05:29:56 +02:00
|
|
|
#include <openssl/crypto.h>
|
2018-06-13 13:42:25 +02:00
|
|
|
#include <openssl/engine.h>
|
2018-10-26 05:29:56 +02:00
|
|
|
#include <openssl/evp.h>
|
2018-06-13 13:42:25 +02:00
|
|
|
#include <openssl/hmac.h>
|
2020-02-12 13:59:18 +01:00
|
|
|
#include <openssl/opensslv.h>
|
2018-06-13 13:42:25 +02:00
|
|
|
|
2018-10-26 05:29:56 +02:00
|
|
|
#if !HAVE_CRYPTO_ZALLOC
|
2020-02-12 13:59:18 +01:00
|
|
|
void *
|
|
|
|
CRYPTO_zalloc(size_t size);
|
2018-10-26 05:29:56 +02:00
|
|
|
#define OPENSSL_zalloc(num) CRYPTO_zalloc(num)
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_CRYPTO_ZALLOC */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_EVP_CIPHER_CTX_NEW
|
2020-02-12 13:59:18 +01:00
|
|
|
EVP_CIPHER_CTX *
|
|
|
|
EVP_CIPHER_CTX_new(void);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_EVP_CIPHER_CTX_NEW */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_EVP_CIPHER_CTX_FREE
|
2020-02-12 13:59:18 +01:00
|
|
|
void
|
|
|
|
EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_EVP_CIPHER_CTX_FREE */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_EVP_MD_CTX_NEW
|
2020-02-12 13:59:18 +01:00
|
|
|
EVP_MD_CTX *
|
|
|
|
EVP_MD_CTX_new(void);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_EVP_MD_CTX_NEW */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_EVP_MD_CTX_FREE
|
2020-02-12 13:59:18 +01:00
|
|
|
void
|
|
|
|
EVP_MD_CTX_free(EVP_MD_CTX *ctx);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_EVP_MD_CTX_FREE */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_EVP_MD_CTX_RESET
|
2020-02-12 13:59:18 +01:00
|
|
|
int
|
|
|
|
EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_EVP_MD_CTX_RESET */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_HMAC_CTX_NEW
|
2020-02-12 13:59:18 +01:00
|
|
|
HMAC_CTX *
|
|
|
|
HMAC_CTX_new(void);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_HMAC_CTX_NEW */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_HMAC_CTX_FREE
|
2020-02-12 13:59:18 +01:00
|
|
|
void
|
|
|
|
HMAC_CTX_free(HMAC_CTX *ctx);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_HMAC_CTX_FREE */
|
2018-10-26 05:29:56 +02:00
|
|
|
|
|
|
|
#if !HAVE_HMAC_CTX_RESET
|
2020-02-12 13:59:18 +01:00
|
|
|
int
|
|
|
|
HMAC_CTX_reset(HMAC_CTX *ctx);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_HMAC_CTX_RESET */
|
2018-06-13 13:42:25 +02:00
|
|
|
|
2018-10-26 05:29:56 +02:00
|
|
|
#if !HAVE_HMAC_CTX_GET_MD
|
2020-02-12 13:59:18 +01:00
|
|
|
const EVP_MD *
|
|
|
|
HMAC_CTX_get_md(const HMAC_CTX *ctx);
|
2020-02-13 21:48:23 +01:00
|
|
|
#endif /* if !HAVE_HMAC_CTX_GET_MD */
|