Skip to content
Permalink
Browse files

Update TSVConnSslConnectionGet name to match others in the TSVConnSsl…

…* family
  • Loading branch information
Susan Hinrichs authored and shinrich committed Sep 16, 2019
1 parent fd59013 commit 52944ce144d1de64ae31509f0e94745957af8bdd
@@ -42,7 +42,7 @@ int
CB_SNI(TSCont contp, TSEvent, void *cb_data)
{
auto vc = static_cast<TSVConn>(cb_data);
TSSslConnection ssl_conn = TSVConnSSLConnectionGet(vc);
TSSslConnection ssl_conn = TSVConnSslConnectionGet(vc);
auto *ssl = reinterpret_cast<SSL *>(ssl_conn);
char const *sni = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
if (sni) {
@@ -49,7 +49,7 @@ int
CB_servername(TSCont /* contp */, TSEvent /* event */, void *edata)
{
TSVConn ssl_vc = reinterpret_cast<TSVConn>(edata);
TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);
SSL *ssl = reinterpret_cast<SSL *>(sslobj);
const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
if (servername != nullptr) {
@@ -40,7 +40,7 @@ int
CB_servername_whitelist(TSCont /* contp */, TSEvent /* event */, void *edata)
{
TSVConn ssl_vc = reinterpret_cast<TSVConn>(edata);
TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);
SSL *ssl = reinterpret_cast<SSL *>(sslobj);
const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);

@@ -62,7 +62,7 @@ int
CB_clientcert(TSCont /* contp */, TSEvent /* event */, void *edata)
{
TSVConn ssl_vc = reinterpret_cast<TSVConn>(edata);
TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);
SSL *ssl = reinterpret_cast<SSL *>(sslobj);
X509 *cert = SSL_get_peer_certificate(ssl);
TSDebug(PLUGIN_NAME, "plugin verify_cert verifying client certificate");
@@ -1233,7 +1233,7 @@ tsapi void TSVConnReenableEx(TSVConn sslvcp, TSEvent event);
/* Set the connection to go into blind tunnel mode */
tsapi TSReturnCode TSVConnTunnel(TSVConn sslp);
/* Return the SSL object associated with the connection */
tsapi TSSslConnection TSVConnSSLConnectionGet(TSVConn sslp);
tsapi TSSslConnection TSVConnSslConnectionGet(TSVConn sslp);
/* Return the intermediate X509StoreCTX object that references the certificate being validated */
tsapi TSSslVerifyCTX TSVConnSslVerifyCTXGet(TSVConn sslp);
/* Fetch a SSL context from the global lookup table */
@@ -534,7 +534,7 @@ shadow_cert_generator(TSCont contp, TSEvent event, void *edata)
TSDebug(PLUGIN_NAME, "\tClearing the queue size %lu", localQ.size());
TSVConn ssl_vc = reinterpret_cast<TSVConn>(localQ.front());
localQ.pop();
TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);
SSL *ssl = reinterpret_cast<SSL *>(sslobj);
SSL_set_SSL_CTX(ssl, ref_ctx);
TSVConnReenable(ssl_vc);
@@ -549,7 +549,7 @@ static int
cert_retriever(TSCont contp, TSEvent event, void *edata)
{
TSVConn ssl_vc = reinterpret_cast<TSVConn>(edata);
TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);
SSL *ssl = reinterpret_cast<SSL *>(sslobj);
const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
SSL_CTX *ref_ctx = nullptr;
@@ -302,7 +302,7 @@ client_hello_ja3_handler(TSCont contp, TSEvent event, void *edata)
#error OpenSSL cannot be 1.1.0
#endif

TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);

// OpenSSL handle
SSL *ssl = reinterpret_cast<SSL *>(sslobj);
@@ -36,7 +36,7 @@ SslHdrExpandRequestHook(TSCont cont, TSEvent event, void *edata)
txn = static_cast<TSHttpTxn>(edata);
hdr = static_cast<const SslHdrInstance *>(TSContDataGet(cont));
TSVConn vconn = TSHttpSsnClientVConnGet(TSHttpTxnSsnGet(txn));
TSSslConnection ssl = TSVConnSSLConnectionGet(vconn);
TSSslConnection ssl = TSVConnSslConnectionGet(vconn);

switch (event) {
case TS_EVENT_HTTP_READ_REQUEST_HDR:
@@ -9162,7 +9162,7 @@ TSVConnTunnel(TSVConn sslp)
}

TSSslConnection
TSVConnSSLConnectionGet(TSVConn sslp)
TSVConnSslConnectionGet(TSVConn sslp)
{
TSSslConnection ssl = nullptr;
NetVConnection *vc = reinterpret_cast<NetVConnection *>(sslp);
@@ -190,7 +190,7 @@ InterceptPlugin::getSslConnection()
return nullptr;
}

return TSVConnSSLConnectionGet(state_->net_vc_);
return TSVConnSslConnectionGet(state_->net_vc_);
}

bool
@@ -47,7 +47,7 @@ CB_server_verify(TSCont cont, TSEvent event, void *edata)

// Is this a good name or not?
TSEvent reenable_event = TS_EVENT_CONTINUE;
TSSslConnection sslobj = TSVConnSSLConnectionGet(ssl_vc);
TSSslConnection sslobj = TSVConnSslConnectionGet(ssl_vc);
SSL *ssl = (SSL *)sslobj;
const char *sni_name = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
if (sni_name) {

0 comments on commit 52944ce

Please sign in to comment.
You can’t perform that action at this time.