OpenCoverage

m_sigver.c

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

Generated by Squish Coco 4.2.2