xref: /minix3/external/bsd/bind/dist/lib/dns/dst_openssl.h (revision 00b67f09dd46474d133c95011a48590a8e8f94c7)
1 /*	$NetBSD: dst_openssl.h,v 1.7 2014/12/10 04:37:58 christos Exp $	*/
2 
3 /*
4  * Copyright (C) 2004, 2005, 2007-2009, 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
5  * Copyright (C) 2002  Internet Software Consortium.
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /* Id: dst_openssl.h,v 1.11 2011/03/12 04:59:48 tbox Exp  */
21 
22 #ifndef DST_OPENSSL_H
23 #define DST_OPENSSL_H 1
24 
25 #include <isc/lang.h>
26 #include <isc/log.h>
27 #include <isc/result.h>
28 
29 #include <openssl/err.h>
30 #include <openssl/rand.h>
31 #include <openssl/evp.h>
32 #include <openssl/conf.h>
33 #include <openssl/crypto.h>
34 
35 #if !defined(OPENSSL_NO_ENGINE) && defined(CRYPTO_LOCK_ENGINE) && \
36     (OPENSSL_VERSION_NUMBER >= 0x0090707f)
37 #define USE_ENGINE 1
38 #endif
39 
40 ISC_LANG_BEGINDECLS
41 
42 isc_result_t
43 dst__openssl_toresult(isc_result_t fallback);
44 
45 isc_result_t
46 dst__openssl_toresult2(const char *funcname, isc_result_t fallback);
47 
48 isc_result_t
49 dst__openssl_toresult3(isc_logcategory_t *category,
50 		       const char *funcname, isc_result_t fallback);
51 
52 #ifdef USE_ENGINE
53 ENGINE *
54 dst__openssl_getengine(const char *engine);
55 #else
56 #define dst__openssl_getengine(x) NULL
57 #endif
58 
59 ISC_LANG_ENDDECLS
60 
61 #endif /* DST_OPENSSL_H */
62 /*! \file */
63