SSL handshakes randomly fail when using BouncyCastle

Solution Unverified - Updated -

Issue

  • SSL/TLS handshakes with Diffie-Hellman cipher suites randomly fail from invalid padding exceptions.
  • IOException in getSession(): javax.net.ssl.SSLHandshakeException: Invalid padding
  • javax.net.ssl.SSLHandshakeException: Invalid Padding length: 79 (number may vary)

Environment

  • Java 6, 7, 8
  • BouncyCastle 1.50,1.51

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.