OpenCoverage

t1_meth.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/ssl/t1_meth.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static const SSL_METHOD *tls1_get_method(int ver);-
5-
6static const SSL_METHOD_INTERNAL TLS_method_internal_data = {-
7 .version = 0x0303,-
8 .min_version = 0x0301,-
9 .max_version = 0x0303,-
10 .ssl_new = tls1_new,-
11 .ssl_clear = tls1_clear,-
12 .ssl_free = tls1_free,-
13 .ssl_accept = ssl3_accept,-
14 .ssl_connect = ssl3_connect,-
15 .get_ssl_method = tls1_get_method,-
16 .get_timeout = tls1_default_timeout,-
17 .ssl_version = ssl_undefined_void_function,-
18 .ssl_renegotiate = ssl_undefined_function,-
19 .ssl_renegotiate_check = ssl_ok,-
20 .ssl_get_message = ssl3_get_message,-
21 .ssl_read_bytes = ssl3_read_bytes,-
22 .ssl_write_bytes = ssl3_write_bytes,-
23 .ssl3_enc = &TLSv1_2_enc_data,-
24};-
25-
26static const SSL_METHOD TLS_method_data = {-
27 .ssl_dispatch_alert = ssl3_dispatch_alert,-
28 .num_ciphers = ssl3_num_ciphers,-
29 .get_cipher = ssl3_get_cipher,-
30 .get_cipher_by_char = ssl3_get_cipher_by_char,-
31 .put_cipher_by_char = ssl3_put_cipher_by_char,-
32 .internal = &TLS_method_internal_data,-
33};-
34-
35static const SSL_METHOD_INTERNAL TLSv1_method_internal_data = {-
36 .version = 0x0301,-
37 .min_version = 0x0301,-
38 .max_version = 0x0301,-
39 .ssl_new = tls1_new,-
40 .ssl_clear = tls1_clear,-
41 .ssl_free = tls1_free,-
42 .ssl_accept = ssl3_accept,-
43 .ssl_connect = ssl3_connect,-
44 .get_ssl_method = tls1_get_method,-
45 .get_timeout = tls1_default_timeout,-
46 .ssl_version = ssl_undefined_void_function,-
47 .ssl_renegotiate = ssl3_renegotiate,-
48 .ssl_renegotiate_check = ssl3_renegotiate_check,-
49 .ssl_get_message = ssl3_get_message,-
50 .ssl_read_bytes = ssl3_read_bytes,-
51 .ssl_write_bytes = ssl3_write_bytes,-
52 .ssl3_enc = &TLSv1_enc_data,-
53};-
54-
55static const SSL_METHOD TLSv1_method_data = {-
56 .ssl_dispatch_alert = ssl3_dispatch_alert,-
57 .num_ciphers = ssl3_num_ciphers,-
58 .get_cipher = ssl3_get_cipher,-
59 .get_cipher_by_char = ssl3_get_cipher_by_char,-
60 .put_cipher_by_char = ssl3_put_cipher_by_char,-
61 .internal = &TLSv1_method_internal_data,-
62};-
63-
64static const SSL_METHOD_INTERNAL TLSv1_1_method_internal_data = {-
65 .version = 0x0302,-
66 .min_version = 0x0302,-
67 .max_version = 0x0302,-
68 .ssl_new = tls1_new,-
69 .ssl_clear = tls1_clear,-
70 .ssl_free = tls1_free,-
71 .ssl_accept = ssl3_accept,-
72 .ssl_connect = ssl3_connect,-
73 .get_ssl_method = tls1_get_method,-
74 .get_timeout = tls1_default_timeout,-
75 .ssl_version = ssl_undefined_void_function,-
76 .ssl_renegotiate = ssl3_renegotiate,-
77 .ssl_renegotiate_check = ssl3_renegotiate_check,-
78 .ssl_get_message = ssl3_get_message,-
79 .ssl_read_bytes = ssl3_read_bytes,-
80 .ssl_write_bytes = ssl3_write_bytes,-
81 .ssl3_enc = &TLSv1_1_enc_data,-
82};-
83-
84static const SSL_METHOD TLSv1_1_method_data = {-
85 .ssl_dispatch_alert = ssl3_dispatch_alert,-
86 .num_ciphers = ssl3_num_ciphers,-
87 .get_cipher = ssl3_get_cipher,-
88 .get_cipher_by_char = ssl3_get_cipher_by_char,-
89 .put_cipher_by_char = ssl3_put_cipher_by_char,-
90 .internal = &TLSv1_1_method_internal_data,-
91};-
92-
93static const SSL_METHOD_INTERNAL TLSv1_2_method_internal_data = {-
94 .version = 0x0303,-
95 .min_version = 0x0303,-
96 .max_version = 0x0303,-
97 .ssl_new = tls1_new,-
98 .ssl_clear = tls1_clear,-
99 .ssl_free = tls1_free,-
100 .ssl_accept = ssl3_accept,-
101 .ssl_connect = ssl3_connect,-
102 .get_ssl_method = tls1_get_method,-
103 .get_timeout = tls1_default_timeout,-
104 .ssl_version = ssl_undefined_void_function,-
105 .ssl_renegotiate = ssl3_renegotiate,-
106 .ssl_renegotiate_check = ssl3_renegotiate_check,-
107 .ssl_get_message = ssl3_get_message,-
108 .ssl_read_bytes = ssl3_read_bytes,-
109 .ssl_write_bytes = ssl3_write_bytes,-
110 .ssl3_enc = &TLSv1_2_enc_data,-
111};-
112-
113static const SSL_METHOD TLSv1_2_method_data = {-
114 .ssl_dispatch_alert = ssl3_dispatch_alert,-
115 .num_ciphers = ssl3_num_ciphers,-
116 .get_cipher = ssl3_get_cipher,-
117 .get_cipher_by_char = ssl3_get_cipher_by_char,-
118 .put_cipher_by_char = ssl3_put_cipher_by_char,-
119 .internal = &TLSv1_2_method_internal_data,-
120};-
121-
122static const SSL_METHOD *-
123tls1_get_method(int ver)-
124{-
125 if (ver == 0x0303
ver == 0x0303Description
TRUEnever evaluated
FALSEnever evaluated
)
0
126 return
never executed: return (TLSv1_2_method());
(TLSv1_2_method());
never executed: return (TLSv1_2_method());
0
127 if (ver == 0x0302
ver == 0x0302Description
TRUEnever evaluated
FALSEnever evaluated
)
0
128 return
never executed: return (TLSv1_1_method());
(TLSv1_1_method());
never executed: return (TLSv1_1_method());
0
129 if (ver == 0x0301
ver == 0x0301Description
TRUEnever evaluated
FALSEnever evaluated
)
0
130 return
never executed: return (TLSv1_method());
(TLSv1_method());
never executed: return (TLSv1_method());
0
131 return
never executed: return ( ((void *)0) );
(
never executed: return ( ((void *)0) );
0
132 ((void *)0)
never executed: return ( ((void *)0) );
0
133 );
never executed: return ( ((void *)0) );
0
134}-
135-
136const SSL_METHOD *-
137SSLv23_method(void)-
138{-
139 return
executed 39 times by 5 tests: return (TLS_method());
Executed by:
  • cipherstest
  • configtest
  • ssltest
  • tlstest
  • verifytest
(TLS_method());
executed 39 times by 5 tests: return (TLS_method());
Executed by:
  • cipherstest
  • configtest
  • ssltest
  • tlstest
  • verifytest
39
140}-
141-
142const SSL_METHOD *-
143TLS_method(void)-
144{-
145 return
executed 68 times by 6 tests: return &TLS_method_data;
Executed by:
  • cipherstest
  • configtest
  • ssl_versions
  • ssltest
  • tlstest
  • verifytest
&TLS_method_data;
executed 68 times by 6 tests: return &TLS_method_data;
Executed by:
  • cipherstest
  • configtest
  • ssl_versions
  • ssltest
  • tlstest
  • verifytest
68
146}-
147-
148const SSL_METHOD *-
149TLSv1_method(void)-
150{-
151 return
executed 13 times by 4 tests: return (&TLSv1_method_data);
Executed by:
  • cipherstest
  • ssl_versions
  • ssltest
  • tls_prf
(&TLSv1_method_data);
executed 13 times by 4 tests: return (&TLSv1_method_data);
Executed by:
  • cipherstest
  • ssl_versions
  • ssltest
  • tls_prf
13
152}-
153-
154const SSL_METHOD *-
155TLSv1_1_method(void)-
156{-
157 return
executed 6 times by 2 tests: return (&TLSv1_1_method_data);
Executed by:
  • cipherstest
  • ssl_versions
(&TLSv1_1_method_data);
executed 6 times by 2 tests: return (&TLSv1_1_method_data);
Executed by:
  • cipherstest
  • ssl_versions
6
158}-
159-
160const SSL_METHOD *-
161TLSv1_2_method(void)-
162{-
163 return
executed 5 times by 2 tests: return (&TLSv1_2_method_data);
Executed by:
  • cipherstest
  • tls_prf
(&TLSv1_2_method_data);
executed 5 times by 2 tests: return (&TLSv1_2_method_data);
Executed by:
  • cipherstest
  • tls_prf
5
164}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2