OpenCoverage

hmac.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/hmac/hmac.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.-
3 *-
4 * Licensed under the OpenSSL license (the "License"). You may not use-
5 * this file except in compliance with the License. You can obtain a copy-
6 * in the file LICENSE in the source distribution or at-
7 * https://www.openssl.org/source/license.html-
8 */-
9-
10#include <stdio.h>-
11#include <stdlib.h>-
12#include <string.h>-
13#include "internal/cryptlib.h"-
14#include <openssl/hmac.h>-
15#include <openssl/opensslconf.h>-
16#include "hmac_lcl.h"-
17-
18int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,-
19 const EVP_MD *md, ENGINE *impl)-
20{-
21 int rv = 0;-
22 int i, j, reset = 0;-
23 unsigned char pad[HMAC_MAX_MD_CBLOCK_SIZE];-
24-
25 /* If we are changing MD then we must have a key */-
26 if (md != NULL && md != ctx->md && (key == NULL || len < 0))
md != ((void *)0)Description
TRUEevaluated 53523 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 55 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
md != ctx->mdDescription
TRUEevaluated 53523 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
key == ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
len < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 53520 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53523
27 return 0;
executed 3 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
3
28-
29 if (md != NULL) {
md != ((void *)0)Description
TRUEevaluated 53520 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 55 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
55-53520
30 reset = 1;-
31 ctx->md = md;-
32 } else if (ctx->md) {
executed 53520 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
ctx->mdDescription
TRUEevaluated 53 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
2-53520
33 md = ctx->md;-
34 } else {
executed 53 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
53
35 return 0;
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
2
36 }-
37-
38 if (key != NULL) {
key != ((void *)0)Description
TRUEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 52 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
52-53521
39 reset = 1;-
40 j = EVP_MD_block_size(md);-
41 if (!ossl_assert(j <= (int)sizeof(ctx->key)))
!((j <= (int)s...x->key)) != 0)Description
TRUEnever evaluated
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53521
42 return 0;
never executed: return 0;
0
43 if (j < len) {
j < lenDescription
TRUEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 53315 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
206-53315
44 if (!EVP_DigestInit_ex(ctx->md_ctx, md, impl)
!EVP_DigestIni...ctx, md, impl)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
45 || !EVP_DigestUpdate(ctx->md_ctx, key, len)
!EVP_DigestUpd...ctx, key, len)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
46 || !EVP_DigestFinal_ex(ctx->md_ctx, ctx->key,
!EVP_DigestFin...x->key_length)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
47 &ctx->key_length))
!EVP_DigestFin...x->key_length)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
48 return 0;
never executed: return 0;
0
49 } else {
executed 206 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
206
50 if (len < 0 || len > (int)sizeof(ctx->key))
len < 0Description
TRUEnever evaluated
FALSEevaluated 53315 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
len > (int)sizeof(ctx->key)Description
TRUEnever evaluated
FALSEevaluated 53315 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53315
51 return 0;
never executed: return 0;
0
52 memcpy(ctx->key, key, len);-
53 ctx->key_length = len;-
54 }
executed 53315 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
53315
55 if (ctx->key_length != HMAC_MAX_MD_CBLOCK_SIZE)
ctx->key_length != 144Description
TRUEevaluated 53520 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-53520
56 memset(&ctx->key[ctx->key_length], 0,
executed 53520 times by 1 test: memset(&ctx->key[ctx->key_length], 0, 144 - ctx->key_length);
Executed by:
  • libcrypto.so.1.1
53520
57 HMAC_MAX_MD_CBLOCK_SIZE - ctx->key_length);
executed 53520 times by 1 test: memset(&ctx->key[ctx->key_length], 0, 144 - ctx->key_length);
Executed by:
  • libcrypto.so.1.1
