1 /** @file 2 3 Header file for SSLProxySession class. 4 5 @section license License 6 7 Licensed to the Apache Software Foundation (ASF) under one 8 or more contributor license agreements. See the NOTICE file 9 distributed with this work for additional information 10 regarding copyright ownership. The ASF licenses this file 11 to you under the Apache License, Version 2.0 (the 12 "License"); you may not use this file except in compliance 13 with the License. You may obtain a copy of the License at 14 15 http://www.apache.org/licenses/LICENSE-2.0 16 17 Unless required by applicable law or agreed to in writing, software 18 distributed under the License is distributed on an "AS IS" BASIS, 19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 See the License for the specific language governing permissions and 21 limitations under the License. 22 */ 23 24 #pragma once 25 26 #include <memory> 27 #include <string_view> 28 29 class SSLNetVConnection; 30 31 class SSLProxySession 32 { 33 public: 34 // Returns null pointer if no SNI server name, otherwise pointer to null-terminated string. 35 // 36 char const * client_sni_server_name()37 client_sni_server_name() const 38 { 39 return _client_sni_server_name.get(); 40 } 41 42 bool client_provided_certificate()43 client_provided_certificate() const 44 { 45 return _client_provided_cert; 46 } 47 48 void init(SSLNetVConnection const &new_vc); 49 50 private: 51 std::unique_ptr<char[]> _client_sni_server_name; 52 bool _client_provided_cert = false; 53 }; 54