OpenCoverage

m_sigver.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/evp/m_sigver.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright 2006-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 "internal/cryptlib.h"-
12#include <openssl/evp.h>-
13#include <openssl/objects.h>-
14#include <openssl/x509.h>-
15#include "internal/evp_int.h"-
16#include "evp_locl.h"-
17-
18static int update(EVP_MD_CTX *ctx, const void *data, size_t datalen)-
19{-
20 EVPerr(EVP_F_UPDATE, EVP_R_ONLY_ONESHOT_SUPPORTED);-
21 return 0;
executed 4 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
4
22}-
23-
24static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,-
25 const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey,-
26 int ver)-
27{-
28 if (ctx->pctx == NULL)
ctx->pctx == ((void *)0)Description
TRUEevaluated 24489 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3-24489
29 ctx->pctx = EVP_PKEY_CTX_new(pkey, e);
executed 24489 times by 1 test: ctx->pctx = EVP_PKEY_CTX_new(pkey, e);
Executed by:
  • libcrypto.so.1.1
24489
30 if (ctx->pctx == NULL)
ctx->pctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 24492 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24492
31 return 0;
never executed: return 0;
0
32-
33 if (!(ctx->pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM)) {
!(ctx->pctx->pmeth->flags & 4)Description
TRUEevaluated 24370 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 122 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
122-24370
34-
35 if (type == NULL) {
type == ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24368 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
2-24368
36 int def_nid;-
37 if (EVP_PKEY_get_default_digest_nid(pkey, &def_nid) > 0)
EVP_PKEY_get_d... &def_nid) > 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-2
38 type = EVP_get_digestbynid(def_nid);
executed 2 times by 1 test: type = EVP_get_digestbyname(OBJ_nid2sn(def_nid));
Executed by:
  • libcrypto.so.1.1
2
39 }
executed 2 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
2
40-
41 if (type == NULL) {
type == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 24370 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24370
42 EVPerr(EVP_F_DO_SIGVER_INIT, EVP_R_NO_DEFAULT_DIGEST);-
43 return 0;
never executed: return 0;
0
44 }-
45 }
executed 24370 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
24370
46-
47 if (ver) {
verDescription
TRUEevaluated 3194 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21298 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3194-21298
48 if (ctx->pctx->pmeth->verifyctx_init) {
ctx->pctx->pme...verifyctx_initDescription
TRUEnever evaluated
FALSEevaluated 3194 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3194
49 if (ctx->pctx->pmeth->verifyctx_init(ctx->pctx, ctx) <= 0)
ctx->pctx->pme...ctx, ctx) <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
50 return 0;
never executed: return 0;
0
51 ctx->pctx->operation = EVP_PKEY_OP_VERIFYCTX;-
52 } else if (ctx->pctx->pmeth->digestverify != 0) {
never executed: end of block
ctx->pctx->pme...estverify != 0Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3173 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3173
53 ctx->pctx->operation = EVP_PKEY_OP_VERIFY;-
54 ctx->update = update;-
55 } else if (EVP_PKEY_verify_init(ctx->pctx) <= 0) {
executed 21 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
EVP_PKEY_verif...tx->pctx) <= 0Description
TRUEnever evaluated
FALSEevaluated 3173 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3173
56 return 0;
never executed: return 0;
0
57 }-
58 } else {
executed 3194 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3194
59 if (ctx->pctx->pmeth->signctx_init) {
ctx->pctx->pmeth->signctx_initDescription
TRUEevaluated 19278 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2020 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
2020-19278
60 if (ctx->pctx->pmeth->signctx_init(ctx->pctx, ctx) <= 0)
ctx->pctx->pme...ctx, ctx) <= 0Description
TRUEnever evaluated
FALSEevaluated 19278 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-19278
61 return 0;
never executed: return 0;
0
62 ctx->pctx->operation = EVP_PKEY_OP_SIGNCTX;-
63 } else if (ctx->pctx->pmeth->digestsign != 0) {
executed 19278 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
ctx->pctx->pme...igestsign != 0Description
TRUEevaluated 29 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1991 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
29-19278
64 ctx->pctx->operation = EVP_PKEY_OP_SIGN;-
65 ctx->update = update;-
66 } else if (EVP_PKEY_sign_init(ctx->pctx) <= 0) {
executed 29 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
EVP_PKEY_sign_...tx->pctx) <= 0Description
TRUEnever evaluated
FALSEevaluated 1991 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1991
67 return 0;
never executed: return 0;
0
68 }-
69 }
executed 21298 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
21298
70 if (EVP_PKEY_CTX_set_signature_md(ctx->pctx, type) <= 0)
EVP_PKEY_CTX_c...*)(type)) <= 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24489 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3-24489
71 return 0;
executed 3 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
3
72 if (pctx)
pctxDescription
TRUEevaluated 3930 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 20559 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3930-20559
73 *pctx = ctx->pctx;
executed 3930 times by 1 test: *pctx = ctx->pctx;
Executed by:
  • libcrypto.so.1.1