53520
58 }
executed 53521 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
53521
59-
60 if (reset) {
resetDescription
TRUEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 52 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
52-53521
61 for (i = 0; i < HMAC_MAX_MD_CBLOCK_SIZE; i++)
i < 144Description
TRUEevaluated 7707024 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
53521-7707024
62 pad[i] = 0x36 ^ ctx->key[i];
executed 7707024 times by 1 test: pad[i] = 0x36 ^ ctx->key[i];
Executed by:
  • libcrypto.so.1.1
7707024
63 if (!EVP_DigestInit_ex(ctx->i_ctx, md, impl)
!EVP_DigestIni...ctx, md, impl)Description
TRUEnever evaluated
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53521
64 || !EVP_DigestUpdate(ctx->i_ctx, pad, EVP_MD_block_size(md)))
!EVP_DigestUpd...lock_size(md))Description
TRUEnever evaluated
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53521
65 goto err;
never executed: goto err;
0
66-
67 for (i = 0; i < HMAC_MAX_MD_CBLOCK_SIZE; i++)
i < 144Description
TRUEevaluated 7707024 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
53521-7707024
68 pad[i] = 0x5c ^ ctx->key[i];
executed 7707024 times by 1 test: pad[i] = 0x5c ^ ctx->key[i];
Executed by:
  • libcrypto.so.1.1
7707024
69 if (!EVP_DigestInit_ex(ctx->o_ctx, md, impl)
!EVP_DigestIni...ctx, md, impl)Description
TRUEnever evaluated
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53521
70 || !EVP_DigestUpdate(ctx->o_ctx, pad, EVP_MD_block_size(md)))
!EVP_DigestUpd...lock_size(md))Description
TRUEnever evaluated
FALSEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53521
71 goto err;
never executed: goto err;
0
72 }
executed 53521 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
53521
73 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->i_ctx))
!EVP_MD_CTX_co...x, ctx->i_ctx)Description
TRUEnever evaluated
FALSEevaluated 53573 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-53573
74 goto err;
never executed: goto err;
0
75 rv = 1;-
76 err:
code before this statement executed 53573 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
53573
77 if (reset)
resetDescription
TRUEevaluated 53521 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 52 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
52-53521
78 OPENSSL_cleanse(pad, sizeof(pad));
executed 53521 times by 1 test: OPENSSL_cleanse(pad, sizeof(pad));
Executed by:
  • libcrypto.so.1.1
53521
79 return rv;
executed 53573 times by 1 test: return rv;
Executed by:
  • libcrypto.so.1.1
53573
80}-
81-
82#if OPENSSL_API_COMPAT < 0x10100000L-
83int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md)-
84{-
85 if (key && md)
keyDescription
TRUEnever evaluated
FALSEnever evaluated
mdDescription
TRUEnever evaluated
FALSEnever evaluated
0
86 HMAC_CTX_reset(ctx);
never executed: HMAC_CTX_reset(ctx);
0
87 return HMAC_Init_ex(ctx, key, len, md, NULL);
never executed: return HMAC_Init_ex(ctx, key, len, md, ((void *)0) );
0
88}-
89#endif-
90-
91int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)-
92{-
93 if (!ctx->md)
!ctx->mdDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 218860 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3-218860
94 return 0;
executed 3 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
3
95 return EVP_DigestUpdate(ctx->md_ctx, data, len);
executed 218860 times by 1 test: return EVP_DigestUpdate(ctx->md_ctx, data, len);
Executed by:
  • libcrypto.so.1.1
218860
96}-
97-
98int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len)-
99{-
100 unsigned int i;-
101 unsigned char buf[EVP_MAX_MD_SIZE];-
102-
103 if (!ctx->md)
!ctx->mdDescription
TRUEnever evaluated
FALSEevaluated 163219 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-163219
104 goto err;
never executed: goto err;
0
105-
106 if (!EVP_DigestFinal_ex(ctx->md_ctx, buf, &i))
!EVP_DigestFin..._ctx, buf, &i)Description
TRUEnever evaluated
FALSEevaluated 163219 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-163219
107 goto err;
never executed: goto err;
0
108 if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->o_ctx))
!EVP_MD_CTX_co...x, ctx->o_ctx)Description
TRUEnever evaluated
FALSEevaluated 163219 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-163219
109 goto err;
never executed: goto err;
0
110 if (!EVP_DigestUpdate(ctx->md_ctx, buf, i))
!EVP_DigestUpd...d_ctx, buf, i)Description
TRUEnever evaluated
FALSEevaluated 163219 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-163219
111 goto err;
never executed: goto err;
0
112 if (!EVP_DigestFinal_ex(ctx->md_ctx, md, len))
!EVP_DigestFin..._ctx, md, len)Description
TRUEnever evaluated
FALSEevaluated 163219 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-163219
113 goto err;
never executed: goto err;
0
114 return 1;
executed 163219 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
163219
115 err:-
116 return 0;
never executed: return 0;
0
117}-
118-
119size_t HMAC_size(const HMAC_CTX *ctx)-
120{-
121 int size = EVP_MD_size((ctx)->md);-
122-
123 return (size < 0) ? 0 : size;
executed 221 times by 1 test: return (size < 0) ? 0 : size;
Executed by:
  • libcrypto.so.1.1
(size < 0)Description
TRUEnever evaluated
FALSEevaluated 221 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-221
124}-
125-
126HMAC_CTX *HMAC_CTX_new(void)-
127{-
128 HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX));-
129-
130 if (ctx != NULL) {
ctx != ((void *)0)Description
TRUEevaluated 215927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-215927
131 if (!HMAC_CTX_reset(ctx)) {
!HMAC_CTX_reset(ctx)Description
TRUEnever evaluated
FALSEevaluated 215927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-215927
132 HMAC_CTX_free(ctx);-
133 return NULL;
never executed: return ((void *)0) ;
0
134 }-
135 }
executed 215927 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
215927
136 return ctx;
executed 215927 times by 1 test: return ctx;
Executed by:
  • libcrypto.so.1.1
