Changeset View
Changeset View
Standalone View
Standalone View
apps/lib/apps.c
/* | /* | ||||
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. | ||||
* | * | ||||
* Licensed under the Apache License 2.0 (the "License"). You may not use | * Licensed under the Apache License 2.0 (the "License"). You may not use | ||||
* this file except in compliance with the License. You can obtain a copy | * this file except in compliance with the License. You can obtain a copy | ||||
Context not available. | |||||
if (connect) { | if (connect) { | ||||
SSL *ssl; | SSL *ssl; | ||||
BIO *sbio = NULL; | BIO *sbio = NULL; | ||||
X509_STORE *ts = SSL_CTX_get_cert_store(ssl_ctx); | |||||
X509_VERIFY_PARAM *vpm = X509_STORE_get0_param(ts); | |||||
const char *host = vpm == NULL ? NULL : | |||||
X509_VERIFY_PARAM_get0_host(vpm, 0 /* first hostname */); | |||||
/* adapt after fixing callback design flaw, see #17088 */ | /* adapt after fixing callback design flaw, see #17088 */ | ||||
if ((info->use_proxy | if ((info->use_proxy | ||||
Context not available. | |||||
return NULL; | return NULL; | ||||
} | } | ||||
/* adapt after fixing callback design flaw, see #17088 */ | if (vpm != NULL) | ||||
SSL_set_tlsext_host_name(ssl, info->server); /* not critical to do */ | SSL_set_tlsext_host_name(ssl, host /* may be NULL */); | ||||
SSL_set_connect_state(ssl); | SSL_set_connect_state(ssl); | ||||
BIO_set_ssl(sbio, ssl, BIO_CLOSE); | BIO_set_ssl(sbio, ssl, BIO_CLOSE); | ||||
Context not available. |