Skip to content

ttyd doesn't check client certification when connecting to ip addr instead of domain #1405

@ikicha

Description

@ikicha

Describe the bug
ttyd doesn't check client certification when connecting to ip addr instead of domain

To Reproduce
Steps to reproduce the behavior:

  1. /ttyd.x86_64 --ssl --ssl-cert server.crt --ssl-key server.key --ssl-ca ca.crt bash
  2. curl --insecure -vvv https://127.0.0.1:7681 succeeds to get response, while curl --insecure -vvv https://localhost:7681 fails.

Expected behavior
It should check and verify the client certificate regardless of how a user connects to ttyd.

Additional context
Here is warmcat/libwebsockets#3257 which is my PR to fix this bug in libwebsockets.
Can we use libwebsockets with patch? or it looks like the recent libwebsocket might include some workaround as well(warmcat/libwebsockets#2902)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions