Home
last modified time | relevance | path

Searched refs:hostname (Results 1 – 25 of 63) sorted by relevance

123

/openssl/demos/guide/
H A Dquic-multi-stream.c29 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 Dtls-client-block.c29 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 Dquic-client-block.c29 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 Dtls-client-non-block.c30 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 Dquic-client-non-block.c30 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 Dquic-hq-interop.c102 static BIO *create_socket_bio(const char *hostname, const char *port, in create_socket_bio() argument
113 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_DGRAM, 0, in create_socket_bio()
685 static int setup_connection(char *hostname, char *port, int ipv6, in setup_connection() argument
750 bio = create_socket_bio(hostname, port, ipv6 ? AF_INET6 : AF_INET, in setup_connection()
762 if (!SSL_set_tlsext_host_name(*ssl, hostname)) { in setup_connection()
773 if (!SSL_set1_host(*ssl, hostname)) { in setup_connection()
861 char *hostname, *port; in main() local
877 hostname = argv[argnext++]; in main()
904 if (!setup_connection(hostname, port, ipv6, &ctx, &ssl)) { in main()
/openssl/apps/lib/
H A Ds_socket.c199 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 Dservername_test.c103 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 Dsconnect.c37 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 Dbio_addr.c229 char **hostname, char **service) in addr_strings() argument
270 if (hostname != NULL) in addr_strings()
271 *hostname = OPENSSL_strdup(host); in addr_strings()
276 if (hostname != NULL) in addr_strings()
285 if ((hostname != NULL && *hostname == NULL) in addr_strings()
287 if (hostname != NULL) { in addr_strings()
288 OPENSSL_free(*hostname); in addr_strings()
289 *hostname = NULL; in addr_strings()
303 char *hostname = NULL; in BIO_ADDR_hostname_string() local
305 if (addr_strings(ap, numeric, &hostname, NULL)) in BIO_ADDR_hostname_string()
[all …]
/openssl/doc/man3/
H A DSSL_set1_host.pod12 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 DBIO_s_connect.pod49 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 DSSL_SESSION_get0_hostname.pod16 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 DBIO_parse_hostserv.pod22 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 DSSL_CTX_get0_param.pod45 them to suit its needs: for example to add a hostname check.
58 Check hostname matches "www.foo.com" in peer certificate:
/openssl/util/
H A Dquicserver.c68 static BIO *create_dgram_bio(int family, const char *hostname, const char *port) in create_dgram_bio() argument
81 if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_SERVER, family, SOCK_DGRAM, in create_dgram_bio()
148 char *hostname, *port, *certfile, *keyfile; in main() local
189 hostname = argv[argnext++]; in main()
194 bio = create_dgram_bio(ipv6 ? AF_INET6 : AF_INET, hostname, port); in main()
/openssl/doc/designs/ddd/
H A Dddd-06-mem-uv.c30 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 Dddd-01-conn-blocking.c49 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 Dddd-02-conn-nonblocking-threads.c61 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 Dossl-guide-tls-client-block.pod255 =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 Dssl_sess.c157 dest->ext.hostname = NULL; in ssl_session_dup_intern()
225 if (src->ext.hostname) { in ssl_session_dup_intern()
226 dest->ext.hostname = OPENSSL_strdup(src->ext.hostname); in ssl_session_dup_intern()
227 if (dest->ext.hostname == NULL) in ssl_session_dup_intern()
859 OPENSSL_free(ss->ext.hostname); in SSL_SESSION_free()
1015 return s->ext.hostname; in SSL_SESSION_get0_hostname()
1020 OPENSSL_free(s->ext.hostname); in SSL_SESSION_set1_hostname()
1021 if (hostname == NULL) { in SSL_SESSION_set1_hostname()
1022 s->ext.hostname = NULL; in SSL_SESSION_set1_hostname()
1025 s->ext.hostname = OPENSSL_strdup(hostname); in SSL_SESSION_set1_hostname()
[all …]
/openssl/doc/internal/man3/
H A Dossl_punycode_decode.pod23 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 Dextensions_clnt.c66 if (s->ext.hostname == NULL) in tls_construct_ctos_server_name()
76 || !WPACKET_sub_memcpy_u16(pkt, s->ext.hostname, in tls_construct_ctos_server_name()
77 strlen(s->ext.hostname)) in tls_construct_ctos_server_name()
872 if (edsess->ext.hostname != NULL) { in tls_construct_ctos_early_data()
873 if (s->ext.hostname == NULL in tls_construct_ctos_early_data()
874 || (s->ext.hostname != NULL in tls_construct_ctos_early_data()
875 && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) { in tls_construct_ctos_early_data()
1356 if (s->ext.hostname == NULL) { in tls_parse_stoc_server_name()
1367 if (s->session->ext.hostname != NULL) { in tls_parse_stoc_server_name()
1371 s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname); in tls_parse_stoc_server_name()
[all …]
H A Dextensions_srvr.c108 PACKET sni, hostname; in tls_parse_ctos_server_name() local
130 || !PACKET_as_length_prefixed_2(&sni, &hostname)) { in tls_parse_ctos_server_name()
140 if (PACKET_remaining(&hostname) > TLSEXT_MAXLEN_host_name) { in tls_parse_ctos_server_name()
145 if (PACKET_contains_zero_byte(&hostname)) { in tls_parse_ctos_server_name()
154 OPENSSL_free(s->ext.hostname); in tls_parse_ctos_server_name()
155 s->ext.hostname = NULL; in tls_parse_ctos_server_name()
156 if (!PACKET_strndup(&hostname, &s->ext.hostname)) { in tls_parse_ctos_server_name()
168 s->servername_done = (s->session->ext.hostname != NULL) in tls_parse_ctos_server_name()
169 && PACKET_equal(&hostname, s->session->ext.hostname, in tls_parse_ctos_server_name()
170 strlen(s->session->ext.hostname)); in tls_parse_ctos_server_name()
/openssl/.github/workflows/
H A Dcoveralls.yml66 - name: setup hostname workaround
67 run: sudo hostname localhost

Completed in 42 milliseconds

123