| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | int | - |
| 12 | kex_dh_hash( | - |
| 13 | int hash_alg, | - |
| 14 | const char *client_version_string, | - |
| 15 | const char *server_version_string, | - |
| 16 | const u_char *ckexinit, size_t ckexinitlen, | - |
| 17 | const u_char *skexinit, size_t skexinitlen, | - |
| 18 | const u_char *serverhostkeyblob, size_t sbloblen, | - |
| 19 | const BIGNUM *client_dh_pub, | - |
| 20 | const BIGNUM *server_dh_pub, | - |
| 21 | const BIGNUM *shared_secret, | - |
| 22 | u_char *hash, size_t *hashlen) | - |
| 23 | { | - |
| 24 | struct sshbuf *b; | - |
| 25 | int r; | - |
| 26 | | - |
| 27 | if (*| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
hashlen < ssh_digest_bytes(hash_alg)| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
) | 0-80 |
| 28 | return never executed: return -10; -10;never executed: return -10; | 0 |
| 29 | 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 |
| 30 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
| 0-80 |
| 31 | ) | - |
| 32 | return never executed: return -2; -2;never executed: return -2; | 0 |
| 33 | if ((| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_cstring(b, client_version_string)) != 0| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
| 34 | (| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_cstring(b, server_version_string)) != 0| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
| 35 | | - |
| 36 | (| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u32(b, ckexinitlen+1)) != 0| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
| 37 | (| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_u8(b, 20)) != 0| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
| 38 | (| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put(b, ckexinit, ckexinitlen)) != 0| TRUE | 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_u32(b, skexinitlen+1)) != 0| TRUE | 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_u8(b, 20)) != 0| TRUE | 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(b, skexinit, skexinitlen)) != 0| TRUE | 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_string(b, serverhostkeyblob, sbloblen)) != 0| TRUE | 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_bignum2(b, client_dh_pub)) != 0| TRUE | 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_bignum2(b, server_dh_pub)) != 0| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
|| | 0-80 |
| 45 | (| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
r = sshbuf_put_bignum2(b, shared_secret)) != 0| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
) { | 0-80 |
| 46 | sshbuf_free(b); | - |
| 47 | return never executed: return r; r;never executed: return r; | 0 |
| 48 | } | - |
| 49 | | - |
| 50 | | - |
| 51 | | - |
| 52 | if (ssh_digest_buffer(hash_alg, b, hash, *hashlen) != 0| TRUE | never evaluated | | FALSE | evaluated 80 times by 1 test |
) { | 0-80 |
| 53 | sshbuf_free(b); | - |
| 54 | return never executed: return -22; -22;never executed: return -22; | 0 |
| 55 | } | - |
| 56 | sshbuf_free(b); | - |
| 57 | *hashlen = ssh_digest_bytes(hash_alg); | - |
| 58 | | - |
| 59 | | - |
| 60 | | - |
| 61 | returnexecuted 80 times by 1 test: return 0; 0;executed 80 times by 1 test: return 0; | 80 |
| 62 | } | - |
| | |