[GH-ISSUE #98] wrong version number #54

Closed
opened 2026-02-25 22:32:29 +03:00 by kerem · 2 comments
Owner

Originally created by @Dmitry-N-Medvedev on GitHub (Jan 7, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/98

Hi all,

I get a cryptic error:

Uncaught Error: write EPROTO 4478952896:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:252:

      at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:66:16)

Following is almost a copy of your documentation:

NODE_EXTRA_CA_CERTS: /Users/dmitrymedvedev/Library/Application Support/mkcert/rootCA.pem

const CA_PATH = path.resolve('./certs');
const httpsConfig = {
  get cert() {
    return readFileSync(path.resolve(path.join(CA_PATH, 'localhost+2.pem')));
  },
  get key() {
    return readFileSync(
      path.resolve(path.join(CA_PATH, 'localhost+2-key.pem')),
    );
  },
};

// ...

const httpsServer = new https.createServer(httpsConfig);

this.wss = new WebSocket.Server(
  Object.assign(
    {},
    this.settings.wss,
    { server: httpsServer },
  ),
);
Originally created by @Dmitry-N-Medvedev on GitHub (Jan 7, 2019). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/98 Hi all, I get a cryptic error: ``` Uncaught Error: write EPROTO 4478952896:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:252: at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:66:16) ``` Following is almost a copy of your documentation: ```NODE_EXTRA_CA_CERTS: /Users/dmitrymedvedev/Library/Application Support/mkcert/rootCA.pem``` ``` const CA_PATH = path.resolve('./certs'); const httpsConfig = { get cert() { return readFileSync(path.resolve(path.join(CA_PATH, 'localhost+2.pem'))); }, get key() { return readFileSync( path.resolve(path.join(CA_PATH, 'localhost+2-key.pem')), ); }, }; // ... const httpsServer = new https.createServer(httpsConfig); this.wss = new WebSocket.Server( Object.assign( {}, this.settings.wss, { server: httpsServer }, ), ); ```
kerem 2026-02-25 22:32:29 +03:00
Author
Owner

@FiloSottile commented on GitHub (Jan 8, 2019):

This sounds like a TLS stack issue rather than a mkcert issue, but if you found a solution it might be useful to leave a pointer here for the next person to encounter it.

<!-- gh-comment-id:452386725 --> @FiloSottile commented on GitHub (Jan 8, 2019): This sounds like a TLS stack issue rather than a mkcert issue, but if you found a solution it might be useful to leave a pointer here for the next person to encounter it.
Author
Owner

@indapublic commented on GitHub (Mar 3, 2020):

Having same issue for OSX and nginx

OpenSSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Unable to establish SSL connection.
<!-- gh-comment-id:593822702 --> @indapublic commented on GitHub (Mar 3, 2020): Having same issue for OSX and nginx ``` OpenSSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number Unable to establish SSL connection. ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#54
No description provided.