-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathwebsSSL.h
63 lines (45 loc) · 1.78 KB
/
websSSL.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* websSSL.h -- MatrixSSL Layer Header
*
* (C)Copyright 2002-2010 PeerSec Networks
* All Rights Reserved
*/
/******************************************************************************/
#ifndef _h_websSSL
#define _h_websSSL 1
/******************************** Description *********************************/
/*
* Header file for the PeerSec MatrixSSL layer. This defines the interface to
* integrate MatrixSSL into the GoAhead Webserver.
*/
/********************************* Includes ***********************************/
#ifdef WEBS_SSL_SUPPORT
#include "webs.h"
#include "matrixSSLSocket.h"
#include "uemf.h"
/********************************** Defines ***********************************/
#define DEFAULT_CERT_FILE "./certSrv.pem" /* Public key certificate */
#define DEFAULT_KEY_FILE "./privkeySrv.pem" /* Private key file */
typedef struct {
sslConn_t* sslConn;
struct websRec* wp;
} websSSL_t;
/*************************** User Code Prototypes *****************************/
extern int websSSLOpen();
extern int websSSLIsOpen();
extern void websSSLClose();
#ifdef WEBS_WHITELIST_SUPPORT
extern int websRequireSSL(char *url);
#endif /* WEBS_WHITELIST_SUPPORT */
/*************************** Internal Prototypes *****************************/
extern int websSSLWrite(websSSL_t *wsp, char_t *buf, int nChars);
extern int websSSLGets(websSSL_t *wsp, char_t **buf);
extern int websSSLRead(websSSL_t *wsp, char_t *buf, int nChars);
extern int websSSLEof(websSSL_t *wsp);
extern int websSSLFree(websSSL_t *wsp);
extern int websSSLFlush(websSSL_t *wsp);
extern int websSSLSetKeyFile(char_t *keyFile);
extern int websSSLSetCertFile(char_t *certFile);
#endif /* WEBS_SSL_SUPPORT */
#endif /* _h_websSSL */
/*****************************************************************************/