Lines Matching defs:hostname
237 dst->hostname = NULL;
307 ret = mbedtls_ssl_session_set_hostname(dst, src->hostname);
2773 int mbedtls_ssl_set_hostname(mbedtls_ssl_context *ssl, const char *hostname)
2778 /* Check if new hostname is valid before
2780 if (hostname != NULL) {
2781 hostname_len = strlen(hostname);
2788 /* Now it's clear that we will overwrite the old hostname,
2791 if (ssl->hostname != NULL) {
2792 mbedtls_zeroize_and_free(ssl->hostname, strlen(ssl->hostname));
2795 /* Passing NULL as hostname shall clear the old one */
2797 if (hostname == NULL) {
2798 ssl->hostname = NULL;
2800 ssl->hostname = mbedtls_calloc(1, hostname_len + 1);
2801 if (ssl->hostname == NULL) {
2805 memcpy(ssl->hostname, hostname, hostname_len);
2807 ssl->hostname[hostname_len] = '\0';
3766 size_t hostname_len = (session->hostname == NULL) ?
3767 0 : strlen(session->hostname) + 1;
3810 + hostname_len; /* hostname */
3875 memcpy(p, session->hostname, hostname_len);
3992 session->hostname = mbedtls_calloc(1, hostname_len);
3993 if (session->hostname == NULL) {
3996 memcpy(session->hostname, p, hostname_len);
4223 * opaque hostname<0..2^16-1>;
4934 mbedtls_free(session->hostname);
5574 if (ssl->hostname != NULL) {
5575 mbedtls_zeroize_and_free(ssl->hostname, strlen(ssl->hostname));
7972 ssl->hostname,
8000 ssl->hostname,
9849 const char *hostname)
9854 /* Check if new hostname is valid before
9856 if (hostname != NULL) {
9857 hostname_len = strlen(hostname);
9864 /* Now it's clear that we will overwrite the old hostname,
9866 if (session->hostname != NULL) {
9867 mbedtls_zeroize_and_free(session->hostname,
9868 strlen(session->hostname));
9871 /* Passing NULL as hostname shall clear the old one */
9872 if (hostname == NULL) {
9873 session->hostname = NULL;
9875 session->hostname = mbedtls_calloc(1, hostname_len + 1);
9876 if (session->hostname == NULL) {
9880 memcpy(session->hostname, hostname, hostname_len);