HTTPS requests to CA with AES-CBC failing with java.lang.ArrayIndexOutOfBoundsException: javax.crypto.ShortBufferException: Need at least X bytes of space in output buffer #498
This issue was migrated from Pagure Issue #3099.Originally filed by msqr on 2019-04-28
I am testing a new deployment of Dogtag 10.6.9 on Fedora 29. When I run some tests that attempt to submit a CSR using an agent user with a client certificate, I am getting an SSL error that I've tracked down on the Dogtag side of the SSL connection. The SSL handshake and certificate exchange all appear to succeed in Dogtag, but then fail when responding to the client. The error looks like this (in the SSL debug logs on the Dogtag server):
I found out that the following ciphers all produced the same stye error:
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
Until I reached the first cipher that worked: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384. It looks like the AES-CBC ciphers are all failing, but AES-GCM is OK.
I couldn't find a stacktrace anywhere, but I turned on JVM debugging and captured a stacktrace in Eclipse, which I'm attaching as a screen shot. The exception comes from the org.mozilla.jss.provider.javax.crypto.JSSCipherSpi.AES.bufferCrypt() method, line 759.
This issue was migrated from Pagure Issue #3099.Originally filed by msqr on 2019-04-28
I am testing a new deployment of Dogtag 10.6.9 on Fedora 29. When I run some tests that attempt to submit a CSR using an agent user with a client certificate, I am getting an SSL error that I've tracked down on the Dogtag side of the SSL connection. The SSL handshake and certificate exchange all appear to succeed in Dogtag, but then fail when responding to the client. The error looks like this (in the SSL debug logs on the Dogtag server):
I found out that the following ciphers all produced the same stye error:
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
Until I reached the first cipher that worked:
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
. It looks like the AES-CBC ciphers are all failing, but AES-GCM is OK.