forked from MrBean35000vr/netslug-wii
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e4dac6
commit 296cc80
Showing
2 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* ssl.h | ||
* by Alex Chadwick | ||
* | ||
* Copyright (C) 2014, Alex Chadwick | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
/* definitions of symbols inferred to exist in the ssl.h header file for which | ||
* the brainslug symbol information is available. */ | ||
|
||
#ifndef _RVL_SSL_H_ | ||
#define _RVL_SSL_H_ | ||
|
||
#include <rvl/so.h> | ||
#include <stddef.h> | ||
|
||
typedef int ssl_ctx_t; | ||
|
||
ssl_ctx_t SSLNew(int options, char hostname[128]); | ||
/* generally 0 on success or negative on error. */ | ||
int SSLConnect(ssl_ctx_t ctx, so_fd_t fd); | ||
int SSLDoHandshake(ssl_ctx_t ctx); | ||
int SSLRead(ssl_ctx_t ctx, void *buffer, size_t size); | ||
int SSLWrite(ssl_ctx_t ctx, const void *buffer, size_t size); | ||
int SSLShutdown(ssl_ctx_t ctx); | ||
int SSLSetClientCert( | ||
ssl_ctx_t ctx, const void *buffer1, size_t buffer1_size, | ||
const void *buffer2, size_t buffer2_size); | ||
int SSLSetRootCA(ssl_ctx_t ctx, const void *cert, size_t cert_len); | ||
/* these methods aren't in all games with ssl that I've seen */ | ||
int SSLSetRootCADefault(ssl_ctx_t ctx); | ||
int SSLSetBuiltinRootCA(ssl_ctx_t ctx, int index); | ||
int SSLSetBuiltinClientCert(ssl_ctx_t ctx, int index); | ||
|
||
#endif /* _RVL_SSL_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Symbols relating to ssl networking --> | ||
<symbols> | ||
<!-- an old version of this is shorter --> | ||
<symbol name="SSLNew" size="0x158" offset="0x28"> | ||
<data> | ||
7C9D2378 38800000 938CFFF0 7C7C1B78 | ||
</data> | ||
</symbol> | ||
<symbol name="SSLConnect" size="0xc8" offset="0x6c"> | ||
<data> | ||
38800002 93C10040 38A00001 38C00002 | ||
</data> | ||
</symbol> | ||
<symbol name="SSLDoHandshake" size="0xac" offset="0x60"> | ||
<data> | ||
38800003 38A00001 93C10040 38C00001 | ||
</data> | ||
</symbol> | ||
<!-- an old version of this is shorter --> | ||
<symbol name="SSLRead" size="0x2d0" offset="0x40"> | ||
<data> | ||
7C7F1B78 3B40FFFF 4080000C 3860FFFF | ||
</data> | ||
</symbol> | ||
<!-- an old version of this is shorter --> | ||
<symbol name="SSLWrite" size="0x2c0" offset="0x40"> | ||
<data> | ||
7C7F1B78 3B60FFFF 4080000C 3860FFFF | ||
</data> | ||
</symbol> | ||
<symbol name="SSLShutdown" size="0xac" offset="0x60"> | ||
<data> | ||
38800006 38A00001 93C10040 38C00001 | ||
</data> | ||
</symbol> | ||
<symbol name="SSLSetClientCert" size="0x16c" offset="0x108"> | ||
<data> | ||
38800007 93010020 38A00001 38C00003 | ||
</data> | ||
</symbol> | ||
<symbol name="SSLSetRootCA" size="0x148" offset="0xf0"> | ||
<data> | ||
3880000A 38A00001 38C00002 91410060 | ||
</data> | ||
</symbol> | ||
<!-- these are a bit hit and miss as to which games have them --> | ||
<symbol name="SSLSetRootCADefault" size="0xac" offset="0x60"> | ||
<data> | ||
3880000B 38A00001 93C10020 38C00001 | ||
</data> | ||
</symbol> | ||
<symbol name="SSLSetBuiltinRootCA" size="0xc8" offset="0x6c"> | ||
<data> | ||
3880000D 90A10060 38A00001 38C00002 | ||
</data> | ||
</symbol> | ||
<symbol name="SSLSetBuiltinClientCert" size="0xc8" offset="0x6c"> | ||
<data> | ||
3880000E 90A10060 38A00001 38C00002 | ||
</data> | ||
</symbol> | ||
</symbols> |