profile
viewpoint

Ask questionsNode.js 12.10 throwing EPROTO on HTTPS request

<!-- Thank you for reporting a possible bug in Node.js.

Please fill in as much of the template below as you can.

Version: output of node -v Platform: output of uname -a (UNIX), or version and 32 or 64-bit (Windows) Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you can. -->

Code that was working previously in Node 11.12 (docker: node:11.12.0-stretch) is failing with a SSL error in Node 12.10 (docker: node:12.10.0-buster)

I've narrowed it down to this piece of code that reproduces the issue under Node 12.10.0 (but works fine in Node 11.12.0):

const https = require('https')
const options = { hostname: 'americas.universal-api.travelport.com', port: 443, path: '/B2BGateway/connect/uAPI/HotelService', method: 'POST', headers: { 'Content-Type': 'application/xml', 'Content-Length': '0' } }
https.request(options, res => {}).on('error', err => console.error('ERR', err))

Which produces the following output:

> ERR [Error: 140508230993792:error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature type:../deps/openssl/openssl/ssl/t1_lib.c:1110:
] {
  library: 'SSL routines',
  function: 'tls12_check_peer_sigalg',
  reason: 'wrong signature type',
  code: 'ERR_SSL_WRONG_SIGNATURE_TYPE'
}

FWIW, the exact same code works fine in Debian Stretch (docker: node:12.10.0-stretch)

  • Version: 12.10
  • Platform: Debian Buster (docker image: node:10.12.0-buster)
  • Subsystem: Docker

uname -a:

root@09b304d90ae0:/var/app# uname -a
Linux 09b304d90ae0 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 GNU/Linux

node -v:

root@09b304d90ae0:/var/app# node -v
v12.10.0

Full Stack trace:

Error: write EPROTO 140650779117440:error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature type:../deps/openssl/openssl/ssl/t1_lib.c:1110:

    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:87:16)
From previous event:
    at TravelportSOAPClient._callService (/var/app/src/services/api/requests/baseSoapClient.js:256:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at TravelportSOAPClient.request (/var/app/src/services/api/requests/baseSoapClient.js:229:12)
    at roomRates (/var/app/src/services/api/handlers/hotels.js:220:16)
    at getResponse (/var/app/src/services/api/index.js:77:10)
    at Object.exports.runQuery (/var/app/src/services/api/index.js:105:22)
    at Object.getTpHotelRates [as tp] (/var/app/src/app/search/collectors/hotel.js:681:24)
    at /var/app/src/app/search/collectors/hotel.js:1341:9

<!-- Please provide more details below this comment. -->

nodejs/node

Answer questions bnoordhuis

Doesn't seem like a bug to me - if it worked without .end() before v12.x, that was by accident. It was never the documented behavior.

@mscdex @sam-github Do you concur? Can this be closed?

useful!

Related questions

--max-http-header-size= is not allowed in NODE_OPTIONS hot 8
Crash with "req.handle.writev is not a function" on Socket.Writable.uncork hot 2
pkg-exports: "." errors without a specified `main` hot 2
shutdown ENOTCONN on TLS.Socket._final hot 2
HTTP/2 requests eventually start throwing NGHTTP2_ENHANCE_YOUR_CALM errors hot 2
stream.finished behaviour change hot 2
Assertion `(parser->current_buffer_len_) == (0)' failed hot 1
Remove util.inherits usage internally? hot 1
[Bug] Node 10.1.0 TLS issue with ldap: Client network socket disconnected before secure TLS connection was established hot 1
ReferenceError: internalBinding is not defined hot 1
Incorrect timezone hot 1
HPE_INVALID_HEADER_TOKEN on http requests hot 1
HPE_INVALID_HEADER_TOKEN on http requests hot 1
crypto, bad decrypt hot 1
display node.js version (process.version) at the end of stacktraces hot 1
Github User Rank List