Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
OpenSslCon.h File Reference
#include <HttpServCon.h>
#include <openssl/ssl.h>
Include dependency graph for OpenSslCon.h:

Go to the source code of this file.

Classes

struct  OpenSslCon
 OpenSSL-backed HTTP listener. More...
 

Macros

#define OpenSslCon_isValid(o)   HttpServCon_isValid((HttpServCon*)o)
 

Typedefs

typedef struct OpenSslCon OpenSslCon
 OpenSSL-backed HTTP listener. More...
 

Functions

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. More...
 
SHARKSSL_API void OpenSslCon_destructor (OpenSslCon *o)
 Close and unregister the listener. More...
 
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. More...
 

Macro Definition Documentation

◆ OpenSslCon_isValid

#define OpenSslCon_isValid (   o)    HttpServCon_isValid((HttpServCon*)o)
Parameters
[in]oInitialized listener.
Returns
TRUE if its listening socket is valid, FALSE otherwise.

Typedef Documentation

◆ OpenSslCon

typedef struct OpenSslCon OpenSslCon

OpenSSL-backed HTTP listener.

Configure SSL_CTX before construction. Check OpenSslCon_isValid after construction; socket setup has no direct constructor status. Listener configuration requires the dispatcher mutex.

Function Documentation

◆ OpenSslCon_constructor()

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.

Parameters
ctxRequired borrowed SSL_CTX configured for server use. Keep it alive throughout listener use; configure certificates before listening.
serverRequired borrowed server, valid throughout listener use.
portTCP listen port in host byte order, normally 443. Zero initializes an inactive listener without opening a socket.
setIP6TRUE selects IPv6, FALSE IPv4. This parameter is ignored unless the underlying TCP/IP stack is a dual IP V4 and IP V6 stack.
interfaceNameBorrowed platform binding address/interface, used during the call; normally a NUL-terminated address string. NULL binds the wildcard address. Accepted representation is platform-specific.
[out]oCaller-owned listener storage.

◆ OpenSslCon_destructor()

SHARKSSL_API void OpenSslCon_destructor ( OpenSslCon o)

Close and unregister the listener.

Accepted connections are separate.

Parameters
[in,out]oInitialized listener; no borrowed dependency is freed.

◆ OpenSslCon_setPort()

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.

Parameters
[in]portNumberNew TCP port in host byte order, 1..65535.
[in]setIp6True selects IPv6, false IPv4 (default).
[in]interfaceNameBorrowed platform binding address/interface, or NULL for wildcard; used during this call only.
Returns
Zero on success, -1 on failure. The old listener is retained if replacement setup fails. Uses the associated server's dispatcher. Hold the dispatcher mutex during this operation.
Parameters
[in,out]oInitialized listener.