GeezerVison is showing github.com — crypto: Use system CAs instead of using bundled ones · nodejs/node@fd9bb56
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: configure +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -153,6 +153,11 @@ parser.add_option('--openssl-fips', |
153 | 153 | dest='openssl_fips', |
154 | 154 | help='Build OpenSSL using FIPS canister .o file in supplied folder') |
155 | 155 |
|
| 156 | +parser.add_option('--openssl-use-def-ca-store', |
| 157 | + action='store_true', |
| 158 | + dest='use_openssl_ca_store', |
| 159 | + help='Use OpenSSL supplied CA store instead of compiled-in Mozilla CA copy.') |
| 160 | + |
156 | 161 | shared_optgroup.add_option('--shared-http-parser', |
157 | 162 | action='store_true', |
158 | 163 | dest='shared_http_parser', |
@@ -953,6 +958,8 @@ def configure_openssl(o): |
953 | 958 | o['variables']['node_use_openssl'] = b(not options.without_ssl) |
954 | 959 | o['variables']['node_shared_openssl'] = b(options.shared_openssl) |
955 | 960 | o['variables']['openssl_no_asm'] = 1 if options.openssl_no_asm else 0 |
| 961 | + if options.use_openssl_ca_store: |
| 962 | + o['defines'] += ['NODE_OPENSSL_CERT_STORE'] |
956 | 963 | if options.openssl_fips: |
957 | 964 | o['variables']['openssl_fips'] = options.openssl_fips |
958 | 965 | fips_dir = os.path.join(root_dir, 'deps', 'openssl', 'fips') |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_crypto.cc +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -708,10 +708,14 @@ static X509_STORE* NewRootCertStore() { |
708 | 708 | } |
709 | 709 |
|
710 | 710 | X509_STORE* store = X509_STORE_new(); |
| 711 | +#if defined(NODE_OPENSSL_CERT_STORE) |
| 712 | + X509_STORE_set_default_paths(store); |
| 713 | +#else |
711 | 714 | for (X509 *cert : root_certs_vector) { |
712 | 715 | X509_up_ref(cert); |
713 | 716 | X509_STORE_add_cert(store, cert); |
714 | 717 | } |
| 718 | +#endif |
715 | 719 |
|
716 | 720 | return store; |
717 | 721 | } |
|