summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hmac
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/hmac')
-rw-r--r--src/lib/libcrypto/hmac/hm_ameth.c6
-rw-r--r--src/lib/libcrypto/hmac/hm_pmeth.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/hmac/hm_ameth.c b/src/lib/libcrypto/hmac/hm_ameth.c
index 84bb5f0c07..86e42bdfab 100644
--- a/src/lib/libcrypto/hmac/hm_ameth.c
+++ b/src/lib/libcrypto/hmac/hm_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hm_ameth.c,v 1.12 2021/12/12 21:30:14 tb Exp $ */ 1/* $OpenBSD: hm_ameth.c,v 1.13 2022/11/18 14:45:10 tb 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 */
@@ -82,7 +82,7 @@ hmac_size(const EVP_PKEY *pkey)
82static void 82static void
83hmac_key_free(EVP_PKEY *pkey) 83hmac_key_free(EVP_PKEY *pkey)
84{ 84{
85 ASN1_OCTET_STRING *os = (ASN1_OCTET_STRING *)pkey->pkey.ptr; 85 ASN1_OCTET_STRING *os = pkey->pkey.ptr;
86 86
87 if (os) { 87 if (os) {
88 if (os->data) 88 if (os->data)
@@ -132,7 +132,7 @@ static int
132old_hmac_encode(const EVP_PKEY *pkey, unsigned char **pder) 132old_hmac_encode(const EVP_PKEY *pkey, unsigned char **pder)
133{ 133{
134 int inc; 134 int inc;
135 ASN1_OCTET_STRING *os = (ASN1_OCTET_STRING *)pkey->pkey.ptr; 135 ASN1_OCTET_STRING *os = pkey->pkey.ptr;
136 136
137 if (pder) { 137 if (pder) {
138 if (!*pder) { 138 if (!*pder) {
diff --git a/src/lib/libcrypto/hmac/hm_pmeth.c b/src/lib/libcrypto/hmac/hm_pmeth.c
index 4017f570b8..3ba5b47027 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.13 2022/03/30 07:17:48 tb Exp $ */ 1/* $OpenBSD: hm_pmeth.c,v 1.14 2022/11/18 14:45:10 tb 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 */
@@ -202,7 +202,7 @@ pkey_hmac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
202 break; 202 break;
203 203
204 case EVP_PKEY_CTRL_DIGESTINIT: 204 case EVP_PKEY_CTRL_DIGESTINIT:
205 key = (ASN1_OCTET_STRING *)ctx->pkey->pkey.ptr; 205 key = ctx->pkey->pkey.ptr;
206 if (!HMAC_Init_ex(&hctx->ctx, key->data, key->length, hctx->md, 206 if (!HMAC_Init_ex(&hctx->ctx, key->data, key->length, hctx->md,
207 ctx->engine)) 207 ctx->engine))
208 return 0; 208 return 0;