node-opcua-pki 6.8.1 → 6.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/pki.mjs +17 -0
- package/dist/bin/pki.mjs.map +1 -1
- package/dist/index.d.mts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/bin/pki.mjs
CHANGED
|
@@ -608,6 +608,23 @@ var init_certificate_manager = __esm({
|
|
|
608
608
|
async trustCertificate(certificate) {
|
|
609
609
|
await this.#moveCertificate(certificate, "trusted");
|
|
610
610
|
}
|
|
611
|
+
/**
|
|
612
|
+
* Check whether the trusted certificate store is empty.
|
|
613
|
+
*
|
|
614
|
+
* This inspects the in-memory index, which is kept in
|
|
615
|
+
* sync with the `trusted/certs/` folder by file-system
|
|
616
|
+
* watchers after {@link initialize} has been called.
|
|
617
|
+
*/
|
|
618
|
+
isTrustListEmpty() {
|
|
619
|
+
return this.#thumbs.trusted.size === 0;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Return the number of certificates currently in the
|
|
623
|
+
* trusted store.
|
|
624
|
+
*/
|
|
625
|
+
getTrustedCertificateCount() {
|
|
626
|
+
return this.#thumbs.trusted.size;
|
|
627
|
+
}
|
|
611
628
|
/** Path to the rejected certificates folder. */
|
|
612
629
|
get rejectedFolder() {
|
|
613
630
|
return path2.join(this.rootDir, "rejected");
|