Class reference

X509Certificate

Inherits Resource

An X509 certificate (e.g. for TLS).

Description

The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other Resource. They can be used as the server certificate in StreamPeerTLS.accept_stream() (along with the proper CryptoKey), and to specify the only certificate that should be accepted when connecting to a TLS server via StreamPeerTLS.connect_to_stream().

Methods

int load(String path)

Loads a certificate from path ("*.crt" file).

int load_from_string(String string)

Loads a certificate from the given string.

int save(String path)

Saves a certificate to the given path (should be a "*.crt" file).

String save_to_string()

Returns a string representation of the certificate, or an empty string if the certificate is invalid.

Tutorials

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.