Lines Matching refs:version
28 bool ssl_protocol_version_from_wire(uint16_t *out, uint16_t version) { in ssl_protocol_version_from_wire() argument
29 switch (version) { in ssl_protocol_version_from_wire()
34 *out = version; in ssl_protocol_version_from_wire()
78 uint16_t version) { in ssl_method_supports_version() argument
83 if (versions[i] == version) { in ssl_method_supports_version()
93 static const char *ssl_version_to_string(uint16_t version) { in ssl_version_to_string() argument
94 switch (version) { in ssl_version_to_string()
118 static uint16_t wire_version_to_api(uint16_t version) { in wire_version_to_api() argument
119 return version; in wire_version_to_api()
123 static bool api_version_to_wire(uint16_t *out, uint16_t version) { in api_version_to_wire() argument
126 if (!ssl_protocol_version_from_wire(&unused, version)) { in api_version_to_wire()
130 *out = version; in api_version_to_wire()
135 uint16_t version) { in set_version_bound() argument
136 if (!api_version_to_wire(&version, version) || in set_version_bound()
137 !ssl_method_supports_version(method, version) || in set_version_bound()
138 !ssl_protocol_version_from_wire(out, version)) { in set_version_bound()
147 uint16_t version) { in set_min_version() argument
149 if (version == 0) { in set_min_version()
155 return set_version_bound(method, out, version); in set_min_version()
159 uint16_t version) { in set_max_version() argument
161 if (version == 0) { in set_max_version()
166 return set_version_bound(method, out, version); in set_max_version()
170 uint16_t version; member
212 if (min_version > kProtocolVersions[i].version) { in ssl_get_version_range()
215 if (max_version < kProtocolVersions[i].version) { in ssl_get_version_range()
223 min_version = kProtocolVersions[i].version; in ssl_get_version_range()
231 max_version = kProtocolVersions[i-1].version; in ssl_get_version_range()
251 return ssl->version; in ssl_version()
256 uint16_t version; in ssl_protocol_version() local
257 if (!ssl_protocol_version_from_wire(&version, ssl->version)) { in ssl_protocol_version()
263 return version; in ssl_protocol_version()
266 bool ssl_supports_version(SSL_HANDSHAKE *hs, uint16_t version) { in ssl_supports_version() argument
269 if (!ssl_method_supports_version(ssl->method, version) || in ssl_supports_version()
270 !ssl_protocol_version_from_wire(&protocol_version, version) || in ssl_supports_version()
316 uint16_t version; in ssl_negotiate_version() local
317 if (!CBS_get_u16(©, &version)) { in ssl_negotiate_version()
323 if (version == versions[i]) { in ssl_negotiate_version()
324 *out_version = version; in ssl_negotiate_version()
339 int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version) { in SSL_CTX_set_min_proto_version() argument
340 return set_min_version(ctx->method, &ctx->conf_min_version, version); in SSL_CTX_set_min_proto_version()
343 int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version) { in SSL_CTX_set_max_proto_version() argument
344 return set_max_version(ctx->method, &ctx->conf_max_version, version); in SSL_CTX_set_max_proto_version()
347 int SSL_set_min_proto_version(SSL *ssl, uint16_t version) { in SSL_set_min_proto_version() argument
351 return set_min_version(ssl->method, &ssl->config->conf_min_version, version); in SSL_set_min_proto_version()
354 int SSL_set_max_proto_version(SSL *ssl, uint16_t version) { in SSL_set_max_proto_version() argument
358 return set_max_version(ssl->method, &ssl->config->conf_max_version, version); in SSL_set_max_proto_version()
377 int SSL_SESSION_set_protocol_version(SSL_SESSION *session, uint16_t version) { in SSL_SESSION_set_protocol_version() argument
380 return api_version_to_wire(&session->ssl_version, version); in SSL_SESSION_set_protocol_version()