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
Name Description
rootCertificates Nullable<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.

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.

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
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
Name Description
configurator ChannelCredentialsConfiguratorBase
state Object
Overrides