00001 /** @file 00002 00003 A brief file description 00004 00005 @section license License 00006 00007 Licensed to the Apache Software Foundation (ASF) under one 00008 or more contributor license agreements. See the NOTICE file 00009 distributed with this work for additional information 00010 regarding copyright ownership. The ASF licenses this file 00011 to you under the Apache License, Version 2.0 (the 00012 "License"); you may not use this file except in compliance 00013 with the License. You may obtain a copy of the License at 00014 00015 http://www.apache.org/licenses/LICENSE-2.0 00016 00017 Unless required by applicable law or agreed to in writing, software 00018 distributed under the License is distributed on an "AS IS" BASIS, 00019 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00020 See the License for the specific language governing permissions and 00021 limitations under the License. 00022 */ 00023 00024 /**************************************************************************** 00025 00026 Net.h 00027 00028 This file implements an I/O Processor for network I/O. 00029 00030 00031 ****************************************************************************/ 00032 #ifndef __P_SSLNETPROCESSOR_H 00033 #define __P_SSLNETPROCESSOR_H 00034 00035 #include "libts.h" 00036 #include "P_Net.h" 00037 #include "P_SSLConfig.h" 00038 #include <openssl/ssl.h> 00039 00040 class UnixNetVConnection; 00041 struct NetAccept; 00042 00043 ////////////////////////////////////////////////////////////////// 00044 // 00045 // class SSLNetProcessor 00046 // 00047 ////////////////////////////////////////////////////////////////// 00048 struct SSLNetProcessor : public UnixNetProcessor 00049 { 00050 public: 00051 00052 virtual int start(int no_of_ssl_threads, size_t stacksize); 00053 00054 void cleanup(void); 00055 00056 SSL_CTX *getClientSSL_CTX(void) const { return client_ctx; } 00057 00058 SSLNetProcessor(); 00059 virtual ~SSLNetProcessor(); 00060 00061 SSL_CTX *client_ctx; 00062 00063 static EventType ET_SSL; 00064 00065 // 00066 // Private 00067 // 00068 00069 // Virtual function allows etype 00070 // to be upgraded to ET_SSL for SSLNetProcessor. 00071 virtual void upgradeEtype(EventType &etype); 00072 00073 virtual NetAccept * createNetAccept(); 00074 virtual NetVConnection * allocate_vc(EThread *t); 00075 00076 private: 00077 SSLNetProcessor(const SSLNetProcessor &); 00078 SSLNetProcessor & operator =(const SSLNetProcessor &); 00079 }; 00080 00081 extern SSLNetProcessor ssl_NetProcessor; 00082 00083 #endif