# DocumentSecurityStore

## Content

# Class: DocumentSecurityStore

Represents a Document Security Store (DSS).
Holds information that can be used to verify signatures offline.
See PDF specification for details.

## Extends

- [`ObjectBase`](ObjectBase)

## Accessors

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

## Methods

### addVerification()

```ts
addVerification(signature, prms?): Promise<boolean>;
```

Add verification information for specified signature.

#### Parameters

##### signature

[`PdfSignature`](PdfSignature)

The [PdfSignature](PdfSignature) object.

##### prms?

[`DSSVerificationParams`](../type-aliases/DSSVerificationParams)

The [DSSVerificationParams](../type-aliases/DSSVerificationParams) object which defines parameters used to build verification information.

#### Returns

`Promise`&lt;`boolean`&gt;

***

### addVerificationCert()

```ts
addVerificationCert(signature, certificatePem): void;
```

Adds a certificate response for a specified signature.

#### Parameters

##### signature

[`PdfSignature`](PdfSignature)

The [PdfSignature](PdfSignature) object.

##### certificatePem

`string`

PEM-encoded end-entity certificate.

#### Returns

`void`

***

### addVerificationCRL()

#### Call Signature

```ts
addVerificationCRL(signature, crl): Promise<void>;
```

Adds a CRL list for a specified signature.

##### Parameters

###### signature

[`PdfSignature`](PdfSignature)

The [PdfSignature](PdfSignature) object.

###### crl

`Uint8Array`

The DER-encoded CRL.

##### Returns

`Promise`&lt;`void`&gt;

#### Call Signature

```ts
addVerificationCRL(
   signature, 
   crlUri, 
   externalResourcesOptions?): Promise<void>;
```

Adds a CRL list for a specified signature.

##### Parameters

###### signature

[`PdfSignature`](PdfSignature)

The [PdfSignature](PdfSignature) object.

###### crlUri

`string`

The URI containing CRL.

###### externalResourcesOptions?

[`ExternalResourcesOptions`](../interfaces/ExternalResourcesOptions)

The options used to execute CRL request.

##### Returns

`Promise`&lt;`void`&gt;

***

### addVerificationOCSP()

#### Call Signature

```ts
addVerificationOCSP(signature, ocsp): Promise<void>;
```

Adds an OCSP response for a specified signature.

##### Parameters

###### signature

[`PdfSignature`](PdfSignature)

The [PdfSignature](PdfSignature) object.

###### ocsp

`Uint8Array`

The DER-encoded OCSP response.

##### Returns

`Promise`&lt;`void`&gt;

#### Call Signature

```ts
addVerificationOCSP(
   signature, 
   certificatePem, 
   parentCertificatePem, 
   url?, 
   externalResourcesOptions?): Promise<void>;
```

Adds an OCSP response for a specified signature.

##### Parameters

###### signature

[`PdfSignature`](PdfSignature)

The [PdfSignature](PdfSignature) object.

###### certificatePem

`string`

The certificate for which OCSP is requested.

###### parentCertificatePem

`string`

The parent certificate.

###### url?

`string`

The OCSP URL. If "null", it will be obtained from `certificatePem` if possible.

###### externalResourcesOptions?

[`ExternalResourcesOptions`](../interfaces/ExternalResourcesOptions)

The options used to execute OCSP request.

##### Returns

`Promise`&lt;`void`&gt;

***

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
