Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/ecdsa/ecs_sign.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | ECDSA_SIG * | - | ||||||
6 | ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) | - | ||||||
7 | { | - | ||||||
8 | return never executed: ECDSA_do_sign_ex(dgst, dlen, return ECDSA_do_sign_ex(dgst, dlen, ((void *)0) , ((void *)0) , eckey); never executed: return ECDSA_do_sign_ex(dgst, dlen, ((void *)0) , ((void *)0) , eckey); | 0 | ||||||
9 | ((void *)0) never executed: return ECDSA_do_sign_ex(dgst, dlen, ((void *)0) , ((void *)0) , eckey); | 0 | ||||||
10 | , never executed: return ECDSA_do_sign_ex(dgst, dlen, ((void *)0) , ((void *)0) , eckey); | 0 | ||||||
11 | ((void *)0) never executed: return ECDSA_do_sign_ex(dgst, dlen, ((void *)0) , ((void *)0) , eckey); | 0 | ||||||
12 | , eckey); never executed: return ECDSA_do_sign_ex(dgst, dlen, ((void *)0) , ((void *)0) , eckey); | 0 | ||||||
13 | } | - | ||||||
14 | - | |||||||
15 | ECDSA_SIG * | - | ||||||
16 | ECDSA_do_sign_ex(const unsigned char *dgst, int dlen, const BIGNUM *kinv, | - | ||||||
17 | const BIGNUM *rp, EC_KEY *eckey) | - | ||||||
18 | { | - | ||||||
19 | ECDSA_DATA *ecdsa = ecdsa_check(eckey); | - | ||||||
20 | - | |||||||
21 | if (ecdsa ==
| 0-76 | ||||||
22 | ((void *)0)
| 0-76 | ||||||
23 | ) | - | ||||||
24 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||
25 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||
26 | ; never executed: return ((void *)0) ; | 0 | ||||||
27 | return executed 76 times by 1 test: ecdsa->meth->ecdsa_do_sign(dgst, dlen, kinv, rp, eckey);return ecdsa->meth->ecdsa_do_sign(dgst, dlen, kinv, rp, eckey); Executed by:
executed 76 times by 1 test: return ecdsa->meth->ecdsa_do_sign(dgst, dlen, kinv, rp, eckey); Executed by:
| 76 | ||||||
28 | } | - | ||||||
29 | - | |||||||
30 | int | - | ||||||
31 | ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, | - | ||||||
32 | unsigned int *siglen, EC_KEY *eckey) | - | ||||||
33 | { | - | ||||||
34 | return executed 76 times by 1 test: ECDSA_sign_ex(type, dgst, dlen, sig, siglen, return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, ((void *)0) , ((void *)0) , eckey); Executed by:
executed 76 times by 1 test: return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, ((void *)0) , ((void *)0) , eckey); Executed by:
| 76 | ||||||
35 | ((void *)0) executed 76 times by 1 test: return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, ((void *)0) , ((void *)0) , eckey); Executed by:
| 76 | ||||||
36 | , executed 76 times by 1 test: return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, ((void *)0) , ((void *)0) , eckey); Executed by:
| 76 | ||||||
37 | ((void *)0) executed 76 times by 1 test: return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, ((void *)0) , ((void *)0) , eckey); Executed by:
| 76 | ||||||
38 | , eckey); executed 76 times by 1 test: return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, ((void *)0) , ((void *)0) , eckey); Executed by:
| 76 | ||||||
39 | } | - | ||||||
40 | - | |||||||
41 | int | - | ||||||
42 | ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, unsigned char *sig, | - | ||||||
43 | unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey) | - | ||||||
44 | { | - | ||||||
45 | ECDSA_SIG *s; | - | ||||||
46 | - | |||||||
47 | s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey); | - | ||||||
48 | if (s ==
| 0-76 | ||||||
49 | ((void *)0)
| 0-76 | ||||||
50 | ) { | - | ||||||
51 | *siglen = 0; | - | ||||||
52 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||
53 | } | - | ||||||
54 | *siglen = i2d_ECDSA_SIG(s, &sig); | - | ||||||
55 | ECDSA_SIG_free(s); | - | ||||||
56 | return executed 76 times by 1 test: 1;return 1; Executed by:
executed 76 times by 1 test: return 1; Executed by:
| 76 | ||||||
57 | } | - | ||||||
58 | - | |||||||
59 | int | - | ||||||
60 | ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) | - | ||||||
61 | { | - | ||||||
62 | ECDSA_DATA *ecdsa = ecdsa_check(eckey); | - | ||||||
63 | - | |||||||
64 | if (ecdsa ==
| 0-76 | ||||||
65 | ((void *)0)
| 0-76 | ||||||
66 | ) | - | ||||||
67 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||
68 | return executed 76 times by 1 test: ecdsa->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp);return ecdsa->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp); Executed by:
executed 76 times by 1 test: return ecdsa->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp); Executed by:
| 76 | ||||||
69 | } | - | ||||||
Switch to Source code | Preprocessed file |