Exposes String functions for X509Certificates

Exposes String functions for X509Certificates via two function calls: save_to_string() and load_from_string(str).
This commit is contained in:
ScorpionInc
2023-04-05 17:45:55 -04:00
committed by ScorpionInc
parent fba9416fe0
commit a5b867391e
5 changed files with 49 additions and 0 deletions

View File

@ -63,6 +63,8 @@ X509Certificate *X509Certificate::create() {
void X509Certificate::_bind_methods() {
ClassDB::bind_method(D_METHOD("save", "path"), &X509Certificate::save);
ClassDB::bind_method(D_METHOD("load", "path"), &X509Certificate::load);
ClassDB::bind_method(D_METHOD("save_to_string"), &X509Certificate::save_to_string);
ClassDB::bind_method(D_METHOD("load_from_string", "string"), &X509Certificate::load_from_string);
}
/// TLSOptions

View File

@ -65,6 +65,8 @@ public:
virtual Error load(String p_path) = 0;
virtual Error load_from_memory(const uint8_t *p_buffer, int p_len) = 0;
virtual Error save(String p_path) = 0;
virtual String save_to_string() = 0;
virtual Error load_from_string(const String &string) = 0;
};
class TLSOptions : public RefCounted {