Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
OpenSslCon.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 *
11 ****************************************************************************
12 * HEADER
13 *
14 * $Id: OpenSslCon.h 5978 2026-09-11 16:13:48Z wini $
15 *
16 * COPYRIGHT: Real Time Logic LLC, 2021
17 *
18 * This software is copyrighted by and is the sole property of Real
19 * Time Logic LLC. All rights, title, ownership, or other interests in
20 * the software remain the property of Real Time Logic LLC. This
21 * software may only be used in accordance with the terms and
22 * conditions stipulated in the corresponding license agreement under
23 * which the software has been supplied. Any unauthorized use,
24 * duplication, transmission, distribution, or disclosure of this
25 * software is expressly forbidden.
26 *
27 * This Copyright notice may not be removed or modified without prior
28 * written consent of Real Time Logic LLC.
29 *
30 * Real Time Logic LLC. reserves the right to modify this software
31 * without notice.
32 *
33 * https://realtimelogic.com
34 ****************************************************************************
35 *
36 * OpenSSL HTTP Server Porting Layer.
37 *
38 */
39
42#ifndef __OpenSslCon_h
43#define __OpenSslCon_h
44
45#include <HttpServCon.h>
46#include <openssl/ssl.h>
47
51typedef struct OpenSslCon
52{
53#ifdef __cplusplus
54
68 SSL_CTX* ctx,
69 struct HttpServer* server,
70 U16 port,
71 BaBool setIP6,
72 const void* interfaceName);
73
83 int setPort(U16 portNumber, bool setIp6=false,
84 const void* interfaceName=0);
85
88 ~OpenSslCon();
89 private:
90#endif
91 HttpServCon super;
92 SSL_CTX* ctx;
94
95#ifdef __cplusplus
96extern "C" {
97#endif
98
101SHARKSSL_API void OpenSslCon_constructor(
102 OpenSslCon* o,
103 SSL_CTX* ctx,
104 struct HttpServer* server,
105 U16 port,
106 BaBool setIP6,
107 const void* interfaceName);
108
111SHARKSSL_API void OpenSslCon_destructor(OpenSslCon* o);
112
113
116SHARKSSL_API int OpenSslCon_setPort(OpenSslCon* o,
117 U16 portNumber,
118 BaBool setIp6,
119 const void* interfaceName);
122#define OpenSslCon_isValid(o) HttpServCon_isValid((HttpServCon*)o)
123
124#ifdef __cplusplus
125
127 SSL_CTX* ctx,
128 struct HttpServer* server,
129 U16 port,
130 BaBool setIP6,
131 const void* interfaceName) {
132 OpenSslCon_constructor(this,ctx,server,port,setIP6,interfaceName);
133}
134
135inline int OpenSslCon::setPort(U16 portNumber, bool setIp6=false,
136 const void* interfaceName) {
137 return OpenSslCon_setPort(this,portNumber,setIp6,interfaceName);
138}
139
142}
143
144
145}
146#endif
147
148#endif
SHARKSSL_API int OpenSslCon_setPort(OpenSslCon *o, U16 portNumber, BaBool setIp6, const void *interfaceName)
Open a replacement listener, then close the old listener on success.
SHARKSSL_API void OpenSslCon_destructor(OpenSslCon *o)
Close and unregister the listener.
SHARKSSL_API void OpenSslCon_constructor(OpenSslCon *o, SSL_CTX *ctx, struct HttpServer *server, U16 port, BaBool setIP6, const void *interfaceName)
Create an OpenSSL Server Connection Object.
struct OpenSslCon OpenSslCon
OpenSSL-backed HTTP listener.
uint16_t U16
Unsigned 16-bit integer.
Definition: GenPrimT.h:91
U8 BaBool
Boolean stored in an unsigned byte; FALSE is zero and TRUE is one.
Definition: GenPrimT.h:118
Create a server listen object.
Definition: HttpServCon.h:70
The Web Server.
Definition: HttpServer.h:3393
OpenSSL-backed HTTP listener.
Definition: OpenSslCon.h:52
~OpenSslCon()
Close and unregister the listener.
Definition: OpenSslCon.h:140
OpenSslCon(SSL_CTX *ctx, struct HttpServer *server, U16 port, BaBool setIP6, const void *interfaceName)
Create an OpenSSL Server Connection Object.
Definition: OpenSslCon.h:126
int setPort(U16 portNumber, bool setIp6=false, const void *interfaceName=0)
Open a replacement listener, then close the old listener on success.
Definition: OpenSslCon.h:135