SslStream.LocalCertificate Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the certificate used to authenticate the local endpoint.

Namespace:   System.Net.Security
Assembly:  System (in System.dll)

Public Overridable ReadOnly Property LocalCertificate As X509Certificate

Property Value

Type: System.Security.Cryptography.X509Certificates.X509Certificate

An X509Certificate object that represents the certificate supplied for authentication or null if no certificate was supplied.

Exception Condition
InvalidOperationException

Authentication failed or has not occurred.

The following code example demonstrates displaying the certificate returned by this property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: