Added some more SSL functions

This commit is contained in:
Maschell 2018-03-11 20:48:34 +01:00
parent fcb17e5826
commit e10909f54c
2 changed files with 18 additions and 0 deletions

View File

@ -48,6 +48,12 @@ EXPORT_DECL(const char *, inet_ntop, s32 af, const void *src, char *dst, s32 siz
EXPORT_DECL(s32, inet_pton, s32 af, const char *src, void *dst); EXPORT_DECL(s32, inet_pton, s32 af, const char *src, void *dst);
EXPORT_DECL(s32, socketlasterr, void); EXPORT_DECL(s32, socketlasterr, void);
EXPORT_DECL(s32, NSSLInit, void);
EXPORT_DECL(s32, NSSLFinish, void);
EXPORT_DECL(s32, NSSLCreateContext, s32 unkwn);
EXPORT_DECL(s32, NSSLDestroyContext, s32 context);
EXPORT_DECL(s32, NSSLAddServerPKI, s32 context, s32 pki);
EXPORT_DECL(s32, NSSLAddServerPKIExternal, s32 context, const u8* cert, s32 length, s32 unkwn);
EXPORT_DECL(s32, NSSLWrite, s32 connection, const void* buf, s32 len,s32 * written); EXPORT_DECL(s32, NSSLWrite, s32 connection, const void* buf, s32 len,s32 * written);
EXPORT_DECL(s32, NSSLRead, s32 connection, const void* buf, s32 len,s32 * read); EXPORT_DECL(s32, NSSLRead, s32 connection, const void* buf, s32 len,s32 * read);
EXPORT_DECL(s32, NSSLCreateConnection, s32 context, const char* host, s32 hotlen,s32 options,s32 sock,s32 block); EXPORT_DECL(s32, NSSLCreateConnection, s32 context, const char* host, s32 hotlen,s32 options,s32 sock,s32 block);
@ -95,6 +101,12 @@ void InitSocketFunctionPointers(void) {
OS_FIND_EXPORT(nsysnet_handle, inet_ntop); OS_FIND_EXPORT(nsysnet_handle, inet_ntop);
OS_FIND_EXPORT(nsysnet_handle, inet_pton); OS_FIND_EXPORT(nsysnet_handle, inet_pton);
OS_FIND_EXPORT(nsysnet_handle, NSSLInit);
OS_FIND_EXPORT(nsysnet_handle, NSSLFinish);
OS_FIND_EXPORT(nsysnet_handle, NSSLCreateContext);
OS_FIND_EXPORT(nsysnet_handle, NSSLDestroyContext);
OS_FIND_EXPORT(nsysnet_handle, NSSLAddServerPKI);
OS_FIND_EXPORT(nsysnet_handle, NSSLAddServerPKIExternal);
OS_FIND_EXPORT(nsysnet_handle, NSSLWrite); OS_FIND_EXPORT(nsysnet_handle, NSSLWrite);
OS_FIND_EXPORT(nsysnet_handle, NSSLRead); OS_FIND_EXPORT(nsysnet_handle, NSSLRead);
OS_FIND_EXPORT(nsysnet_handle, NSSLCreateConnection); OS_FIND_EXPORT(nsysnet_handle, NSSLCreateConnection);

View File

@ -103,6 +103,12 @@ extern s32 (*socketlasterr)(void);
extern s32 (*sendto)(s32 s, const void *buffer, s32 size, s32 flags, const struct sockaddr *dest, s32 dest_len); extern s32 (*sendto)(s32 s, const void *buffer, s32 size, s32 flags, const struct sockaddr *dest, s32 dest_len);
extern s32 (*setsockopt)(s32 s, s32 level, s32 optname, void *optval, s32 optlen); extern s32 (*setsockopt)(s32 s, s32 level, s32 optname, void *optval, s32 optlen);
extern s32 (* NSSLInit)(void);
extern s32 (* NSSLFinish)(void);
extern s32 (* NSSLCreateContext)(s32 unkwn);
extern s32 (* NSSLDestroyContext)(s32 context);
extern s32 (* NSSLAddServerPKIExternal)(s32 context, const u8* cert, s32 length, s32 unkwn);
extern s32 (* NSSLAddServerPKI)(s32 context, s32 pki);
extern s32 (* NSSLWrite)(s32 connection, const void* buf, s32 len,s32 * written); extern s32 (* NSSLWrite)(s32 connection, const void* buf, s32 len,s32 * written);
extern s32 (* NSSLRead)(s32 connection, const void* buf, s32 len,s32 * read); extern s32 (* NSSLRead)(s32 connection, const void* buf, s32 len,s32 * read);
extern s32 (* NSSLCreateConnection)(s32 context, const char* host, s32 hotlen,s32 options,s32 sock,s32 block); extern s32 (* NSSLCreateConnection)(s32 context, const char* host, s32 hotlen,s32 options,s32 sock,s32 block);