4 * Class for secure service applications using HTTPS as the user interface.
6 * Portable Windows Library
8 * Copyright (c) 1993-2001 Equivalence Pty. Ltd.
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
20 * The Original Code is Portable Windows Library.
22 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
24 * Contributor(s): ______________________________________.
27 * Revision 1.7 2004/04/24 03:58:15 rjongbloed
28 * Allow for run time enable/disable of secure web access to HTTP process,
29 * changed from old debug only hack to "correct" usager. Thanks Ben Lear
31 * Revision 1.6 2002/09/16 01:08:59 robertj
32 * Added #define so can select if #pragma interface/implementation is used on
33 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
35 * Revision 1.5 2002/08/05 05:40:45 robertj
36 * Fixed missing pragma interface/implementation
38 * Revision 1.4 2001/12/13 09:19:09 robertj
39 * Added ability to create HTTP server certificate if one does not exist.
41 * Revision 1.3 2001/05/16 06:02:05 craigs
42 * Changed to allow detection of non-SSL connection to SecureHTTPServiceProcess
44 * Revision 1.2 2001/03/27 03:56:01 craigs
45 * Added hack to allow secure servers to act as non-secure servers
47 * Revision 1.1 2001/02/15 02:41:14 robertj
48 * Added class to do secure HTTP based service process.
60 #include <ptclib/httpsvc.h>
61 #include <ptclib/pssl.h>
64 /////////////////////////////////////////////////////////////////////
66 class PSecureHTTPServiceProcess
: public PHTTPServiceProcess
68 PCLASSINFO(PSecureHTTPServiceProcess
, PHTTPServiceProcess
)
71 PSecureHTTPServiceProcess(const Info
& inf
);
72 ~PSecureHTTPServiceProcess();
74 virtual PHTTPServer
* CreateHTTPServer(PTCPSocket
& socket
);
76 BOOL
SetServerCertificate(
77 const PFilePath
& certFile
,
79 const char * dn
= NULL
82 virtual BOOL
OnDetectedNonSSLConnection(PChannel
* chan
, const PString
& line
);
84 virtual PString
CreateNonSSLMessage(const PString
& url
);
85 virtual PString
CreateRedirectMessage(const PString
& url
);
88 PSSLContext
* sslContext
;