dst_gost.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
00003  *
00004  * Permission to use, copy, modify, and/or distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00009  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00010  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00011  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00012  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00013  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00014  * PERFORMANCE OF THIS SOFTWARE.
00015  */
00016 
00017 #ifndef DST_GOST_H
00018 #define DST_GOST_H 1
00019 
00020 #include <isc/lang.h>
00021 #include <isc/log.h>
00022 #include <dst/result.h>
00023 
00024 #define ISC_GOST_DIGESTLENGTH 32U
00025 
00026 #ifdef HAVE_OPENSSL_GOST
00027 #include <openssl/evp.h>
00028 
00029 typedef EVP_MD_CTX isc_gost_t;
00030 #endif
00031 #ifdef HAVE_PKCS11_GOST
00032 #include <pk11/pk11.h>
00033 
00034 typedef pk11_context_t isc_gost_t;
00035 #endif
00036 
00037 ISC_LANG_BEGINDECLS
00038 
00039 #if defined(HAVE_OPENSSL_GOST) || defined(HAVE_PKCS11_GOST)
00040 
00041 isc_result_t
00042 isc_gost_init(isc_gost_t *ctx);
00043 
00044 void
00045 isc_gost_invalidate(isc_gost_t *ctx);
00046 
00047 isc_result_t
00048 isc_gost_update(isc_gost_t *ctx, const unsigned char *data, unsigned int len);
00049 
00050 isc_result_t
00051 isc_gost_final(isc_gost_t *ctx, unsigned char *digest);
00052 
00053 ISC_LANG_ENDDECLS
00054 
00055 #endif /* HAVE_OPENSSL_GOST || HAVE_PKCS11_GOST */
00056 
00057 #endif /* DST_GOST_H */

Generated on Tue Apr 28 17:40:56 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha