test: use EC cert property now that it exists

Remove XXX, there has been an EC specific cert property since
https://github.com/nodejs/node/pull/24358

PR-URL: https://github.com/nodejs/node/pull/26598
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
This commit is contained in:
Sam Roberts 2019-03-11 13:26:44 -07:00
parent 97a919b12d
commit ed2c6965d2

View File

@ -160,9 +160,7 @@ function test(options) {
version: 'TLSv1.2'
});
assert.strictEqual(ecdsa.getPeerCertificate().subject.CN, eccCN);
// XXX(sam) certs don't currently include EC key info, so depend on
// absence of RSA key info to indicate key is EC.
assert(!ecdsa.getPeerCertificate().exponent, 'not cert for an RSA key');
assert.strictEqual(ecdsa.getPeerCertificate().asn1Curve, 'prime256v1');
ecdsa.end();
connectWithRsa();
}));