diff options
| author | Mary <me@thog.eu> | 2022-01-13 23:29:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-13 23:29:04 +0100 |
| commit | 3fa7ef21b43081a8f40ce76aafdb7cd0695dcda5 (patch) | |
| tree | 3430485991831be214bffbbbf13b06d11e430430 /Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslConnectionBase.cs | |
| parent | 366fe2dbb24e853662d0b910ee09e1733b863b69 (diff) | |
ssl: Implement SSL connectivity (#2961)
* implement certain servicessl functions
* ssl: Implement more of SSL connection and abstract it
This adds support to non blocking SSL operations and unlink the SSL
implementation from the IPC logic.
* Rename SslDefaultSocketConnection to SslManagedSocketConnection
* Fix regression on Pokemon TV
* Address gdkchan's comment
* Simplify value read from previous commit
* ssl: some changes
- Implement builtin certificates parsing and retrieving
- Fix issues with SSL version handling
- Improve managed SSL socket error handling
- Ensure to only return a certificate on DoHandshake when actually requested
* Add missing BuiltInCertificateManager initialization call
* Address gdkchan's comment
* Address Ack's comment
Co-authored-by: InvoxiPlayGames <webmaster@invoxiplaygames.uk>
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslConnectionBase.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslConnectionBase.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslConnectionBase.cs b/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslConnectionBase.cs new file mode 100644 index 00000000..74e5fcda --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslConnectionBase.cs @@ -0,0 +1,25 @@ +using Ryujinx.HLE.HOS.Services.Sockets.Bsd; +using System; +using System.Net.Sockets; + +namespace Ryujinx.HLE.HOS.Services.Ssl.SslService +{ + interface ISslConnectionBase: IDisposable + { + int SocketFd { get; } + + ISocket Socket { get; } + + ResultCode Handshake(string hostName); + + ResultCode GetServerCertificate(string hostname, Span<byte> certificates, out uint storageSize, out uint certificateCount); + + ResultCode Write(out int writtenCount, ReadOnlyMemory<byte> buffer); + + ResultCode Read(out int readCount, Memory<byte> buffer); + + ResultCode Peek(out int peekCount, Memory<byte> buffer); + + int Pending(); + } +} |
