summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-certificate.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-crypto-certificate.js')
-rw-r--r--test/parallel/test-crypto-certificate.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js
index e987be2129..a426e0be00 100644
--- a/test/parallel/test-crypto-certificate.js
+++ b/test/parallel/test-crypto-certificate.js
@@ -30,10 +30,9 @@ const { Certificate } = crypto;
const fixtures = require('../common/fixtures');
// Test Certificates
-const spkacValid = fixtures.readKey('rsa_spkac.spkac');
-const spkacChallenge = 'this-is-a-challenge';
-const spkacFail = fixtures.readKey('rsa_spkac_invalid.spkac');
-const spkacPublicPem = fixtures.readKey('rsa_public.pem');
+const spkacValid = fixtures.readSync('spkac.valid');
+const spkacFail = fixtures.readSync('spkac.fail');
+const spkacPem = fixtures.readSync('spkac.pem');
function checkMethods(certificate) {
@@ -42,13 +41,13 @@ function checkMethods(certificate) {
assert.strictEqual(
stripLineEndings(certificate.exportPublicKey(spkacValid).toString('utf8')),
- stripLineEndings(spkacPublicPem.toString('utf8'))
+ stripLineEndings(spkacPem.toString('utf8'))
);
assert.strictEqual(certificate.exportPublicKey(spkacFail), '');
assert.strictEqual(
certificate.exportChallenge(spkacValid).toString('utf8'),
- spkacChallenge
+ 'fb9ab814-6677-42a4-a60c-f905d1a6924d'
);
assert.strictEqual(certificate.exportChallenge(spkacFail), '');
}