OpenCoverage

OpenSSH Test Coverage

Function Tree

Page:<>1
Condition %: 100.000% (1/1)
2
Condition %: 100.000% (1/1)
3
Condition %:  80.000% (8/10)
4
Condition %:  56.522% (13/23)
56
Condition %:  26.374% (24/91)
7
Condition %:  0.000% (0/1)
8
Condition %:  0.000% (0/33)
9
Condition %:  0.000% (0/159)
10
Condition %:  0.000% (0/9)
...20
Condition %:  0.000% (0/19)
21
Condition %:  0.000% (0/1)
FunctionCondition %▾eLOC - Effective Lines of CodeMcCabe - Cyclomatic Complexity
sshkey_save_private
Name: sshkey_save_private
Prototype: int sshkey_save_private(struct sshkey *key, const char *filename, const char *passphrase, const char *comment, int force_new_format, const char *new_format_cipher, int new_format_rounds)
Coverage:  45.455% (5/11)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/authfile.c
Lines: 74-93
 45.455% (5/11)
185
host_hash
Name: host_hash
Prototype: char * host_hash(const char *host, const char *name_from_hostfile, u_int src_len)
Coverage:  45.455% (10/22)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/hostfile.c
Lines: 119-155
 45.455% (10/22)
385
cert_new
Name: cert_new
Prototype: static struct sshkey_cert * cert_new(void)
Coverage:  45.455% (5/11)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 473-491
 45.455% (5/11)
493
input_kex_c25519_init
Name: input_kex_c25519_init
Prototype: static int input_kex_c25519_init(int type, u_int32_t seq, struct ssh *ssh)
Coverage:  45.283% (24/53)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kexc25519s.c
Lines: 54-158
 45.283% (24/53)
10515
input_kex_ecdh_init
Name: input_kex_ecdh_init
Prototype: static int input_kex_ecdh_init(int type, u_int32_t seq, struct ssh *ssh)
Coverage:  44.928% (31/69)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kexecdhs.c
Lines: 60-201
 44.928% (31/69)
15019
sshkey_load_private
Name: sshkey_load_private
Prototype: int sshkey_load_private(const char *filename, const char *passphrase, struct sshkey **keyp, char **commentp)
Coverage:  44.828% (13/29)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/authfile.c
Lines: 227-262
 44.828% (13/29)
479
cipher_init
Name: cipher_init
Prototype: int cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher, const u_char *key, u_int keylen, const u_char *iv, u_int ivlen, int do_encrypt)
Coverage:  44.681% (21/47)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/cipher.c
Lines: 235-322
 44.681% (21/47)
8314
sshkey_perm_ok
Name: sshkey_perm_ok
Prototype: int sshkey_perm_ok(int fd, const char *filename)
Coverage:  44.444% (4/9)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/authfile.c
Lines: 139-165
 44.444% (4/9)
133
ssh_rsa_complete_crt_parameters
Name: ssh_rsa_complete_crt_parameters
Prototype: int ssh_rsa_complete_crt_parameters(struct sshkey *key, const BIGNUM *iqmp)
Coverage:  44.444% (16/36)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-rsa.c
Lines: 108-160
 44.444% (16/36)
1548
kexgex_client
Name: kexgex_client
Prototype: int kexgex_client(struct ssh *ssh)
Coverage:  44.444% (8/18)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kexgexc.c
Lines: 59-91
 44.444% (8/18)
214
bitmap_clear_bit
Name: bitmap_clear_bit
Prototype: void bitmap_clear_bit(struct bitmap *b, u_int n)
Coverage:  44.444% (4/9)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/bitmap.c
Lines: 125-138
 44.444% (4/9)
83
input_kex_dh_gex_group
Name: input_kex_dh_gex_group
Prototype: static int input_kex_dh_gex_group(int type, u_int32_t seq, struct ssh *ssh)
Coverage:  44.118% (15/34)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kexgexc.c
Lines: 93-145
 44.118% (15/34)
638
ssh_ed25519_verify
Name: ssh_ed25519_verify
Prototype: int ssh_ed25519_verify(const struct sshkey *key, const u_char *signature, size_t signaturelen, const u_char *data, size_t datalen, u_int compat)
Coverage:  44.048% (37/84)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-ed25519.c
Lines: 94-167
 44.048% (37/84)
