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

KeyStore.store takes several minutes on PKCS12

    XMLWordPrintable

    Details

      Description

      FULL PRODUCT VERSION :
      java 64-bit server vm build 20.13-b06 mixed mode

      ADDITIONAL OS VERSION INFORMATION :
      linux ca-server 3.5.0-17-generic x86_64
      Ubuntu 12.10

      A DESCRIPTION OF THE PROBLEM :
      I've tried to load a key into my soft p12 store. But it took several minutes with jrockit and oracle jdk. When I tried the openjdk it worked correctly.
      I'm not sure if it matters but my ubuntu server is inside of vmware ESX.
      I've attached a simple program which takes several minutes with oracle jdk and jrockit. on ubuntu.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No error message

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      System.out.println( " Started creating " );
      Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
      KeyPairGenerator generator = KeyPairGenerator.getInstance( " RSA " , " BC " );
      generator.initialize(2048);
      KeyPair keys = generator.generateKeyPair();
      String password = " passpass " ;
      KeyStore.PasswordProtection passProtectionEntry = new KeyStore.PasswordProtection(password.toCharArray());

      KeyStore storeP12 = KeyStore.getInstance( " PKCS12 " );
      storeP12.load(null, password.toCharArray());

      ByteArrayOutputStream bus = new ByteArrayOutputStream();

      storeP12.store(bus, password.toCharArray());
      bus.flush();
      bus.close();

      System.out.println( " Done creating " );
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      use openjdk

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              coffeys Sean Coffey
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: