mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
-Fixes to OpenSSL compilation (more)
-Fix bug in GDScript, now static functions can call static functions.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "register_openssl.h"
|
||||
|
||||
#include "stream_peer_openssl.h"
|
||||
#ifdef OPENSSL_ENABLED
|
||||
|
||||
void register_openssl() {
|
||||
|
||||
@@ -14,3 +15,5 @@ void unregister_openssl() {
|
||||
StreamPeerOpenSSL::finalize_ssl();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -553,6 +553,25 @@ void StreamPeerOpenSSL::initialize_ssl() {
|
||||
}
|
||||
String config_path =GLOBAL_DEF("ssl/config","");
|
||||
Globals::get_singleton()->set_custom_property_info("ssl/config",PropertyInfo(Variant::STRING,"ssl/config",PROPERTY_HINT_FILE,"*.cnf"));
|
||||
if (config_path!="") {
|
||||
|
||||
Vector<uint8_t> data = FileAccess::get_file_as_array(config_path);
|
||||
if (data.size()) {
|
||||
data.push_back(0);
|
||||
BIO* mem = BIO_new(BIO_s_mem());
|
||||
BIO_puts(mem,(const char*) data.ptr());
|
||||
|
||||
while(true) {
|
||||
X509*cert = PEM_read_bio_X509(mem, NULL, 0, NULL);
|
||||
if (!cert)
|
||||
break;
|
||||
certs.push_back(cert);
|
||||
}
|
||||
BIO_free(mem);
|
||||
}
|
||||
print_line("Loaded certs from '"+certs_path+"': "+itos(certs.size()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user