Robert Rapplean
Robert Rapplean

Reputation: 669

Where can I get an official copy of sunrsasign.jar?

I'm trying to link in a third party library that is looking for /jdk**/jre/lib/sunrsasign.jar and can't find it. I've found numerous threads online that say they copied it in from elsewhere and got it to work, but the only places I can find to copy it from are third party groups of questionable provenience. Considering that this is a cryptography library, I can't imagine that using their version is a good idea.

My question is twofold. The first is "why doesn't this file exist in the standard Java distributions?" The second is "where can I get it from?"

Upvotes: 3

Views: 6418

Answers (1)

eis
eis

Reputation: 53462

Apparently it does exist in standard Java distributions, but not in current ones.

sunrsasign.jar is the SunRsaSign Provider as explained here. It says:

This document describes the technical details of the providers shipped as part of Sun's Java Environment.

and

The SunRsaSign Provider

The SunRsaSign provider was introduced in JDK 1.3 as an enhanced replacement for the RSA signatures in the SunJSSE provider.

In my 64-bit Oracle JDK 1.7.0_09 the sunrsasign.jar file does not exist, and doing a web search we can see the class SunRsaSign is contained within rt.jar. Using jarfinder we can see that for JDK 1.4.2, the jar did exist as a separate file. From google cache we can see that it used to be in jre/lib/ext / jre/lib.

Also, sunprovider docs say

In earlier JDK releases, there were no RSA signature providers available in the JDK, therefore SunJSSE had to provide its own RSA implementation in order to use commonly available RSA-based certificates. JDK 5 introduced the SunRsaSign provider, which provides all the functionality (and more) of the SunJSSE provider. Applications targeted at JDK 5.0 and higher should request instances of the SunRsaSign provider instead.

I take this so that it used to be in a separate jar provided by sun that you mentioned, and since JDK 5 it's been integrated into JDK and not as a separate jar.

Upvotes: 4

Related Questions