StreamSocketInformation.ServerCertificate StreamSocketInformation.ServerCertificate StreamSocketInformation.ServerCertificate StreamSocketInformation.ServerCertificate StreamSocketInformation.ServerCertificate Property

Definition

Gets the certificate from the server when making an SSL connection with a StreamSocket.

public : Certificate ServerCertificate { get; }
Certificate ServerCertificate();
public Certificate ServerCertificate { get; }
Public ReadOnly Property ServerCertificate As Certificate
var certificate = streamSocketInformation.serverCertificate;

Property Value

The certificate from the server with the SSL information.

Remarks

This property gets the server certificate used for an SSL connection when connecting with a StreamSocket. This certificate is provided by the server during the SSL connection negotiation. The properties on the Certificate object returned can be used to get detailed information on the certificate.

This property is useful for notifying the user why an SSL connection failed.

This property can also be used to enforce stronger security than the default connection using the Certificate object returned. The BuildChainAsync methods and other properties on the Certificate object and methods on the CertificateChain object can be used when an app needs stronger security than the standard SSL negotiation.

See also