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
static X509Certificate2^ GetClientCertificate(
    HttpRequestMessage^ request
static member GetClientCertificate : 
        request:HttpRequestMessage -> X509Certificate2
Public Shared Function GetClientCertificate (
    request As HttpRequestMessage
) As X509Certificate2


Return Value

Type: System.Security.Cryptography.X509Certificates.X509Certificate2

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

See Also

HttpRequestMessageExtensions Class
System.Net.Http Namespace

Return to top