Update CertificateManager.gd

This commit is contained in:
creeperita09
2025-09-08 18:32:13 +02:00
committed by GitHub
parent 607807d22c
commit f0694b1ebc

View File

@@ -9,15 +9,20 @@ static func initialize():
print("Certificate Manager initialized with ", trusted_ca_certificates.size(), " trusted CAs")
static func load_builtin_ca():
var ca_file = FileAccess.open("res://Assets/gurted-ca.crt", FileAccess.READ)
if ca_file:
var ca_cert_pem = ca_file.get_as_text()
ca_file.close()
if not ca_cert_pem.is_empty():
trusted_ca_certificates.append(ca_cert_pem)
print("Loaded built-in GURT CA certificate")
else:
print("Built-in CA certificate not yet configured")
else:
print("Could not load built-in CA certificate")
var ca_file = FileAccess.open("res://Assets/gurted-ca.crt", FileAccess.READ)
var arson_ca_file = FileAccess.open("res://Assets/arson-ca.crt", FileAccess.READ)
if ca_file:
var ca_cert_pem = ca_file.get_as_text()
ca_file.close()
var arson_ca_cert_pem = arson_ca_file.get_as_text()
arson_ca_file.close()
if not ca_cert_pem.is_empty():
trusted_ca_certificates.append(ca_cert_pem)
trusted_ca_certificates.append(arson_ca_cert_pem)
print("Loaded built-in GURT CA certificate")
else:
print("Built-in CA certificate not yet configured")
else:
print("Could not load built-in CA certificate")