Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / lib / dns / dst_gost.h
blob7953cf0d24f4259a6713db6f9b41a063fb4dd13a
1 /* $NetBSD: dst_gost.h,v 1.1.1.3 2014/12/10 03:34:39 christos Exp $ */
3 /*
4 * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
19 #ifndef DST_GOST_H
20 #define DST_GOST_H 1
22 #include <isc/lang.h>
23 #include <isc/log.h>
24 #include <dst/result.h>
26 #define ISC_GOST_DIGESTLENGTH 32U
28 #ifdef HAVE_OPENSSL_GOST
29 #include <openssl/evp.h>
31 typedef EVP_MD_CTX isc_gost_t;
32 #endif
33 #ifdef HAVE_PKCS11_GOST
34 #include <pk11/pk11.h>
36 typedef pk11_context_t isc_gost_t;
37 #endif
39 ISC_LANG_BEGINDECLS
41 #if defined(HAVE_OPENSSL_GOST) || defined(HAVE_PKCS11_GOST)
43 isc_result_t
44 isc_gost_init(isc_gost_t *ctx);
46 void
47 isc_gost_invalidate(isc_gost_t *ctx);
49 isc_result_t
50 isc_gost_update(isc_gost_t *ctx, const unsigned char *data, unsigned int len);
52 isc_result_t
53 isc_gost_final(isc_gost_t *ctx, unsigned char *digest);
55 ISC_LANG_ENDDECLS
57 #endif /* HAVE_OPENSSL_GOST || HAVE_PKCS11_GOST */
59 #endif /* DST_GOST_H */