26420
kex_new
Name: kex_new
Prototype: int kex_new(struct ssh *ssh, char *proposal[PROPOSAL_MAX], struct kex **kexp)
Coverage:  43.750% (7/16)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kex.c
Lines: 580-605
 43.750% (7/16)
316
kex_from_blob
Name: kex_from_blob
Prototype: static int kex_from_blob(struct sshbuf *m, struct kex **kexp)
Coverage:  43.182% (19/44)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 2324-2364
 43.182% (19/44)
637
xmalloc
Name: xmalloc
Prototype: void * xmalloc(size_t size)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/xmalloc.c
Lines: 39-50
 42.857% (3/7)
93
vfmprintf
Name: vfmprintf
Prototype: int vfmprintf(FILE *stream, const char *fmt, va_list ap)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/utf8.c
Lines: 263-275
 42.857% (3/7)
143
try_read_key
Name: try_read_key
Prototype: static struct sshkey * try_read_key(char **cpp)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-keygen.c
Lines: 840-853
 42.857% (3/7)
143
sshkey_save_private_blob
Name: sshkey_save_private_blob
Prototype: static int sshkey_save_private_blob(struct sshbuf *keybuf, const char *filename)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/authfile.c
Lines: 55-72
 42.857% (3/7)
303
sshbuf_new
Name: sshbuf_new
Prototype: struct sshbuf * sshbuf_new(void)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshbuf.c
Lines: 68-85
 42.857% (3/7)
283
ssh_digest_copy_state
Name: ssh_digest_copy_state
Prototype: int ssh_digest_copy_state(struct ssh_digest_ctx *from, struct ssh_digest_ctx *to)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/digest-openssl.c
Lines: 132-141
 42.857% (3/7)
53
seed_rng
Name: seed_rng
Prototype: void seed_rng(void)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/entropy.c
Lines: 216-240
 42.857% (3/7)
133
kex_input_newkeys
Name: kex_input_newkeys
Prototype: static int kex_input_newkeys(int type, u_int32_t seq, struct ssh *ssh)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kex.c
Lines: 476-496
 42.857% (3/7)
193
dh_new_group_fallback
Name: dh_new_group_fallback
Prototype: DH * dh_new_group_fallback(int max)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/dh.c
Lines: 458-471
 42.857% (3/7)
93
dh_new_group
Name: dh_new_group
Prototype: DH * dh_new_group(BIGNUM *gen, BIGNUM *modulus)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/dh.c
Lines: 324-337
 42.857% (3/7)
213
choose_kex
Name: choose_kex
Prototype: static int choose_kex(struct kex *k, char *client, char *server)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kex.c
Lines: 757-773
 42.857% (3/7)
193
choose_hostkeyalg
Name: choose_hostkeyalg
Prototype: static int choose_hostkeyalg(struct kex *k, char *client, char *server)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kex.c
Lines: 775-789
 42.857% (3/7)
163
choose_enc
Name: choose_enc
Prototype: static int choose_enc(struct sshenc *enc, char *client, char *server)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kex.c
Lines: 698-717
 42.857% (3/7)
303
bitmap_new
Name: bitmap_new
Prototype: struct bitmap * bitmap_new(void)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/bitmap.c
Lines: 37-51
 42.857% (3/7)
213
addr_host_is_all0s
Name: addr_host_is_all0s
Prototype: static int addr_host_is_all0s(const struct xaddr *a, u_int masklen)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/addrmatch.c
Lines: 294-305
 42.857% (3/7)
