-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: use OpenSSL instead of node-forge for DER-to-PEM conversion
This commit removes node-forge as a dependency and the conversion logic for X.509 certificates from DER to PEM format that we used it for, and replaces that logic with direct calls to OpenSSL functions (which are always available in Node.js). The main downside of this approach is that it removes the ABI stability guarantees we get from Node-API and instead makes us dependent on the OpenSSL ABI as well. Currently, the functions used in this code are compatible with OpenSSL 1.1.x and 3.x, which should be good enough in the present and for at least a good number of years into the future. The main upside of this approach is that it is significantly faster, and should enable applications that use this package to get the system certificate list to do so by default, rather than as an opt-in feature.
- Loading branch information
Showing
5 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use strict'; | ||
const tls = require('tls'); | ||
const fs = require('fs'); | ||
const assert = require('assert'); | ||
|