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分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
google/conscrypt の issue をすべて見る
似ている 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 件 ·
メンテナーはふだん 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 日以内に返信