215927
137}-
138-
139static void hmac_ctx_cleanup(HMAC_CTX *ctx)-
140{-
141 EVP_MD_CTX_reset(ctx->i_ctx);-
142 EVP_MD_CTX_reset(ctx->o_ctx);-
143 EVP_MD_CTX_reset(ctx->md_ctx);-
144 ctx->md = NULL;-
145 ctx->key_length = 0;-
146 OPENSSL_cleanse(ctx->key, sizeof(ctx->key));-
147}
executed 431855 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
431855
148-
149void HMAC_CTX_free(HMAC_CTX *ctx)-
150{-
151 if (ctx != NULL) {
ctx != ((void *)0)Description
TRUEevaluated 215927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1191 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1191-215927
152 hmac_ctx_cleanup(ctx);-
153 EVP_MD_CTX_free(ctx->i_ctx);-
154 EVP_MD_CTX_free(ctx->o_ctx);-
155 EVP_MD_CTX_free(ctx->md_ctx);-
156 OPENSSL_free(ctx);-
157 }
executed 215927 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
215927
158}
executed 217118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
217118
159-
160static int hmac_ctx_alloc_mds(HMAC_CTX *ctx)-
161{-
162 if (ctx->i_ctx == NULL)
ctx->i_ctx == ((void *)0)Description
TRUEevaluated 215927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 207331 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
207331-215927
163 ctx->i_ctx = EVP_MD_CTX_new();
executed 215927 times by 1 test: ctx->i_ctx = EVP_MD_CTX_new();
Executed by:
  • libcrypto.so.1.1
215927
164 if (ctx->i_ctx == NULL)
ctx->i_ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 423258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-423258
165 return 0;
never executed: return 0;
0
166 if (ctx->o_ctx == NULL)
ctx->o_ctx == ((void *)0)Description
TRUEevaluated 215927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 207331 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
207331-215927
167 ctx->o_ctx = EVP_MD_CTX_new();
executed 215927 times by 1 test: ctx->o_ctx = EVP_MD_CTX_new();
Executed by:
  • libcrypto.so.1.1
215927
168 if (ctx->o_ctx == NULL)
ctx->o_ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 423258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-423258
169 return 0;
never executed: return 0;
0
170 if (ctx->md_ctx == NULL)
ctx->md_ctx == ((void *)0)Description
TRUEevaluated 215927 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 207331 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
207331-215927
171 ctx->md_ctx = EVP_MD_CTX_new();
executed 215927 times by 1 test: ctx->md_ctx = EVP_MD_CTX_new();
Executed by:
  • libcrypto.so.1.1
215927
172 if (ctx->md_ctx == NULL)
ctx->md_ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 423258 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-423258
173 return 0;
never executed: return 0;
0
174 return 1;
executed 423258 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
423258
175}-
176-
177int HMAC_CTX_reset(HMAC_CTX *ctx)-
178{-
179 hmac_ctx_cleanup(ctx);-
180 if (!hmac_ctx_alloc_mds(ctx)) {
!hmac_ctx_alloc_mds(ctx)Description
TRUEnever evaluated
FALSEevaluated 215928 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-215928
181 hmac_ctx_cleanup(ctx);-
182 return 0;
never executed: return 0;
0
183 }-
184 return 1;
executed 215928 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
215928
185}-
186-
187int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx)-
188{-
189 if (!hmac_ctx_alloc_mds(dctx))
!hmac_ctx_alloc_mds(dctx)Description
TRUEnever evaluated
FALSEevaluated 207330 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-207330
190 goto err;
never executed: goto err;
0
191 if (!EVP_MD_CTX_copy_ex(dctx->i_ctx, sctx->i_ctx))
!EVP_MD_CTX_co..., sctx->i_ctx)Description
TRUEnever evaluated
FALSEevaluated 207330 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-207330
192 goto err;
never executed: goto err;
0
193 if (!EVP_MD_CTX_copy_ex(dctx->o_ctx, sctx->o_ctx))
!EVP_MD_CTX_co..., sctx->o_ctx)Description
TRUEnever evaluated
FALSEevaluated 207330 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-207330
194 goto err;
never executed: goto err;
0
195 if (!EVP_MD_CTX_copy_ex(dctx->md_ctx, sctx->md_ctx))
!EVP_MD_CTX_co... sctx->md_ctx)Description
TRUEnever evaluated
FALSEevaluated 207330 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-207330
196 goto err;
never executed: goto err;
0
197 memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK_SIZE);-
198 dctx->key_length = sctx->key_length;-
199 dctx->md = sctx->md;-
200 return 1;
executed 207330 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
207330
201 err:-
202 hmac_ctx_cleanup(dctx);-
203 return 0;
never executed: return 0;
0
204}-
205-
206unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,-
207 const unsigned char *d, size_t n, unsigned char *md,-
208 unsigned int *md_len)-
209{-
210 HMAC_CTX *c = NULL;-
211 static unsigned char m[EVP_MAX_MD_SIZE];-
212 static const unsigned char dummy_key[1] = {'\0'};-
213-
214 if (md == NULL)
md == ((void *)0)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4480 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
5-4480
215 md = m;
executed 5 times by 1 test: md = m;
Executed by:
  • libcrypto.so.1.1
5
216 if ((c = HMAC_CTX_new()) == NULL)
(c = HMAC_CTX_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4485 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4485
217 goto err;
never executed: goto err;
0
218-
219 /* For HMAC_Init_ex, NULL key signals reuse. */-
220 if (key == NULL && key_len == 0) {
key == ((void *)0)Description
TRUEevaluated 1571 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2914 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
key_len == 0Description
TRUEevaluated 1571 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-2914
221 key = dummy_key;-
222 }
executed 1571 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1571
223-
224 if (!HMAC_Init_ex(c, key, key_len, evp_md, NULL))
!HMAC_Init_ex(... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 4485 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4485
225 goto err;
never executed: goto err;
0
226 if (!HMAC_Update(c, d, n))
!HMAC_Update(c, d, n)Description
TRUEnever evaluated
FALSEevaluated 4485 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4485
227 goto err;
never executed: goto err;
0
228 if (!HMAC_Final(c, md, md_len))
!HMAC_Final(c, md, md_len)Description
TRUEnever evaluated
FALSEevaluated 4485 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4485
229 goto err;
never executed: goto err;
0
230 HMAC_CTX_free(c);-
231 return md;
executed 4485 times by 1 test: return md;
Executed by:
  • libcrypto.so.1.1
4485
232 err:-
233 HMAC_CTX_free(c);-
234 return NULL;
never executed: return ((void *)0) ;
0
235}-
236-
237void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags)-
238{-
239 EVP_MD_CTX_set_flags(ctx->i_ctx, flags);-
240 EVP_MD_CTX_set_flags(ctx->o_ctx, flags);-
241 EVP_MD_CTX_set_flags(ctx->md_ctx, flags);-
242}
executed 19206 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
19206
243-
244const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx)-
245{-
246 return ctx->md;
executed 3 times by 1 test: return ctx->md;
Executed by:
  • libcrypto.so.1.1
3
247}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.2