Fix crash when passing invalid key to Crypto.
In generate_self_signed_certificate
This commit is contained in:
parent
98497ff719
commit
e9abcbac3b
1 changed files with 1 additions and 0 deletions
|
@ -237,6 +237,7 @@ Ref<CryptoKey> CryptoMbedTLS::generate_rsa(int p_bytes) {
|
|||
|
||||
Ref<X509Certificate> CryptoMbedTLS::generate_self_signed_certificate(Ref<CryptoKey> p_key, String p_issuer_name, String p_not_before, String p_not_after) {
|
||||
Ref<CryptoKeyMbedTLS> key = static_cast<Ref<CryptoKeyMbedTLS> >(p_key);
|
||||
ERR_FAIL_COND_V_MSG(key.is_null(), NULL, "Invalid private key argument.");
|
||||
mbedtls_x509write_cert crt;
|
||||
mbedtls_x509write_crt_init(&crt);
|
||||
|
||||
|
|
Loading…
Reference in a new issue