diff options
author | Brian White <mscdex@mscdex.net> | 2015-06-08 12:26:16 -0400 |
---|---|---|
committer | Brian White <mscdex@mscdex.net> | 2015-06-08 12:35:41 -0400 |
commit | 38d1afc24d899cdba6a6981197c664cc991ef64a (patch) | |
tree | 3a49779d936c5955285fce3b113cb54667295a33 /lib/crypto.js | |
parent | ff39ecb91403093c471cce2bb1c1bad34c2a79a6 (diff) | |
download | android-node-v8-38d1afc24d899cdba6a6981197c664cc991ef64a.tar.gz android-node-v8-38d1afc24d899cdba6a6981197c664cc991ef64a.tar.bz2 android-node-v8-38d1afc24d899cdba6a6981197c664cc991ef64a.zip |
crypto: add getCurves() to get supported ECs
PR-URL: https://github.com/nodejs/io.js/pull/1914
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/crypto.js')
-rw-r--r-- | lib/crypto.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/crypto.js b/lib/crypto.js index 7ce89482d5..d0ecef42a2 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -10,6 +10,7 @@ try { var randomBytes = binding.randomBytes; var getCiphers = binding.getCiphers; var getHashes = binding.getHashes; + var getCurves = binding.getCurves; } catch (e) { throw new Error('node.js not compiled with openssl crypto support.'); } @@ -652,13 +653,17 @@ exports.randomBytes = exports.pseudoRandomBytes = randomBytes; exports.rng = exports.prng = randomBytes; exports.getCiphers = function() { - return filterDuplicates(getCiphers.call(null, arguments)); + return filterDuplicates(getCiphers()); }; exports.getHashes = function() { - return filterDuplicates(getHashes.call(null, arguments)); + return filterDuplicates(getHashes()); +}; + +exports.getCurves = function() { + return filterDuplicates(getCurves()); }; |