Merge pull request #32684 from Faless/crypto/self_signed_cert_key_check
Fix crash when passing invalid key to Crypto.
This commit is contained in:
commit
08725bdc28
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