diff options
Diffstat (limited to 'src/lib/libcrypto/hmac/hm_pmeth.c')
-rw-r--r-- | src/lib/libcrypto/hmac/hm_pmeth.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/libcrypto/hmac/hm_pmeth.c b/src/lib/libcrypto/hmac/hm_pmeth.c index c1ada08a48..75b5ad469d 100644 --- a/src/lib/libcrypto/hmac/hm_pmeth.c +++ b/src/lib/libcrypto/hmac/hm_pmeth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hm_pmeth.c,v 1.5 2014/06/21 12:00:01 miod Exp $ */ | 1 | /* $OpenBSD: hm_pmeth.c,v 1.6 2014/06/21 13:39:46 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2007. | 3 | * project 2007. |
4 | */ | 4 | */ |
@@ -10,7 +10,7 @@ | |||
10 | * are met: | 10 | * are met: |
11 | * | 11 | * |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * | 14 | * |
15 | * 2. Redistributions in binary form must reproduce the above copyright | 15 | * 2. Redistributions in binary form must reproduce the above copyright |
16 | * notice, this list of conditions and the following disclaimer in | 16 | * notice, this list of conditions and the following disclaimer in |
@@ -100,7 +100,7 @@ pkey_hmac_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) | |||
100 | 100 | ||
101 | if (!pkey_hmac_init(dst)) | 101 | if (!pkey_hmac_init(dst)) |
102 | return 0; | 102 | return 0; |
103 | sctx = src->data; | 103 | sctx = src->data; |
104 | dctx = dst->data; | 104 | dctx = dst->data; |
105 | dctx->md = sctx->md; | 105 | dctx->md = sctx->md; |
106 | HMAC_CTX_init(&dctx->ctx); | 106 | HMAC_CTX_init(&dctx->ctx); |
@@ -141,12 +141,12 @@ pkey_hmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) | |||
141 | if (!hkey) | 141 | if (!hkey) |
142 | return 0; | 142 | return 0; |
143 | EVP_PKEY_assign(pkey, EVP_PKEY_HMAC, hkey); | 143 | EVP_PKEY_assign(pkey, EVP_PKEY_HMAC, hkey); |
144 | 144 | ||
145 | return 1; | 145 | return 1; |
146 | } | 146 | } |
147 | 147 | ||
148 | static int | 148 | static int |
149 | int_update(EVP_MD_CTX *ctx,const void *data,size_t count) | 149 | int_update(EVP_MD_CTX *ctx, const void *data, size_t count) |
150 | { | 150 | { |
151 | HMAC_PKEY_CTX *hctx = ctx->pctx->data; | 151 | HMAC_PKEY_CTX *hctx = ctx->pctx->data; |
152 | 152 | ||
@@ -186,7 +186,7 @@ hmac_signctx(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, | |||
186 | return 1; | 186 | return 1; |
187 | } | 187 | } |
188 | 188 | ||
189 | static int | 189 | static int |
190 | pkey_hmac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) | 190 | pkey_hmac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) |
191 | { | 191 | { |
192 | HMAC_PKEY_CTX *hctx = ctx->data; | 192 | HMAC_PKEY_CTX *hctx = ctx->data; |
@@ -240,8 +240,7 @@ pkey_hmac_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value) | |||
240 | return -2; | 240 | return -2; |
241 | } | 241 | } |
242 | 242 | ||
243 | const EVP_PKEY_METHOD | 243 | const EVP_PKEY_METHOD hmac_pkey_meth = { |
244 | hmac_pkey_meth = { | ||
245 | .pkey_id = EVP_PKEY_HMAC, | 244 | .pkey_id = EVP_PKEY_HMAC, |
246 | 245 | ||
247 | .init = pkey_hmac_init, | 246 | .init = pkey_hmac_init, |