nsysnet: Add NSSL* functions.

This commit is contained in:
James Benton 2018-06-18 11:13:25 +01:00
parent 73a0b08bcf
commit 3483172b50
2 changed files with 66 additions and 4 deletions

62
include/nsysnet/nssl.h Normal file
View File

@ -0,0 +1,62 @@
#pragma once
#include <wut.h>
/**
* \defgroup nsysnet_nssl Nintendo SSL
* \ingroup nsysnet
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef void *NSSLContext;
typedef void *NSSLConnection;
int32_t
NSSLInit();
int32_t
NSSLFinish();
NSSLContext
NSSLCreateContext(int32_t unk);
int32_t
NSSLDestroyContext(NSSLContext context);
int32_t
NSSLAddServerPKIExternal(NSSLContext context,
const void *cert,
int32_t length,
int32_t unk);
int32_t
NSSLAddServerPKI(NSSLContext context,
int32_t pki);
NSSLConnection
NSSLCreateConnection(NSSLContext context,
const char *host,
int32_t hostLength,
int32_t options,
int32_t socket,
int32_t block);
int32_t
NSSLRead(NSSLConnection connection,
const void *buffer,
int32_t length,
int32_t *outBytesRead);
int32_t
NSSLWrite(NSSLConnection connection,
const void *buffer,
int32_t length,
int32_t *outBytesWritten);
#ifdef __cplusplus
}
#endif
/** @} */

View File

@ -12,6 +12,10 @@
* \ingroup nsysnet
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
#define SOL_SOCKET -1
#define INADDR_ANY 0
@ -99,10 +103,6 @@ struct sockaddr_in
char sin_zero[8];
};
#ifdef __cplusplus
extern "C" {
#endif
void
socket_lib_init();