After accepting connection, peer#hostname is not set
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 276
- Forks
- 200
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Description
I'm experimenting with implementing a SSL server with SNI.
Once the peer has negotiated the connection, and has connected successfully, I want to access the hostname that was used. I thought this would be accessible on the server side through peer.hostname but it's nil. The only thing I can access is peer.cert which does have the right subject.
Would it be safe (on the server side) to set peer.hostname in severname_cb? Another question is, should this be done automatically?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the server-side SNI negotiation and the peer.hostname and severname_cb handling described in the report. Determine the expected behavior after connection acceptance, including whether the hostname should be set automatically, and validate the decision with focused coverage for the server-side result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ruby
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100