3930
74 if (ctx->pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM)
ctx->pctx->pmeth->flags & 4Description
TRUEevaluated 120 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24369 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
120-24369
75 return 1;
executed 120 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
120
76 if (!EVP_DigestInit_ex(ctx, type, e))
!EVP_DigestIni...(ctx, type, e)Description
TRUEnever evaluated
FALSEevaluated 24369 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24369
77 return 0;
never executed: return 0;
0
78 /*-
79 * This indicates the current algorithm requires-
80 * special treatment before hashing the tbs-message.-
81 */-
82 if (ctx->pctx->pmeth->digest_custom != NULL)
ctx->pctx->pme...!= ((void *)0)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24366 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3-24366
83 return ctx->pctx->pmeth->digest_custom(ctx->pctx, ctx);
executed 3 times by 1 test: return ctx->pctx->pmeth->digest_custom(ctx->pctx, ctx);
Executed by:
  • libcrypto.so.1.1
3
84-
85 return 1;
executed 24366 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
24366
86}-
87-
88int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,-
89 const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey)-
90{-
91 return do_sigver_init(ctx, pctx, type, e, pkey, 0);
executed 21298 times by 1 test: return do_sigver_init(ctx, pctx, type, e, pkey, 0);
Executed by:
  • libcrypto.so.1.1
21298
92}-
93-
94int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,-
95 const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey)-
96{-
97 return do_sigver_init(ctx, pctx, type, e, pkey, 1);
executed 3194 times by 1 test: return do_sigver_init(ctx, pctx, type, e, pkey, 1);
Executed by:
  • libcrypto.so.1.1
3194
98}-
99-
100int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,-
101 size_t *siglen)-
102{-
103 int sctx = 0, r = 0;-
104 EVP_PKEY_CTX *pctx = ctx->pctx;-
105 if (pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM) {
pctx->pmeth->flags & 4Description
TRUEevaluated 144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 83271 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
144-83271
106 if (!sigret)
!sigretDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
72
107 return pctx->pmeth->signctx(pctx, sigret, siglen, ctx);
executed 72 times by 1 test: return pctx->pmeth->signctx(pctx, sigret, siglen, ctx);
Executed by:
  • libcrypto.so.1.1
72
108 if (ctx->flags & EVP_MD_CTX_FLAG_FINALISE)
ctx->flags & 0x0200Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-72
109 r = pctx->pmeth->signctx(pctx, sigret, siglen, ctx);
never executed: r = pctx->pmeth->signctx(pctx, sigret, siglen, ctx);
0
110 else {-
111 EVP_PKEY_CTX *dctx = EVP_PKEY_CTX_dup(ctx->pctx);-
112 if (!dctx)
!dctxDescription
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-72
113 return 0;
never executed: return 0;
0
114 r = dctx->pmeth->signctx(dctx, sigret, siglen, ctx);-
115 EVP_PKEY_CTX_free(dctx);-
116 }
executed 72 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
72
117 return r;
executed 72 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
72
118 }-
119 if (pctx->pmeth->signctx)
pctx->pmeth->signctxDescription
TRUEevaluated 81201 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2070 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
2070-81201
120 sctx = 1;
executed 81201 times by 1 test: sctx = 1;
Executed by:
  • libcrypto.so.1.1
81201
121 else-
122 sctx = 0;
executed 2070 times by 1 test: sctx = 0;
Executed by:
  • libcrypto.so.1.1
2070
123 if (sigret) {
sigretDescription
TRUEevaluated 83162 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 109 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
109-83162
124 unsigned char md[EVP_MAX_MD_SIZE];-
125 unsigned int mdlen = 0;-
126 if (ctx->flags & EVP_MD_CTX_FLAG_FINALISE) {
ctx->flags & 0x0200Description
TRUEnever evaluated
FALSEevaluated 83162 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-83162
127 if (sctx)
sctxDescription
TRUEnever evaluated
FALSEnever evaluated
0
128 r = ctx->pctx->pmeth->signctx(ctx->pctx, sigret, siglen, ctx);
never executed: r = ctx->pctx->pmeth->signctx(ctx->pctx, sigret, siglen, ctx);
0
129 else-
130 r = EVP_DigestFinal_ex(ctx, md, &mdlen);
never executed: r = EVP_DigestFinal_ex(ctx, md, &mdlen);
0
131 } else {-
132 EVP_MD_CTX *tmp_ctx = EVP_MD_CTX_new();-
133 if (tmp_ctx == NULL)
tmp_ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 83162 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-83162
134 return 0;
never executed: return 0;
0
135 if (!EVP_MD_CTX_copy_ex(tmp_ctx, ctx)) {
!EVP_MD_CTX_co...(tmp_ctx, ctx)Description
TRUEnever evaluated
FALSEevaluated 83162 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-83162
136 EVP_MD_CTX_free(tmp_ctx);-
137 return 0;
never executed: return 0;
0
138 }-
139 if (sctx)
sctxDescription
TRUEevaluated 81171 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1991 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1991-81171
140 r = tmp_ctx->pctx->pmeth->signctx(tmp_ctx->pctx,
executed 81171 times by 1 test: r = tmp_ctx->pctx->pmeth->signctx(tmp_ctx->pctx, sigret, siglen, tmp_ctx);
Executed by:
  • libcrypto.so.1.1
81171
141 sigret, siglen, tmp_ctx);
executed 81171 times by 1 test: r = tmp_ctx->pctx->pmeth->signctx(tmp_ctx->pctx, sigret, siglen, tmp_ctx);
Executed by:
  • libcrypto.so.1.1
81171
142 else-
143 r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen);
executed 1991 times by 1 test: r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen);
Executed by:
  • libcrypto.so.1.1
1991
144 EVP_MD_CTX_free(tmp_ctx);-
145 }
executed 83162 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
83162
146 if (sctx || !r)
sctxDescription
TRUEevaluated 81171 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1991 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
!rDescription
TRUEnever evaluated
FALSEevaluated 1991 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-81171
147 return r;
executed 81171 times by 1 test: return r;
Executed by:
  • libcrypto.so.1.1
81171
148 if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, md, mdlen) <= 0)
EVP_PKEY_sign(...d, mdlen) <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1989 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
2-1989
149 return 0;
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
2
150 } else {
executed 1989 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1989
151 if (sctx) {
sctxDescription
TRUEevaluated 30 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 79 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
30-79
152 if (pctx->pmeth->signctx(pctx, sigret, siglen, ctx) <= 0)
pctx->pmeth->s...len, ctx) <= 0Description
TRUEnever evaluated
FALSEevaluated 30 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-30
153 return 0;
never executed: return 0;
0
154 } else {
executed 30 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
30
155 int s = EVP_MD_size(ctx->digest);-
156 if (s < 0 || EVP_PKEY_sign(pctx, sigret, siglen, NULL, s) <= 0)
s < 0Description
TRUEnever evaluated
FALSEevaluated 79 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
EVP_PKEY_sign(...*)0) , s) <= 0Description
TRUEnever evaluated
FALSEevaluated 79 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-79
157 return 0;
never executed: return 0;
0
158 }
executed 79 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
79
159 }-
160 return 1;
executed 2098 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
2098
161}-
162-
163int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen,-
164 const unsigned char *tbs, size_t tbslen)-
165{-
166 if (ctx->pctx->pmeth->digestsign != NULL)
ctx->pctx->pme...!= ((void *)0)Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1914 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
40-1914
167 return ctx->pctx->pmeth->digestsign(ctx, sigret, siglen, tbs, tbslen);
executed 40 times by 1 test: return ctx->pctx->pmeth->digestsign(ctx, sigret, siglen, tbs, tbslen);
Executed by:
  • libcrypto.so.1.1
40
168 if (sigret != NULL && EVP_DigestSignUpdate(ctx, tbs, tbslen) <= 0)
sigret != ((void *)0)Description
TRUEevaluated 1913 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
EVP_DigestUpda...s,tbslen) <= 0Description
TRUEnever evaluated
FALSEevaluated 1913 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1913
169 return 0;
never executed: return 0;
0
170 return EVP_DigestSignFinal(ctx, sigret, siglen);
executed 1914 times by 1 test: return EVP_DigestSignFinal(ctx, sigret, siglen);
Executed by:
  • libcrypto.so.1.1
