Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: remove unnecessary parameter for assertCrypto() #10834

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/_tls_legacy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('internal/util').assertCrypto(exports);
require('internal/util').assertCrypto();

const assert = require('assert');
const EventEmitter = require('events');
Expand Down
2 changes: 1 addition & 1 deletion lib/_tls_wrap.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('internal/util').assertCrypto(exports);
require('internal/util').assertCrypto();

const assert = require('assert');
const crypto = require('crypto');
Expand Down
2 changes: 1 addition & 1 deletion lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'use strict';

const internalUtil = require('internal/util');
internalUtil.assertCrypto(exports);
internalUtil.assertCrypto();

exports.DEFAULT_ENCODING = 'buffer';

Expand Down
2 changes: 1 addition & 1 deletion lib/https.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('internal/util').assertCrypto(exports);
require('internal/util').assertCrypto();

const tls = require('tls');
const url = require('url');
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ exports.objectToString = function objectToString(o) {
};

const noCrypto = !process.versions.openssl;
exports.assertCrypto = function(exports) {
exports.assertCrypto = function() {
if (noCrypto)
throw new Error('Node.js is not compiled with openssl crypto support');
};
Expand Down
2 changes: 1 addition & 1 deletion lib/tls.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const internalUtil = require('internal/util');
internalUtil.assertCrypto(exports);
internalUtil.assertCrypto();

const net = require('net');
const url = require('url');
Expand Down