GOST public key algorithm ENGINE donated to the OpenSSL by Cryptocom.
[openssl.git] / engines / ccgost / md.h
1 #ifndef GOST_MD_H
2 #define GOST_MD_H
3 /**********************************************************************
4  *                             md.h                                   *
5  *             Copyright (c) 2005-2006 Cryptocom LTD                  *
6  *       This file is distributed under the same license as OpenSSL   *
7  *                                                                    *
8  *      Declaration of GOST R 34.11 bindings to OpenSSL                   *
9  *                                                                                                                                        *
10  *          Requires OpenSSL 0.9.9 for compilation                    *
11  **********************************************************************/
12 #include <unistd.h>
13 #include <openssl/err.h>
14 #include <openssl/evp.h>
15 #include "gost89.h"
16 #include "gosthash.h"
17 #ifdef __cplusplus
18  extern "C" {
19 #endif
20
21          /* Structure used as EVP_MD_CTX-md_data. 
22           * It allows to avoid storing in the md-data pointers to
23           * dynamically allocated memory.
24           *
25           * I cannot invent better way to avoid memory leaks, because
26           * openssl insist on invoking Init on Final-ed digests, and there
27           * is no reliable way to find out whether pointer in the passed
28           * md_data is valid or not.
29           * */
30 struct ossl_gost_digest_ctx {
31         gost_hash_ctx dctx;
32         gost_ctx cctx;
33 };      
34
35 extern EVP_MD digest_gost;
36
37
38 #ifdef __cplusplus
39   };
40 #endif
41 #endif