bcgit / bc-java

Bouncy Castle Java Distribution (Mirror)
https://www.bouncycastle.org/java.html
MIT License
2.23k stars 1.11k forks source link

org.bouncycastle.tls.TlsFatalAlertReceived: access_denied(49) #1731

Open yjb152 opened 3 weeks ago

yjb152 commented 3 weeks ago

I am encountering this issue with bctls-jdk18on versions above 1.71, but the problem does not occur when using bctls-jdk18on:1.71. This issue happens on the Windows 11 terminal, but not on Apple devices such as iPhones or Macs. This problem has been troubling me for a long time, do you have any suggestions for troubleshooting?

idea

peterdettman commented 3 weeks ago

TlsFatalAlertReceived indicates an error from the peer, not a local error.

access_denied: A valid certificate or PSK was received, but when access control was applied, the sender decided not to proceed with negotiation.

So presumably you are connecting to a server and it is denying access based on the presented certificate. That makes it difficult to see how the BC version could be relevant, but perhaps the later versions of BC are negotiating a different TLS protocol (e.g. TLS 1.3) and the bug arises downstream of that.