| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4d86a42 commit 75f11ae
16 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1985,9 +1985,13 @@ changes: | |||
| 1985 | 1985 | * `allowPartialTrustChain` {boolean} Treat intermediate (non-self-signed) | |
| 1986 | 1986 | certificates in the trust CA certificate list as trusted. | |
| 1987 | 1987 | * `ca` {string|string\[]|Buffer|Buffer\[]} Optionally override the trusted CA | |
| 1988 | - certificates. Default is to trust the well-known CAs curated by Mozilla. | ||
| 1989 | - Mozilla's CAs are completely replaced when CAs are explicitly specified | ||
| 1990 | - using this option. The value can be a string or `Buffer`, or an `Array` of | ||
| 1988 | + certificates. If not specified, the CA certificates trusted by default are | ||
| 1989 | + the same as the ones returned by [`tls.getCACertificates()`][] using the | ||
| 1990 | + `default` type. If specified, the default list would be completely replaced | ||
| 1991 | + (instead of being concatenated) by the certificates in the `ca` option. | ||
| 1992 | + Users need to concatenate manually if they wish to add additional certificates | ||
| 1993 | + instead of completely overriding the default. | ||
| 1994 | + The value can be a string or `Buffer`, or an `Array` of | ||
| 1991 | 1995 | strings and/or `Buffer`s. Any string or `Buffer` can contain multiple PEM | |
| 1992 | 1996 | CAs concatenated together. The peer's certificate must be chainable to a CA | |
| 1993 | 1997 | trusted by the server for the connection to be authenticated. When using | |
@@ -2001,7 +2005,6 @@ changes: | |||
| 2001 | 2005 | provided. | |
| 2002 | 2006 | For PEM encoded certificates, supported types are "TRUSTED CERTIFICATE", | |
| 2003 | 2007 | "X509 CERTIFICATE", and "CERTIFICATE". | |
| 2004 | - See also [`tls.rootCertificates`][]. | ||
| 2005 | 2008 | * `cert` {string|string\[]|Buffer|Buffer\[]} Cert chains in PEM format. One | |
| 2006 | 2009 | cert chain should be provided per private key. Each cert chain should | |
| 2007 | 2010 | consist of the PEM formatted certificate for a provided private `key`, | |
@@ -2364,6 +2367,39 @@ openssl pkcs12 -certpbe AES-256-CBC -export -out client-cert.pem \ | |||
| 2364 | 2367 | The server can be tested by connecting to it using the example client from | |
| 2365 | 2368 | [`tls.connect()`][]. | |
| 2366 | 2369 | ||
| 2370 | + ## `tls.getCACertificates([type])` | ||
| 2371 | + | ||
| 2372 | + <!-- YAML | ||
| 2373 | + added: REPLACEME | ||
| 2374 | + --> | ||
| 2375 | + | ||
| 2376 | + * `type` {string|undefined} The type of CA certificates that will be returned. Valid values | ||
| 2377 | + are `"default"`, `"system"`, `"bundled"` and `"extra"`. | ||
| 2378 | + **Default:** `"default"`. | ||
| 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. | ||
| 2381 | + | ||
| 2382 | + Returns an array containing the CA certificates from various sources, depending on `type`: | ||
| 2383 | + | ||
| 2384 | + * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default. | ||
| 2385 | + * When [`--use-bundled-ca`][] is enabled (default), or [`--use-openssl-ca`][] is not enabled, | ||
| 2386 | + this would include CA certificates from the bundled Mozilla CA store. | ||
| 2387 | + * When [`--use-system-ca`][] is enabled, this would also include certificates from the system's | ||
| 2388 | + trusted store. | ||
| 2389 | + * When [`NODE_EXTRA_CA_CERTS`][] is used, this would also include certificates loaded from the specified | ||
| 2390 | + file. | ||
| 2391 | + * `"system"`: return the CA certificates that are loaded from the system's trusted store, according | ||
| 2392 | + to rules set by [`--use-system-ca`][]. This can be used to get the certificates from the system | ||
| 2393 | + when [`--use-system-ca`][] is not enabled. | ||
| 2394 | + * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same | ||
| 2395 | + as [`tls.rootCertificates`][]. | ||
| 2396 | + * `"extra"`: return the CA certificates loaded from [`NODE_EXTRA_CA_CERTS`][]. It's an empty array if | ||
| 2397 | + [`NODE_EXTRA_CA_CERTS`][] is not set. | ||
| 2398 | + | ||
| 2399 | + <!-- YAML | ||
| 2400 | + added: v0.10.2 | ||
| 2401 | + --> | ||
| 2402 | + | ||
| 2367 | 2403 | ## `tls.getCiphers()` | |
| 2368 | 2404 | ||
| 2369 | 2405 | <!-- YAML | |
@@ -2400,8 +2436,10 @@ from the bundled Mozilla CA store as supplied by the current Node.js version. | |||
| 2400 | 2436 | The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store | |
| 2401 | 2437 | that is fixed at release time. It is identical on all supported platforms. | |
| 2402 | 2438 | ||
| 2403 | - On macOS if `--use-system-ca` is passed then trusted certificates | ||
| 2404 | - from the user and system keychains are also included. | ||
| 2439 | + To get the actual CA certificates used by the current Node.js instance, which | ||
| 2440 | + may include certificates loaded from the system store (if `--use-system-ca` is used) | ||
| 2441 | + or loaded from a file indicated by `NODE_EXTRA_CA_CERTS`, use | ||
| 2442 | + [`tls.getCACertificates()`][]. | ||
| 2405 | 2443 | ||
| 2406 | 2444 | ## `tls.DEFAULT_ECDH_CURVE` | |
| 2407 | 2445 | ||
@@ -2487,7 +2525,11 @@ added: | |||
| 2487 | 2525 | [`'secureConnection'`]: #event-secureconnection | |
| 2488 | 2526 | [`'session'`]: #event-session | |
| 2489 | 2527 | [`--tls-cipher-list`]: cli.md#--tls-cipher-listlist | |
| 2528 | + [`--use-bundled-ca`]: cli.md#--use-bundled-ca---use-openssl-ca | ||
| 2529 | + [`--use-openssl-ca`]: cli.md#--use-bundled-ca---use-openssl-ca | ||
| 2530 | + [`--use-system-ca`]: cli.md#--use-system-ca | ||
| 2490 | 2531 | [`Duplex`]: stream.md#class-streamduplex | |
| 2532 | + [`NODE_EXTRA_CA_CERTS`]: cli.md#node_extra_ca_certsfile | ||
| 2491 | 2533 | [`NODE_OPTIONS`]: cli.md#node_optionsoptions | |
| 2492 | 2534 | [`SSL_export_keying_material`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html | |
| 2493 | 2535 | [`SSL_get_version`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html | |
@@ -2516,6 +2558,7 @@ added: | |||
| 2516 | 2558 | [`tls.createSecureContext()`]: #tlscreatesecurecontextoptions | |
| 2517 | 2559 | [`tls.createSecurePair()`]: #tlscreatesecurepaircontext-isserver-requestcert-rejectunauthorized-options | |
| 2518 | 2560 | [`tls.createServer()`]: #tlscreateserveroptions-secureconnectionlistener | |
| 2561 | + [`tls.getCACertificates()`]: #tlsgetcacertificatestype | ||
| 2519 | 2562 | [`tls.getCiphers()`]: #tlsgetciphers | |
| 2520 | 2563 | [`tls.rootCertificates`]: #tlsrootcertificates | |
| 2521 | 2564 | [`x509.checkHost()`]: crypto.md#x509checkhostname-options | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,6 +24,8 @@ | |||
| 24 | 24 | const { | |
| 25 | 25 | Array, | |
| 26 | 26 | ArrayIsArray, | |
| 27 | + // eslint-disable-next-line no-restricted-syntax | ||
| 28 | + ArrayPrototypePush, | ||
| 27 | 29 | JSONParse, | |
| 28 | 30 | ObjectDefineProperty, | |
| 29 | 31 | ObjectFreeze, | |
@@ -34,6 +36,7 @@ const { | |||
| 34 | 36 | ERR_TLS_CERT_ALTNAME_FORMAT, | |
| 35 | 37 | ERR_TLS_CERT_ALTNAME_INVALID, | |
| 36 | 38 | ERR_OUT_OF_RANGE, | |
| 39 | + ERR_INVALID_ARG_VALUE, | ||
| 37 | 40 | } = require('internal/errors').codes; | |
| 38 | 41 | const internalUtil = require('internal/util'); | |
| 39 | 42 | internalUtil.assertCrypto(); | |
@@ -44,12 +47,18 @@ const { | |||
| 44 | 47 | ||
| 45 | 48 | const net = require('net'); | |
| 46 | 49 | const { getOptionValue } = require('internal/options'); | |
| 47 | - const { getRootCertificates, getSSLCiphers } = internalBinding('crypto'); | ||
| 50 | + const { | ||
| 51 | + getBundledRootCertificates, | ||
| 52 | + getExtraCACertificates, | ||
| 53 | + getSystemCACertificates, | ||
| 54 | + getSSLCiphers, | ||
| 55 | + } = internalBinding('crypto'); | ||
| 48 | 56 | const { Buffer } = require('buffer'); | |
| 49 | 57 | const { canonicalizeIP } = internalBinding('cares_wrap'); | |
| 50 | 58 | const _tls_common = require('_tls_common'); | |
| 51 | 59 | const _tls_wrap = require('_tls_wrap'); | |
| 52 | 60 | const { createSecurePair } = require('internal/tls/secure-pair'); | |
| 61 | + const { validateString } = require('internal/validators'); | ||
| 53 | 62 | ||
| 54 | 63 | // Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations | |
| 55 | 64 | // every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more | |
@@ -85,23 +94,84 @@ exports.getCiphers = internalUtil.cachedResult( | |||
| 85 | 94 | () => internalUtil.filterDuplicateStrings(getSSLCiphers(), true), | |
| 86 | 95 | ); | |
| 87 | 96 | ||
| 88 | - let rootCertificates; | ||
| 97 | + let bundledRootCertificates; | ||
| 98 | + function cacheBundledRootCertificates() { | ||
| 99 | + bundledRootCertificates ||= ObjectFreeze(getBundledRootCertificates()); | ||
| 89 | 100 | ||
| 90 | - function cacheRootCertificates() { | ||
| 91 | - rootCertificates = ObjectFreeze(getRootCertificates()); | ||
| 101 | + return bundledRootCertificates; | ||
| 92 | 102 | } | |
| 93 | 103 | ||
| 94 | 104 | ObjectDefineProperty(exports, 'rootCertificates', { | |
| 95 | 105 | __proto__: null, | |
| 96 | 106 | configurable: false, | |
| 97 | 107 | enumerable: true, | |
| 98 | - get: () => { | ||
| 99 | - // Out-of-line caching to promote inlining the getter. | ||
| 100 | - if (!rootCertificates) cacheRootCertificates(); | ||
| 101 | - return rootCertificates; | ||
| 102 | - }, | ||
| 108 | + get: cacheBundledRootCertificates, | ||
| 103 | 109 | }); | |
| 104 | 110 | ||
| 111 | + let extraCACertificates; | ||
| 112 | + function cacheExtraCACertificates() { | ||
| 113 | + extraCACertificates ||= ObjectFreeze(getExtraCACertificates()); | ||
| 114 | + | ||
| 115 | + return extraCACertificates; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + let systemCACertificates; | ||
| 119 | + function cacheSystemCACertificates() { | ||
| 120 | + systemCACertificates ||= ObjectFreeze(getSystemCACertificates()); | ||
| 121 | + | ||
| 122 | + return systemCACertificates; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + let defaultCACertificates; | ||
| 126 | + function cacheDefaultCACertificates() { | ||
| 127 | + if (defaultCACertificates) { return defaultCACertificates; } | ||
| 128 | + defaultCACertificates = []; | ||
| 129 | + | ||
| 130 | + if (!getOptionValue('--use-openssl-ca')) { | ||
| 131 | + const bundled = cacheBundledRootCertificates(); | ||
| 132 | + for (let i = 0; i < bundled.length; ++i) { | ||
| 133 | + ArrayPrototypePush(defaultCACertificates, bundled[i]); | ||
| 134 | + } | ||
| 135 | + if (getOptionValue('--use-system-ca')) { | ||
| 136 | + const system = cacheSystemCACertificates(); | ||
| 137 | + for (let i = 0; i < system.length; ++i) { | ||
| 138 | + | ||
| 139 | + ArrayPrototypePush(defaultCACertificates, system[i]); | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + if (process.env.NODE_EXTRA_CA_CERTS) { | ||
| 145 | + const extra = cacheExtraCACertificates(); | ||
| 146 | + for (let i = 0; i < extra.length; ++i) { | ||
| 147 | + | ||
| 148 | + ArrayPrototypePush(defaultCACertificates, extra[i]); | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + ObjectFreeze(defaultCACertificates); | ||
| 153 | + return defaultCACertificates; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + // TODO(joyeecheung): support X509Certificate output? | ||
| 157 | + function getCACertificates(type = 'default') { | ||
| 158 | + validateString(type, 'type'); | ||
| 159 | + | ||
| 160 | + switch (type) { | ||
| 161 | + case 'default': | ||
| 162 | + return cacheDefaultCACertificates(); | ||
| 163 | + case 'bundled': | ||
| 164 | + return cacheBundledRootCertificates(); | ||
| 165 | + case 'system': | ||
| 166 | + return cacheSystemCACertificates(); | ||
| 167 | + case 'extra': | ||
| 168 | + return cacheExtraCACertificates(); | ||
| 169 | + default: | ||
| 170 | + throw new ERR_INVALID_ARG_VALUE('type', type); | ||
| 171 | + } | ||
| 172 | + } | ||
| 173 | + exports.getCACertificates = getCACertificates; | ||
| 174 | + | ||
| 105 | 175 | // Convert protocols array into valid OpenSSL protocols list | |
| 106 | 176 | // ("\x06spdy/2\x08http/1.1\x08http/1.0") | |
| 107 | 177 | function convertProtocols(protocols) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,11 +42,13 @@ using ncrypto::MarkPopErrorOnReturn; | |||
| 42 | 42 | using ncrypto::SSLPointer; | |
| 43 | 43 | using ncrypto::StackOfX509; | |
| 44 | 44 | using ncrypto::X509Pointer; | |
| 45 | + using ncrypto::X509View; | ||
| 45 | 46 | using v8::Array; | |
| 46 | 47 | using v8::ArrayBufferView; | |
| 47 | 48 | using v8::Boolean; | |
| 48 | 49 | using v8::Context; | |
| 49 | 50 | using v8::DontDelete; | |
| 51 | + using v8::EscapableHandleScope; | ||
| 50 | 52 | using v8::Exception; | |
| 51 | 53 | using v8::External; | |
| 52 | 54 | using v8::FunctionCallbackInfo; | |
@@ -57,7 +59,9 @@ using v8::Integer; | |||
| 57 | 59 | using v8::Isolate; | |
| 58 | 60 | using v8::JustVoid; | |
| 59 | 61 | using v8::Local; | |
| 62 | + using v8::LocalVector; | ||
| 60 | 63 | using v8::Maybe; | |
| 64 | + using v8::MaybeLocal; | ||
| 61 | 65 | using v8::Nothing; | |
| 62 | 66 | using v8::Object; | |
| 63 | 67 | using v8::PropertyAttribute; | |
@@ -672,9 +676,6 @@ static void LoadCertsFromDir(std::vector<X509*>* certs, | |||
| 672 | 676 | return; | |
| 673 | 677 | } | |
| 674 | 678 | ||
| 675 | - uv_fs_t stats_req; | ||
| 676 | - auto cleanup_stats = | ||
| 677 | - OnScopeLeave([&stats_req]() { uv_fs_req_cleanup(&stats_req); }); | ||
| 678 | 679 | for (;;) { | |
| 679 | 680 | uv_dirent_t ent; | |
| 680 | 681 | ||
@@ -691,12 +692,14 @@ static void LoadCertsFromDir(std::vector<X509*>* certs, | |||
| 691 | 692 | return; | |
| 692 | 693 | } | |
| 693 | 694 | ||
| 695 | + uv_fs_t stats_req; | ||
| 694 | 696 | std::string file_path = std::string(cert_dir) + "/" + ent.name; | |
| 695 | 697 | int stats_r = uv_fs_stat(nullptr, &stats_req, file_path.c_str(), nullptr); | |
| 696 | 698 | if (stats_r == 0 && | |
| 697 | 699 | (static_cast<uv_stat_t*>(stats_req.ptr)->st_mode & S_IFREG)) { | |
| 698 | 700 | LoadCertsFromFile(certs, file_path.c_str()); | |
| 699 | 701 | } | |
| 702 | + uv_fs_req_cleanup(&stats_req); | ||
| 700 | 703 | } | |
| 701 | 704 | } | |
| 702 | 705 | ||
@@ -775,7 +778,7 @@ static std::vector<X509*> InitializeSystemStoreCertificates() { | |||
| 775 | 778 | return system_store_certs; | |
| 776 | 779 | } | |
| 777 | 780 | ||
| 778 | - static std::vector<X509*>& GetSystemStoreRootCertificates() { | ||
| 781 | + static std::vector<X509*>& GetSystemStoreCACertificates() { | ||
| 779 | 782 | // Use function-local static to guarantee thread safety. | |
| 780 | 783 | static std::vector<X509*> system_store_certs = | |
| 781 | 784 | InitializeSystemStoreCertificates(); | |
@@ -847,7 +850,7 @@ X509_STORE* NewRootCertStore() { | |||
| 847 | 850 | CHECK_EQ(1, X509_STORE_add_cert(store, cert)); | |
| 848 | 851 | } | |
| 849 | 852 | if (per_process::cli_options->use_system_ca) { | |
| 850 | - for (X509* cert : GetSystemStoreRootCertificates()) { | ||
| 853 | + for (X509* cert : GetSystemStoreCACertificates()) { | ||
| 851 | 854 | CHECK_EQ(1, X509_STORE_add_cert(store, cert)); | |
| 852 | 855 | } | |
| 853 | 856 | } | |
@@ -869,7 +872,7 @@ void CleanupCachedRootCertificates() { | |||
| 869 | 872 | } | |
| 870 | 873 | } | |
| 871 | 874 | if (has_cached_system_root_certs.load()) { | |
| 872 | - for (X509* cert : GetSystemStoreRootCertificates()) { | ||
| 875 | + for (X509* cert : GetSystemStoreCACertificates()) { | ||
| 873 | 876 | X509_free(cert); | |
| 874 | 877 | } | |
| 875 | 878 | } | |
@@ -881,7 +884,7 @@ void CleanupCachedRootCertificates() { | |||
| 881 | 884 | } | |
| 882 | 885 | } | |
| 883 | 886 | ||
| 884 | - void GetRootCertificates(const FunctionCallbackInfo<Value>& args) { | ||
| 887 | + void GetBundledRootCertificates(const FunctionCallbackInfo<Value>& args) { | ||
| 885 | 888 | Environment* env = Environment::GetCurrent(args); | |
| 886 | 889 | Local<Value> result[arraysize(root_certs)]; | |
| 887 | 890 | ||
@@ -898,6 +901,58 @@ void GetRootCertificates(const FunctionCallbackInfo<Value>& args) { | |||
| 898 | 901 | Array::New(env->isolate(), result, arraysize(root_certs))); | |
| 899 | 902 | } | |
| 900 | 903 | ||
| 904 | + MaybeLocal<Array> X509sToArrayOfStrings(Environment* env, | ||
| 905 | + const std::vector<X509*>& certs) { | ||
| 906 | + ClearErrorOnReturn clear_error_on_return; | ||
| 907 | + EscapableHandleScope scope(env->isolate()); | ||
| 908 | + | ||
| 909 | + LocalVector<Value> result(env->isolate(), certs.size()); | ||
| 910 | + for (size_t i = 0; i < certs.size(); ++i) { | ||
| 911 | + X509View view(certs[i]); | ||
| 912 | + auto pem_bio = view.toPEM(); | ||
| 913 | + if (!pem_bio) { | ||
| 914 | + ThrowCryptoError(env, ERR_get_error(), "X509 to PEM conversion"); | ||
| 915 | + return MaybeLocal<Array>(); | ||
| 916 | + } | ||
| 917 | + | ||
| 918 | + char* pem_data = nullptr; | ||
| 919 | + auto pem_size = BIO_get_mem_data(pem_bio.get(), &pem_data); | ||
| 920 | + if (pem_size <= 0 || !pem_data) { | ||
| 921 | + ThrowCryptoError(env, ERR_get_error(), "Reading PEM data"); | ||
| 922 | + return MaybeLocal<Array>(); | ||
| 923 | + } | ||
| 924 | + // PEM is base64-encoded, so it must be one-byte. | ||
| 925 | + if (!String::NewFromOneByte(env->isolate(), | ||
| 926 | + reinterpret_cast<uint8_t*>(pem_data), | ||
| 927 | + v8::NewStringType::kNormal, | ||
| 928 | + pem_size) | ||
| 929 | + .ToLocal(&result[i])) { | ||
| 930 | + return MaybeLocal<Array>(); | ||
| 931 | + } | ||
| 932 | + } | ||
| 933 | + return scope.Escape(Array::New(env->isolate(), result.data(), result.size())); | ||
| 934 | + } | ||
| 935 | + | ||
| 936 | + void GetSystemCACertificates(const FunctionCallbackInfo<Value>& args) { | ||
| 937 | + Environment* env = Environment::GetCurrent(args); | ||
| 938 | + Local<Array> results; | ||
| 939 | + if (X509sToArrayOfStrings(env, GetSystemStoreCACertificates()) | ||
| 940 | + .ToLocal(&results)) { | ||
| 941 | + args.GetReturnValue().Set(results); | ||
| 942 | + } | ||
| 943 | + } | ||
| 944 | + | ||
| 945 | + void GetExtraCACertificates(const FunctionCallbackInfo<Value>& args) { | ||
| 946 | + Environment* env = Environment::GetCurrent(args); | ||
| 947 | + if (extra_root_certs_file.empty()) { | ||
| 948 | + return args.GetReturnValue().Set(Array::New(env->isolate())); | ||
| 949 | + } | ||
| 950 | + Local<Array> results; | ||
| 951 | + if (X509sToArrayOfStrings(env, GetExtraCACertificates()).ToLocal(&results)) { | ||
| 952 | + args.GetReturnValue().Set(results); | ||
| 953 | + } | ||
| 954 | + } | ||
| 955 | + | ||
| 901 | 956 | bool SecureContext::HasInstance(Environment* env, const Local<Value>& value) { | |
| 902 | 957 | return GetConstructorTemplate(env)->HasInstance(value); | |
| 903 | 958 | } | |
@@ -981,8 +1036,14 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) { | |||
| 981 | 1036 | GetConstructorTemplate(env), | |
| 982 | 1037 | SetConstructorFunctionFlag::NONE); | |
| 983 | 1038 | ||
| 1039 | + SetMethodNoSideEffect(context, | ||
| 1040 | + target, | ||
| 1041 | + "getBundledRootCertificates", | ||
| 1042 | + GetBundledRootCertificates); | ||
| 1043 | + SetMethodNoSideEffect( | ||
| 1044 | + context, target, "getSystemCACertificates", GetSystemCACertificates); | ||
| 984 | 1045 | SetMethodNoSideEffect( | |
| 985 | - context, target, "getRootCertificates", GetRootCertificates); | ||
| 1046 | + context, target, "getExtraCACertificates", GetExtraCACertificates); | ||
| 986 | 1047 | } | |
| 987 | 1048 | ||
| 988 | 1049 | void SecureContext::RegisterExternalReferences( | |
@@ -1022,7 +1083,9 @@ void SecureContext::RegisterExternalReferences( | |||
| 1022 | 1083 | ||
| 1023 | 1084 | registry->Register(CtxGetter); | |
| 1024 | 1085 | ||
| 1025 | - registry->Register(GetRootCertificates); | ||
| 1086 | + registry->Register(GetBundledRootCertificates); | ||
| 1087 | + registry->Register(GetSystemCACertificates); | ||
| 1088 | + registry->Register(GetExtraCACertificates); | ||
| 1026 | 1089 | } | |
| 1027 | 1090 | ||
| 1028 | 1091 | SecureContext* SecureContext::Create(Environment* env) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments