diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2019-03-27 12:10:48 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2019-03-28 14:03:25 -0700 |
commit | 8c69e06972b5b0aa7e45163f860fb63d90203289 (patch) | |
tree | 7c3260ada43e49a4c867f7e37fb693ec01de0a4a /test/parallel/test-tls-client-renegotiation-13.js | |
parent | bcbd35a48d00c915690682b546e6c282bd15150b (diff) | |
download | android-node-v8-8c69e06972b5b0aa7e45163f860fb63d90203289.tar.gz android-node-v8-8c69e06972b5b0aa7e45163f860fb63d90203289.tar.bz2 android-node-v8-8c69e06972b5b0aa7e45163f860fb63d90203289.zip |
tls: return an OpenSSL error from renegotiate
A generic error lacks any of the context or detail of the underlying
OpenSSL error, so throw from C++, and report the OpenSSL error to the
callback.
PR-URL: https://github.com/nodejs/node/pull/26868
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'test/parallel/test-tls-client-renegotiation-13.js')
-rw-r--r-- | test/parallel/test-tls-client-renegotiation-13.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/parallel/test-tls-client-renegotiation-13.js b/test/parallel/test-tls-client-renegotiation-13.js index 8af63c4f79..075eb70e91 100644 --- a/test/parallel/test-tls-client-renegotiation-13.js +++ b/test/parallel/test-tls-client-renegotiation-13.js @@ -28,8 +28,12 @@ connect({ assert.strictEqual(client.getProtocol(), 'TLSv1.3'); const ok = client.renegotiate({}, common.mustCall((err) => { - assert(err.code, 'ERR_TLS_RENEGOTIATE'); - assert(err.message, 'Attempt to renegotiate TLS session failed'); + assert.throws(() => { throw err; }, { + message: 'error:1420410A:SSL routines:SSL_renegotiate:wrong ssl version', + code: 'ERR_SSL_WRONG_SSL_VERSION', + library: 'SSL routines', + reason: 'wrong ssl version', + }); cleanup(); })); |