1914
171}-
172-
173int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,-
174 size_t siglen)-
175{-
176 unsigned char md[EVP_MAX_MD_SIZE];-
177 int r = 0;-
178 unsigned int mdlen = 0;-
179 int vctx = 0;-
180-
181 if (ctx->pctx->pmeth->verifyctx)
ctx->pctx->pmeth->verifyctxDescription
TRUEnever evaluated
FALSEevaluated 3170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3170
182 vctx = 1;
never executed: vctx = 1;
0
183 else-
184 vctx = 0;
executed 3170 times by 1 test: vctx = 0;
Executed by:
  • libcrypto.so.1.1
3170
185 if (ctx->flags & EVP_MD_CTX_FLAG_FINALISE) {
ctx->flags & 0x0200Description
TRUEnever evaluated
FALSEevaluated 3170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3170
186 if (vctx)
vctxDescription
TRUEnever evaluated
FALSEnever evaluated
0
187 r = ctx->pctx->pmeth->verifyctx(ctx->pctx, sig, siglen, ctx);
never executed: r = ctx->pctx->pmeth->verifyctx(ctx->pctx, sig, siglen, ctx);
0
188 else-
189 r = EVP_DigestFinal_ex(ctx, md, &mdlen);
never executed: r = EVP_DigestFinal_ex(ctx, md, &mdlen);
0
190 } else {-
191 EVP_MD_CTX *tmp_ctx = EVP_MD_CTX_new();-
192 if (tmp_ctx == NULL)
tmp_ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3170
193 return -1;
never executed: return -1;
0
194 if (!EVP_MD_CTX_copy_ex(tmp_ctx, ctx)) {
!EVP_MD_CTX_co...(tmp_ctx, ctx)Description
TRUEnever evaluated
FALSEevaluated 3170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3170
195 EVP_MD_CTX_free(tmp_ctx);-
196 return -1;
never executed: return -1;
0
197 }-
198 if (vctx)
vctxDescription
TRUEnever evaluated
FALSEevaluated 3170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3170
199 r = tmp_ctx->pctx->pmeth->verifyctx(tmp_ctx->pctx,
never executed: r = tmp_ctx->pctx->pmeth->verifyctx(tmp_ctx->pctx, sig, siglen, tmp_ctx);
0
200 sig, siglen, tmp_ctx);
never executed: r = tmp_ctx->pctx->pmeth->verifyctx(tmp_ctx->pctx, sig, siglen, tmp_ctx);
0
201 else-
202 r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen);
executed 3170 times by 1 test: r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen);
Executed by:
  • libcrypto.so.1.1
3170
203 EVP_MD_CTX_free(tmp_ctx);-
204 }
executed 3170 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3170
205 if (vctx || !r)
vctxDescription
TRUEnever evaluated
FALSEevaluated 3170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
!rDescription
TRUEnever evaluated
FALSEevaluated 3170 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3170
206 return r;
never executed: return r;
0
207 return EVP_PKEY_verify(ctx->pctx, sig, siglen, md, mdlen);
executed 3170 times by 1 test: return EVP_PKEY_verify(ctx->pctx, sig, siglen, md, mdlen);
Executed by:
  • libcrypto.so.1.1
3170
208}-
209-
210int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret,-
211 size_t siglen, const unsigned char *tbs, size_t tbslen)-
212{-
213 if (ctx->pctx->pmeth->digestverify != NULL)
ctx->pctx->pme...!= ((void *)0)Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3098 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
19-3098
214 return ctx->pctx->pmeth->digestverify(ctx, sigret, siglen, tbs, tbslen);
executed 19 times by 1 test: return ctx->pctx->pmeth->digestverify(ctx, sigret, siglen, tbs, tbslen);
Executed by:
  • libcrypto.so.1.1
19
215 if (EVP_DigestVerifyUpdate(ctx, tbs, tbslen) <= 0)
EVP_DigestUpda...s,tbslen) <= 0Description
TRUEnever evaluated
FALSEevaluated 3098 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3098
216 return -1;
never executed: return -1;
0
217 return EVP_DigestVerifyFinal(ctx, sigret, siglen);
executed 3098 times by 1 test: return EVP_DigestVerifyFinal(ctx, sigret, siglen);
Executed by:
  • libcrypto.so.1.1
3098
218}-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.2