ruby / ruby/openssl

After accepting connection, peer#hostname is not set

Open
#197 0 comments 0 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.