summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cmac/cm_pmeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/cmac/cm_pmeth.c')
-rw-r--r--src/lib/libcrypto/cmac/cm_pmeth.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/cmac/cm_pmeth.c b/src/lib/libcrypto/cmac/cm_pmeth.c
index 3010f91aca..5bb391d053 100644
--- a/src/lib/libcrypto/cmac/cm_pmeth.c
+++ b/src/lib/libcrypto/cmac/cm_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cm_pmeth.c,v 1.5 2014/06/21 12:07:02 miod Exp $ */ 1/* $OpenBSD: cm_pmeth.c,v 1.6 2014/06/21 13:42:14 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 2010. 3 * project 2010.
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,12 +100,12 @@ pkey_cmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
100 return 0; 100 return 0;
101 } 101 }
102 EVP_PKEY_assign(pkey, EVP_PKEY_CMAC, cmkey); 102 EVP_PKEY_assign(pkey, EVP_PKEY_CMAC, cmkey);
103 103
104 return 1; 104 return 1;
105} 105}
106 106
107static int 107static int
108int_update(EVP_MD_CTX *ctx,const void *data,size_t count) 108int_update(EVP_MD_CTX *ctx, const void *data, size_t count)
109{ 109{
110 if (!CMAC_Update(ctx->pctx->data, data, count)) 110 if (!CMAC_Update(ctx->pctx->data, data, count))
111 return 0; 111 return 0;
@@ -193,8 +193,7 @@ pkey_cmac_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
193 return -2; 193 return -2;
194} 194}
195 195
196const EVP_PKEY_METHOD 196const EVP_PKEY_METHOD cmac_pkey_meth = {
197cmac_pkey_meth = {
198 .pkey_id = EVP_PKEY_CMAC, 197 .pkey_id = EVP_PKEY_CMAC,
199 .flags = EVP_PKEY_FLAG_SIGCTX_CUSTOM, 198 .flags = EVP_PKEY_FLAG_SIGCTX_CUSTOM,
200 199