2 Replies Latest reply on Nov 22, 2017 2:33 PM by 9ad0db9e-85b2-4f3e-9b9f-eb3c09591843

    keytool not import any certificate

    a536c18f-b955-4920-8d99-15c2c4824b19

      Hi all

       

      On a new AWS instance, new and clean I have intall jre_8_0_91 and I do:

       

      echo "" | openssl s_client -connect android.googleapis.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > google.cert

       

      now

      /usr/java/jre1.8.0_152/bin/keytool -importcert -file google.cert -storepass changeit -keystore /usr/java/jre1.8.0_152/lib/security/cacerts -alias google

       

      ok, it all right.
      Now I update to jre_8_0_151 or jre_8_0_152 and repeat the commands, but allways the error is
      error de herramienta de claves: java.util.IllegalFormatConversionException: d != java.lang.String

       

      What is new in the last versions at KEYTOOL? Why I cannot import any certificate?

       

      Any suggestions are wellcome!!
      Best regards

        • 1. Re: keytool not import any certificate
          9ad0db9e-85b2-4f3e-9b9f-eb3c09591843

          Hi everyone,

           

          It is not exactly the same command but I have the same error when I try to execute the next command in CMD of Windows both as administrator and normal user:

          > keytool -list -v -keystore mykestore.jks

          The error is:

          error de herramienta de claves: java.util.IllegalFormatConversionException: d != java.lang.String

          java.util.IllegalFormatConversionException: d != java.lang.String

                  at java.util.Formatter$FormatSpecifier.failConversion(Unknown Source)

                  at java.util.Formatter$FormatSpecifier.printInteger(Unknown Source)

           

          Java version:

          java version "1.8.0_151"

          Java(TM) SE Runtime Environment (build 1.8.0_151-b12)

          Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

           

          OS: Windows 10 Home 64bits. Version 1703

           

          I tried to solve the problem reinstalling a new clean version of Windows Home 10 with a new installation of jre_8_0_151 but the problem persists.

           

          However the error does not occur in other version of java, 1.8.0_131.

          • 2. Re: keytool not import any certificate
            9ad0db9e-85b2-4f3e-9b9f-eb3c09591843

            Going back to the same question, I have the same error with the next version of Java:

            java version "9.0.1"

            Java(TM) SE Runtime Environment (build 9.0.1+11)

            Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)