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
504 views
in Technique[技术] by (71.8m points)

java - 信任库中的根证书是否足以建立连接?(Is root certificate in the trust store enough to establish a connection?)

Is having the root certificate in truststore enough for establishing the connection with a website?

(在truststore中拥有根证书足以建立与网站的连接吗?)

If so, just to test, I've imported the root certificate of google to new trust store which I have created and pointed to that trust store.

(如果是这样,为了测试,我已经将google的根证书导入到我创建的新信任库中并指向该信任库。)

Even then I am getting the following exception.

(即使那样,我也收到以下异常。) javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

But if I try to connect to google using default java trust store then it's working fine.

(但是,如果我尝试使用默认的Java信任库连接到Google,那么它工作正常。)

Can someone please help me with this?

(有人可以帮我吗?)

TIA.

(TIA。)

  ask by preetk translate from so

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

1 Answer

0 votes
by (71.8m points)
等待大神答复

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

...