aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-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 /test/parallel/test-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 'test/parallel/test-crypto.js')
-rw-r--r--test/parallel/test-crypto.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js
index e3557943c6..2555cf448a 100644
--- a/test/parallel/test-crypto.js
+++ b/test/parallel/test-crypto.js
@@ -96,6 +96,12 @@ assert.notEqual(-1, crypto.getHashes().indexOf('RSA-SHA1'));
assert.equal(-1, crypto.getHashes().indexOf('rsa-sha1'));
assertSorted(crypto.getHashes());
+// Assume that we have at least secp384r1.
+assert.notEqual(0, crypto.getCurves().length);
+assert.notEqual(-1, crypto.getCurves().indexOf('secp384r1'));
+assert.equal(-1, crypto.getCurves().indexOf('SECP384R1'));
+assertSorted(crypto.getCurves());
+
// Regression tests for #5725: hex input that's not a power of two should
// throw, not assert in C++ land.
assert.throws(function() {