Omit SNI when the host is an IP literal

Open Beginner friendly
#1,661 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp

Research direction

Start in tls-stream.cpp, where SNI is configured during TLS stream context setup, and compare the current HostName handling with RFC 6066. Verify the behavior for literal IPv4 and IPv6 hosts, and consider the work complete when IP literals are not sent as SNI while hostname handling remains unchanged.

Written by the indexing model from the issue text.

Description

This is an additional finding from PR #1647

When SNI is configured during TLS stream context configuration (tls-stream.cpp), the code currently allows HostName to be set w/ an IP address,

According to RFC 6066:

Literal IPv4 and IPv6 addresses are not permitted in "HostName".

Dominant language
C++
Stars
1.2k
Forks
180
Avg merge
1d 14h
Merged PRs (30d)
27

Contributor guide

No contributing guide indexed for this repository

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.

More from alibaba/PhotonLibOS

All issues in alibaba/PhotonLibOS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.