summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ssl/ssl.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-26 18:44:55 +0100
committerGitHub <noreply@github.com>2024-02-26 18:44:55 +0100
commit79edad25337e408f2b8a5060f7653e1174367360 (patch)
tree0552592af3e2f23c7c99985a78f6fb75c6d17de0 /src/core/hle/service/ssl/ssl.cpp
parentMerge pull request #13149 from liamwhite/per-channel-program (diff)
parentsettings: enable error applet (diff)
downloadyuzu-79edad25337e408f2b8a5060f7653e1174367360.tar
yuzu-79edad25337e408f2b8a5060f7653e1174367360.tar.gz
yuzu-79edad25337e408f2b8a5060f7653e1174367360.tar.bz2
yuzu-79edad25337e408f2b8a5060f7653e1174367360.tar.lz
yuzu-79edad25337e408f2b8a5060f7653e1174367360.tar.xz
yuzu-79edad25337e408f2b8a5060f7653e1174367360.tar.zst
yuzu-79edad25337e408f2b8a5060f7653e1174367360.zip
Diffstat (limited to 'src/core/hle/service/ssl/ssl.cpp')
-rw-r--r--src/core/hle/service/ssl/ssl.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp
index 0fbb43057..008ee4492 100644
--- a/src/core/hle/service/ssl/ssl.cpp
+++ b/src/core/hle/service/ssl/ssl.cpp
@@ -5,11 +5,13 @@
#include "core/core.h"
#include "core/hle/result.h"
+#include "core/hle/service/cmif_serialization.h"
#include "core/hle/service/ipc_helpers.h"
#include "core/hle/service/server_manager.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
#include "core/hle/service/sockets/bsd.h"
+#include "core/hle/service/ssl/cert_store.h"
#include "core/hle/service/ssl/ssl.h"
#include "core/hle/service/ssl/ssl_backend.h"
#include "core/internal_network/network.h"
@@ -492,13 +494,14 @@ private:
class ISslService final : public ServiceFramework<ISslService> {
public:
- explicit ISslService(Core::System& system_) : ServiceFramework{system_, "ssl"} {
+ explicit ISslService(Core::System& system_)
+ : ServiceFramework{system_, "ssl"}, cert_store{system} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &ISslService::CreateContext, "CreateContext"},
{1, nullptr, "GetContextCount"},
- {2, nullptr, "GetCertificates"},
- {3, nullptr, "GetCertificateBufSize"},
+ {2, D<&ISslService::GetCertificates>, "GetCertificates"},
+ {3, D<&ISslService::GetCertificateBufSize>, "GetCertificateBufSize"},
{4, nullptr, "DebugIoctl"},
{5, &ISslService::SetInterfaceVersion, "SetInterfaceVersion"},
{6, nullptr, "FlushSessionCache"},
@@ -540,6 +543,22 @@ private:
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
+
+ Result GetCertificateBufSize(
+ Out<u32> out_size, InArray<CaCertificateId, BufferAttr_HipcMapAlias> certificate_ids) {
+ LOG_INFO(Service_SSL, "called");
+ u32 num_entries;
+ R_RETURN(cert_store.GetCertificateBufSize(out_size, &num_entries, certificate_ids));
+ }
+
+ Result GetCertificates(Out<u32> out_num_entries, OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
+ InArray<CaCertificateId, BufferAttr_HipcMapAlias> certificate_ids) {
+ LOG_INFO(Service_SSL, "called");
+ R_RETURN(cert_store.GetCertificates(out_num_entries, out_buffer, certificate_ids));
+ }
+
+private:
+ CertStore cert_store;
};
void LoopProcess(Core::System& system) {