Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/ecdsa/ecs_vrf.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | - | |||||||||||||
10 | int | - | ||||||||||||
11 | ECDSA_do_verify(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, | - | ||||||||||||
12 | EC_KEY *eckey) | - | ||||||||||||
13 | { | - | ||||||||||||
14 | ECDSA_DATA *ecdsa = ecdsa_check(eckey); | - | ||||||||||||
15 | - | |||||||||||||
16 | if (ecdsa ==
| 0-380 | ||||||||||||
17 | ((void *)0)
| 0-380 | ||||||||||||
18 | ) | - | ||||||||||||
19 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
20 | return executed 380 times by 1 test: ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, eckey);return ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, eckey); Executed by:
executed 380 times by 1 test: return ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, eckey); Executed by:
| 380 | ||||||||||||
21 | } | - | ||||||||||||
22 | - | |||||||||||||
23 | - | |||||||||||||
24 | - | |||||||||||||
25 | - | |||||||||||||
26 | - | |||||||||||||
27 | - | |||||||||||||
28 | int | - | ||||||||||||
29 | ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, | - | ||||||||||||
30 | const unsigned char *sigbuf, int sig_len, EC_KEY *eckey) | - | ||||||||||||
31 | { | - | ||||||||||||
32 | ECDSA_SIG *s; | - | ||||||||||||
33 | unsigned char *der = | - | ||||||||||||
34 | ((void *)0) | - | ||||||||||||
35 | ; | - | ||||||||||||
36 | const unsigned char *p = sigbuf; | - | ||||||||||||
37 | int derlen = -1; | - | ||||||||||||
38 | int ret = -1; | - | ||||||||||||
39 | - | |||||||||||||
40 | s = ECDSA_SIG_new(); | - | ||||||||||||
41 | if (s ==
| 0-456 | ||||||||||||
42 | ((void *)0)
| 0-456 | ||||||||||||
43 | ) | - | ||||||||||||
44 | return never executed: (ret);return (ret); never executed: return (ret); | 0 | ||||||||||||
45 | if (d2i_ECDSA_SIG(&s, &p, sig_len) ==
| 76-380 | ||||||||||||
46 | ((void *)0)
| 76-380 | ||||||||||||
47 | ) | - | ||||||||||||
48 | goto executed 76 times by 1 test: err;goto err; Executed by:
executed 76 times by 1 test: goto err; Executed by:
| 76 | ||||||||||||
49 | - | |||||||||||||
50 | derlen = i2d_ECDSA_SIG(s, &der); | - | ||||||||||||
51 | if (derlen != sig_len
| 0-380 | ||||||||||||
52 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||
53 | ret = ECDSA_do_verify(dgst, dgst_len, s, eckey); | - | ||||||||||||
54 | - | |||||||||||||
55 | err: code before this statement executed 380 times by 1 test: err: Executed by:
| 380 | ||||||||||||
56 | freezero(der, derlen); | - | ||||||||||||
57 | ECDSA_SIG_free(s); | - | ||||||||||||
58 | return executed 456 times by 1 test: (ret);return (ret); Executed by:
executed 456 times by 1 test: return (ret); Executed by:
| 456 | ||||||||||||
59 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |