---
title: "WindowsCertificateStore"
description: "Namespace: Lacuna.Pki.Stores"
canonical: "https://docs.lacunasoftware.com/api/Lacuna.Pki.Stores/WindowsCertificateStore"
locale: "pt-BR"
product: "PKI SDK"
last_updated: "2026-06-02"
---

# WindowsCertificateStore

**Namespace:** `Lacuna.Pki.Stores`  
**Assembly:** `Lacuna.Pki`  
_Class_

```csharp
public class WindowsCertificateStore : ICertificateStore
```

**Hierarquia:** [`object`](https://learn.microsoft.com/dotnet/api/system.object) → `WindowsCertificateStore`

## Métodos

### `GetCertificate(byte[])`

Find a certificate by its Key Identifier

```csharp
public PKCertificate GetCertificate(byte[] keyIdentifier)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `keyIdentifier` | [`byte[]`](https://learn.microsoft.com/dotnet/api/system.byte) |  |

**Retorno**

[`PKCertificate`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKCertificate)

---

### `GetCertificate(Name, BigInteger)`

Find a certificate by its Issuer Name and Serial Number

```csharp
public PKCertificate GetCertificate(Name issuerName, BigInteger serialNumber)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `issuerName` | [`Name`](https://docs.lacunasoftware.com/api/Lacuna.Pki/Name) | Certificate's issuer name |
| `serialNumber` | [`BigInteger`](https://learn.microsoft.com/dotnet/api/system.numerics.biginteger) | Certificate's serial number |

**Retorno**

[`PKCertificate`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKCertificate)

---

### `GetCertificates(Name)`

Find one or more certificates by its Subject Name

```csharp
public List<PKCertificate> GetCertificates(Name subjectName)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `subjectName` | [`Name`](https://docs.lacunasoftware.com/api/Lacuna.Pki/Name) |  |

**Retorno**

[`List<PKCertificate>`](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)

---

### `GetCertificatesWithKey()`

```csharp
public List<PKCertificateWithKey> GetCertificatesWithKey()
```

**Retorno**

[`List<PKCertificateWithKey>`](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)

---

### `Load(StoreName, StoreLocation)`

```csharp
public static WindowsCertificateStore Load(StoreName storeName, StoreLocation storeLocation)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `storeName` | [`StoreName`](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.storename) |  |
| `storeLocation` | [`StoreLocation`](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.storelocation) |  |

**Retorno**

[`WindowsCertificateStore`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Stores/WindowsCertificateStore)

---

### `LoadPersonalCurrentUser()`

```csharp
public static WindowsCertificateStore LoadPersonalCurrentUser()
```

**Retorno**

[`WindowsCertificateStore`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Stores/WindowsCertificateStore)

---

### `LoadPersonalLocalMachine()`

```csharp
public static WindowsCertificateStore LoadPersonalLocalMachine()
```

**Retorno**

[`WindowsCertificateStore`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Stores/WindowsCertificateStore)

---

## Membros herdados

[`ToString()`](https://learn.microsoft.com/dotnet/api/system.object.tostring), [`Equals(object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)>), [`Equals(object, object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)>), [`ReferenceEquals(object, object)`](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [`GetHashCode()`](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [`GetType()`](https://learn.microsoft.com/dotnet/api/system.object.gettype), [`MemberwiseClone()`](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)
