diff options
Diffstat (limited to 'src/lib/libcrypto/evp/m_gostr341194.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_gostr341194.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/libcrypto/evp/m_gostr341194.c b/src/lib/libcrypto/evp/m_gostr341194.c index 380d92d508..66d9b4f303 100644 --- a/src/lib/libcrypto/evp/m_gostr341194.c +++ b/src/lib/libcrypto/evp/m_gostr341194.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: m_gostr341194.c,v 1.1 2014/11/09 19:17:13 miod Exp $ */ | 1 | /* $OpenBSD: m_gostr341194.c,v 1.2 2014/11/09 23:06:50 miod Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -58,17 +58,21 @@ | |||
58 | #include <openssl/gost.h> | 58 | #include <openssl/gost.h> |
59 | #include <openssl/objects.h> | 59 | #include <openssl/objects.h> |
60 | 60 | ||
61 | static int init(EVP_MD_CTX *ctx) | 61 | static int |
62 | gostr341194_init(EVP_MD_CTX *ctx) | ||
62 | { | 63 | { |
63 | return GOSTR341194_Init(ctx->md_data, NID_id_GostR3411_94_CryptoProParamSet); | 64 | return GOSTR341194_Init(ctx->md_data, |
65 | NID_id_GostR3411_94_CryptoProParamSet); | ||
64 | } | 66 | } |
65 | 67 | ||
66 | static int update(EVP_MD_CTX *ctx, const void *data, size_t count) | 68 | static int |
69 | gostr341194_update(EVP_MD_CTX *ctx, const void *data, size_t count) | ||
67 | { | 70 | { |
68 | return GOSTR341194_Update(ctx->md_data, data, count); | 71 | return GOSTR341194_Update(ctx->md_data, data, count); |
69 | } | 72 | } |
70 | 73 | ||
71 | static int final(EVP_MD_CTX *ctx, unsigned char *md) | 74 | static int |
75 | gostr341194_final(EVP_MD_CTX *ctx, unsigned char *md) | ||
72 | { | 76 | { |
73 | return GOSTR341194_Final(md, ctx->md_data); | 77 | return GOSTR341194_Final(md, ctx->md_data); |
74 | } | 78 | } |
@@ -78,9 +82,9 @@ static const EVP_MD gostr341194_md = { | |||
78 | .pkey_type = NID_undef, | 82 | .pkey_type = NID_undef, |
79 | .md_size = GOSTR341194_LENGTH, | 83 | .md_size = GOSTR341194_LENGTH, |
80 | .flags = EVP_MD_FLAG_PKEY_METHOD_SIGNATURE, | 84 | .flags = EVP_MD_FLAG_PKEY_METHOD_SIGNATURE, |
81 | .init = init, | 85 | .init = gostr341194_init, |
82 | .update = update, | 86 | .update = gostr341194_update, |
83 | .final = final, | 87 | .final = gostr341194_final, |
84 | .block_size = GOSTR341194_CBLOCK, | 88 | .block_size = GOSTR341194_CBLOCK, |
85 | .ctx_size = sizeof(EVP_MD *) + sizeof(GOSTR341194_CTX), | 89 | .ctx_size = sizeof(EVP_MD *) + sizeof(GOSTR341194_CTX), |
86 | }; | 90 | }; |