StreamSocketInformation.ServerCertificate | serverCertificate property

Applies to Windows and Windows Phone

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

Syntax


var serverCertificate = streamSocketInformation.serverCertificate;

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 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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

See also

Other resources
How to use advanced socket controls (HTML)
How to use advanced socket controls (XAML)
Supporting proximity and tapping
Reference
BuildChainAsync
Certificate
CertificateChain
StreamSocketControl.IgnorableServerCertificateErrors
ServerCertificateErrorSeverity
ServerCertificateErrors
ServerIntermediateCertificates
SocketSslErrorSeverity
StreamSocket
StreamSocketInformation

 

 

Show:
© 2014 Microsoft