Condividi tramite


X509Util.FindCertificateByKeyIdentifier Method

Finds an X.509 certificate by using its subject key identifier in the specified X.509 store name and location.

Namespace: Microsoft.Web.Services3.Security.X509
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim keyIdentifier() As Byte
Dim storeLocation As StoreLocation
Dim storeName As String
Dim returnValue As X509Certificate2Collection
returnValue = X509Util.FindCertificateByKeyIdentifier(keyIdentifier, storeLocation, storeName)

Syntax

'Declaration
Public Shared Function FindCertificateByKeyIdentifier( _
    ByVal keyIdentifier() As Byte, _
    ByVal storeLocation As StoreLocation, _
    ByVal storeName As String _
) As X509Certificate2Collection
public static X509Certificate2Collection FindCertificateByKeyIdentifier(
    byte[] keyIdentifier, 
    StoreLocation storeLocation, 
    string storeName
);
public:
static X509Certificate2Collection^ FindCertificateByKeyIdentifier(
    array<unsigned char>^ keyIdentifier,
    StoreLocation^ storeLocation,
    String^ storeName
);
public static X509Certificate2Collection FindCertificateByKeyIdentifier(
    ubyte[] keyIdentifier, 
    StoreLocation storeLocation, 
    System.String storeName
);
public static function FindCertificateByKeyIdentifier(
     keyIdentifier : Byte[], 
     storeLocation : StoreLocation, 
     storeName : String
) : X509Certificate2Collection;

Parameters

  • keyIdentifier
    An array of System.Byte that contains the subject key identifier for a specific X.509 certificate.
  • storeLocation
    A System.Security.Cryptography.X509Certificates.StoreLocation that specifies the location of the X.509 certificate store.
  • storeName
    One of the System.Security.Cryptography.X509Certificates.StoreLocation.StoreName values.

Return Value

A System.Security.Cryptography.X509Certificates.StoreLocation.X509Certificate2Collection that contains the collection of X.509 certificates that match the specified criteria.

Exceptions

Exception type Condition
ArgumentNullException

keyIdentifier is null

-or-

storeName is null

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

X509Util Class
X509Util Members
Microsoft.Web.Services3.Security.X509 Namespace