Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

X509Certificate

繼承: Resource < RefCounted < Object

X509 憑證(例如用於 TLS)。

說明

X509Certificate 類代表 X509 憑證。憑證可以像其他的 Resource 資源一樣載入和保存。

可以用作 StreamPeerTLS.accept_stream() 中的伺服器憑證(搭配正確的 CryptoKey),也可以用於指定通過 StreamPeerTLS.connect_to_stream() 連接到 TLS 伺服器時應該接受的唯一憑證。

教學

方法

Error

load(path: String)

Error

load_from_string(string: String)

Error

save(path: String)

String

save_to_string()


方法說明

Error load(path: String) 🔗

從路徑 path 載入憑證(“*.crt”檔案)。


Error load_from_string(string: String) 🔗

從給定的字串 string 載入憑證。


Error save(path: String) 🔗

將憑證保存到給定的路徑 path(應該是“*.crt”檔案)。


String save_to_string() 🔗

返回憑證的字串表示,如果憑證無效則返回空字串。