/openssl/demos/guide/ |
H A D | quic-multi-stream.c | 29 static BIO *create_socket_bio(const char *hostname, const char *port, in create_socket_bio() argument 40 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_DGRAM, 0, in create_socket_bio() 112 const char *hostname) in write_a_request() argument 120 if (!SSL_write_ex(stream, hostname, strlen(hostname), &written)) in write_a_request() 150 char *hostname, *port; in main() local 167 hostname = argv[argnext++]; in main() 214 bio = create_socket_bio(hostname, port, ipv6 ? AF_INET6 : AF_INET, &peer_addr); in main() 225 if (!SSL_set_tlsext_host_name(ssl, hostname)) { in main() 236 if (!SSL_set1_host(ssl, hostname)) { in main() 278 if (!write_a_request(stream1, request1_start, hostname)) { in main() [all …]
|
H A D | tls-client-block.c | 29 static BIO *create_socket_bio(const char *hostname, const char *port, int family) in create_socket_bio() argument 39 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_STREAM, 0, in create_socket_bio() 111 char *hostname, *port; in main() local 128 hostname = argv[argnext++]; in main() 175 bio = create_socket_bio(hostname, port, ipv6 ? AF_INET6 : AF_INET); in main() 186 if (!SSL_set_tlsext_host_name(ssl, hostname)) { in main() 197 if (!SSL_set1_host(ssl, hostname)) { in main() 220 if (!SSL_write_ex(ssl, hostname, strlen(hostname), &written)) { in main()
|
H A D | quic-client-block.c | 29 static BIO *create_socket_bio(const char *hostname, const char *port, in create_socket_bio() argument 40 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_DGRAM, 0, in create_socket_bio() 130 char *hostname, *port; in main() local 147 hostname = argv[argnext++]; in main() 185 bio = create_socket_bio(hostname, port, ipv6 ? AF_INET6 : AF_INET, &peer_addr); in main() 196 if (!SSL_set_tlsext_host_name(ssl, hostname)) { in main() 207 if (!SSL_set1_host(ssl, hostname)) { in main() 242 if (!SSL_write_ex(ssl, hostname, strlen(hostname), &written)) { in main()
|
H A D | tls-client-non-block.c | 30 static BIO *create_socket_bio(const char *hostname, const char *port, int family) in create_socket_bio() argument 40 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_STREAM, 0, in create_socket_bio() 189 char *hostname, *port; in main() local 207 hostname = argv[argnext++]; in main() 254 bio = create_socket_bio(hostname, port, ipv6 ? AF_INET6 : AF_INET); in main() 265 if (!SSL_set_tlsext_host_name(ssl, hostname)) { in main() 276 if (!SSL_set1_host(ssl, hostname)) { in main() 296 while (!SSL_write_ex(ssl, hostname, strlen(hostname), &written)) { in main()
|
H A D | quic-client-non-block.c | 30 static BIO *create_socket_bio(const char *hostname, const char *port, in create_socket_bio() argument 41 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_DGRAM, 0, in create_socket_bio() 238 char *hostname, *port; in main() local 255 hostname = argv[argnext++]; in main() 293 bio = create_socket_bio(hostname, port, ipv6 ? AF_INET6 : AF_INET, in main() 305 if (!SSL_set_tlsext_host_name(ssl, hostname)) { in main() 316 if (!SSL_set1_host(ssl, hostname)) { in main() 358 while (!SSL_write_ex(ssl, hostname, strlen(hostname), &written)) { in main()
|
H A D | README.md | 19 LD_LIBRARY_PATH=../.. ./tls-client-block hostname port 21 In the above replace "hostname" and "port" with the hostname and the port number
|
/openssl/apps/lib/ |
H A D | s_socket.c | 199 char *hostname = NULL; in init_client() local 202 if (hostname != NULL) { in init_client() 204 OPENSSL_free(hostname); in init_client() 222 if (hostname != NULL) in get_sock_info_address() 223 *hostname = NULL; in get_sock_info_address() 229 if (hostname != NULL) in get_sock_info_address() 244 char *hostname, *service; in report_server_accept() local 246 get_sock_info_address(asock, &hostname, &service); in report_server_accept() 247 success = hostname != NULL && service != NULL; in report_server_accept() 253 hostname, service) > 0; in report_server_accept() [all …]
|
/openssl/test/ |
H A D | servername_test.c | 103 char *hostname = NULL; in client_setup_sni_before_state() local 135 if (!TEST_true(get_sni_from_client_hello(wbio, &hostname))) in client_setup_sni_before_state() 138 if (!TEST_str_eq(hostname, host)) in client_setup_sni_before_state() 143 OPENSSL_free(hostname); in client_setup_sni_before_state() 155 char *hostname = NULL; in client_setup_sni_after_state() local 188 if (!TEST_true(get_sni_from_client_hello(wbio, &hostname))) in client_setup_sni_after_state() 191 if (!TEST_str_eq(hostname, host)) in client_setup_sni_after_state() 196 OPENSSL_free(hostname); in client_setup_sni_after_state()
|
/openssl/demos/bio/ |
H A D | sconnect.c | 37 const char *hostname; in main() local 76 hostname = BIO_get_conn_hostname(out); in main() 77 if (!hostname || SSL_set1_host(ssl, hostname) <= 0) in main()
|
/openssl/crypto/bio/ |
H A D | bio_addr.c | 230 char **hostname, char **service) in addr_strings() argument 271 if (hostname != NULL) in addr_strings() 272 *hostname = OPENSSL_strdup(host); in addr_strings() 277 if (hostname != NULL) in addr_strings() 286 if ((hostname != NULL && *hostname == NULL) in addr_strings() 288 if (hostname != NULL) { in addr_strings() 289 OPENSSL_free(*hostname); in addr_strings() 290 *hostname = NULL; in addr_strings() 304 char *hostname = NULL; in BIO_ADDR_hostname_string() local 306 if (addr_strings(ap, numeric, &hostname, NULL)) in BIO_ADDR_hostname_string() [all …]
|
/openssl/doc/man3/ |
H A D | SSL_set1_host.pod | 12 int SSL_set1_host(SSL *s, const char *hostname); 13 int SSL_add1_host(SSL *s, const char *hostname); 19 These functions configure server hostname checks in the SSL client. 21 SSL_set1_host() sets the expected DNS hostname to B<name> clearing 22 any previously specified hostname. If B<name> is NULL 26 the peer hostname via L<X509_check_host(3)> with B<flags> as specified 46 SSL_get0_peername() returns the DNS hostname or subject CommonName 77 The calls below will arrange to match either the MX hostname or the
|
H A D | BIO_s_connect.pod | 49 and the port and hostname (see below) is set up properly then 63 a single call: that is it creates a new connect BIO with hostname B<name>. 65 BIO_set_conn_hostname() uses the string B<name> to set the hostname. 66 The hostname can be an IP address; if the address is an IPv6 one, it 68 The hostname can also include the port in the form hostname:port; 80 BIO_get_conn_hostname() returns the hostname of the connect BIO or 81 NULL if the BIO is initialized but no hostname is set. 128 If the port name is supplied as part of the hostname then this will 132 character in the passed hostname and either indicating an error or 169 BIO_get_conn_hostname() returns the connected hostname or NULL if
|
H A D | SSL_SESSION_get0_hostname.pod | 16 int SSL_SESSION_set1_hostname(SSL_SESSION *s, const char *hostname); 29 SNI hostname is negotiated with each handshake including resumption handshakes 35 SSL_SESSION_set1_hostname() sets the SNI value for the hostname to a copy of 36 the string provided in hostname.
|
H A D | BIO_parse_hostserv.pod | 22 create strings with the hostname and service name and give those 25 be interpreted primarily as a hostname or a service name in ambiguous
|
H A D | SSL_CTX_get0_param.pod | 45 them to suit its needs: for example to add a hostname check. 58 Check hostname matches "www.foo.com" in peer certificate:
|
H A D | OSSL_HTTP_parse_url.pod | 35 OSSL_HTTP_adapt_proxy() takes an optional proxy hostname I<proxy> 40 If this still does not yield a proxy hostname, 87 otherwise a constant proxy hostname string,
|
/openssl/test/quic-openssl-docker/hq-interop/ |
H A D | quic-hq-interop.c | 100 static BIO *create_socket_bio(const char *hostname, const char *port, in create_socket_bio() argument 111 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, AF_UNSPEC, SOCK_DGRAM, in create_socket_bio() 701 static int setup_connection(char *hostname, char *port, in setup_connection() argument 766 bio = create_socket_bio(hostname, port, &peer_addr); in setup_connection() 777 if (!SSL_set_tlsext_host_name(*ssl, hostname)) { in setup_connection() 788 if (!SSL_set1_host(*ssl, hostname)) { in setup_connection() 876 char *hostname, *port; in main() local 883 hostname = argv[argnext++]; in main() 910 if (!setup_connection(hostname, port, &ctx, &ssl)) { in main()
|
/openssl/doc/designs/ddd/ |
H A D | ddd-06-mem-uv.c | 30 static int setup_ssl(APP_CONN *conn, const char *hostname); 86 const char *hostname; member 131 APP_CONN *new_conn(SSL_CTX *ctx, const char *hostname, in new_conn() argument 173 conn->hostname = hostname; in new_conn() 176 rc = setup_ssl(conn, hostname); in new_conn() 495 static int setup_ssl(APP_CONN *conn, const char *hostname) in setup_ssl() argument 523 if (SSL_set1_host(ssl, hostname) <= 0) { in setup_ssl() 528 if (SSL_set_tlsext_host_name(ssl, hostname) <= 0) { in setup_ssl() 558 rc = setup_ssl(conn, conn->hostname); in tcp_connect_done()
|
H A D | ddd-01-conn-blocking.c | 49 BIO *new_conn(SSL_CTX *ctx, const char *hostname) in new_conn() argument 67 if (BIO_set_conn_hostname(out, hostname) == 0) { in new_conn()
|
H A D | ddd-02-conn-nonblocking-threads.c | 61 APP_CONN *new_conn(SSL_CTX *ctx, const char *hostname) in new_conn() argument 96 if (BIO_set_conn_hostname(out, hostname) == 0) { in new_conn()
|
/openssl/doc/man7/ |
H A D | ossl-guide-tls-client-block.pod | 255 =head2 Setting the server's hostname 259 purposes and we need to set the hostname for each one. 277 if (!SSL_set_tlsext_host_name(ssl, hostname)) { 278 printf("Failed to set the SNI hostname\n"); 282 Here the C<hostname> argument is a string representing the hostname of the 294 * supplied a certificate for the hostname that we were expecting. 298 if (!SSL_set1_host(ssl, hostname)) { 299 printf("Failed to set the certificate verification hostname"); 364 if (!SSL_write_ex(ssl, hostname, strlen(hostname), &written)) { 365 printf("Failed to write hostname in HTTP request\n"); [all …]
|
/openssl/ssl/ |
H A D | ssl_sess.c | 158 dest->ext.hostname = NULL; in ssl_session_dup_intern() 226 if (src->ext.hostname) { in ssl_session_dup_intern() 227 dest->ext.hostname = OPENSSL_strdup(src->ext.hostname); in ssl_session_dup_intern() 228 if (dest->ext.hostname == NULL) in ssl_session_dup_intern() 864 OPENSSL_free(ss->ext.hostname); in SSL_SESSION_free() 1024 return s->ext.hostname; in SSL_SESSION_get0_hostname() 1029 OPENSSL_free(s->ext.hostname); in SSL_SESSION_set1_hostname() 1030 if (hostname == NULL) { in SSL_SESSION_set1_hostname() 1031 s->ext.hostname = NULL; in SSL_SESSION_set1_hostname() 1034 s->ext.hostname = OPENSSL_strdup(hostname); in SSL_SESSION_set1_hostname() [all …]
|
/openssl/doc/internal/man3/ |
H A D | ossl_punycode_decode.pod | 23 ossl_a2ulabel() decodes NUL-terminated hostname from PUNYCODE to UTF-8, 27 a hostname, with stripped PUNYCODE marker I<xn-->.
|
/openssl/ssl/statem/ |
H A D | extensions_clnt.c | 67 if (s->ext.hostname == NULL) in tls_construct_ctos_server_name() 77 || !WPACKET_sub_memcpy_u16(pkt, s->ext.hostname, in tls_construct_ctos_server_name() 78 strlen(s->ext.hostname)) in tls_construct_ctos_server_name() 898 if (edsess->ext.hostname != NULL) { in tls_construct_ctos_early_data() 899 if (s->ext.hostname == NULL in tls_construct_ctos_early_data() 900 || (s->ext.hostname != NULL in tls_construct_ctos_early_data() 901 && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) { in tls_construct_ctos_early_data() 1382 if (s->ext.hostname == NULL) { in tls_parse_stoc_server_name() 1393 if (s->session->ext.hostname != NULL) { in tls_parse_stoc_server_name() 1397 s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname); in tls_parse_stoc_server_name() [all …]
|
/openssl/demos/sslecho/ |
H A D | A-SSL-Docs.txt | 18 should enter 'localhost', or an actual hostname.
|