Knowledgebase:
Getting java.security.InvalidKeyException: Illegal key size in JSCAPE MFT Gateway
Posted by John Villanueva, Last modified by John Villanueva on 20 June 2019 12:21 AM

You might encounter an issue where you're unable to connect to a 'HTTPS to HTTP' reverse proxy service on MFT Gateway. If you open the gateway0.log file inside your [mft gateway installdir]/var/log directory and see something like below (notice the java.security.InvalidKeyException: Illegal key size), this could simply mean you need to install the JCE Unlimited Strength Jurisdiction Policy Files. Please follow the instructions below to install the files in question.

if you are using Oracle Java then you can download it from one of the following URL. Kindly follow the installation instructions found inside the zip archive.

http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html (JVM 1.6)
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html (JVM 1.7)
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html (JVM 1.8)

Please note a restart of JSCAPE MFT Gateway is required after installing the JCE policy files for it to take effect.

06.19.2019 07:52:35 [WARNING] Error processing incoming HTTP/S connection: [127.0.0.1:443 <-> 127.0.0.1:55162].
com.jscape.util.net.connection.ConnectionProtector$OperationException: internal_error(80)
at com.jscape.util.net.socket.SslSocketConnectionProtector.protect(Unknown Source)
at com.jscape.inet.gateway.adapter.b1.a(Unknown Source)
at com.jscape.inet.gateway.adapter.b1.onConnection(Unknown Source)
at com.jscape.util.net.MessageConnectionServer.onConnection(Unknown Source)
at com.jscape.util.net.MessageConnectionServer.onConnection(Unknown Source)
at com.jscape.util.net.socket.SocketAcceptor.processConnection(Unknown Source)
at com.jscape.util.net.socket.SocketAcceptor$2.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.bouncycastle.tls.TlsFatalAlert: internal_error(80)
at org.bouncycastle.tls.TlsProtocol.safeReadRecord(Unknown Source)
at org.bouncycastle.tls.TlsProtocol.blockForHandshake(Unknown Source)
at org.bouncycastle.tls.TlsServerProtocol.accept(Unknown Source)
at org.bouncycastle.jsse.provider.ProvSSLSocketWrap.startHandshake(Unknown Source)
at org.bouncycastle.jsse.provider.ProvSSLSocketWrap.startHandshake(Unknown Source)
... 12 more
Caused by: java.lang.IllegalStateException: java.security.InvalidKeyException: Illegal key size
at org.bouncycastle.tls.crypto.impl.jcajce.JceAEADCipherImpl.init(Unknown Source)
at org.bouncycastle.tls.crypto.impl.TlsAEADCipher.<init>(Unknown Source)
at org.bouncycastle.tls.crypto.impl.TlsAEADCipher.<init>(Unknown Source)
at org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsCrypto.createCipher_AES_GCM(Unknown Source)
at org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsCrypto.createCipher(Unknown Source)
at org.bouncycastle.tls.crypto.impl.AbstractTlsSecret.createCipher(Unknown Source)
at org.bouncycastle.tls.AbstractTlsServer.getCipher(Unknown Source)
at org.bouncycastle.tls.TlsServerProtocol.receiveClientKeyExchangeMessage(Unknown Source)
at org.bouncycastle.tls.TlsServerProtocol.handleHandshakeMessage(Unknown Source)
at org.bouncycastle.tls.TlsProtocol.processHandshakeQueue(Unknown Source)
at org.bouncycastle.tls.TlsProtocol.processRecord(Unknown Source)
at org.bouncycastle.tls.RecordStream.readRecord(Unknown Source)
... 17 more
Caused by: java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.init(Cipher.java:1393)
at javax.crypto.Cipher.init(Cipher.java:1327)
... 29 more  

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako jscape.kayako.com