Skip to content

tls: pauseOnConnect option not honored #29620

@r1b

Description

@r1b

Background

  • v12.10.0:
  • Darwin mcdouble 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64:
  • TLS

Issue

The fix in #27665 does not seem to work with the pauseOnConnect option. The test in that PR only checks the allowHalfOpen option. The docs indicate that Any net.createServer() option can be provided.

Reproduction

// Create self-signed cert at certificate.pem / key.pem

const assert = require('assert');
const fs = require('fs');
const { createServer } = require('tls');

const server = createServer({
  cert: fs.readFileSync('./certificate.pem'),
  key: fs.readFileSync('./key.pem'),
  pauseOnConnect: true,
}, socket => {
  assert(socket.isPaused(), 'Socket is not paused');
});

server.listen(6666);

Expect error 'Socket is not paused' when you ncat --ssl localhost 6666 or wget https://localhost:6666.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions