SharkSSL™ Embedded SSL/TLS Stack
SharkSslSCMgr.h
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * SharkSSL Embedded SSL/TLS Stack
10 ****************************************************************************
11 * PROGRAM MODULE
12 *
13 * $Id: SharkSslSCMgr.h 5300 2022-10-25 13:21:57Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2013 - 2022
16 *
17 * This software is copyrighted by and is the sole property of Real
18 * Time Logic LLC. All rights, title, ownership, or other interests in
19 * the software remain the property of Real Time Logic LLC. This
20 * software may only be used in accordance with the terms and
21 * conditions stipulated in the corresponding license agreement under
22 * which the software has been supplied. Any unauthorized use,
23 * duplication, transmission, distribution, or disclosure of this
24 * software is expressly forbidden.
25 *
26 * This Copyright notice may not be removed or modified without prior
27 * written consent of Real Time Logic LLC.
28 *
29 * Real Time Logic LLC. reserves the right to modify this software
30 * without notice.
31 *
32 * http://www.realtimelogic.com
33 * http://www.sharkssl.com
34 ****************************************************************************
35 *
36 */
37#ifndef _SharkSslSCMgr_h
38#define _SharkSslSCMgr_h
39
40#include <SharkSslEx.h>
41#include "SplayTree.h"
42#include "DoubleList.h"
43
44#ifndef SHARKSSL_API
45#define SHARKSSL_API
46#else /* Barracuda */
47#define SHARKSSL_BA 1
48#endif
49
50
60typedef struct
61{
62 SplayTreeNode super;
63 DoubleLink dlink;
65 const char* host;
66 U16 hostLen;
67 U16 port;
69
70
71
74typedef struct
75{
76 SharkSslIntf super;
77 SplayTree stree;
78 DoubleList dlist;
79 SharkSsl* ssl;
80 U32 maxTime;
81 int noOfSessions;
83
84
85#ifdef __cplusplus
86extern "C" {
87#endif
88
96SHARKSSL_API void SharkSslSCMgr_constructor(
97 SharkSslSCMgr* o, SharkSsl* ssl, U32 maxTime);
98
105 SharkSslSCMgr* o,SharkSslCon* scon,const char* host,U16 port);
106
118SHARKSSL_API int SharkSslSCMgr_save(
119 SharkSslSCMgr* o, SharkSslCon* scon, const char* host, U16 port);
120
121#ifdef __cplusplus
122}
123#endif
124 /* end group SharkSslSCMgr */
126
127#endif
struct SharkSslCon SharkSslCon
SharkSslCon is an opaque handle returned by function SharkSsl_createCon.
Definition: SharkSSL.h:553
SHARKSSL_API void SharkSslSCMgr_constructor(SharkSslSCMgr *o, SharkSsl *ssl, U32 maxTime)
SharkSslSCMgr simplifies using the session API for TLS clients; the constructor initializes a SharkSs...
SHARKSSL_API int SharkSslSCMgr_save(SharkSslSCMgr *o, SharkSslCon *scon, const char *host, U16 port)
Save the session when SharkSslSCMgr_get returns NULL.
SHARKSSL_API SharkSslSCMgrNode * SharkSslSCMgr_get(SharkSslSCMgr *o, SharkSslCon *scon, const char *host, U16 port)
Resume a session.
struct SharkSslSession SharkSslSession
SharkSslSession is an opaque handle returned by function SharkSslCon_acquireSession.
Definition: SharkSSL.h:265
The handle returned by SharkSslSCMgr_get and passed into SharkSslSCMgr_save.
Definition: SharkSslSCMgr.h:61
See SharkSslSCMgr_constructor for details.
Definition: SharkSslSCMgr.h:75
A SharkSsl object is the coordinator for managing SharkSslCon objects (See SharkSsl_constructor for d...
Definition: SharkSSL.h:561