Class SslCredentials (2.48.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(Nullable<String>, KeyCertificatePair, VerifyPeerCallback)

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

Creates client-side SSL credentials.

Parameters
NameDescription
rootCertificatesNullable<String>

string containing PEM encoded server root certificates.

keyCertificatePairKeyCertificatePair

a key certificate pair.

verifyPeerCallbackVerifyPeerCallback

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

SslCredentials(String)

public SslCredentials(string rootCertificates)

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

Parameter
NameDescription
rootCertificatesString

SslCredentials(String, KeyCertificatePair)

public SslCredentials(string rootCertificates, KeyCertificatePair keyCertificatePair)

Creates client-side SSL credentials.

Parameters
NameDescription
rootCertificatesString

string containing PEM encoded server root certificates.

keyCertificatePairKeyCertificatePair

a key certificate pair.

Properties

KeyCertificatePair

public KeyCertificatePair KeyCertificatePair { get; }

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

Property Value
TypeDescription
KeyCertificatePair

RootCertificates

public string? RootCertificates { get; }

PEM encoding of the server root certificates.

Property Value
TypeDescription
Nullable<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
NameDescription
configuratorChannelCredentialsConfiguratorBase
stateObject
Overrides