move server hosting to dns
This commit is contained in:
@@ -4,32 +4,6 @@ class_name CertificateManager
|
||||
static var trusted_ca_certificates: Array[String] = []
|
||||
static var ca_cache: Dictionary = {}
|
||||
|
||||
static func fetch_cert_via_http(url: String) -> String:
|
||||
var http_request = HTTPRequest.new()
|
||||
|
||||
var main_scene = Engine.get_main_loop().current_scene
|
||||
if not main_scene:
|
||||
return ""
|
||||
|
||||
main_scene.add_child(http_request)
|
||||
|
||||
var error = http_request.request(url)
|
||||
if error != OK:
|
||||
http_request.queue_free()
|
||||
return ""
|
||||
|
||||
var response = await http_request.request_completed
|
||||
http_request.queue_free()
|
||||
|
||||
var result = response[0]
|
||||
var response_code = response[1]
|
||||
var body = response[3]
|
||||
|
||||
if result != HTTPRequest.RESULT_SUCCESS or response_code != 200:
|
||||
return ""
|
||||
|
||||
return body.get_string_from_utf8()
|
||||
|
||||
static func initialize():
|
||||
load_builtin_ca()
|
||||
print("Certificate Manager initialized with ", trusted_ca_certificates.size(), " trusted CAs")
|
||||
|
||||
Reference in New Issue
Block a user