socketio / socketio/socket.io

[bug] client certificate is not used in electron

Open
#5,100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

package:socket.io-client
Dominant language
TypeScript
Stars
63.2k
Forks
10.3k
Avg merge
11d 20h
Merged PRs (30d)
2

Description

Hi !
I'm using socket.io over https, using client certificates.
Inside the browser, everything works fine: the client certificate of the browser is used properly by socket.io-client.

Inside Electron, I import the client certificate using importCertificate.
Using axios, the certificate is sent, but not using socket.io-client: the certificate isn't sent, and I get a 400 error (the SSL certificate error) while polling.
(engine.io-client:socket socket error {"type":"TransportError","description":400} +15ms)

Any idea to tell socket.io-client to use the electron client store ?
Thank you !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Electron setup using app.importCertificate, comparing the successful axios request with socket.io-client polling over HTTPS. Start from the engine.io-client TransportError described in the report and trace how the client certificate is selected. Done means socket.io-client uses the Electron certificate store and the polling request no longer returns the reported 400 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop, networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.