Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)"

This reverts merge request !47
This commit is contained in:
GreemDev
2025-06-15 20:45:26 -05:00
parent faf9e3cdd7
commit 77a797f154
307 changed files with 1245 additions and 1016 deletions

View File

@@ -50,8 +50,10 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
{
private const uint ValidMagic = 0x546C7373;
#pragma warning disable CS0649 // Field is never assigned to
public uint Magic;
public uint EntriesCount;
#pragma warning restore CS0649
public readonly bool IsValid()
{
@@ -61,12 +63,12 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
private struct CertStoreFileEntry
{
#pragma warning disable CS0649 // Field is never assigned to
public CaCertificateId Id;
public TrustedCertStatus Status;
public uint DataSize;
public uint DataOffset;
#pragma warning restore CS0649
}
public class CertStoreEntry

View File

@@ -21,8 +21,9 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
public ResultCode CreateContext(ServiceCtx context)
{
SslVersion sslVersion = (SslVersion)context.RequestData.ReadUInt32();
_ = context.RequestData.ReadUInt64(); // pid
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pidPlaceholder = context.RequestData.ReadUInt64();
#pragma warning restore IDE0059
MakeObject(context, new ISslContext(context.Request.HandleDesc.PId, sslVersion));

View File

@@ -47,6 +47,11 @@ namespace Ryujinx.HLE.HOS.Services.Ssl.SslService
{
CertificateFormat certificateFormat = (CertificateFormat)context.RequestData.ReadUInt32();
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong certificateDataPosition = context.Request.SendBuff[0].Position;
ulong certificateDataSize = context.Request.SendBuff[0].Size;
#pragma warning restore IDE0059
context.ResponseData.Write(_serverCertificateId++);
Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { certificateFormat });
@@ -58,6 +63,11 @@ namespace Ryujinx.HLE.HOS.Services.Ssl.SslService
// ImportClientPki(buffer<bytes, 5> certificate, buffer<bytes, 5> ascii_password) -> u64 certificateId
public ResultCode ImportClientPki(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong certificateDataPosition = context.Request.SendBuff[0].Position;
ulong certificateDataSize = context.Request.SendBuff[0].Size;
#pragma warning restore IDE0059
ulong asciiPasswordDataPosition = context.Request.SendBuff[1].Position;
ulong asciiPasswordDataSize = context.Request.SendBuff[1].Size;

View File

@@ -69,6 +69,8 @@ namespace Ryujinx.HLE.HOS.Services.Ssl.SslService
EndSslOperation();
}
// NOTE: We silence warnings about TLS 1.0 and 1.1 as games will likely use it.
#pragma warning disable SYSLIB0039
private SslProtocols TranslateSslVersion(SslVersion version)
{
return (version & SslVersion.VersionMask) switch
@@ -81,6 +83,7 @@ namespace Ryujinx.HLE.HOS.Services.Ssl.SslService
_ => throw new NotImplementedException(version.ToString()),
};
}
#pragma warning restore SYSLIB0039
/// <summary>
/// Retrieve the hostname of the current remote in case the provided hostname is null or empty.