SecPolicy.CreateSslPolicy(Boolean, String) Method

Definition

Create a policy instance that represents the SSL/TLS profile.

public static Security.SecPolicy CreateSslPolicy(bool server, string hostName);
public static Security.SecPolicy CreateSslPolicy(bool server, string? hostName);
static member CreateSslPolicy : bool * string -> Security.SecPolicy

Parameters

server
Boolean

Indicate if the policy is for a server (true) or client (false) certificate.

hostName
String

The server host name on which the policy will be applied, or null to create a policy without a specific host name (disables host name validation).

Returns

A SecPolicy instance that can be used to validate a SecCertificate using SecTrust.

Applies to