---
title: "Trusting in custom certificates"
description: "Trusting non-ICP-Brasil and Lacuna test certificates in PKI Express on Node.js by configuring PkiExpressOperator and trustLacunaTestRoot."
canonical: "https://docs.lacunasoftware.com/en-us/articles/pki-express/nodejs/trusting-in-custom-certificates"
locale: "en"
product: "PKI Express"
last_updated: "2026-10-12"
---

# Trusting in custom certificates

By default, PKI Express will only allow operations performed by valid Brazilian certificates emmited by ICP-Brasil organization. However, if you want to use another kind of the certificate, it's required to configure the [PkiExpressOperator](https://github.com/LacunaSoftware/PkiExpressNode/blob/develop/lib/pkiexpress-operator.js) class or **any class that inherits from it**.

## Using Lacuna's testing certificates
In case you are testing your aplication using our mock certificates (see [test certificates](https://docs.lacunasoftware.com/en-us/articles/pki-guide/test-certs)), you have to set the `trustLacunaTestRoot` field to `true` to trust in these certificates: 

```js
operator.trustLacunaTestRoot = true;
```

## Using a custom certificate
In case you are using other kinds of certificates, you need to provide each certificate roots for the operator class.

```js
operator.addTrustedRootSync("/path/to/root1.cer");
operator.addTrustedRootSync("/path/to/root2.cer");
operator.addTrustedRootSync("/path/to/root3.cer");
```
