Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

No installed provider: sun.security.ras.RSAPublicKeyImpl

843811Jun 7 2005 — edited Sep 13 2005
I am receiving the following exception and do not know how to fix it.

java.security.InvalidKeyException: No installed provider supports this key: sun.
security.rsa.RSAPublicKeyImpl

I tried doing a
Security.addProvider(new sun.security.rsa.RSAPublicKeyImpl());
but received a 'cannot find symbol' error. Sorry, I'm new at this, so if a library needs to be included for this, someone tell me where it is cause I couldn't find information about it.

Here's some information I have.
The following providers were listed through Security.getProviders():
- SUN version 1.5
- SunRsaSign version 1.5
- SunJSSE version 1.5
- SunJCE version 1.5
- SunJGSS version 1.0
- SunSASL version 1.5

This is what I recieved from the HandshakeCompletedEvent.
CipherSuite:SSL_RSA_WITH_RC4_128_MD5
SessionId: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
Certificate: 1 Sun RSA public key, 1024 bits

This is what I tried to do:
                Cipher cipher = Cipher.getInstance("RC4");
                cipher.init(Cipher.ENCRYPT_MODE, cert);
                CipherOutputStream cos = new CipherOutputStream(socket.getOutputStream(), cipher);
                cos.write("GET / HTTP/1.0\\r\\n\\r\\n".getBytes());
                cos.flush();
socket is an SSLSocket.
cert is assigned through HandshakeCompletedEvent.getPeerCertificates()[0];


Did I do this wrongly?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2005
Added on Jun 7 2005
1 comment
2,714 views