summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-keygen.js
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2019-01-16 14:52:58 +0100
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-01-21 06:25:03 +0100
commit8b2e861da1da827cf8c581efbfd126907df9b593 (patch)
tree1c292b3565c7a9be2f6d892b53967ed2eeac3880 /test/parallel/test-crypto-keygen.js
parent07e0c4eaa3e91fa92f63486c0d0a12cc1f330597 (diff)
downloadandroid-node-v8-8b2e861da1da827cf8c581efbfd126907df9b593.tar.gz
android-node-v8-8b2e861da1da827cf8c581efbfd126907df9b593.tar.bz2
android-node-v8-8b2e861da1da827cf8c581efbfd126907df9b593.zip
test: use stronger curves for keygen
This commit updates the named curves P-192 (prime192v1), and secp192k1 to 256 bit versions. The motivation for this is that in Red Hat Enterprise Linux (RHEL) all ECC curves < 224 bits are removed from OpenSSL provided by the system. I'm not sure if other distributions do this but these 256 bit curves are availalbe in OpenSSL 1.1.0j (current version on master) and OpenSSL 1.1.1 so as far as I can tell it should be safe change to make. PR-URL: https://github.com/nodejs/node/pull/25564 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-crypto-keygen.js')
-rw-r--r--test/parallel/test-crypto-keygen.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-crypto-keygen.js b/test/parallel/test-crypto-keygen.js
index 61cd69b5d6..ebbac7606f 100644
--- a/test/parallel/test-crypto-keygen.js
+++ b/test/parallel/test-crypto-keygen.js
@@ -283,7 +283,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
// Test async elliptic curve key generation, e.g. for ECDSA, with an encrypted
// private key.
generateKeyPair('ec', {
- namedCurve: 'P-192',
+ namedCurve: 'P-256',
paramEncoding: 'named',
publicKeyEncoding: {
type: 'spki',
@@ -691,7 +691,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
// It should recognize both NIST and standard curve names.
generateKeyPair('ec', {
- namedCurve: 'P-192',
+ namedCurve: 'P-256',
publicKeyEncoding: { type: 'spki', format: 'pem' },
privateKeyEncoding: { type: 'pkcs8', format: 'pem' }
}, common.mustCall((err, publicKey, privateKey) => {
@@ -699,7 +699,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
}));
generateKeyPair('ec', {
- namedCurve: 'secp192k1',
+ namedCurve: 'secp256k1',
publicKeyEncoding: { type: 'spki', format: 'pem' },
privateKeyEncoding: { type: 'pkcs8', format: 'pem' }
}, common.mustCall((err, publicKey, privateKey) => {