GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: expose crypto.constants.OPENSSL_IS_BORINGSSL · nodejs/node@9fccb06

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/bootstrap
    • node.js
  • src
    • node_config.cc
  • test/parallel
    • test-crypto-getcipherinfo.js
    • test-crypto-hkdf.js
    • test-process-features.js
    • test-tls-getprotocol.js
    • test-tls-write-error.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/bootstrap/node.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ ObjectDefineProperty(process, 'allowedNodeEnvironmentFlags', {
266266

267267
// TODO(joyeecheung): this property has not been well-maintained, should we
268268
// deprecate it in favor of a better API?
269-
const { isDebugBuild, hasOpenSSL, hasInspector } = config;
269+
const { isDebugBuild, hasOpenSSL, openSSLIsBoringSSL, hasInspector } = config;
270270
const features = {
271271
inspector: hasInspector,
272272
debug: isDebugBuild,
@@ -276,6 +276,7 @@ const features = {
276276
tls_sni: hasOpenSSL,
277277
tls_ocsp: hasOpenSSL,
278278
tls: hasOpenSSL,
279+
openssl_is_boringssl: openSSLIsBoringSSL,
279280
// This needs to be dynamic because --no-node-snapshot disables the
280281
// code cache even if the binary is built with embedded code cache.
281282
get cached_builtins() {
Collapse file

‎src/node_config.cc‎

Copy file name to clipboardExpand all lines: src/node_config.cc
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ static void InitConfig(Local<Object> target,
4848
READONLY_FALSE_PROPERTY(target, "isDebugBuild");
4949
#endif // defined(DEBUG) && DEBUG
5050

51+
#ifdef OPENSSL_IS_BORINGSSL
52+
READONLY_TRUE_PROPERTY(target, "openSSLIsBoringSSL");
53+
#else
54+
READONLY_FALSE_PROPERTY(target, "openSSLIsBoringSSL");
55+
#endif // OPENSSL_IS_BORINGSSL
56+
5157
#if HAVE_OPENSSL
5258
READONLY_TRUE_PROPERTY(target, "hasOpenSSL");
5359
#else
Collapse file

‎test/parallel/test-crypto-getcipherinfo.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-crypto-getcipherinfo.js
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ assert(getCipherInfo('aes-128-cbc', { ivLength: 16 }));
6262

6363
assert(!getCipherInfo('aes-128-ccm', { ivLength: 1 }));
6464
assert(!getCipherInfo('aes-128-ccm', { ivLength: 14 }));
65-
for (let n = 7; n <= 13; n++)
66-
assert(getCipherInfo('aes-128-ccm', { ivLength: n }));
65+
if (!process.features.openssl_is_boringssl) {
66+
for (let n = 7; n <= 13; n++)
67+
assert(getCipherInfo('aes-128-ccm', { ivLength: n }));
68+
}
6769

6870
assert(!getCipherInfo('aes-128-ocb', { ivLength: 16 }));
69-
for (let n = 1; n < 16; n++)
70-
assert(getCipherInfo('aes-128-ocb', { ivLength: n }));
71+
if (!process.features.openssl_is_boringssl) {
72+
for (let n = 1; n < 16; n++)
73+
assert(getCipherInfo('aes-128-ocb', { ivLength: n }));
74+
}
Collapse file

‎test/parallel/test-crypto-hkdf.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-crypto-hkdf.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const algorithms = [
125125
['sha256', '', 'salt', '', 10],
126126
['sha512', 'secret', 'salt', '', 15],
127127
];
128-
if (!hasOpenSSL3)
128+
if (!hasOpenSSL3 && !process.features.openssl_is_boringssl)
129129
algorithms.push(['whirlpool', 'secret', '', 'info', 20]);
130130

131131
algorithms.forEach(([ hash, secret, salt, info, length ]) => {
Collapse file

‎test/parallel/test-process-features.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-features.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const expectedKeys = new Map([
99
['debug', ['boolean']],
1010
['uv', ['boolean']],
1111
['ipv6', ['boolean']],
12+
['openssl_is_boringssl', ['boolean']],
1213
['tls_alpn', ['boolean']],
1314
['tls_sni', ['boolean']],
1415
['tls_ocsp', ['boolean']],
Collapse file

‎test/parallel/test-tls-getprotocol.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-getprotocol.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ const clientConfigs = [
2929

3030
const serverConfig = {
3131
secureProtocol: 'TLS_method',
32-
ciphers: 'RSA@SECLEVEL=0',
3332
key: fixtures.readKey('agent2-key.pem'),
3433
cert: fixtures.readKey('agent2-cert.pem')
3534
};
3635

36+
if (!process.features.openssl_is_boringssl) {
37+
serverConfig.ciphers = 'RSA@SECLEVEL=0';
38+
}
39+
3740
const server = tls.createServer(serverConfig, common.mustCall(clientConfigs.length))
3841
.listen(0, common.localhostIPv4, function() {
3942
let connected = 0;
Collapse file

‎test/parallel/test-tls-write-error.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-write-error.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ const server_cert = fixtures.readKey('agent1-cert.pem');
1717
const opts = {
1818
key: server_key,
1919
cert: server_cert,
20-
ciphers: 'ALL@SECLEVEL=0'
2120
};
2221

22+
if (!process.features.openssl_is_boringssl) {
23+
opts.ciphers = 'ALL@SECLEVEL=0';
24+
}
25+
2326
const server = https.createServer(opts, (req, res) => {
2427
res.write('hello');
2528
}).listen(0, common.mustCall(() => {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.