-
Notifications
You must be signed in to change notification settings - Fork 0
/
ssl.h
47 lines (42 loc) · 1.2 KB
/
ssl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <util.h>
namespace nhttp {
using ssl_ctx_t = u32;
using func = void (*)();
#pragma pack(push, 1)
struct Self {
u8 _[2020];
func a_func;
};
struct Request {
u8 _[40];
char *hostname;
u8 _1[128];
ssl_ctx_t ssl_ctx;
void *buffer1;
u32 buffer1_len;
void *buffer2;
u32 buffer2_len;
void *cert;
u32 cert_len;
u32 should_use_client_cert;
u32 options;
u32 unk;
u32 a_field;
u32 root_ca_index;
u32 client_cert_index;
};
#pragma pack(pop)
LONGCALL ssl_ctx_t SSLNew(u32 options, const char *hostname) AT(0x802543c8);
LONGCALL s32 SSLSetBuiltinClientCert(ssl_ctx_t ctx, u32 client_cert_index)
AT(0x8025504c);
LONGCALL s32 SSLSetClientCert(ssl_ctx_t ctx, void *buffer1, u32 buffer1_size,
void *buffer2, u32 buffer2_size) AT(0x80254cd0);
LONGCALL s32 SSLSetRootCA(ssl_ctx_t ctx, const u8 *cert, u32 cert_size)
AT(0x80254e3c);
LONGCALL s32 SSLConnect(ssl_ctx_t ctx, void *socket) AT(0x80254520);
LONGCALL int NHTTPi_Request2Connection(void *_, nhttp::Request *request)
AT(0x80247fb8);
LONGCALL s32 SSLDoHandshake(ssl_ctx_t ctx) AT(0x802545e8);
LONGCALL void NHTTPi_SetSSLError(nhttp::Self *self, s32 error) AT(0x80241350);
} // namespace nhttp