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

Linux: Keytool (and others) don't accept symlinks

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 6u29
    • Fix Version/s: None
    • Component/s: security-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_18"
      OpenJDK Runtime Environment (IcedTea6 1.8.9) (6b18-1.8.9-0.1~squeeze1)
      OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux 2.6.32-5-amd64 #1 SMP Wed Aug 31 16:50:35 UTC 2011 x86_64 GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      The keytool tool (and probably other tools) don't accept symlink files as input.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      keytool -import -file /etc/ssl/certs/$FILE.pem -alias $FILE -keystore $OUTFILE -storepass $PASSWORD -noprompt

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The file is accepted since symlinks should be handled like normal files
      ACTUAL -
      java.io.FileNotFoundException is thrown

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      keytool -import -file /etc/ssl/certs/$FILE.pem -alias $FILE -keystore $OUTFILE -storepass $PASSWORD -noprompt
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Workaround: Generate a "real" file so that keystore accepts it.

      cat /etc/ssl/certs/$FILE.pem > tmp.pem
      keytool -import -file tmp.pem -alias $FILE -keystore $OUTFILE -storepass $PASSWORD -noprompt
      rm tmp.pem

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: