Skip to content

feat: optimize SSLSocketFactory implementation#223

Merged
yndu13 merged 1 commit intomasterfrom
sslSocketFactory
Aug 19, 2024
Merged

feat: optimize SSLSocketFactory implementation#223
yndu13 merged 1 commit intomasterfrom
sslSocketFactory

Conversation

@yndu13
Copy link
Contributor

@yndu13 yndu13 commented Aug 16, 2024

No description provided.

trustManager.checkServerTrusted(chain, authType);
return; // someone trusts them. success!
} catch (CertificateException e) {
// maybe someone else will trust them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是应该把异常抛出来啊

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

噢噢不是,这里是个链式检查,检查到最后一个还是不trust的话,会抛出CertificateException("None of the TrustManagers trust this certificate chain")

trustManager.checkServerTrusted(chain, authType);
return; // someone trusts them. success!
} catch (CertificateException e) {
// maybe someone else will trust them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yndu13 yndu13 merged commit 3081c92 into master Aug 19, 2024
@yndu13 yndu13 deleted the sslSocketFactory branch August 19, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants