wut/include/nsysnet/nssl.h

72 lines
1.4 KiB
C
Raw Normal View History

2018-06-18 12:13:25 +02:00
#pragma once
#include <wut.h>
/**
* \defgroup nsysnet_nssl Nintendo SSL
* \ingroup nsysnet
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef int32_t NSSLContextHandle;
typedef int32_t NSSLConnectionHandle;
typedef enum NSSLServerCertId
{
NSSL_SERVER_CERT_GROUP_0_FIRST = 100,
NSSL_SERVER_CERT_GROUP_0_LAST = 105,
NSSL_SERVER_CERT_GROUP_1_FIRST = 1001,
NSSL_SERVER_CERT_GROUP_1_LAST = 1033,
} NSSLServerCertId;
2018-06-18 12:13:25 +02:00
int32_t
NSSLInit();
int32_t
NSSLFinish();
NSSLContextHandle
2018-06-18 12:13:25 +02:00
NSSLCreateContext(int32_t unk);
int32_t
NSSLDestroyContext(NSSLContextHandle context);
2018-06-18 12:13:25 +02:00
int32_t
NSSLAddServerPKIExternal(NSSLContextHandle context,
2018-06-18 12:13:25 +02:00
const void *cert,
int32_t length,
int32_t unk);
int32_t
NSSLAddServerPKI(NSSLContextHandle context,
NSSLServerCertId pki);
2018-06-18 12:13:25 +02:00
NSSLConnectionHandle
NSSLCreateConnection(NSSLContextHandle context,
2018-06-18 12:13:25 +02:00
const char *host,
int32_t hostLength,
int32_t options,
int32_t socket,
int32_t block);
int32_t
NSSLRead(NSSLConnectionHandle connection,
2018-06-18 12:13:25 +02:00
const void *buffer,
int32_t length,
int32_t *outBytesRead);
int32_t
NSSLWrite(NSSLConnectionHandle connection,
2018-06-18 12:13:25 +02:00
const void *buffer,
int32_t length,
int32_t *outBytesWritten);
#ifdef __cplusplus
}
#endif
/** @} */