Go to the source code of this file.
|
| STATUS | createTlsSession (PTlsSessionCallbacks, PTlsSession *) |
| STATUS | freeTlsSession (PTlsSession *) |
| STATUS | tlsSessionStartWithHostname (PTlsSession, BOOL, PCHAR) |
| STATUS | tlsSessionStart (PTlsSession, BOOL) |
| STATUS | tlsSessionProcessPacket (PTlsSession, PBYTE, UINT32, PUINT32) |
| STATUS | tlsSessionPutApplicationData (PTlsSession, PBYTE, UINT32) |
| STATUS | tlsSessionShutdown (PTlsSession) |
| STATUS | tlsSessionChangeState (PTlsSession, TLS_SESSION_STATE) |
◆ PTlsSession
◆ PTlsSessionCallbacks
◆ TlsSession
◆ TlsSessionOnStateChange
◆ TlsSessionOutboundPacketFunc
| typedef STATUS(* TlsSessionOutboundPacketFunc) (UINT64, PBYTE, UINT32) |
◆ TLS_SESSION_STATE
| Enumerator |
|---|
| TLS_SESSION_STATE_NEW | |
| TLS_SESSION_STATE_CONNECTING | |
| TLS_SESSION_STATE_CONNECTED | |
| TLS_SESSION_STATE_CLOSED | |
◆ createTlsSession()
Create TLS session. NOT THREAD SAFE.
- Parameters
-
- Returns
- STATUS - status of operation
◆ freeTlsSession()
Free TLS session. Not thread safe.
- Parameters
-
- Returns
- STATUS - status of operation
◆ tlsSessionChangeState()
◆ tlsSessionProcessPacket()
| STATUS tlsSessionProcessPacket |
( |
PTlsSession | pTlsSession, |
|
|
PBYTE | pData, |
|
|
UINT32 | bufferLen, |
|
|
PUINT32 | pDataLen ) |
Decrypt application data up to specified bytes. The decrypted data will be copied back to the original buffer. During handshaking, the return data size should be always 0 since there's no application data yet. NOT THREAD SAFE.
- Parameters
-
| PTlsSession | - TlsSession object |
| PBYTE | - encrypted data |
| UINT32 | - the size of buffer that PBYTE is pointing to |
| PUINT32 | - pointer to the size of encrypted data and will be used to store the size of application data |
◆ tlsSessionPutApplicationData()
| STATUS tlsSessionPutApplicationData |
( |
PTlsSession | pTlsSession, |
|
|
PBYTE | pData, |
|
|
UINT32 | dataLen ) |
Encrypt application data up to specified bytes. The encrypted data will be sent through specified callback during initialization. If NULL is specified, it'll only check for pending handshake buffer. NOT THREAD SAFE.
- Parameters
-
◆ tlsSessionShutdown()
Mark Tls session to be closed NOT THREAD SAFE.
◆ tlsSessionStart()
| STATUS tlsSessionStart |
( |
PTlsSession | pTlsSession, |
|
|
BOOL | isServer ) |
Start TLS handshake. NOT THREAD SAFE.
- Parameters
-
- Returns
- STATUS - status of operation
◆ tlsSessionStartWithHostname()
| STATUS tlsSessionStartWithHostname |
( |
PTlsSession | pTlsSession, |
|
|
BOOL | isServer, |
|
|
PCHAR | hostname ) |
Start TLS handshake with an optional hostname parameter. NOT THREAD SAFE.
- Parameters
-
| PTlsSession | - TlsSession object |
| BOOL | - is server |
| PCHAR | - hostname hint for TLS backends that support hostname verification or SNI, or NULL when no hostname is available. The current OpenSSL backend ignores this parameter and preserves the existing behavior. |
- Returns
- STATUS - status of operation