OpenCoverage

kexdh.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssh/src/kexdh.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11int-
12kex_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 (*
*hashlen < ssh...ytes(hash_alg)Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
hashlen < ssh_digest_bytes(hash_alg)
*hashlen < ssh...ytes(hash_alg)Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
)
0-80
28 return
never executed: return -10;
-10;
never executed: return -10;
0
29 if ((
(b = sshbuf_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
b = sshbuf_new()) ==
(b = sshbuf_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
0-80
30 ((void *)0)
(b = sshbuf_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
0-80
31 )-
32 return
never executed: return -2;
-2;
never executed: return -2;
0
33 if ((
(r = sshbuf_pu..._string)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_cstring(b, client_version_string)) != 0
(r = sshbuf_pu..._string)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
34 (
(r = sshbuf_pu..._string)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_cstring(b, server_version_string)) != 0
(r = sshbuf_pu..._string)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
35-
36 (
(r = sshbuf_pu...itlen+1)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_u32(b, ckexinitlen+1)) != 0
(r = sshbuf_pu...itlen+1)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
37 (
(r = sshbuf_pu...8(b, 20)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_u8(b, 20)) != 0
(r = sshbuf_pu...8(b, 20)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
38 (
(r = sshbuf_pu...initlen)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put(b, ckexinit, ckexinitlen)) != 0
(r = sshbuf_pu...initlen)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
39 (
(r = sshbuf_pu...itlen+1)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_u32(b, skexinitlen+1)) != 0
(r = sshbuf_pu...itlen+1)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
40 (
(r = sshbuf_pu...8(b, 20)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_u8(b, 20)) != 0
(r = sshbuf_pu...8(b, 20)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
41 (
(r = sshbuf_pu...initlen)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put(b, skexinit, skexinitlen)) != 0
(r = sshbuf_pu...initlen)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
42 (
(r = sshbuf_pu...bloblen)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_string(b, serverhostkeyblob, sbloblen)) != 0
(r = sshbuf_pu...bloblen)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
43 (
(r = sshbuf_pu..._dh_pub)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_bignum2(b, client_dh_pub)) != 0
(r = sshbuf_pu..._dh_pub)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
44 (
(r = sshbuf_pu..._dh_pub)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_bignum2(b, server_dh_pub)) != 0
(r = sshbuf_pu..._dh_pub)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
||
0-80
45 (
(r = sshbuf_pu..._secret)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
r = sshbuf_put_bignum2(b, shared_secret)) != 0
(r = sshbuf_pu..._secret)) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
) {
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
ssh_digest_buf...*hashlen) != 0Description
TRUEnever evaluated
FALSEevaluated 80 times by 1 test
Evaluated by:
  • test_kex
) {
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 return
executed 80 times by 1 test: return 0;
Executed by:
  • test_kex
0;
executed 80 times by 1 test: return 0;
Executed by:
  • test_kex
80
62}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2