Home
last modified time | relevance | path

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

12345678910>>...17

/external/boringssl/src/ssl/
Dd1_clnt.c134 static int dtls1_get_hello_verify(SSL *ssl);
136 int dtls1_connect(SSL *ssl) { in dtls1_connect() argument
138 void (*cb)(const SSL *ssl, int type, int value) = NULL; in dtls1_connect()
142 assert(ssl->handshake_func == dtls1_connect); in dtls1_connect()
143 assert(!ssl->server); in dtls1_connect()
144 assert(SSL_IS_DTLS(ssl)); in dtls1_connect()
149 if (ssl->info_callback != NULL) { in dtls1_connect()
150 cb = ssl->info_callback; in dtls1_connect()
151 } else if (ssl->ctx->info_callback != NULL) { in dtls1_connect()
152 cb = ssl->ctx->info_callback; in dtls1_connect()
[all …]
Dd1_srvr.c133 int dtls1_accept(SSL *ssl) { in dtls1_accept() argument
135 void (*cb)(const SSL *ssl, int type, int value) = NULL; in dtls1_accept()
140 assert(ssl->handshake_func == dtls1_accept); in dtls1_accept()
141 assert(ssl->server); in dtls1_accept()
142 assert(SSL_IS_DTLS(ssl)); in dtls1_accept()
147 if (ssl->info_callback != NULL) { in dtls1_accept()
148 cb = ssl->info_callback; in dtls1_accept()
149 } else if (ssl->ctx->info_callback != NULL) { in dtls1_accept()
150 cb = ssl->ctx->info_callback; in dtls1_accept()
153 ssl->in_handshake++; in dtls1_accept()
[all …]
Dssl_lib.c356 SSL *ssl = (SSL *)OPENSSL_malloc(sizeof(SSL)); in SSL_new() local
357 if (ssl == NULL) { in SSL_new()
360 memset(ssl, 0, sizeof(SSL)); in SSL_new()
362 ssl->min_version = ctx->min_version; in SSL_new()
363 ssl->max_version = ctx->max_version; in SSL_new()
365 ssl->options = ctx->options; in SSL_new()
366 ssl->mode = ctx->mode; in SSL_new()
367 ssl->max_cert_list = ctx->max_cert_list; in SSL_new()
369 ssl->cert = ssl_cert_dup(ctx->cert); in SSL_new()
370 if (ssl->cert == NULL) { in SSL_new()
[all …]
Ds3_pkt.c125 static int do_ssl3_write(SSL *ssl, int type, const uint8_t *buf, unsigned len);
134 static int ssl3_get_record(SSL *ssl) { in ssl3_get_record() argument
138 ret = ssl_read_buffer_extend_to(ssl, ssl_record_prefix_len(ssl)); in ssl3_get_record()
142 assert(ssl_read_buffer_len(ssl) >= ssl_record_prefix_len(ssl)); in ssl3_get_record()
144 uint8_t *out = ssl_read_buffer(ssl) + ssl_record_prefix_len(ssl); in ssl3_get_record()
145 size_t max_out = ssl_read_buffer_len(ssl) - ssl_record_prefix_len(ssl); in ssl3_get_record()
148 switch (tls_open_record(ssl, &type, out, &len, &consumed, &alert, max_out, in ssl3_get_record()
149 ssl_read_buffer(ssl), ssl_read_buffer_len(ssl))) { in ssl3_get_record()
151 ssl_read_buffer_consume(ssl, consumed); in ssl3_get_record()
158 SSL3_RECORD *rr = &ssl->s3->rrec; in ssl3_get_record()
[all …]
Ds3_clnt.c175 int ssl3_connect(SSL *ssl) { in ssl3_connect() argument
177 void (*cb)(const SSL *ssl, int type, int value) = NULL; in ssl3_connect()
181 assert(ssl->handshake_func == ssl3_connect); in ssl3_connect()
182 assert(!ssl->server); in ssl3_connect()
183 assert(!SSL_IS_DTLS(ssl)); in ssl3_connect()
188 if (ssl->info_callback != NULL) { in ssl3_connect()
189 cb = ssl->info_callback; in ssl3_connect()
190 } else if (ssl->ctx->info_callback != NULL) { in ssl3_connect()
191 cb = ssl->ctx->info_callback; in ssl3_connect()
194 ssl->in_handshake++; in ssl3_connect()
[all …]
Ds3_both.c136 int ssl3_do_write(SSL *ssl, int type) { in ssl3_do_write() argument
139 n = ssl3_write_bytes(ssl, type, &ssl->init_buf->data[ssl->init_off], in ssl3_do_write()
140 ssl->init_num); in ssl3_do_write()
145 if (n == ssl->init_num) { in ssl3_do_write()
146 if (ssl->msg_callback) { in ssl3_do_write()
147 ssl->msg_callback(1, ssl->version, type, ssl->init_buf->data, in ssl3_do_write()
148 (size_t)(ssl->init_off + ssl->init_num), ssl, in ssl3_do_write()
149 ssl->msg_callback_arg); in ssl3_do_write()
154 ssl->init_off += n; in ssl3_do_write()
155 ssl->init_num -= n; in ssl3_do_write()
[all …]
Ds3_srvr.c177 int ssl3_accept(SSL *ssl) { in ssl3_accept() argument
180 void (*cb)(const SSL *ssl, int type, int value) = NULL; in ssl3_accept()
184 assert(ssl->handshake_func == ssl3_accept); in ssl3_accept()
185 assert(ssl->server); in ssl3_accept()
186 assert(!SSL_IS_DTLS(ssl)); in ssl3_accept()
191 if (ssl->info_callback != NULL) { in ssl3_accept()
192 cb = ssl->info_callback; in ssl3_accept()
193 } else if (ssl->ctx->info_callback != NULL) { in ssl3_accept()
194 cb = ssl->ctx->info_callback; in ssl3_accept()
197 ssl->in_handshake++; in ssl3_accept()
[all …]
Dd1_pkt.c127 static int do_dtls1_write(SSL *ssl, int type, const uint8_t *buf,
133 static int dtls1_get_record(SSL *ssl) { in dtls1_get_record() argument
136 if (ssl_read_buffer_len(ssl) == 0) { in dtls1_get_record()
137 int ret = ssl_read_buffer_extend_to(ssl, 0 /* unused */); in dtls1_get_record()
142 assert(ssl_read_buffer_len(ssl) > 0); in dtls1_get_record()
145 if (ssl_read_buffer_len(ssl) < ssl_record_prefix_len(ssl)) { in dtls1_get_record()
146 ssl_read_buffer_clear(ssl); in dtls1_get_record()
150 uint8_t *out = ssl_read_buffer(ssl) + ssl_record_prefix_len(ssl); in dtls1_get_record()
151 size_t max_out = ssl_read_buffer_len(ssl) - ssl_record_prefix_len(ssl); in dtls1_get_record()
154 switch (dtls_open_record(ssl, &type, out, &len, &consumed, &alert, max_out, in dtls1_get_record()
[all …]
Dd1_lib.c85 static void get_current_time(const SSL *ssl, struct timeval *out_clock);
87 int dtls1_new(SSL *ssl) { in dtls1_new() argument
90 if (!ssl3_new(ssl)) { in dtls1_new()
95 ssl3_free(ssl); in dtls1_new()
107 ssl3_free(ssl); in dtls1_new()
111 ssl->d1 = d1; in dtls1_new()
118 ssl->version = DTLS1_2_VERSION; in dtls1_new()
122 static void dtls1_clear_queues(SSL *ssl) { in dtls1_clear_queues() argument
126 while ((item = pqueue_pop(ssl->d1->buffered_messages)) != NULL) { in dtls1_clear_queues()
132 while ((item = pqueue_pop(ssl->d1->sent_messages)) != NULL) { in dtls1_clear_queues()
[all …]
Dd1_both.c250 static void dtls1_update_mtu(SSL *ssl) { in dtls1_update_mtu() argument
252 if (ssl->d1->mtu < dtls1_min_mtu() && in dtls1_update_mtu()
253 !(SSL_get_options(ssl) & SSL_OP_NO_QUERY_MTU)) { in dtls1_update_mtu()
254 long mtu = BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_QUERY_MTU, 0, NULL); in dtls1_update_mtu()
256 ssl->d1->mtu = (unsigned)mtu; in dtls1_update_mtu()
258 ssl->d1->mtu = kDefaultMTU; in dtls1_update_mtu()
259 BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SET_MTU, ssl->d1->mtu, NULL); in dtls1_update_mtu()
264 assert(ssl->d1->mtu >= dtls1_min_mtu()); in dtls1_update_mtu()
270 static size_t dtls1_max_record_size(SSL *ssl) { in dtls1_max_record_size() argument
271 size_t ret = ssl->d1->mtu; in dtls1_max_record_size()
[all …]
Ds3_lib.c184 int ssl3_set_handshake_header(SSL *ssl, int htype, unsigned long len) { in ssl3_set_handshake_header() argument
185 uint8_t *p = (uint8_t *)ssl->init_buf->data; in ssl3_set_handshake_header()
188 ssl->init_num = (int)len + SSL3_HM_HEADER_LENGTH; in ssl3_set_handshake_header()
189 ssl->init_off = 0; in ssl3_set_handshake_header()
192 return ssl3_update_handshake_hash(ssl, (uint8_t *)ssl->init_buf->data, in ssl3_set_handshake_header()
193 ssl->init_num); in ssl3_set_handshake_header()
196 int ssl3_handshake_write(SSL *ssl) { in ssl3_handshake_write() argument
197 return ssl3_do_write(ssl, SSL3_RT_HANDSHAKE); in ssl3_handshake_write()
200 int ssl3_new(SSL *ssl) { in ssl3_new() argument
212 ssl->s3 = s3; in ssl3_new()
[all …]
Dinternal.h354 size_t ssl_record_prefix_len(const SSL *ssl);
384 SSL *ssl, uint8_t *out_type, uint8_t *out, size_t *out_len,
391 SSL *ssl, uint8_t *out_type, uint8_t *out, size_t *out_len,
402 size_t ssl_seal_prefix_len(const SSL *ssl);
409 size_t ssl_max_seal_overhead(const SSL *ssl);
421 int tls_seal_record(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out,
431 int dtls_seal_record(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out,
440 int ssl_has_private_key(SSL *ssl);
446 int ssl_private_key_type(SSL *ssl);
448 size_t ssl_private_key_max_signature_len(SSL *ssl);
[all …]
Dt1_lib.c130 static int ssl_check_clienthello_tlsext(SSL *ssl);
131 static int ssl_check_serverhello_tlsext(SSL *ssl);
267 if (SSL_IS_DTLS(ctx->ssl)) { in ssl_early_callback_init()
349 static void tls1_get_curvelist(SSL *ssl, int get_peer_curves, in tls1_get_curvelist() argument
355 assert(ssl->server); in tls1_get_curvelist()
356 *out_curve_ids = ssl->s3->tmp.peer_ellipticcurvelist; in tls1_get_curvelist()
357 *out_curve_ids_len = ssl->s3->tmp.peer_ellipticcurvelist_length; in tls1_get_curvelist()
361 *out_curve_ids = ssl->tlsext_ellipticcurvelist; in tls1_get_curvelist()
362 *out_curve_ids_len = ssl->tlsext_ellipticcurvelist_length; in tls1_get_curvelist()
369 int tls1_get_shared_curve(SSL *ssl, uint16_t *out_curve_id) { in tls1_get_shared_curve() argument
[all …]
Dssl_buffer.c79 static int setup_read_buffer(SSL *ssl) { in setup_read_buffer() argument
80 SSL3_BUFFER *buf = &ssl->s3->read_buffer; in setup_read_buffer()
86 size_t header_len = ssl_record_prefix_len(ssl); in setup_read_buffer()
88 if (SSL_IS_DTLS(ssl)) { in setup_read_buffer()
97 uint8_t *ssl_read_buffer(SSL *ssl) { in ssl_read_buffer() argument
98 return ssl->s3->read_buffer.buf + ssl->s3->read_buffer.offset; in ssl_read_buffer()
101 size_t ssl_read_buffer_len(const SSL *ssl) { in ssl_read_buffer_len() argument
102 return ssl->s3->read_buffer.len; in ssl_read_buffer_len()
105 static int dtls_read_buffer_next_packet(SSL *ssl) { in dtls_read_buffer_next_packet() argument
106 SSL3_BUFFER *buf = &ssl->s3->read_buffer; in dtls_read_buffer_next_packet()
[all …]
Dtls_record.c127 static int ssl_needs_record_splitting(const SSL *ssl) { in ssl_needs_record_splitting() argument
128 return !SSL_USE_EXPLICIT_IV(ssl) && ssl->aead_write_ctx != NULL && in ssl_needs_record_splitting()
129 (ssl->mode & SSL_MODE_CBC_RECORD_SPLITTING) != 0 && in ssl_needs_record_splitting()
130 SSL_CIPHER_is_block_cipher(ssl->aead_write_ctx->cipher); in ssl_needs_record_splitting()
133 size_t ssl_record_prefix_len(const SSL *ssl) { in ssl_record_prefix_len() argument
134 if (SSL_IS_DTLS(ssl)) { in ssl_record_prefix_len()
136 SSL_AEAD_CTX_explicit_nonce_len(ssl->aead_read_ctx); in ssl_record_prefix_len()
139 SSL_AEAD_CTX_explicit_nonce_len(ssl->aead_read_ctx); in ssl_record_prefix_len()
143 size_t ssl_seal_prefix_len(const SSL *ssl) { in ssl_seal_prefix_len() argument
144 if (SSL_IS_DTLS(ssl)) { in ssl_seal_prefix_len()
[all …]
Dt1_enc.c227 int tls1_prf(SSL *ssl, uint8_t *out, size_t out_len, const uint8_t *secret, in tls1_prf() argument
238 uint32_t algorithm_prf = ssl_get_algorithm_prf(ssl); in tls1_prf()
263 static int tls1_generate_key_block(SSL *ssl, uint8_t *out, size_t out_len) { in tls1_generate_key_block() argument
264 return ssl->enc_method->prf( in tls1_generate_key_block()
265 ssl, out, out_len, ssl->session->master_key, in tls1_generate_key_block()
266 ssl->session->master_key_length, TLS_MD_KEY_EXPANSION_CONST, in tls1_generate_key_block()
267 TLS_MD_KEY_EXPANSION_CONST_SIZE, ssl->s3->server_random, SSL3_RANDOM_SIZE, in tls1_generate_key_block()
268 ssl->s3->client_random, SSL3_RANDOM_SIZE); in tls1_generate_key_block()
271 int tls1_change_cipher_state(SSL *ssl, int which) { in tls1_change_cipher_state() argument
283 const EVP_AEAD *aead = ssl->s3->tmp.new_aead; in tls1_change_cipher_state()
[all …]
Ds3_enc.c165 static int ssl3_handshake_mac(SSL *ssl, int md_nid, const char *sender, int len,
168 int ssl3_prf(SSL *ssl, uint8_t *out, size_t out_len, const uint8_t *secret, in ssl3_prf() argument
231 void ssl3_cleanup_key_block(SSL *ssl) { in ssl3_cleanup_key_block() argument
232 if (ssl->s3->tmp.key_block != NULL) { in ssl3_cleanup_key_block()
233 OPENSSL_cleanse(ssl->s3->tmp.key_block, ssl->s3->tmp.key_block_length); in ssl3_cleanup_key_block()
234 OPENSSL_free(ssl->s3->tmp.key_block); in ssl3_cleanup_key_block()
235 ssl->s3->tmp.key_block = NULL; in ssl3_cleanup_key_block()
237 ssl->s3->tmp.key_block_length = 0; in ssl3_cleanup_key_block()
240 int ssl3_init_handshake_buffer(SSL *ssl) { in ssl3_init_handshake_buffer() argument
241 ssl3_free_handshake_buffer(ssl); in ssl3_init_handshake_buffer()
[all …]
Dssl_rsa.c76 int SSL_use_certificate(SSL *ssl, X509 *x) { in SSL_use_certificate() argument
81 return ssl_set_cert(ssl->cert, x); in SSL_use_certificate()
84 int SSL_use_certificate_ASN1(SSL *ssl, const uint8_t *der, size_t der_len) { in SSL_use_certificate_ASN1() argument
98 int ret = SSL_use_certificate(ssl, x509); in SSL_use_certificate_ASN1()
103 int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) { in SSL_use_RSAPrivateKey() argument
121 ret = ssl_set_pkey(ssl->cert, pkey); in SSL_use_RSAPrivateKey()
150 int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const uint8_t *der, size_t der_len) { in SSL_use_RSAPrivateKey_ASN1() argument
157 int ret = SSL_use_RSAPrivateKey(ssl, rsa); in SSL_use_RSAPrivateKey_ASN1()
162 int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) { in SSL_use_PrivateKey() argument
170 ret = ssl_set_pkey(ssl->cert, pkey); in SSL_use_PrivateKey()
[all …]
Dssl_session.c270 SSL_SESSION *SSL_get_session(const SSL *ssl) in SSL_get_session() argument
273 return ssl->session; in SSL_get_session()
276 SSL_SESSION *SSL_get1_session(SSL *ssl) { in SSL_get1_session() argument
278 return SSL_SESSION_up_ref(ssl->session); in SSL_get1_session()
301 int ssl_get_new_session(SSL *ssl, int is_server) { in ssl_get_new_session() argument
302 if (ssl->mode & SSL_MODE_NO_SESSION_CREATION) { in ssl_get_new_session()
313 if (ssl->initial_ctx->session_timeout != 0) { in ssl_get_new_session()
314 session->timeout = ssl->initial_ctx->session_timeout; in ssl_get_new_session()
317 session->ssl_version = ssl->version; in ssl_get_new_session()
320 if (ssl->tlsext_ticket_expected) { in ssl_get_new_session()
[all …]
Dssl_cert.c272 void ssl_cert_set_cert_cb(CERT *c, int (*cb)(SSL *ssl, void *arg), void *arg) { in ssl_cert_set_cert_cb() argument
277 int ssl_verify_cert_chain(SSL *ssl, STACK_OF(X509) *cert_chain) { in ssl_verify_cert_chain() argument
285 if (!X509_STORE_CTX_init(&ctx, ssl->ctx->cert_store, leaf, cert_chain)) { in ssl_verify_cert_chain()
290 ssl)) { in ssl_verify_cert_chain()
297 X509_STORE_CTX_set_default(&ctx, ssl->server ? "ssl_client" : "ssl_server"); in ssl_verify_cert_chain()
300 X509_VERIFY_PARAM_set1(X509_STORE_CTX_get0_param(&ctx), ssl->param); in ssl_verify_cert_chain()
302 if (ssl->verify_callback) { in ssl_verify_cert_chain()
303 X509_STORE_CTX_set_verify_cb(&ctx, ssl->verify_callback); in ssl_verify_cert_chain()
306 if (ssl->ctx->app_verify_callback != NULL) { in ssl_verify_cert_chain()
307 ret = ssl->ctx->app_verify_callback(&ctx, ssl->ctx->app_verify_arg); in ssl_verify_cert_chain()
[all …]
Ddtls_record.c175 SSL *ssl, uint8_t *out_type, uint8_t *out, size_t *out_len, in dtls_open_record() argument
190 (ssl->s3->have_version && version != ssl->version) || in dtls_open_record()
198 if (ssl->msg_callback != NULL) { in dtls_open_record()
199 ssl->msg_callback(0 /* read */, 0, SSL3_RT_HEADER, in, in dtls_open_record()
200 DTLS1_RT_HEADER_LENGTH, ssl, ssl->msg_callback_arg); in dtls_open_record()
204 if (epoch != ssl->d1->r_epoch || in dtls_open_record()
205 dtls1_bitmap_should_discard(&ssl->d1->bitmap, sequence)) { in dtls_open_record()
216 if (!SSL_AEAD_CTX_open(ssl->aead_read_ctx, out, &plaintext_len, max_out, in dtls_open_record()
237 dtls1_bitmap_record(&ssl->d1->bitmap, sequence); in dtls_open_record()
248 int dtls_seal_record(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out, in dtls_seal_record() argument
[all …]
/external/boringssl/src/ssl/test/
Dbssl_shim.cc120 static bool SetConfigPtr(SSL *ssl, const TestConfig *config) { in SetConfigPtr() argument
121 return SSL_set_ex_data(ssl, g_config_index, (void *)config) == 1; in SetConfigPtr()
124 static const TestConfig *GetConfigPtr(const SSL *ssl) { in GetConfigPtr() argument
125 return (const TestConfig *)SSL_get_ex_data(ssl, g_config_index); in GetConfigPtr()
128 static bool SetTestState(SSL *ssl, std::unique_ptr<TestState> state) { in SetTestState() argument
130 if (SSL_set_ex_data(ssl, g_state_index, state.get()) == 1) { in SetTestState()
137 static TestState *GetTestState(const SSL *ssl) { in GetTestState() argument
138 return (TestState *)SSL_get_ex_data(ssl, g_state_index); in GetTestState()
150 static int AsyncPrivateKeyType(SSL *ssl) { in AsyncPrivateKeyType() argument
151 return EVP_PKEY_id(GetTestState(ssl)->private_key.get()); in AsyncPrivateKeyType()
[all …]
/external/boringssl/src/include/openssl/
Dssl.h216 OPENSSL_EXPORT void SSL_free(SSL *ssl);
221 OPENSSL_EXPORT SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);
224 OPENSSL_EXPORT void SSL_set_connect_state(SSL *ssl);
227 OPENSSL_EXPORT void SSL_set_accept_state(SSL *ssl);
231 OPENSSL_EXPORT int SSL_is_server(SSL *ssl);
241 OPENSSL_EXPORT void SSL_set_bio(SSL *ssl, BIO *rbio, BIO *wbio);
244 OPENSSL_EXPORT BIO *SSL_get_rbio(const SSL *ssl);
247 OPENSSL_EXPORT BIO *SSL_get_wbio(const SSL *ssl);
250 OPENSSL_EXPORT int SSL_get_fd(const SSL *ssl);
255 OPENSSL_EXPORT int SSL_get_rfd(const SSL *ssl);
[all …]
/external/curl/lib/vtls/
Daxtls.c123 if(connssl->ssl) { in free_ssl_structs()
124 ssl_free (connssl->ssl); in free_ssl_structs()
125 connssl->ssl = NULL; in free_ssl_structs()
142 SSL *ssl = NULL; in connect_prep() local
156 if(conn->ssl[sockindex].state == ssl_connection_complete) in connect_prep()
163 switch(data->set.ssl.version) { in connect_prep()
184 conn->ssl[sockindex].ssl_ctx = ssl_ctx; in connect_prep()
185 conn->ssl[sockindex].ssl = NULL; in connect_prep()
188 if(data->set.ssl.CAfile) { in connect_prep()
189 if(ssl_obj_load(ssl_ctx, SSL_OBJ_X509_CACERT, data->set.ssl.CAfile, NULL) in connect_prep()
[all …]
/external/curl/
DMakefile.dist29 ssl:
30 ./configure --with-ssl
39 borland-ssl:
45 borland-ssl-zlib:
99 nmake -f Makefile.$(VC) cfg=release-ssl
101 nmake -f Makefile.$(VC) cfg=release-ssl-zlib
102 nmake -f Makefile.$(VC) cfg=release-ssl-dll
104 nmake -f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
106 nmake -f Makefile.$(VC) cfg=release-dll-ssl-dll
108 nmake -f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
[all …]

12345678910>>...17