73
_ssh_verify_host_key
Name: _ssh_verify_host_key
Prototype: int _ssh_verify_host_key(struct sshkey *hostkey, struct ssh *ssh)
Coverage:  42.857% (3/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh_api.c
Lines: 467-479
 42.857% (3/7)
103
ssh_ecdsa_verify
Name: ssh_ecdsa_verify
Prototype: int ssh_ecdsa_verify(const struct sshkey *key, const u_char *signature, size_t signaturelen, const u_char *data, size_t datalen, u_int compat)
Coverage:  42.697% (38/89)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-ecdsa.c
Lines: 113-200
 42.697% (38/89)
27922
sshkey_from_private
Name: sshkey_from_private
Prototype: int sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
Coverage:  42.647% (29/68)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 1734-1876
 42.647% (29/68)
17725
kexdh_client
Name: kexdh_client
Prototype: int kexdh_client(struct ssh *ssh)
Coverage:  42.308% (11/26)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kexdhc.c
Lines: 56-105
 42.308% (11/26)
3511
chacha_encrypt_bytes
Name: chacha_encrypt_bytes
Prototype: static void chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
Coverage:  42.308% (11/26)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/openbsd-compat/chacha_private.h
Lines: 88-222
 42.308% (11/26)
10010
kexdh_server
Name: kexdh_server
Prototype: int kexdh_server(struct ssh *ssh)
Coverage:  42.105% (8/19)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kexdhs.c
Lines: 56-93
 42.105% (8/19)
2410
sshkey_load_file
Name: sshkey_load_file
Prototype: int sshkey_load_file(int fd, struct sshbuf *blob)
Coverage:  41.935% (13/31)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/authfile.c
Lines: 96-135
 41.935% (13/31)
5711
xcalloc
Name: xcalloc
Prototype: void * xcalloc(size_t nmemb, size_t size)
Coverage:  41.667% (5/12)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/xmalloc.c
Lines: 52-66
 41.667% (5/12)
144
ssh_digest_start
Name: ssh_digest_start
Prototype: struct ssh_digest_ctx * ssh_digest_start(int alg)
Coverage:  41.667% (5/12)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/digest-openssl.c
Lines: 112-130
 41.667% (5/12)
384
ssh_digest_by_alg
Name: ssh_digest_by_alg
Prototype: static const struct ssh_digest * ssh_digest_by_alg(int alg)
Coverage:  41.667% (5/12)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/digest-openssl.c
Lines: 66-76
 41.667% (5/12)
214
fingerprint_b64
Name: fingerprint_b64
Prototype: static char * fingerprint_b64(const char *alg, u_char *dgst_raw, size_t dgst_raw_len)
Coverage:  41.667% (5/12)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 943-965
 41.667% (5/12)
424
dh_gen_key
Name: dh_gen_key
Prototype: int dh_gen_key(DH *dh, int need)
Coverage:  41.667% (10/24)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/dh.c
Lines: 270-297
 41.667% (10/24)
336
atomicio6
Name: atomicio6
Prototype: size_t atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n, int (*cb)(void *, size_t), void *cb_arg)
Coverage:  41.667% (10/24)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/atomicio.c
Lines: 51-89
 41.667% (10/24)
628
sshbuf_putfv
Name: sshbuf_putfv
Prototype: int sshbuf_putfv(struct sshbuf *buf, const char *fmt, va_list ap)
Coverage:  41.176% (7/17)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshbuf-getput-basic.c
Lines: 266-297
 41.176% (7/17)
587
sshkey_ec_validate_private
Name: sshkey_ec_validate_private
Prototype: int sshkey_ec_validate_private(const EC_KEY *key)
Coverage:  40.909% (9/22)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 3309-3346
 40.909% (9/22)
328
sshkey_ec_validate_public
Name: sshkey_ec_validate_public
Prototype: int sshkey_ec_validate_public(const EC_GROUP *group, const EC_POINT *public)
Coverage:  40.426% (19/47)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 3232-3307
 40.426% (19/47)
7113
strtonum
Name: strtonum
Prototype: long long strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp)
Coverage:  40.000% (12/30)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/openbsd-compat/strtonum.c
Lines: 33-70
 40.000% (12/30)
