Skip to main content

Windows Dev Center

HttpTransportInformation.ServerCertificate | serverCertificate property

Gets the certificate from the server with the SSL information.

Syntax


var serverCertificate = httpTransportInformation.serverCertificate;

public Certificate ServerCertificate { get; }

Public ReadOnly Property ServerCertificate As Certificate

public:
property Certificate^ ServerCertificate { 
   Certificate^ get();
}

Property value

Type: Certificate

The certificate from the server with the SSL information.

Remarks

This property gets the server certificate used for an SSL connection. This certificate is provided by the server during the SSL connection negotiation. The properties on the Certificate object returned can be used to determine 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 requires stronger security than the standard SSL negotiation.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Web.Http
Windows::Web::Http [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http
Windows::Web::Http [C++]

Metadata

Windows.winmd

See also

BuildChainAsync
Certificate
HttpBaseProtocolFilter.IgnorableServerCertificateErrors
HttpTransportInformation
ServerCertificateErrorSeverity
ServerCertificateErrors
ServerIntermediateCertificates
SocketSslErrorSeverity