reckfellENGINE

TlsOptions

TLS options and trust/identity verification.

On this page
class TlsOptionsReckfellSharpInherits RefCounted

Client creates a verified client. Defaults use standard trusted CAs and the connection hostname. A supplied trustedChain replaces the default set for that connection; commonNameOverride sets another expected identity.

ClientUnsafe disables name verification and, without trustedChain, mandatory chain trust verification too. That does not repair an incorrect certificate. Server needs a matching private key/certificate; clients do not need the server private key. Check TLS availability and target-platform trust behavior separately.

Working example.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Methods9

ClientTlsOptions
# Client
C#
public static TlsOptions Client(X509Certificate trustedChain = null, string commonNameOverride = "");

Creates a verified TLS client. trustedChain replaces the default trust set; an empty commonNameOverride retains the connection identity.

Parameters
NameTypeDefault
trustedChainX509Certificatenull
commonNameOverridestring""
Returns TlsOptions
ClientUnsafeTlsOptions
# ClientUnsafe
C#
public static TlsOptions ClientUnsafe(X509Certificate trustedChain = null);

Disables server-name verification. Without trustedChain also disables mandatory chain trust verification. Do not use as a certificate repair.

Parameters
NameTypeDefault
trustedChainX509Certificatenull
Returns TlsOptions
GetCommonNameOverridestring
# GetCommonNameOverride
C#
public string GetCommonNameOverride();

The expected identity overriding the connection name; empty retains the connection name. Not evidence that certificate verification succeeded.

Returns string
GetOwnCertificateX509Certificate
# GetOwnCertificate
C#
public X509Certificate GetOwnCertificate();

Returns the X509Certificate specified when creating with TlsOptions.Server.

Returns X509Certificate
GetPrivateKeyCryptoKey
# GetPrivateKey
C#
public CryptoKey GetPrivateKey();

Returns the CryptoKey specified when creating with TlsOptions.Server.

Returns CryptoKey
GetTrustedCaChainX509Certificate
# GetTrustedCaChain
C#
public X509Certificate GetTrustedCaChain();

Returns the CA X509Certificate chain specified when creating with TlsOptions.Client or TlsOptions.ClientUnsafe.

Returns X509Certificate
IsServerbool
# IsServer
C#
public bool IsServer();

Returns true if created with TlsOptions.Server, false otherwise.

Returns bool
IsUnsafeClientbool
# IsUnsafeClient
C#
public bool IsUnsafeClient();

Returns true if created with TlsOptions.ClientUnsafe, false otherwise.

Returns bool
ServerTlsOptions
# Server
C#
public static TlsOptions Server(CryptoKey key, X509Certificate certificate);

Creates a TLS server configuration using the provided key and certificate. Note: The certificate should include the full certificate chain up to the signing CA (certificates file can be concatenated using a general purpose text editor).

Parameters
NameTypeDefault
keyCryptoKey—
certificateX509Certificate—
Returns TlsOptions
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.