Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | int | - |
11 | kexgex_hash( | - |
12 | int hash_alg, | - |
13 | const char *client_version_string, | - |
14 | const char *server_version_string, | - |
15 | const u_char *ckexinit, size_t ckexinitlen, | - |
16 | const u_char *skexinit, size_t skexinitlen, | - |
17 | const u_char *serverhostkeyblob, size_t sbloblen, | - |
18 | int min, int wantbits, int max, | - |
19 | const BIGNUM *prime, | - |
20 | const BIGNUM *gen, | - |
21 | const BIGNUM *client_dh_pub, | - |
22 | const BIGNUM *server_dh_pub, | - |
23 | const BIGNUM *shared_secret, | - |
24 | u_char *hash, size_t *hashlen) | - |
25 | { | - |
26 | struct sshbuf *b; | - |
27 | int r; | - |
28 | | - |
29 | if (*TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
hashlen < ssh_digest_bytes(1)TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
) | 0-80 |
30 | return never executed: return -10; -10;never executed: return -10; | 0 |
31 | if ((TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
b = sshbuf_new()) == TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
| 0-80 |
32 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
| 0-80 |
33 | ) | - |
34 | return never executed: return -2; -2;never executed: return -2; | 0 |
35 | if ((TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_cstring(b, client_version_string)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
36 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_cstring(b, server_version_string)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
37 | | - |
38 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u32(b, ckexinitlen+1)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
39 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u8(b, 20)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
40 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put(b, ckexinit, ckexinitlen)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
41 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u32(b, skexinitlen+1)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
42 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u8(b, 20)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
43 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put(b, skexinit, skexinitlen)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
44 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_string(b, serverhostkeyblob, sbloblen)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
45 | (min != -1TRUE | evaluated 80 times by 1 test | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u32(b, min)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
) || | 0-80 |
46 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u32(b, wantbits)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
47 | (max != -1TRUE | evaluated 80 times by 1 test | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u32(b, max)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
) || | 0-80 |
48 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_bignum2(b, prime)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
49 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_bignum2(b, gen)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
50 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_bignum2(b, client_dh_pub)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
51 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_bignum2(b, server_dh_pub)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
52 | (TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_bignum2(b, shared_secret)) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
) { | 0-80 |
53 | sshbuf_free(b); | - |
54 | return never executed: return r; r;never executed: return r; | 0 |
55 | } | - |
56 | | - |
57 | | - |
58 | | - |
59 | if (ssh_digest_buffer(hash_alg, b, hash, *hashlen) != 0TRUE | never evaluated | FALSE | evaluated 80 times by 1 test |
) { | 0-80 |
60 | sshbuf_free(b); | - |
61 | return never executed: return -22; -22;never executed: return -22; | 0 |
62 | } | - |
63 | sshbuf_free(b); | - |
64 | *hashlen = ssh_digest_bytes(hash_alg); | - |
65 | | - |
66 | | - |
67 | | - |
68 | returnexecuted 80 times by 1 test: return 0; 0;executed 80 times by 1 test: return 0; | 80 |
69 | } | - |
| | |