HttpRequestMessageExtensions.GetClientCertificate Method (HttpRequestMessage)

 

Gets the current X.509 certificate from the given HTTP request.

Namespace:   System.Net.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

public static X509Certificate2 GetClientCertificate(
	this HttpRequestMessage request
)

Parameters

request
Type: System.Net.Http.HttpRequestMessage

The HTTP request.

Return Value

Type: System.Security.Cryptography.X509Certificates.X509Certificate2

The current X509Certificate2, or null if a certificate is not available.

Return to top
Show: