2002-03-19 04:30:57 +00:00
|
|
|
/*
|
2011-03-12 04:59:49 +00:00
|
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2002-03-19 04:30:57 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
2021-06-03 08:37:05 +02:00
|
|
|
*
|
2002-03-19 04:30:57 +00:00
|
|
|
* 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 https://mozilla.org/MPL/2.0/.
|
2018-02-23 09:53:12 +01:00
|
|
|
*
|
2002-03-19 04:30:57 +00:00
|
|
|
* See the COPYRIGHT file distributed with this work for additional
|
2016-10-31 10:04:37 +11:00
|
|
|
* information regarding copyright ownership.
|
2002-03-19 04:30:57 +00:00
|
|
|
*/
|
|
|
|
|
2021-10-05 16:49:47 +02:00
|
|
|
#pragma once
|
2002-03-19 04:30:57 +00:00
|
|
|
|
2011-03-11 01:11:54 +00:00
|
|
|
#include <openssl/bn.h>
|
|
|
|
#include <openssl/conf.h>
|
|
|
|
#include <openssl/crypto.h>
|
2015-05-28 14:41:21 +10:00
|
|
|
#include <openssl/err.h>
|
2011-03-11 01:11:54 +00:00
|
|
|
#include <openssl/evp.h>
|
|
|
|
#include <openssl/rand.h>
|
|
|
|
|
2020-03-09 16:17:26 +01:00
|
|
|
#include <isc/lang.h>
|
|
|
|
#include <isc/log.h>
|
|
|
|
#include <isc/result.h>
|
|
|
|
|
2002-03-19 04:30:57 +00:00
|
|
|
ISC_LANG_BEGINDECLS
|
|
|
|
|
|
|
|
isc_result_t
|
|
|
|
dst__openssl_toresult(isc_result_t fallback);
|
|
|
|
|
2022-08-07 21:41:18 +10:00
|
|
|
#define dst__openssl_toresult2(A, B) \
|
|
|
|
dst___openssl_toresult2(A, B, __FILE__, __LINE__)
|
2012-07-23 15:08:21 +10:00
|
|
|
isc_result_t
|
2022-08-07 21:41:18 +10:00
|
|
|
dst___openssl_toresult2(const char *funcname, isc_result_t fallback,
|
|
|
|
const char *file, int line);
|
2012-07-23 15:08:21 +10:00
|
|
|
|
2022-08-07 21:41:18 +10:00
|
|
|
#define dst__openssl_toresult3(A, B, C) \
|
|
|
|
dst___openssl_toresult3(A, B, C, __FILE__, __LINE__)
|
2012-10-24 12:58:16 -07:00
|
|
|
isc_result_t
|
2022-08-07 21:41:18 +10:00
|
|
|
dst___openssl_toresult3(isc_logcategory_t *category, const char *funcname,
|
|
|
|
isc_result_t fallback, const char *file, int line);
|
2012-10-24 12:58:16 -07:00
|
|
|
|
2022-12-26 19:31:26 +02:00
|
|
|
isc_result_t
|
2024-08-05 11:40:42 +02:00
|
|
|
dst__openssl_fromlabel(int key_base_id, const char *label, const char *pin,
|
|
|
|
EVP_PKEY **ppub, EVP_PKEY **ppriv);
|
2022-12-26 19:31:26 +02:00
|
|
|
|
2022-12-28 17:11:21 +02:00
|
|
|
bool
|
2023-01-26 16:11:07 +02:00
|
|
|
dst__openssl_keypair_compare(const dst_key_t *key1, const dst_key_t *key2);
|
|
|
|
|
|
|
|
bool
|
|
|
|
dst__openssl_keypair_isprivate(const dst_key_t *key);
|
|
|
|
|
|
|
|
void
|
|
|
|
dst__openssl_keypair_destroy(dst_key_t *key);
|
2022-12-28 17:11:21 +02:00
|
|
|
|
2002-03-19 04:30:57 +00:00
|
|
|
ISC_LANG_ENDDECLS
|