X509Certificate
An X.509 certificate for TLS trust or server setup.
Loads and saves certificates. Successfully loading a file does not establish a trusted chain, matching server identity or valid dates. Pass a private CA certificate to TlsOptions.Client while retaining name verification.
A trust certificate is not a private key. A client project contains the required public CA certificate; the server private key stays on the server. A asset:// path must actually be included in the target export.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
X509CertificateConstructor
public X509Certificate();Methods4
LoadError
public Error Load(string path);Loads a certificate from a PEM file and returns Error. Successful file parsing does not establish server trust, identity or validity dates.
| Name | Type | Default |
|---|---|---|
path | string | — |
ErrorLoadFromStringError
public Error LoadFromString(string @string);Loads a certificate from the given string.
| Name | Type | Default |
|---|---|---|
string | string | — |
ErrorSaveError
public Error Save(string path);Saves a certificate to the given path (should be a "*.crt" file).
| Name | Type | Default |
|---|---|---|
path | string | — |
ErrorSaveToStringstring
public string SaveToString();Returns a string representation of the certificate, or an empty string if the certificate is invalid.
string