A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nodejs/node/commit/9fccb0609f below:

expose crypto.constants.OPENSSL_IS_BORINGSSL · nodejs/node@9fccb06 · GitHub

File tree Expand file treeCollapse file tree 7 files changed

+26

-8

lines changed

Filter options

Expand file treeCollapse file tree 7 files changed

+26

-8

lines changed Original file line number Diff line number Diff line change

@@ -266,7 +266,7 @@ ObjectDefineProperty(process, 'allowedNodeEnvironmentFlags', {

266 266 267 267

// TODO(joyeecheung): this property has not been well-maintained, should we

268 268

// deprecate it in favor of a better API?

269 -

const { isDebugBuild, hasOpenSSL, hasInspector } = config;

269 +

const { isDebugBuild, hasOpenSSL, openSSLIsBoringSSL, hasInspector } = config;

270 270

const features = {

271 271

inspector: hasInspector,

272 272

debug: isDebugBuild,

@@ -276,6 +276,7 @@ const features = {

276 276

tls_sni: hasOpenSSL,

277 277

tls_ocsp: hasOpenSSL,

278 278

tls: hasOpenSSL,

279 +

openssl_is_boringssl: openSSLIsBoringSSL,

279 280

// This needs to be dynamic because --no-node-snapshot disables the

280 281

// code cache even if the binary is built with embedded code cache.

281 282

get cached_builtins() {

Original file line number Diff line number Diff line change

@@ -48,6 +48,12 @@ static void InitConfig(Local<Object> target,

48 48

READONLY_FALSE_PROPERTY(target, "isDebugBuild");

49 49

#endif // defined(DEBUG) && DEBUG

50 50 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 + 51 57

#if HAVE_OPENSSL

52 58

READONLY_TRUE_PROPERTY(target, "hasOpenSSL");

53 59

#else

Original file line number Diff line number Diff line change

@@ -62,9 +62,13 @@ assert(getCipherInfo('aes-128-cbc', { ivLength: 16 }));

62 62 63 63

assert(!getCipherInfo('aes-128-ccm', { ivLength: 1 }));

64 64

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 +

}

67 69 68 70

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 +

}

Original file line number Diff line number Diff line change

@@ -125,7 +125,7 @@ const algorithms = [

125 125

['sha256', '', 'salt', '', 10],

126 126

['sha512', 'secret', 'salt', '', 15],

127 127

];

128 -

if (!hasOpenSSL3)

128 +

if (!hasOpenSSL3 && !process.features.openssl_is_boringssl)

129 129

algorithms.push(['whirlpool', 'secret', '', 'info', 20]);

130 130 131 131

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

Original file line number Diff line number Diff line change

@@ -9,6 +9,7 @@ const expectedKeys = new Map([

9 9

['debug', ['boolean']],

10 10

['uv', ['boolean']],

11 11

['ipv6', ['boolean']],

12 +

['openssl_is_boringssl', ['boolean']],

12 13

['tls_alpn', ['boolean']],

13 14

['tls_sni', ['boolean']],

14 15

['tls_ocsp', ['boolean']],

Original file line number Diff line number Diff line change

@@ -29,11 +29,14 @@ const clientConfigs = [

29 29 30 30

const serverConfig = {

31 31

secureProtocol: 'TLS_method',

32 -

ciphers: 'RSA@SECLEVEL=0',

33 32

key: fixtures.readKey('agent2-key.pem'),

34 33

cert: fixtures.readKey('agent2-cert.pem')

35 34

};

36 35 36 +

if (!process.features.openssl_is_boringssl) {

37 +

serverConfig.ciphers = 'RSA@SECLEVEL=0';

38 +

}

39 + 37 40

const server = tls.createServer(serverConfig, common.mustCall(clientConfigs.length))

38 41

.listen(0, common.localhostIPv4, function() {

39 42

let connected = 0;

Original file line number Diff line number Diff line change

@@ -17,9 +17,12 @@ const server_cert = fixtures.readKey('agent1-cert.pem');

17 17

const opts = {

18 18

key: server_key,

19 19

cert: server_cert,

20 -

ciphers: 'ALL@SECLEVEL=0'

21 20

};

22 21 22 +

if (!process.features.openssl_is_boringssl) {

23 +

opts.ciphers = 'ALL@SECLEVEL=0';

24 +

}

25 + 23 26

const server = https.createServer(opts, (req, res) => {

24 27

res.write('hello');

25 28

}).listen(0, common.mustCall(() => {

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4