717
sshbuf_put_ec
Name: sshbuf_put_ec
Prototype: int sshbuf_put_ec(struct sshbuf *buf, const EC_POINT *v, const EC_GROUP *g)
Coverage:  40.000% (4/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshbuf-getput-crypto.c
Lines: 191-215
 40.000% (4/10)
244
sshbuf_fromb
Name: sshbuf_fromb
Prototype: struct sshbuf * sshbuf_fromb(struct sshbuf *buf)
Coverage:  40.000% (4/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshbuf.c
Lines: 117-131
 40.000% (4/10)
234
ssh_hmac_start
Name: ssh_hmac_start
Prototype: struct ssh_hmac_ctx * ssh_hmac_start(int alg)
Coverage:  40.000% (6/15)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/hmac.c
Lines: 42-61
 40.000% (6/15)
365
ssh_digest_final
Name: ssh_digest_final
Prototype: int ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
Coverage:  40.000% (6/15)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/digest-openssl.c
Lines: 157-172
 40.000% (6/15)
175
masklen_valid
Name: masklen_valid
Prototype: static inline int masklen_valid(int af, u_int masklen)
Coverage:  40.000% (4/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/addrmatch.c
Lines: 63-74
 40.000% (4/10)
44
lowercase
Name: lowercase
Prototype: void lowercase(char *s)
Coverage:  40.000% (6/15)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/misc.c
Lines: 1476-1481
 40.000% (6/15)
264
kex_send_kexinit
Name: kex_send_kexinit
Prototype: int kex_send_kexinit(struct ssh *ssh)
Coverage:  40.000% (8/20)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kex.c
Lines: 498-525
 40.000% (8/20)
246
do_print_public
Name: do_print_public
Prototype: static void do_print_public(struct passwd *pw)
Coverage:  40.000% (4/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-keygen.c
Lines: 777-794
 40.000% (4/10)
254
dh_estimate
Name: dh_estimate
Prototype: u_int dh_estimate(int bits)
Coverage:  40.000% (4/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/dh.c
Lines: 480-490
 40.000% (4/10)
74
addr_netmatch
Name: addr_netmatch
Prototype: static int addr_netmatch(const struct xaddr *host, const struct xaddr *net, u_int masklen)
Coverage:  40.000% (4/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/addrmatch.c
Lines: 348-361
 40.000% (4/10)
84
ssh_rsa_verify
Name: ssh_rsa_verify
Prototype: int ssh_rsa_verify(const struct sshkey *key, const u_char *sig, size_t siglen, const u_char *data, size_t datalen, const char *alg)
Coverage:  39.080% (34/87)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-rsa.c
Lines: 244-329
 39.080% (34/87)
26923
ssh_dss_verify
Name: ssh_dss_verify
Prototype: int ssh_dss_verify(const struct sshkey *key, const u_char *signature, size_t signaturelen, const u_char *data, size_t datalen, u_int compat)
Coverage:  38.889% (35/90)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-dss.c
Lines: 119-208
 38.889% (35/90)
28923
ssh_alloc_session_state
Name: ssh_alloc_session_state
Prototype: struct ssh * ssh_alloc_session_state(void)
Coverage:  38.889% (7/18)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 223-262
 38.889% (7/18)
754
_ssh_order_hostkeyalgs
Name: _ssh_order_hostkeyalgs
Prototype: int _ssh_order_hostkeyalgs(struct ssh *ssh)
Coverage:  38.636% (17/44)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh_api.c
Lines: 482-532
 38.636% (17/44)
16112
ssh_digest_memory
Name: ssh_digest_memory
Prototype: int ssh_digest_memory(int alg, const void *m, size_t mlen, u_char *d, size_t dlen)
Coverage:  38.462% (5/13)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/digest-openssl.c
Lines: 183-199
 38.462% (5/13)
205
newkeys_to_blob
Name: newkeys_to_blob
Prototype: static int newkeys_to_blob(struct sshbuf *m, struct ssh *ssh, int mode)
Coverage:  38.462% (15/39)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 2186-2227
 38.462% (15/39)
399
dh_new_group_asc
Name: dh_new_group_asc
Prototype: DH * dh_new_group_asc(const char *gen, const char *modulus)
Coverage:  38.462% (5/13)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/dh.c
Lines: 299-318
 38.462% (5/13)
365
buffer_get_bignum_bits
Name: buffer_get_bignum_bits
Prototype: static void buffer_get_bignum_bits(struct sshbuf *b, BIGNUM *value)
Coverage:  38.462% (5/13)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-keygen.c
Lines: 424-440
 38.462% (5/13)
145
msetlocale
Name: msetlocale
Prototype: void msetlocale(void)
Coverage:  36.842% (7/19)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/utf8.c
Lines: 310-340
 36.842% (7/19)
575
ssh_packet_close_internal
Name: ssh_packet_close_internal
Prototype: static void ssh_packet_close_internal(struct ssh *ssh, int do_close)
Coverage:  36.364% (12/33)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 581-644
 36.364% (12/33)
7011
kex_send_newkeys
Name: kex_send_newkeys
Prototype: int kex_send_newkeys(struct ssh *ssh)
Coverage:  36.364% (4/11)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/kex.c
Lines: 420-436
 36.364% (4/11)
124
assemble_algorithms
Name: assemble_algorithms
Prototype: static void assemble_algorithms(ServerOptions *o)
Coverage:  36.364% (8/22)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/servconf.c
Lines: 192-221
 36.364% (8/22)
198
sshkey_write
Name: sshkey_write
Prototype: int sshkey_write(const struct sshkey *key, FILE *f)
Coverage:  35.714% (5/14)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 1436-1457
 35.714% (5/14)
266
do_convert_private_ssh2_from_blob
Name: do_convert_private_ssh2_from_blob
Prototype: static struct sshkey * do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
Coverage:  35.556% (48/135)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-keygen.c
Lines: 442-578
 35.556% (48/135)
42630
ssh_packet_send2_wrapped
Name: ssh_packet_send2_wrapped
Prototype: int ssh_packet_send2_wrapped(struct ssh *ssh)
Coverage:  35.135% (39/111)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 1026-1182
 35.135% (39/111)
11930
ssh_packet_read_poll2
Name: ssh_packet_read_poll2
Prototype: int ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
Coverage:  34.973% (64/183)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 1443-1673
 34.973% (64/183)
16948
sshkey_parse_private2
Name: sshkey_parse_private2
Prototype: static int sshkey_parse_private2(struct sshbuf *blob, int type, const char *passphrase, struct sshkey **keyp, char **commentp)
Coverage:  34.012% (117/344)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 3551-3768
 34.012% (117/344)
124478
sshbuf_dtob16
Name: sshbuf_dtob16
Prototype: char * sshbuf_dtob16(struct sshbuf *buf)
Coverage:  33.333% (7/21)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshbuf-misc.c
Lines: 72-90
 33.333% (7/21)
535
ssh_packet_log_type
Name: ssh_packet_log_type
Prototype: int ssh_packet_log_type(u_char type)
Coverage:  33.333% (2/6)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 1010-1021
 33.333% (2/6)
35
do_convert_from_ssh2
Name: do_convert_from_ssh2
Prototype: static void do_convert_from_ssh2(struct passwd *pw, struct sshkey **k, int *private)
Coverage:  33.333% (28/84)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-keygen.c
Lines: 606-653
 33.333% (28/84)
25118
cleanhostname
Name: cleanhostname
Prototype: char * cleanhostname(char *host)
Coverage:  33.333% (2/6)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/misc.c
Lines: 531-539
 33.333% (2/6)
42
addr_unicast_masklen
Name: addr_unicast_masklen
Prototype: static int addr_unicast_masklen(int af)
Coverage:  33.333% (2/6)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/addrmatch.c
Lines: 50-61
 33.333% (2/6)
44
addr_and
Name: addr_and
Prototype: static int addr_and(struct xaddr *dst, const struct xaddr *a, const struct xaddr *b)
Coverage:  33.333% (6/18)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/addrmatch.c
Lines: 149-170
 33.333% (6/18)
246
sshkey_private_deserialize
Name: sshkey_private_deserialize
Prototype: int sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
Coverage:  33.032% (73/221)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 2923-3229
 33.032% (73/221)
42955
ssh_set_newkeys
Name: ssh_set_newkeys
Prototype: int ssh_set_newkeys(struct ssh *ssh, int mode)
Coverage:  32.143% (18/56)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 828-921
 32.143% (18/56)
8515
translate_libcrypto_error
Name: translate_libcrypto_error
Prototype: static int translate_libcrypto_error(unsigned long pem_err)
Coverage:  31.579% (6/19)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 3856-3890
 31.579% (6/19)
1913
match_list
Name: match_list
Prototype: char * match_list(const char *client, const char *server, u_int *next)
Coverage:  31.034% (18/58)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/match.c
Lines: 256-294
 31.034% (18/58)
47314
addr_sa_to_xaddr
Name: addr_sa_to_xaddr
Prototype: static int addr_sa_to_xaddr(struct sockaddr *sa, socklen_t slen, struct xaddr *xa)
Coverage:  30.769% (4/13)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/addrmatch.c
Lines: 80-109
 30.769% (4/13)
256
ssh_packet_send2
Name: ssh_packet_send2
Prototype: int ssh_packet_send2(struct ssh *ssh)
Coverage:  30.612% (15/49)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 1196-1273
 30.612% (15/49)
5914
strnvis
Name: strnvis
Prototype: int strnvis(char *dst, const char *src, size_t siz, int flag)
Coverage:  30.137% (22/73)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/openbsd-compat/vis.c
Lines: 173-214
 30.137% (22/73)
559
reallocarray
Name: reallocarray
Prototype: void * reallocarray(void *optr, size_t nmemb, size_t size)
Coverage:  30.000% (3/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/openbsd-compat/reallocarray.c
Lines: 36-45
 30.000% (3/10)
192
fingerprint_private
Name: fingerprint_private
Prototype: static void fingerprint_private(const char *path)
Coverage:  30.000% (3/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/ssh-keygen.c
Lines: 876-898
 30.000% (3/10)
314
derelativise_path
Name: derelativise_path
Prototype: char * derelativise_path(const char *path)
Coverage:  30.000% (3/10)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/servconf.c
Lines: 697-712
 30.000% (3/10)
214
newkeys_from_blob
Name: newkeys_from_blob
Prototype: static int newkeys_from_blob(struct sshbuf *m, struct ssh *ssh, int mode)
Coverage:  29.787% (14/47)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 2257-2321
 29.787% (14/47)
7813
ssh_packet_enable_delayed_compress
Name: ssh_packet_enable_delayed_compress
Prototype: static int ssh_packet_enable_delayed_compress(struct ssh *ssh)
Coverage:  29.630% (8/27)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/packet.c
Lines: 976-1007
 29.630% (8/27)
248
sshkey_ecdsa_nid_from_name
Name: sshkey_ecdsa_nid_from_name
Prototype: int sshkey_ecdsa_nid_from_name(const char *name)
Coverage:  29.545% (13/44)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 212-224
 29.545% (13/44)
17510
sshkey_private_to_blob2
Name: sshkey_private_to_blob2
Prototype: static int sshkey_private_to_blob2(const struct sshkey *prv, struct sshbuf *blob, const char *passphrase, const char *comment, const char *ciphername, int rounds)
Coverage:  28.814% (51/177)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 3403-3549
 28.814% (51/177)
48643
sshkey_to_certified
Name: sshkey_to_certified
Prototype: int sshkey_to_certified(struct sshkey *k)
Coverage:  28.571% (4/14)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 2470-2502
 28.571% (4/14)
177
cipher_get_length
Name: cipher_get_length
Prototype: int cipher_get_length(struct sshcipher_ctx *cc, u_int *plenp, u_int seqnr, const u_char *cp, u_int len)
Coverage:  28.571% (2/7)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/cipher.c
Lines: 397-408
 28.571% (2/7)
73
addr_cmp
Name: addr_cmp
Prototype: static int addr_cmp(const struct xaddr *a, const struct xaddr *b)
Coverage:  28.571% (8/28)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/addrmatch.c
Lines: 176-199
 28.571% (8/28)
349
do_log
Name: do_log
Prototype: void do_log(LogLevel level, const char *fmt, va_list args)
Coverage:  28.205% (11/39)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/log.c
Lines: 400-480
 28.205% (11/39)
11415
sshkey_type_from_name
Name: sshkey_type_from_name
Prototype: int sshkey_type_from_name(const char *name)
Coverage:  27.907% (12/43)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/sshkey.c
Lines: 198-210
 27.907% (12/43)
1749
sanitise_stdfd
Name: sanitise_stdfd
Prototype: void sanitise_stdfd(void)
Coverage:  27.778% (5/18)
Absolute File Name: /home/opencoverage/opencoverage/guest-scripts/openssh/src/misc.c
Lines: 1105-1126
 27.778% (5/18)
506
Page:<>1
Condition %: 100.000% (1/1)
2
Condition %: 100.000% (1/1)
3
Condition %:  80.000% (8/10)
4
Condition %:  56.522% (13/23)
56
Condition %:  26.374% (24/91)
7
Condition %:  0.000% (0/1)
8
Condition %:  0.000% (0/33)
9
Condition %:  0.000% (0/159)
10
Condition %:  0.000% (0/9)
...20
Condition %:  0.000% (0/19)
21
Condition %:  0.000% (0/1)

Generated by Squish Coco 4.2.2