Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4271124

KeyPairGenerator.generateKeyPair() throws an exception in SunRsaSign provider

XMLWordPrintable

    • kestrel
    • sparc
    • solaris_2.6
    • Verified



      Name: asC58863 Date: 09/13/99


      KeyPairGenerator.generateKeyPair() throws an exception.

      Here is the example demonstrating the bug:
      ------------------ Test.java -----------------
      import java.security.*;

      public class Test {

          public static void main(String[] argv) {
              KeyPair k;
              KeyPairGenerator keyGen = null;

              try {
                  keyGen = KeyPairGenerator.getInstance("RSA", "SunRsaSign");
              } catch (NoSuchAlgorithmException e) {
                  System.out.println("algorithm not available ");
                  System.exit(0);
              } catch (NoSuchProviderException e1) {
                  System.out.println("provider not available");
                  System.exit(0);
              }
              k = keyGen.generateKeyPair();
          }
      }

      -------------- Output from the test -----------------
      java full version "1.3beta-O"

      Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/rsasign/JA_AlgaeDigest
              at com.sun.rsajca.JS_KeyPairGenerator.generateKeyPair([DashoPro-V1.2-120198])
              at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:427)
              at Test.main(Test.java:18)
      ------------------------------------------------------

      ======================================================================

            shihliu Sharon Liu (Inactive)
            anssunw Ans Ans (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: