Home
last modified time | relevance | path

Searched refs:ssl (Results 1 – 25 of 991) sorted by relevance

12345678910>>...40

/third_party/mbedtls/library/
Dssl_cli.c94 int mbedtls_ssl_write_hostname_ext( mbedtls_ssl_context *ssl, in mbedtls_ssl_write_hostname_ext() argument
104 if( ssl->hostname == NULL ) in mbedtls_ssl_write_hostname_ext()
109 ssl->hostname ) ); in mbedtls_ssl_write_hostname_ext()
111 hostname_len = strlen( ssl->hostname ); in mbedtls_ssl_write_hostname_ext()
155 memcpy( p, ssl->hostname, hostname_len ); in mbedtls_ssl_write_hostname_ext()
164 static int ssl_write_renegotiation_ext( mbedtls_ssl_context *ssl, in ssl_write_renegotiation_ext() argument
176 if( ssl->renego_status != MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS ) in ssl_write_renegotiation_ext()
182 MBEDTLS_SSL_CHK_BUF_PTR( p, end, 5 + ssl->verify_data_len ); in ssl_write_renegotiation_ext()
191 *p++ = MBEDTLS_BYTE_0( ssl->verify_data_len + 1 ); in ssl_write_renegotiation_ext()
192 *p++ = MBEDTLS_BYTE_0( ssl->verify_data_len ); in ssl_write_renegotiation_ext()
[all …]
Dssl_srv.c51 int mbedtls_ssl_set_client_transport_id( mbedtls_ssl_context *ssl, in mbedtls_ssl_set_client_transport_id() argument
55 if( ssl->conf->endpoint != MBEDTLS_SSL_IS_SERVER ) in mbedtls_ssl_set_client_transport_id()
58 mbedtls_free( ssl->cli_id ); in mbedtls_ssl_set_client_transport_id()
60 if( ( ssl->cli_id = mbedtls_calloc( 1, ilen ) ) == NULL ) in mbedtls_ssl_set_client_transport_id()
63 memcpy( ssl->cli_id, info, ilen ); in mbedtls_ssl_set_client_transport_id()
64 ssl->cli_id_len = ilen; in mbedtls_ssl_set_client_transport_id()
81 static int ssl_parse_servername_ext( mbedtls_ssl_context *ssl, in ssl_parse_servername_ext() argument
94 mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, in ssl_parse_servername_ext()
102 mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, in ssl_parse_servername_ext()
114 mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, in ssl_parse_servername_ext()
[all …]
Dssl_msg.c57 static uint32_t ssl_get_hs_total_len( mbedtls_ssl_context const *ssl );
63 void mbedtls_ssl_set_timer( mbedtls_ssl_context *ssl, uint32_t millisecs ) in mbedtls_ssl_set_timer() argument
65 if( ssl->f_set_timer == NULL ) in mbedtls_ssl_set_timer()
69 ssl->f_set_timer( ssl->p_timer, millisecs / 4, millisecs ); in mbedtls_ssl_set_timer()
75 int mbedtls_ssl_check_timer( mbedtls_ssl_context *ssl ) in mbedtls_ssl_check_timer() argument
77 if( ssl->f_get_timer == NULL ) in mbedtls_ssl_check_timer()
80 if( ssl->f_get_timer( ssl->p_timer ) == 2 ) in mbedtls_ssl_check_timer()
89 static int ssl_parse_record_header( mbedtls_ssl_context const *ssl,
94 int mbedtls_ssl_check_record( mbedtls_ssl_context const *ssl, in mbedtls_ssl_check_record() argument
105 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_STREAM ) in mbedtls_ssl_check_record()
[all …]
Dssl_tls13_client.c48 static int ssl_tls13_write_supported_versions_ext( mbedtls_ssl_context *ssl, in ssl_tls13_write_supported_versions_ext() argument
83 mbedtls_ssl_write_version( ssl->conf->max_major_ver, in ssl_tls13_write_supported_versions_ext()
84 ssl->conf->max_minor_ver, in ssl_tls13_write_supported_versions_ext()
85 ssl->conf->transport, p ); in ssl_tls13_write_supported_versions_ext()
88 ssl->conf->max_major_ver, in ssl_tls13_write_supported_versions_ext()
89 ssl->conf->max_minor_ver ) ); in ssl_tls13_write_supported_versions_ext()
96 static int ssl_tls13_parse_supported_versions_ext( mbedtls_ssl_context *ssl, in ssl_tls13_parse_supported_versions_ext() argument
100 ((void) ssl); in ssl_tls13_parse_supported_versions_ext()
140 static int ssl_tls13_write_named_group_list_ecdhe( mbedtls_ssl_context *ssl, in ssl_tls13_write_named_group_list_ecdhe() argument
149 const uint16_t *group_list = mbedtls_ssl_get_groups( ssl ); in ssl_tls13_write_named_group_list_ecdhe()
[all …]
Dssl_tls.c78 int mbedtls_ssl_set_cid( mbedtls_ssl_context *ssl, in mbedtls_ssl_set_cid() argument
83 if( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in mbedtls_ssl_set_cid()
86 ssl->negotiate_cid = enable; in mbedtls_ssl_set_cid()
95 if( own_cid_len != ssl->conf->cid_len ) in mbedtls_ssl_set_cid()
99 (unsigned) ssl->conf->cid_len ) ); in mbedtls_ssl_set_cid()
103 memcpy( ssl->own_cid, own_cid, own_cid_len ); in mbedtls_ssl_set_cid()
106 ssl->own_cid_len = (uint8_t) own_cid_len; in mbedtls_ssl_set_cid()
111 int mbedtls_ssl_get_peer_cid( mbedtls_ssl_context *ssl, in mbedtls_ssl_get_peer_cid() argument
118 if( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM || in mbedtls_ssl_get_peer_cid()
119 ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER ) in mbedtls_ssl_get_peer_cid()
[all …]
Dssl_tls13_generic.c38 int mbedtls_ssl_tls13_fetch_handshake_msg( mbedtls_ssl_context *ssl, in mbedtls_ssl_tls13_fetch_handshake_msg() argument
45 if( ( ret = mbedtls_ssl_read_record( ssl, 0 ) ) != 0 ) in mbedtls_ssl_tls13_fetch_handshake_msg()
51 if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE || in mbedtls_ssl_tls13_fetch_handshake_msg()
52 ssl->in_msg[0] != hs_type ) in mbedtls_ssl_tls13_fetch_handshake_msg()
68 *buf = ssl->in_msg + 4; in mbedtls_ssl_tls13_fetch_handshake_msg()
69 *buf_len = ssl->in_hslen - 4; in mbedtls_ssl_tls13_fetch_handshake_msg()
76 int mbedtls_ssl_tls13_start_handshake_msg( mbedtls_ssl_context *ssl, in mbedtls_ssl_tls13_start_handshake_msg() argument
88 *buf = ssl->out_msg + 4; in mbedtls_ssl_tls13_start_handshake_msg()
91 ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE; in mbedtls_ssl_tls13_start_handshake_msg()
92 ssl->out_msg[0] = hs_type; in mbedtls_ssl_tls13_start_handshake_msg()
[all …]
Dssl_misc.h327 size_t mbedtls_ssl_get_output_max_frag_len( const mbedtls_ssl_context *ssl );
343 size_t mbedtls_ssl_get_input_max_frag_len( const mbedtls_ssl_context *ssl );
1076 void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl );
1079 void mbedtls_ssl_set_inbound_transform( mbedtls_ssl_context *ssl,
1083 void mbedtls_ssl_set_outbound_transform( mbedtls_ssl_context *ssl,
1087 int mbedtls_ssl_write_hostname_ext( mbedtls_ssl_context *ssl,
1093 int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl );
1094 int mbedtls_ssl_handshake_server_step( mbedtls_ssl_context *ssl );
1095 void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl );
1097 int mbedtls_ssl_send_fatal_handshake_failure( mbedtls_ssl_context *ssl );
[all …]
Ddebug.c59 static inline void debug_send_line( const mbedtls_ssl_context *ssl, int level, in debug_send_line() argument
70 mbedtls_snprintf( idstr, sizeof( idstr ), "%p: %s", (void*)ssl, str ); in debug_send_line()
71 ssl->conf->f_dbg( ssl->conf->p_dbg, level, file, line, idstr ); in debug_send_line()
73 ssl->conf->f_dbg( ssl->conf->p_dbg, level, file, line, str ); in debug_send_line()
78 void mbedtls_debug_print_msg( const mbedtls_ssl_context *ssl, int level, in mbedtls_debug_print_msg() argument
86 if( NULL == ssl || in mbedtls_debug_print_msg()
87 NULL == ssl->conf || in mbedtls_debug_print_msg()
88 NULL == ssl->conf->f_dbg || in mbedtls_debug_print_msg()
104 debug_send_line( ssl, level, file, line, str ); in mbedtls_debug_print_msg()
107 void mbedtls_debug_print_ret( const mbedtls_ssl_context *ssl, int level, in mbedtls_debug_print_ret() argument
[all …]
/third_party/libwebsockets/lib/tls/mbedtls/wrapper/library/
Dssl_lib.c69 int ossl_statem_in_error(const SSL *ssl) in ossl_statem_in_error() argument
71 SSL_ASSERT1(ssl); in ossl_statem_in_error()
73 if (ssl->statem.state == MSG_FLOW_ERROR) in ossl_statem_in_error()
82 int SSL_want(const SSL *ssl) in SSL_want() argument
84 SSL_ASSERT1(ssl); in SSL_want()
86 return ssl->rwstate; in SSL_want()
92 int SSL_want_nothing(const SSL *ssl) in SSL_want_nothing() argument
94 SSL_ASSERT1(ssl); in SSL_want_nothing()
96 if (ssl->err) in SSL_want_nothing()
99 return (SSL_want(ssl) == SSL_NOTHING); in SSL_want_nothing()
[all …]
Dssl_x509.c128 X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl) in SSL_get0_param() argument
130 return &ssl->param; in SSL_get0_param()
192 int SSL_add_client_CA(SSL *ssl, X509 *x) in SSL_add_client_CA() argument
194 SSL_ASSERT1(ssl); in SSL_add_client_CA()
197 if (ssl->client_CA == x) in SSL_add_client_CA()
200 X509_free(ssl->client_CA); in SSL_add_client_CA()
202 ssl->client_CA = x; in SSL_add_client_CA()
228 int SSL_use_certificate(SSL *ssl, X509 *x) in SSL_use_certificate() argument
230 SSL_ASSERT1(ssl); in SSL_use_certificate()
233 if (ssl->cert->x509 == x) in SSL_use_certificate()
[all …]
/third_party/libwebsockets/lib/tls/mbedtls/wrapper/include/openssl/
Dssl.h42 ssl_get_peer_mbedtls_x509_crt(SSL *ssl);
44 int SSL_set_sni_callback(SSL *ssl, int(*cb)(void *, mbedtls_ssl_context *,
47 void SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx);
49 int SSL_CTX_add_client_CA_ASN1(SSL_CTX *ssl, int len,
54 mbedtls_ssl_context *SSL_mbedtls_ssl_context_from_SSL(SSL *ssl);
90 void SSL_free(SSL *ssl);
101 int SSL_connect(SSL *ssl);
112 int SSL_accept(SSL *ssl);
126 int SSL_read(SSL *ssl, void *buffer, int len);
140 int SSL_write(SSL *ssl, const void *buffer, int len);
[all …]
/third_party/mbedtls/programs/ssl/
Dssl_context_info.c105 if( end - ssl < (int)( LEN ) ) \
512 void print_deserialized_ssl_cert( const uint8_t *ssl, uint32_t len ) in print_deserialized_ssl_cert() argument
522 ret = mbedtls_x509_crt_parse_der( &crt, ssl, len ); in print_deserialized_ssl_cert()
528 print_hex( ssl, len, 25, "\t" ); in print_deserialized_ssl_cert()
586 void print_deserialized_ssl_session( const uint8_t *ssl, uint32_t len, in print_deserialized_ssl_session() argument
593 const uint8_t *end = ssl + len; in print_deserialized_ssl_session()
601 start = ( (uint64_t) ssl[0] << 56 ) | in print_deserialized_ssl_session()
602 ( (uint64_t) ssl[1] << 48 ) | in print_deserialized_ssl_session()
603 ( (uint64_t) ssl[2] << 40 ) | in print_deserialized_ssl_session()
604 ( (uint64_t) ssl[3] << 32 ) | in print_deserialized_ssl_session()
[all …]
/third_party/openssl/ssl/
Dbio_ssl.c27 SSL *ssl; /* The ssl handle :-) */ member
80 if (bs->ssl != NULL) in ssl_free()
81 SSL_shutdown(bs->ssl); in ssl_free()
83 SSL_free(bs->ssl); in ssl_free()
95 SSL *ssl; in ssl_read() local
102 ssl = sb->ssl; in ssl_read()
106 ret = ssl_read_internal(ssl, buf, size, readbytes); in ssl_read()
108 switch (SSL_get_error(ssl, ret)) { in ssl_read()
115 SSL_renegotiate(ssl); in ssl_read()
126 SSL_renegotiate(ssl); in ssl_read()
[all …]
/third_party/libwebsockets/lib/tls/mbedtls/wrapper/platform/
Dssl_pm.c47 mbedtls_ssl_context ssl; member
117 int ssl_pm_new(SSL *ssl) in ssl_pm_new() argument
128 const SSL_METHOD *method = ssl->method; in ssl_pm_new()
136 ssl_pm->owner = ssl; in ssl_pm_new()
138 if (!ssl->ctx->read_buffer_len) in ssl_pm_new()
139 ssl->ctx->read_buffer_len = 2048; in ssl_pm_new()
141 max_content_len = (unsigned int)ssl->ctx->read_buffer_len; in ssl_pm_new()
150 mbedtls_ssl_init(&ssl_pm->ssl); in ssl_pm_new()
153 mbedtls_ssl_set_verify(&ssl_pm->ssl, lws_mbedtls_f_vrfy, ssl_pm); in ssl_pm_new()
174 if (TLS_ANY_VERSION != ssl->version) { in ssl_pm_new()
[all …]
/third_party/openssl/test/ossl_shim/
Dossl_shim.cc103 static bool SetTestConfig(SSL *ssl, const TestConfig *config) { in SetTestConfig() argument
104 return SSL_set_ex_data(ssl, g_config_index, (void *)config) == 1; in SetTestConfig()
107 static const TestConfig *GetTestConfig(const SSL *ssl) { in GetTestConfig() argument
108 return (const TestConfig *)SSL_get_ex_data(ssl, g_config_index); in GetTestConfig()
111 static bool SetTestState(SSL *ssl, std::unique_ptr<TestState> state) { in SetTestState() argument
113 if (SSL_set_ex_data(ssl, g_state_index, state.get()) == 1) { in SetTestState()
120 static TestState *GetTestState(const SSL *ssl) { in GetTestState() argument
121 return (TestState *)SSL_get_ex_data(ssl, g_state_index); in GetTestState()
148 static bool GetCertificate(SSL *ssl, bssl::UniquePtr<X509> *out_x509, in GetCertificate() argument
150 const TestConfig *config = GetTestConfig(ssl); in GetCertificate()
[all …]
/third_party/python/Lib/test/
Dtest_ssl.py37 ssl = import_helper.import_module("ssl") variable
40 from ssl import TLSVersion, _TLSContentType, _TLSMessageType, _TLSAlertType
45 PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)
47 IS_OPENSSL_3_0_0 = ssl.OPENSSL_VERSION_INFO >= (3, 0, 0)
57 proto = getattr(ssl, proto)
58 ver = getattr(ssl.TLSVersion, ver)
153 OP_NO_COMPRESSION = getattr(ssl, "OP_NO_COMPRESSION", 0)
154 OP_SINGLE_DH_USE = getattr(ssl, "OP_SINGLE_DH_USE", 0)
155 OP_SINGLE_ECDH_USE = getattr(ssl, "OP_SINGLE_ECDH_USE", 0)
156 OP_CIPHER_SERVER_PREFERENCE = getattr(ssl, "OP_CIPHER_SERVER_PREFERENCE", 0)
[all …]
/third_party/boost/libs/asio/test/ssl/
Dstream.cpp33 bool verify_callback(bool, boost::asio::ssl::verify_context&) in verify_callback()
68 boost::asio::ssl::context context(boost::asio::ssl::context::sslv23); in test()
74 ssl::stream<ip::tcp::socket> stream1(ioc, context); in test()
76 ssl::stream<ip::tcp::socket&> stream2(socket1, context); in test()
79 ssl::stream<ip::tcp::socket> stream3 in test()
80 = ssl::stream<ip::tcp::socket>(ioc, context); in test()
81 ssl::stream<ip::tcp::socket> stream4(std::move(stream3)); in test()
86 ssl::stream<ip::tcp::socket>::executor_type ex = stream1.get_executor(); in test()
94 ssl::stream<ip::tcp::socket>::lowest_layer_type& lowest_layer in test()
98 const ssl::stream<ip::tcp::socket>& stream5 = stream1; in test()
[all …]
/third_party/libwebsockets/lib/tls/mbedtls/
Dmbedtls-ssl.c51 if (!wsi->tls.ssl) in lws_ssl_capable_read()
55 n = SSL_read(wsi->tls.ssl, buf, (int)len); in lws_ssl_capable_read()
72 m = SSL_get_error(wsi->tls.ssl, n); in lws_ssl_capable_read()
87 if (m == SSL_ERROR_WANT_READ || SSL_want_read(wsi->tls.ssl)) { in lws_ssl_capable_read()
92 if (m == SSL_ERROR_WANT_WRITE || SSL_want_write(wsi->tls.ssl)) { in lws_ssl_capable_read()
136 if (!wsi->tls.ssl) in lws_ssl_capable_read()
139 if (SSL_pending(wsi->tls.ssl)) { in lws_ssl_capable_read()
156 if (!wsi->tls.ssl) in lws_ssl_pending()
159 return SSL_pending(wsi->tls.ssl); in lws_ssl_pending()
177 if (!wsi->tls.ssl) in lws_ssl_capable_write()
[all …]
/third_party/libwebsockets/lib/tls/mbedtls/wrapper/include/platform/
Dssl_pm.h28 int ssl_pm_new(SSL *ssl);
29 void ssl_pm_free(SSL *ssl);
31 int ssl_pm_handshake(SSL *ssl);
32 int ssl_pm_shutdown(SSL *ssl);
33 int ssl_pm_clear(SSL *ssl);
35 int ssl_pm_read(SSL *ssl, void *buffer, int len);
36 int ssl_pm_send(SSL *ssl, const void *buffer, int len);
37 int ssl_pm_pending(const SSL *ssl);
39 void ssl_pm_set_fd(SSL *ssl, int fd, int mode);
40 int ssl_pm_get_fd(const SSL *ssl, int mode);
[all …]
/third_party/libcoap/src/
Dcoap_openssl.c104 SSL *ssl; /* OpenSSL object for listening to connection requests */ member
149 static int psk_tls_server_name_call_back(SSL *ssl, int *sd, void *arg);
151 static int psk_tls_client_hello_call_back(SSL *ssl, int *al, void *arg);
383 coap_dtls_generate_cookie(SSL *ssl, in coap_dtls_generate_cookie() argument
387 (coap_dtls_context_t *)SSL_CTX_get_app_data(SSL_get_SSL_CTX(ssl)); in coap_dtls_generate_cookie()
388 coap_ssl_data *data = (coap_ssl_data*)BIO_get_data(SSL_get_rbio(ssl)); in coap_dtls_generate_cookie()
401 coap_dtls_verify_cookie(SSL *ssl, in coap_dtls_verify_cookie() argument
406 if (coap_dtls_generate_cookie(ssl, hmac, &len) && in coap_dtls_verify_cookie()
415 SSL *ssl, in coap_dtls_psk_client_callback() argument
427 c_session = (coap_session_t*)SSL_get_app_data(ssl); in coap_dtls_psk_client_callback()
[all …]
/third_party/node/src/
Dnode_crypto_common.h37 const SSLPointer& ssl,
42 bool SetALPN(const SSLPointer& ssl, const std::string& alpn);
44 bool SetALPN(const SSLPointer& ssl, v8::Local<v8::Value> alpn);
48 SSL* ssl,
52 const SSLPointer& ssl,
57 const SSLPointer& ssl,
65 const SSLPointer& ssl,
68 int UseSNIContext(const SSLPointer& ssl, BaseObjectPtr<SecureContext> context);
70 const char* GetClientHelloALPN(const SSLPointer& ssl);
72 const char* GetClientHelloServerName(const SSLPointer& ssl);
[all …]
/third_party/nghttp2/src/
Dtls.cc77 const char *get_tls_protocol(SSL *ssl) { in get_tls_protocol() argument
78 switch (SSL_version(ssl)) { in get_tls_protocol()
98 TLSSessionInfo *get_tls_session_info(TLSSessionInfo *tls_info, SSL *ssl) { in get_tls_session_info() argument
99 if (!ssl) { in get_tls_session_info()
103 auto session = SSL_get_session(ssl); in get_tls_session_info()
108 tls_info->cipher = SSL_get_cipher_name(ssl); in get_tls_session_info()
109 tls_info->protocol = get_tls_protocol(ssl); in get_tls_session_info()
110 tls_info->session_reused = SSL_session_reused(ssl); in get_tls_session_info()
135 bool check_http2_cipher_black_list(SSL *ssl) { in check_http2_cipher_black_list() argument
136 int id = SSL_CIPHER_get_id(SSL_get_current_cipher(ssl)) & 0xFFFFFF; in check_http2_cipher_black_list()
[all …]
/third_party/openssl/doc/man7/
Dssl.pod5 ssl - OpenSSL SSL/TLS library
13 The OpenSSL B<ssl> library implements the Secure Sockets Layer (SSL v2/v3) and
38 Currently the OpenSSL B<ssl> library functions deals with the following data
45 This is a dispatch structure describing the internal B<ssl> library
79 Currently the OpenSSL B<ssl> library provides the following C header files
84 =item B<ssl.h>
87 program to make the API of the B<ssl> library available. It internally
100 it's already included by ssl.h>.
106 it's already included by ssl.h>.
112 Currently the OpenSSL B<ssl> library exports 214 API functions.
[all …]
/third_party/mbedtls/tests/suites/
Dtest_suite_debug.function54 mbedtls_ssl_context ssl;
58 mbedtls_ssl_init( &ssl );
70 TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 );
74 mbedtls_debug_print_msg( &ssl, level, file, line,
80 mbedtls_ssl_free( &ssl );
89 mbedtls_ssl_context ssl;
93 mbedtls_ssl_init( &ssl );
105 TEST_ASSERT( mbedtls_ssl_setup( &ssl, &conf ) == 0 );
107 mbedtls_debug_print_ret( &ssl, 0, file, line, text, value);
112 mbedtls_ssl_free( &ssl );
[all …]
/third_party/mbedtls/programs/
DMakefile110 ssl/dtls_client \
111 ssl/dtls_server \
112 ssl/mini_client \
113 ssl/ssl_client1 \
114 ssl/ssl_client2 \
115 ssl/ssl_context_info \
116 ssl/ssl_fork_server \
117 ssl/ssl_mail_client \
118 ssl/ssl_server \
119 ssl/ssl_server2 \
[all …]

12345678910>>...40