Class SslCredentials (2.63.0)

public sealed class SslCredentials : ChannelCredentials

Client-side SSL credentials.

Inheritance

object > ChannelCredentials > SslCredentials

Namespace

Grpc.Core

Assembly

Grpc.Core.Api.dll

Constructors

SslCredentials()

public SslCredentials()

Creates client-side SSL credentials loaded from disk file pointed to by the GRPC_DEFAULT_SSL_ROOTS_FILE_PATH environment variable. If that fails, gets the roots certificates from a well known place on disk.

SslCredentials(string)

public SslCredentials(string rootCertificates)

Creates client-side SSL credentials from a string containing PEM encoded root certificates.

Parameter
Name Description
rootCertificates string

SslCredentials(string, KeyCertificatePair)

public SslCredentials(string rootCertificates, KeyCertificatePair keyCertificatePair)

Creates client-side SSL credentials.

Parameters
Name Description
rootCertificates string

string containing PEM encoded server root certificates.

keyCertificatePair KeyCertificatePair

a key certificate pair.

SslCredentials(string?, KeyCertificatePair?, VerifyPeerCallback?)

public SslCredentials(string? rootCertificates, KeyCertificatePair? keyCertificatePair, VerifyPeerCallback? verifyPeerCallback)

Creates client-side SSL credentials.

Parameters
Name Description
rootCertificates string

string containing PEM encoded server root certificates.

keyCertificatePair KeyCertificatePair

a key certificate pair.

verifyPeerCallback VerifyPeerCallback

a callback to verify peer's target name and certificate.

Properties

KeyCertificatePair

public KeyCertificatePair? KeyCertificatePair { get; }

Client side key and certificate pair. If null, client will not use key and certificate pair.

Property Value
Type Description
KeyCertificatePair

RootCertificates

public string? RootCertificates { get; }

PEM encoding of the server root certificates.

Property Value
Type Description
string

Methods

InternalPopulateConfiguration(ChannelCredentialsConfiguratorBase, object)

public override void InternalPopulateConfiguration(ChannelCredentialsConfiguratorBase configurator, object state)

Populates channel credentials configurator with this instance's configuration. End users never need to invoke this method as it is part of internal implementation.

Parameters
Name Description
configurator ChannelCredentialsConfiguratorBase
state object
Overrides