Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

ssl - Error : java.security.cert.CertificateException: Illegal given domain name: abc_xyz.stg.myweb.com

Hi team i found below exception when calling an api

https://abc_xyz.stg.myweb.com/api/AuthorizedUser?username=admin&password=admin

java.security.cert.CertificateException: Illegal given domain name

when getting response from server using Jersey. Everything is fine when i get response from postman.

Why it is illegal domain name, whether browser not refuse to open this.

If my domain name not contains underscore then this exception is not rising. Is this problem of underscore in domain name?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In case anyone see this issue again. This issue is caused by an old jdk that thinks an underscore is invalid as the sub domain name, which in a later version has been removed from the jdk. So in short upgrade jdk version will solve this issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...