Bug 145734

Summary: gnu-crypto not found at runtime by default.
Product: [Fedora] Fedora Reporter: Anthony Green <green>
Component: gnu-cryptoAssignee: Gary Benson <gbenson>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fitzsim
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-21 13:24:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anthony Green 2005-01-20 23:03:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
This isn't necessarily a gnu-crypto bug, since there are a couple of
ways to fix....

But, what's annoying about the current arrangement is that you have to
manually add gnu-crypto to your CLASSPATH in order to use it as a
provider.  I've seen this confuse users (after they've figured out how
to specify the provider... see 
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=145730 )

Does Sun require that you add their provider to your CLASSPATH when
you're running in Sun's environment?

One idea is to symlink gnu-crypto.jar to libgcj's extensions directory
at install time.

Another idea is to always add it to CLASSPATH in java-gcj-compat.



Version-Release number of selected component (if applicable):
gnu-crypto-2.0.1-1jpp_1fc

How reproducible:
Always

Steps to Reproduce:
1.Compile and run the following with gij4.
2.
3.

import java.security.*;

public class hp
{
    public static void main (String args[])
    {
        java.security.KeyPairGenerator kpg = null;

        try {
            kpg = java.security.KeyPairGenerator.getInstance("DSA");
        } catch(java.security.NoSuchAlgorithmException e) {
            System.out.println(e);
        }

        System.out.println (kpg);
    }
}


Actual Results:  WARNING: Error loading security provider
gnu.crypto.jce.GnuCrypto: java.lang.Cla ssNotFoundException:
gnu.crypto.jce.GnuCrypto not found in [file:./, core:/]
java.security.NoSuchAlgorithmException: DSA
null


Expected Results:  $ gij4 hp
java.security.DummyKeyPairGenerator@8d7f740


Additional info:

This is the work-around:

$ CLASSPATH=/usr/share/java/gnu-crypto.jar gij4 hp
java.security.DummyKeyPairGenerator@8d7f740

Comment 1 Gary Benson 2005-01-21 12:06:31 UTC
My favourite would be adding to the CLASSPATH in java-gcj-compat.  I
think the classes provided by gnu-crypto are part of Java 1.4.2, so if
we say we're compatible with it we ought probably to have those
classes available.