1 | /* |
---|
2 | * websSSL.h -- SSL Patch header |
---|
3 | * |
---|
4 | * Copyright (c) GoAhead Software Inc., 1992-2000. All Rights Reserved. |
---|
5 | * |
---|
6 | * See the file "license.txt" for information on usage and redistribution |
---|
7 | * |
---|
8 | * $Id$ |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef _h_websSSL |
---|
12 | #define _h_websSSL 1 |
---|
13 | |
---|
14 | /******************************** Description *********************************/ |
---|
15 | |
---|
16 | /* |
---|
17 | * Header file for the GoAhead Patch for SSL. This defines the interface to |
---|
18 | * integrate SSL into the GoAhead Webserver. |
---|
19 | */ |
---|
20 | |
---|
21 | /********************************* Includes ***********************************/ |
---|
22 | |
---|
23 | |
---|
24 | #ifdef OPENSSL |
---|
25 | #define SSLEAY /* turn off a few special case MONOLITH macros */ |
---|
26 | #define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */ |
---|
27 | #include <openssl/ssl.h> |
---|
28 | #else |
---|
29 | #include <sslc.h> |
---|
30 | #endif |
---|
31 | |
---|
32 | #ifndef UEMF |
---|
33 | #include "basic/basic.h" |
---|
34 | #include "emf/emf.h" |
---|
35 | #else |
---|
36 | #include "uemf.h" |
---|
37 | #endif |
---|
38 | |
---|
39 | /********************************** Defines ***********************************/ |
---|
40 | |
---|
41 | typedef struct { |
---|
42 | SSL *ssl; |
---|
43 | BIO *bio; |
---|
44 | } websSSL_t; |
---|
45 | |
---|
46 | |
---|
47 | /******************************** Prototypes **********************************/ |
---|
48 | |
---|
49 | extern int websSSLOpen(); |
---|
50 | extern int websSSLIsOpen(); |
---|
51 | extern void websSSLClose(); |
---|
52 | |
---|
53 | extern int websSSLWrite(websSSL_t *wsp, char_t *buf, int nChars); |
---|
54 | extern int websSSLGets(websSSL_t *wsp, char_t **buf); |
---|
55 | extern int websSSLRead(websSSL_t *wsp, char_t *buf, int nChars); |
---|
56 | extern int websSSLEof(websSSL_t *wsp); |
---|
57 | |
---|
58 | extern int websSSLFree(websSSL_t *wsp); |
---|
59 | extern int websSSLFlush(websSSL_t *wsp); |
---|
60 | |
---|
61 | extern int websSSLSetKeyFile(char_t *keyFile); |
---|
62 | extern int websSSLSetCertFile(char_t *certFile); |
---|
63 | |
---|
64 | |
---|
65 | #endif /* _h_websSSL */ |
---|
66 | |
---|
67 | /*****************************************************************************/ |
---|