early-access version 1678

This commit is contained in:
pineappleEA 2021-05-13 03:59:00 +02:00
parent dac0ad612f
commit 360d3522e6
2 changed files with 22 additions and 3 deletions

View file

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 1677. This is the source code for early-access 1678.
## Legal Notice ## Legal Notice

View file

@ -10,6 +10,11 @@
namespace Service::SSL { namespace Service::SSL {
enum class CertificateFormat : u32 {
Pem = 1,
Der = 2,
};
class ISslConnection final : public ServiceFramework<ISslConnection> { class ISslConnection final : public ServiceFramework<ISslConnection> {
public: public:
explicit ISslConnection(Core::System& system_) : ServiceFramework{system_, "ISslConnection"} { explicit ISslConnection(Core::System& system_) : ServiceFramework{system_, "ISslConnection"} {
@ -58,7 +63,7 @@ public:
{1, nullptr, "GetOption"}, {1, nullptr, "GetOption"},
{2, &ISslContext::CreateConnection, "CreateConnection"}, {2, &ISslContext::CreateConnection, "CreateConnection"},
{3, nullptr, "GetConnectionCount"}, {3, nullptr, "GetConnectionCount"},
{4, nullptr, "ImportServerPki"}, {4, &ISslContext::ImportServerPki, "ImportServerPki"},
{5, &ISslContext::ImportClientPki, "ImportClientPki"}, {5, &ISslContext::ImportClientPki, "ImportClientPki"},
{6, nullptr, "RemoveServerPki"}, {6, nullptr, "RemoveServerPki"},
{7, nullptr, "RemoveClientPki"}, {7, nullptr, "RemoveClientPki"},
@ -95,6 +100,20 @@ private:
rb.PushIpcInterface<ISslConnection>(system); rb.PushIpcInterface<ISslConnection>(system);
} }
void ImportServerPki(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto certificate_format = rp.PopEnum<CertificateFormat>();
const auto pkcs_12_certificates = ctx.ReadBuffer(0);
constexpr u64 server_id = 0;
LOG_WARNING(Service_SSL, "(STUBBED) called, certificate_format={}", certificate_format);
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(RESULT_SUCCESS);
rb.Push(server_id);
}
void ImportClientPki(Kernel::HLERequestContext& ctx) { void ImportClientPki(Kernel::HLERequestContext& ctx) {
const auto pkcs_12_certificate = ctx.ReadBuffer(0); const auto pkcs_12_certificate = ctx.ReadBuffer(0);
const auto ascii_password = [&ctx] { const auto ascii_password = [&ctx] {
@ -106,12 +125,12 @@ private:
}(); }();
constexpr u64 client_id = 0; constexpr u64 client_id = 0;
ctx.WriteBuffer(client_id);
LOG_WARNING(Service_SSL, "(STUBBED) called"); LOG_WARNING(Service_SSL, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2}; IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);
rb.Push(client_id);
} }
}; };