OkHostName verifier unable to verify ipv6 addresses
@prbprbprb 已经在做这个了。
开始于 2023年1月15日。
评估
这个 Issue 还没有评估数据。
描述
java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-post-Debian-1deb10u1, mixed mode, sharing)
uname- a
Linux example 5.10.104-custom #1 SMP Mon Sep 27 00:00:00 UTC 2010 x86_64 GNU/Linux
Using
conscrypt tag 2.5.0.
We are trying to use conscrypt as ssl provider for kafka and we are getting in to issues while using verify ip address.
In our certificate we have the following ipv6 ip addresses ( its not the real address, but something similar)
IPAddress: 2001:0db8:85a3:1130::0370:7334
IPAddress: 2001:0db8:85a3:1130:0:0:0370:7334
IPAddress: 2001:0db8:85a3:1130:0000:0000:0370:7334
Here in this example, the real ip address of the host is 2001:0db8:85a3:1130:0:0:0370:7334, but when Conscrypt engine's okhostnameverifier, getSubjectAltNames(certificate, ALT_IPA_NAME) returns the three altnames as
below 2001:0db8:85a3:1130::0370:7334 ( and does not return the other two ip addresses one of which also contains the machines ip address ). And because of this and since we are using if (ipAddress.equalsIgnoreCase(altNames.get(i))), in , the ip address verification returns false, resulting in the below exception
javax.net.ssl.SSLHandshakeException: No subjectAltNames on the certificate match
I am looking for what is the best way to verify ip address as subject alt names is returning ip address in only one format ( 2001:0db8:85a3:1130::0370:7334 and not 2001:0db8:85a3:1130:0:0:0370:7334, which is the machines ip address ) and since we use equalsignorecase, it fails even if the ssl certificate contains the correct altnames.
Could some one please help on what would be the best way to verifyIpAddress in okhostname verifier ? Should the certificate need to have a different ip address format so that the verification succeeds ?
- 主要语言
- Java
- 星标
- 1.4k
- 派生
- 332
- 平均合并
- 2 天 56 分钟
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/conscrypt 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 3/5 半天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 49/100
-
难度 4/5 3-5 天 新手友好度 22/100
-
难度 3/5 1-2 天 新手友好度 58/100
相似的 Issue
-
beginner difficulty: easy documentation good first issue hacktoberfest help wanted observability size/S up-for-grabs
难度 1/5 1 小时以内 新手友好度 88/100
dmitriy-iliyov/spring-transactional-outbox#82 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
RamazanKara/nightjar#264 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
netty/netty#18628 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 87/100
apache/flink-agents#1500 ·
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 85/100
sylvainmetayer/planning-equipes#495 ·
维护者通常 1 天内回复