Bug 145734 - gnu-crypto not found at runtime by default.
Summary: gnu-crypto not found at runtime by default.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnu-crypto
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Gary Benson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-20 23:03 UTC by Anthony Green
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-21 13:24:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.