From 33d0e1c50ccba4eebb05073d4e20b0deb0d6ec54 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 10 Jun 2024 15:35:50 +0200 Subject: [PATCH] [Crypto] Expose get_system_ca_certificates. --- core/core_bind.cpp | 5 +++++ core/core_bind.h | 2 ++ doc/classes/OS.xml | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/core/core_bind.cpp b/core/core_bind.cpp index e8a6a5075bf0..d6719e715fcd 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -194,6 +194,10 @@ void ResourceSaver::_bind_methods() { ////// OS ////// +String OS::get_system_ca_certificates() { + return ::OS::get_singleton()->get_system_ca_certificates(); +} + PackedStringArray OS::get_connected_midi_inputs() { return ::OS::get_singleton()->get_connected_midi_inputs(); } @@ -573,6 +577,7 @@ String OS::get_unique_id() const { OS *OS::singleton = nullptr; void OS::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_system_ca_certificates"), &OS::get_system_ca_certificates); ClassDB::bind_method(D_METHOD("get_connected_midi_inputs"), &OS::get_connected_midi_inputs); ClassDB::bind_method(D_METHOD("open_midi_inputs"), &OS::open_midi_inputs); ClassDB::bind_method(D_METHOD("close_midi_inputs"), &OS::close_midi_inputs); diff --git a/core/core_bind.h b/core/core_bind.h index febc33a9c16a..1452368f60e5 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -134,6 +134,8 @@ class OS : public Object { RENDERING_DRIVER_D3D12, }; + String get_system_ca_certificates(); + virtual PackedStringArray get_connected_midi_inputs(); virtual void open_midi_inputs(); virtual void close_midi_inputs(); diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 7c69bc6ed20b..a3fd15a46d4d 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -455,6 +455,12 @@ Returns the amount of static memory being used by the program in bytes. Only works in debug builds. + + + + Returns the list of certification authorities trusted by the operating system as a string of concatenated certificates in PEM format. + +