diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-03-22 07:42:04 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-03-27 02:08:49 +0200 |
commit | c3efe726694907ce0b2e41546d84a9a94547383e (patch) | |
tree | 29c490bd046b4e29b9d1cd92d5d94df066800c9a /test | |
parent | 2dc1053b0a6800ab7baf052017d37eaebf5e5a7e (diff) | |
download | android-node-v8-c3efe726694907ce0b2e41546d84a9a94547383e.tar.gz android-node-v8-c3efe726694907ce0b2e41546d84a9a94547383e.tar.bz2 android-node-v8-c3efe726694907ce0b2e41546d84a9a94547383e.zip |
tls: support Uint8Arrays for protocol list buffers
PR-URL: https://github.com/nodejs/node/pull/11984
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-tls-basic-validations.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/parallel/test-tls-basic-validations.js b/test/parallel/test-tls-basic-validations.js index 3454da571d..0b5d87ddc8 100644 --- a/test/parallel/test-tls-basic-validations.js +++ b/test/parallel/test-tls-basic-validations.js @@ -56,3 +56,17 @@ assert.throws(() => tls.createSecurePair({}), assert(buffer.equals(Buffer.from('abcd'))); assert(out.NPNProtocols.equals(Buffer.from('efgh'))); } + +{ + const buffer = new Uint8Array(Buffer.from('abcd')); + const out = {}; + tls.convertALPNProtocols(buffer, out); + assert(out.ALPNProtocols.equals(Buffer.from('abcd'))); +} + +{ + const buffer = new Uint8Array(Buffer.from('abcd')); + const out = {}; + tls.convertNPNProtocols(buffer, out); + assert(out.NPNProtocols.equals(Buffer.from('abcd'))); +} |