summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cmac/cm_ameth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/cmac/cm_ameth.c')
-rw-r--r--src/lib/libcrypto/cmac/cm_ameth.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/libcrypto/cmac/cm_ameth.c b/src/lib/libcrypto/cmac/cm_ameth.c
index e4952df2f9..a793e65262 100644
--- a/src/lib/libcrypto/cmac/cm_ameth.c
+++ b/src/lib/libcrypto/cmac/cm_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cm_ameth.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cm_ameth.c,v 1.4 2014/06/21 12:07:02 miod 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 */
@@ -62,19 +62,23 @@
62 * key. 62 * key.
63 */ 63 */
64 64
65static int cmac_size(const EVP_PKEY *pkey) 65static int
66 { 66cmac_size(const EVP_PKEY *pkey)
67{
67 return EVP_MAX_BLOCK_LENGTH; 68 return EVP_MAX_BLOCK_LENGTH;
68 } 69}
69 70
70static void cmac_key_free(EVP_PKEY *pkey) 71static void
71 { 72cmac_key_free(EVP_PKEY *pkey)
73{
72 CMAC_CTX *cmctx = (CMAC_CTX *)pkey->pkey.ptr; 74 CMAC_CTX *cmctx = (CMAC_CTX *)pkey->pkey.ptr;
75
73 if (cmctx) 76 if (cmctx)
74 CMAC_CTX_free(cmctx); 77 CMAC_CTX_free(cmctx);
75 } 78}
76 79
77const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { 80const EVP_PKEY_ASN1_METHOD
81cmac_asn1_meth = {
78 .pkey_id = EVP_PKEY_CMAC, 82 .pkey_id = EVP_PKEY_CMAC,
79 .pkey_base_id = EVP_PKEY_CMAC, 83 .pkey_base_id = EVP_PKEY_CMAC,
80 84
@@ -84,4 +88,3 @@ const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = {
84 .pkey_size = cmac_size, 88 .pkey_size = cmac_size,
85 .pkey_free = cmac_key_free 89 .pkey_free = cmac_key_free
86}; 90};
87