Method SetClientSecrets
SetClientSecrets(string, string)
Set the client parameters for encryption.
Declaration
public void SetClientSecrets(string serverCommonName, string caCertificate = null)
Parameters
Type | Name | Description |
---|---|---|
string | serverCommonName | Common name of the server (typically hostname). |
string | caCertificate | CA certificate used to validate the server's authenticity. |
Remarks
If the CA certificate is not provided, validation will be done against the OS/browser certificate store. This is what you'd want if using certificates from a known provider. For self-signed certificates, the CA certificate needs to be provided.
The CA certificate (if provided) is expected to be in the PEM format, including the
begin/end markers like -----BEGIN CERTIFICATE-----
.