← Back to team overview

openjdk team mailing list archive

[Bug 667218] Re: OpenJDK throws an exception in SSL connect

 

I just see, that the sun-6 jdk is not working as well... I must have
checked the wrong log file.


javax.mail.MessagingException: Connect failed;
  nested exception is:
        javax.net.ssl.SSLKeyException: RSA premaster secret error
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
        at javax.mail.Service.connect(Service.java:288)
        at javax.mail.Service.connect(Service.java:169)
        at org.apache.james.fetchmail.StoreProcessor.process(StoreProcessor.java:79)
        at org.apache.james.fetchmail.FetchMail.targetTriggered(FetchMail.java:541)
        at org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler.doRunEntry(DefaultTimeScheduler.java:449)
        at org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler$1.run(DefaultTimeScheduler.java:412)
        at org.apache.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:55)
        at org.apache.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:116)
Caused by: javax.net.ssl.SSLKeyException: RSA premaster secret error
        at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:97)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:744)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:238)
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:753)
        at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
        at java.io.DataInputStream.readLine(DataInputStream.java:496)
        at com.sun.mail.pop3.Protocol.simpleCommand(Protocol.java:360)
        at com.sun.mail.pop3.Protocol.<init>(Protocol.java:104)
        at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
        ... 8 more
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
        at javax.crypto.KeyGenerator.<init>(DashoA13*..)
        at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
        at com.sun.net.ssl.internal.ssl.JsseJce.getKeyGenerator(JsseJce.java:223)
        at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:89)
        ... 23 more

-- 
OpenJDK throws an exception in SSL connect
https://bugs.launchpad.net/bugs/667218
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in ubuntu.

Status in “openjdk-6” package in Ubuntu: New

Bug description:
I tried to run Apache James with TLS enabled. But the connect to an POP3 store is failing. The root cause seems to be this one: NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available

I tried with openjdk-6-jdk (6b18-1.8.1-0ubuntu1) on Lucid. I also tried to install the openjdk-6 from Maverick (openjdk-6-jdk (6b20-1.9-0ubuntu1)) on the same Lucid system. But the error is the same. 

Using the sun-java6-jdk from the partner repository shows no error.

See the stacktrace below.

javax.mail.MessagingException: Connect failed;
  nested exception is:
        javax.net.ssl.SSLKeyException: RSA premaster secret error
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
        at javax.mail.Service.connect(Service.java:288)
        at javax.mail.Service.connect(Service.java:169)
        at org.apache.james.fetchmail.StoreProcessor.process(StoreProcessor.java:79)
        at org.apache.james.fetchmail.FetchMail.targetTriggered(FetchMail.java:541)
        at org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler.doRunEntry(DefaultTimeScheduler.java:449)
        at org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler$1.run(DefaultTimeScheduler.java:412)
        at org.apache.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.java:55)
        at org.apache.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:116)
Caused by: javax.net.ssl.SSLKeyException: RSA premaster secret error
        at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:116)
        at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:632)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:220)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:546)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:482)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:904)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1140)
        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:764)
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:94)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
        at java.io.DataInputStream.readLine(DataInputStream.java:513)
        at com.sun.mail.pop3.Protocol.simpleCommand(Protocol.java:360)
        at com.sun.mail.pop3.Protocol.<init>(Protocol.java:104)
        at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
        ... 8 more
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
        at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:141)
        at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:191)
        at sun.security.ssl.JsseJce.getKeyGenerator(JsseJce.java:240)
        at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:108)
        ... 23 more





References