Skip to content

Commit 6eefe53

Browse files
committed
fixup! fixup! tls: implement tls.getCACertificates()
1 parent 467dad1 commit 6eefe53

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/api/tls.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,8 @@ added: REPLACEME
23762376
* `type` {string|undefined} The type of CA certificates that will be returned. Valid values
23772377
are `"default"`, `"system"`, `"bundled"` and `"extra"`.
23782378
**Default:** `"default"`.
2379-
* Returns: {string\[]}
2379+
* Returns: {string\[]} An array of PEM-encoded certificates. The array may contain duplicates
2380+
if the same certificate is repeatedly stored in multiple sources.
23802381

23812382
Returns an array containing the CA certificates from various sources, depending on `type`:
23822383

src/crypto/crypto_context.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ using v8::ArrayBufferView;
4848
using v8::Boolean;
4949
using v8::Context;
5050
using v8::DontDelete;
51+
using v8::EscapableHandleScope;
5152
using v8::Exception;
5253
using v8::External;
5354
using v8::FunctionCallbackInfo;
@@ -818,7 +819,7 @@ void GetBundledRootCertificates(const FunctionCallbackInfo<Value>& args) {
818819
MaybeLocal<Array> X509sToArrayOfStrings(Environment* env,
819820
const std::vector<X509*>& certs) {
820821
ClearErrorOnReturn clear_error_on_return;
821-
v8::EscapableHandleScope scope(env->isolate());
822+
EscapableHandleScope scope(env->isolate());
822823

823824
LocalVector<Value> result(env->isolate(), certs.size());
824825
for (size_t i = 0; i < certs.size(); ++i) {

0 commit comments

Comments
 (0)