Class SecureParameterExtensions
Inherited Members
Namespace: Unity.Networking.Transport.TLS
Assembly: Unity.Networking.Transport.dll
Syntax
public static class SecureParameterExtensions
Methods
GetSecureParameters(ref NetworkSettings)
Declaration
public static SecureNetworkProtocolParameter GetSecureParameters(this ref NetworkSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings |
Returns
Type | Description |
---|---|
Secure |
WithSecureClientParameters(ref NetworkSettings, string)
Set client security parameters (for WebSocket usage).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, string serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
string | serverName | Hostname of the server to connect to. |
Returns
Type | Description |
---|---|
Network |
WithSecureClientParameters(ref NetworkSettings, string, string)
Set client security parameters (server authentication only).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, string caCertificate, string serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
string | caCertificate | CA certificate that signed the server's certificate (PEM format). |
string | serverName | Common name (CN) in the server certificate. |
Returns
Type | Description |
---|---|
Network |
WithSecureClientParameters(ref NetworkSettings, string, string, string, string)
Set client security parameters (for client authentication).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, string certificate, string privateKey, string caCertificate, string serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
string | certificate | Client's certificate (PEM format). |
string | privateKey | Client's private key (PEM format). |
string | caCertificate | CA certificate that signed the server's certificate (PEM format). |
string | serverName | Common name (CN) in the server certificate. |
Returns
Type | Description |
---|---|
Network |
WithSecureClientParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString512Bytes)
Set client security parameters (for client authentication).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, ref FixedString4096Bytes certificate, ref FixedString4096Bytes privateKey, ref FixedString4096Bytes caCertificate, ref FixedString512Bytes serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
certificate | Client's certificate (PEM format). |
Fixed |
privateKey | Client's private key (PEM format). |
Fixed |
caCertificate | CA certificate that signed the server's certificate (PEM format). |
Fixed |
serverName | Common name (CN) in the server certificate. |
Returns
Type | Description |
---|---|
Network |
WithSecureClientParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString512Bytes)
Set client security parameters (server authentication only).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, ref FixedString4096Bytes caCertificate, ref FixedString512Bytes serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
caCertificate | CA certificate that signed the server's certificate (PEM format). |
Fixed |
serverName | Common name (CN) in the server certificate. |
Returns
Type | Description |
---|---|
Network |
WithSecureClientParameters(ref NetworkSettings, ref FixedString512Bytes)
Set client security parameters (for WebSocket usage).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, ref FixedString512Bytes serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
serverName | Hostname of the server to connect to. |
Returns
Type | Description |
---|---|
Network |
WithSecureClientParameters(ref NetworkSettings, ref FixedPEMString, ref FixedString512Bytes)
Set client security parameters (server authentication only).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, ref FixedPEMString caCertificate, ref FixedString512Bytes serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
caCertificate | CA certificate that signed the server's certificate (PEM format). |
Fixed |
serverName | Common name (CN) in the server certificate. |
Returns
Type | Description |
---|---|
Network |
WithSecureClientParameters(ref NetworkSettings, ref FixedPEMString, ref FixedPEMString, ref FixedPEMString, ref FixedString512Bytes)
Set client security parameters (for client authentication).
Declaration
public static ref NetworkSettings WithSecureClientParameters(this ref NetworkSettings settings, ref FixedPEMString certificate, ref FixedPEMString privateKey, ref FixedPEMString caCertificate, ref FixedString512Bytes serverName)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
certificate | Client's certificate (PEM format). |
Fixed |
privateKey | Client's private key (PEM format). |
Fixed |
caCertificate | CA certificate that signed the server's certificate (PEM format). |
Fixed |
serverName | Common name (CN) in the server certificate. |
Returns
Type | Description |
---|---|
Network |
WithSecureServerParameters(ref NetworkSettings, string, string)
Set server security parameters (server authentication only).
Declaration
public static ref NetworkSettings WithSecureServerParameters(this ref NetworkSettings settings, string certificate, string privateKey)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
string | certificate | Server's certificate chain (PEM format). |
string | privateKey | Server's private key (PEM format). |
Returns
Type | Description |
---|---|
Network |
WithSecureServerParameters(ref NetworkSettings, string, string, string, string, SecureClientAuthPolicy)
Set server security parameters (for client authentication).
Declaration
public static ref NetworkSettings WithSecureServerParameters(this ref NetworkSettings settings, string certificate, string privateKey, string caCertificate, string clientName, SecureClientAuthPolicy clientAuthenticationPolicy = SecureClientAuthPolicy.Required)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
string | certificate | Server's certificate chain (PEM format). |
string | privateKey | Server's private key (PEM format). |
string | caCertificate | CA certificate that signed the client certificates (PEM format). |
string | clientName | Common name (CN) in the client certificates. |
Secure |
clientAuthenticationPolicy | Client authentication policy. |
Returns
Type | Description |
---|---|
Network |
WithSecureServerParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes)
Set server security parameters (server authentication only).
Declaration
public static ref NetworkSettings WithSecureServerParameters(this ref NetworkSettings settings, ref FixedString4096Bytes certificate, ref FixedString4096Bytes privateKey)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
certificate | Server's certificate chain (PEM format). |
Fixed |
privateKey | Server's private key (PEM format). |
Returns
Type | Description |
---|---|
Network |
WithSecureServerParameters(ref NetworkSettings, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString4096Bytes, ref FixedString512Bytes, SecureClientAuthPolicy)
Set server security parameters (for client authentication).
Declaration
public static ref NetworkSettings WithSecureServerParameters(this ref NetworkSettings settings, ref FixedString4096Bytes certificate, ref FixedString4096Bytes privateKey, ref FixedString4096Bytes caCertificate, ref FixedString512Bytes clientName, SecureClientAuthPolicy clientAuthenticationPolicy = SecureClientAuthPolicy.Required)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
certificate | Server's certificate chain (PEM format). |
Fixed |
privateKey | Server's private key (PEM format). |
Fixed |
caCertificate | CA certificate that signed the client certificates (PEM format). |
Fixed |
clientName | Common name (CN) in the client certificates. |
Secure |
clientAuthenticationPolicy | Client authentication policy. |
Returns
Type | Description |
---|---|
Network |
WithSecureServerParameters(ref NetworkSettings, ref FixedPEMString, ref FixedPEMString)
Set server security parameters (server authentication only).
Declaration
public static ref NetworkSettings WithSecureServerParameters(this ref NetworkSettings settings, ref FixedPEMString certificate, ref FixedPEMString privateKey)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
certificate | Server's certificate chain (PEM format). |
Fixed |
privateKey | Server's private key (PEM format). |
Returns
Type | Description |
---|---|
Network |
WithSecureServerParameters(ref NetworkSettings, ref FixedPEMString, ref FixedPEMString, ref FixedPEMString, ref FixedString512Bytes, SecureClientAuthPolicy)
Set server security parameters (for client authentication).
Declaration
public static ref NetworkSettings WithSecureServerParameters(this ref NetworkSettings settings, ref FixedPEMString certificate, ref FixedPEMString privateKey, ref FixedPEMString caCertificate, ref FixedString512Bytes clientName, SecureClientAuthPolicy clientAuthenticationPolicy = SecureClientAuthPolicy.Required)
Parameters
Type | Name | Description |
---|---|---|
Network |
settings | |
Fixed |
certificate | Server's certificate chain (PEM format). |
Fixed |
privateKey | Server's private key (PEM format). |
Fixed |
caCertificate | CA certificate that signed the client certificates (PEM format). |
Fixed |
clientName | Common name (CN) in the client certificates. |
Secure |
clientAuthenticationPolicy | Client authentication policy. |
Returns
Type | Description |
---|---|
Network |