File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,17 @@ InterceptPlugin::getRequestHeaders()
192192 return state_->request_headers_ ;
193193}
194194
195+ TSSslConnection
196+ InterceptPlugin::getSslConnection ()
197+ {
198+ if (!state_->net_vc_ ) {
199+ LOG_ERROR (" Intercept Plugin is not ready to provide SSL Connection" );
200+ return nullptr ;
201+ }
202+
203+ return TSVConnSSLConnectionGet (state_->net_vc_ );
204+ }
205+
195206bool
196207InterceptPlugin::doRead ()
197208{
Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ class InterceptPlugin : public TransactionPlugin
7070 /* * Should be called only after request header has completely been consumed */
7171 Headers &getRequestHeaders ();
7272
73+ /* *
74+ * The returned TSSslConnection would be nullptr if the connection is not a TLS connection
75+ * or Intercept plugin is not ready.
76+ */
77+ TSSslConnection getSslConnection ();
78+
7379 virtual ~InterceptPlugin ();
7480
7581 struct State ; /* * Internal use only */
You can’t perform that action at this time.
0 commit comments