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

PIT: Can not remove "SunPKCS11-Solaris" provider on Solaris 10

XMLWordPrintable

    • b32
    • generic
    • generic

      Build
         Failed with PIT build
            java version "1.5.0-internal"
            Java(TM) 2 Runtime Environment, Standard Edition
            (build 1.5.0-internal-valeriep_01_Dec_2003_23_37)
            Java HotSpot(TM) Client VM (build 1.5.0-beta-b29, mixed
         Passed untill Tiger beta b29
            java version "1.5.0-beta"
            Java(TM) 2 Runtime Environment, Standard Edition (build1.5.0-beta-b29)
            Java HotSpot(TM) Client VM (build 1.5.0-beta-b29, mixed mode)

      Platform
         Solaris 10 only

      How to reproduce
      1. get the test code from the attachment
         (I also post the test code in this bug report)
      2. go to any Solaris 10 machine (i.e. dnm-dtf-002)
      3. javac removeProvider.java
      4. java removeProvider.java
      5. You will see
      ---------------------
      dnm-dtf-002:/home/stuartk/tmp/PIT/PIT11/Bug1( 107 )%!j
      java removeProvider
      You are telling me to remove SunPKCS11-Solaris
      SunPKCS11-Solaris is there
      I am trying to remove SunPKCS11-Solaris
      Status Failed -- since SunPKCS11-Solaris had not been removed
      Here is the provider list after remove operation
      SunPKCS11-Solaris
      SUN
      SunRsaSign
      SunJSSE
      SunJCE
      SunJGSS
      SunSASL
      ---------------------

      The following is test code
      -----------------------------
           import java.io.*;
           import java.security.*;

           public class removeProvider {

               public static void main(String argv[]) {

                   String providerToBeRemove;
                   String providerName;
                   Provider [] providerList=null;

                   if (argv.length > 0)
                       providerToBeRemove = argv[0];
                   else
                       providerToBeRemove = "SunPKCS11-Solaris";

                   System.out.println("You are telling me to remove " + providerToBeRemove);
                   if (Security.getProvider(providerToBeRemove) != null)
                       System.out.println(providerToBeRemove + " is there");
                   else {
                       System.out.println(providerToBeRemove + " is not there");
                       System.out.println("just exit -- This test is not applicable");
                       System.exit (0);
                   }
                   
                   System.out.println("I am trying to remove " + providerToBeRemove);
                   Security.removeProvider(providerToBeRemove);
                   if (Security.getProvider(providerToBeRemove) == null)
                       System.out.println("Status Passed -- since " + providerToBeRemove + " had been removed");
                   else {
                       System.out.println("Status Failed -- since " + providerToBeRemove + " had not been removed");
                   }
                   
                   System.out.println("Here is the provider list after remove operation");
                   providerList=Security.getProviders();
                   for (int i=0;i < providerList.length; i++) {
                        providerName=providerList[i].getName();
                        System.out.println(providerName);
                   }
            }
          }

            andreas Andreas Sterbenz
            skesunw Stuart Ke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: