blob: 8f1abfeb881148a7fb8321e772c588828bfad4d0 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#ifndef _h_websSSL
2#define _h_websSSL 1
3
4
5#ifdef OPENSSL
6#define SSLEAY
7#define USE_SOCKETS
8#include <openssl/ssl.h>
9#else
10#include <sslc.h>
11#endif
12
13#ifndef UEMF
14 #include "basic/basic.h"
15 #include "emf/emf.h"
16#else
17 #include "uemf.h"
18#endif
19
20typedef struct {
21 SSL *ssl;
22 BIO *bio;
23} websSSL_t;
24
25
26extern int websSSLIsOpen();
27
28extern int websSSLGets(websSSL_t *wsp, char_t **buf);
29extern int websSSLRead(websSSL_t *wsp, char_t *buf, int nChars);
30extern int websSSLWrite(websSSL_t *wsp, char_t *buf, int nChars);
31
32extern int websSSLOpen();
33extern void websSSLClose();
34
35extern int websSSLEof(websSSL_t *wsp);
36
37extern int websSSLFlush(websSSL_t *wsp);
38extern int websSSLFree(websSSL_t *wsp);
39
40extern int websSSLSetKeyFile(char_t *keyFile);
41extern int websSSLSetCertFile(char_t *certFile);
42
43
44#endif /* _h_websSSL */
45