00001 /* 00002 * shttpsvc.h 00003 * 00004 * Class for secure service applications using HTTPS as the user interface. 00005 * 00006 * Portable Windows Library 00007 * 00008 * Copyright (c) 1993-2001 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Portable Windows Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Contributor(s): ______________________________________. 00025 * 00026 * $Revision: 20385 $ 00027 * $Author: rjongbloed $ 00028 * $Date: 2008-06-04 10:40:38 +0000 (Wed, 04 Jun 2008) $ 00029 */ 00030 00031 #ifndef SHTTPSVC_H 00032 #define SHTTPSVC_H 00033 00034 #ifdef P_USE_PRAGMA 00035 #pragma interface 00036 #endif 00037 00038 00039 #include <ptclib/httpsvc.h> 00040 #include <ptclib/pssl.h> 00041 00042 00044 00045 class PSecureHTTPServiceProcess : public PHTTPServiceProcess 00046 { 00047 PCLASSINFO(PSecureHTTPServiceProcess, PHTTPServiceProcess) 00048 00049 public: 00050 PSecureHTTPServiceProcess(const Info & inf); 00051 ~PSecureHTTPServiceProcess(); 00052 00053 virtual PHTTPServer * CreateHTTPServer(PTCPSocket & socket); 00054 00055 PBoolean SetServerCertificate( 00056 const PFilePath & certFile, 00057 PBoolean create = PFalse, 00058 const char * dn = NULL 00059 ); 00060 00061 virtual PBoolean OnDetectedNonSSLConnection(PChannel * chan, const PString & line); 00062 00063 virtual PString CreateNonSSLMessage(const PString & url); 00064 virtual PString CreateRedirectMessage(const PString & url); 00065 00066 protected: 00067 PSSLContext * sslContext; 00068 PBoolean disableSSL; 00069 }; 00070 00071 00072 #endif // SHTTPSVC_H