summaryrefslogtreecommitdiff
path: root/lib/crypto.js
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2015-06-08 12:26:16 -0400
committerBrian White <mscdex@mscdex.net>2015-06-08 12:35:41 -0400
commit38d1afc24d899cdba6a6981197c664cc991ef64a (patch)
tree3a49779d936c5955285fce3b113cb54667295a33 /lib/crypto.js
parentff39ecb91403093c471cce2bb1c1bad34c2a79a6 (diff)
downloadandroid-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.js9
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());
};