RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1512647 - ERROR "keytool : java.util.IllegalFormatConversionException: d != java.lang.String" when using keytool from openjdk-1.8.0.151 on RHEL 7.4
Summary: ERROR "keytool : java.util.IllegalFormatConversionException: d != java.lang.S...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.8.0-openjdk
Version: 7.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Andrew John Hughes
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks: 1471969
TreeView+ depends on / blocked
 
Reported: 2017-11-13 18:46 UTC by Issa Gueye
Modified: 2020-12-14 10:51 UTC (History)
4 users (show)

Fixed In Version: java-1.8.0-openjdk-1.8.0.152-1.b16.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:52:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
outputs of: "$ java -XshowSettings:locale,properties -version" from reproducible machine OS (4.48 KB, text/plain)
2017-11-13 18:46 UTC, Issa Gueye
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Icedtea Bugzilla 3503 0 None None None 2017-12-20 06:38:20 UTC
Red Hat Product Errata RHBA-2018:0872 0 None None None 2018-04-10 15:54:15 UTC
openjdk bug system JDK-8191137 0 None None None 2017-11-13 18:46:24 UTC
openjdk bug system JDK-8191840 0 None None None 2017-11-24 06:19:09 UTC

Description Issa Gueye 2017-11-13 18:46:25 UTC
Created attachment 1351656 [details]
outputs of:  "$ java -XshowSettings:locale,properties -version" from reproducible machine OS

Description of problem:

A customer upgraded to latest RHEL 7.4.
They face the below error when using keytool from openjdk 1.8.0 u151 to import a certificate in  a keystore:

ERROR "keytool : java.util.IllegalFormatConversionException: d != java.lang.String"

Version-Release number of selected component (if applicable):

java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64.rpm

How reproducible:

easy to reproduce using keytool from openjdk-1.8.0.151 on RHEL 7.4 (for some languages other than English)

Steps to Reproduce:

# keytool -importcert -alias mYdomain -file mYdomain.cer -keystore mYkeystore

Actual results:

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

Expected results:

No error expected.

Additional info:

Comment 3 Severin Gehwolf 2017-11-15 14:45:46 UTC
Reproducer is:

$ echo -en 'DE\nBavaria\nFoo\nRed Hat\nTest Dpt.\nfoo.bar.example.com\n\n' > infile
$ echo -n 'testme\ntestme\n' | openssl req -passout stdin -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -batch < infile
$ echo -en 'changeme\nchangeme\nyes' | keytool -J-Duser.language=fr -importcert -alias mYdomain -file cert.pem -keystore mYkeystore2
Entrez le mot de passe du fichier de clés :  Ressaisissez le nouveau mot de passe : erreur keytool : java.util.IllegalFormatConversionException: d != java.lang.String
$ echo -en 'changeme\nchangeme\nyes' | keytool -J-Duser.language=es -importcert -alias mYdomain -file cert.pem -keystore mYkeystore2
Introduzca la contraseña del almacén de claves:  Volver a escribir la contraseña nueva: error de herramienta de claves: java.util.IllegalFormatConversionException: d != java.lang.String

Last step works with English:

$ echo -en 'changeme\nchangeme\nyes' | keytool -J-Duser.language=en -importcert -alias mYdomain -file cert.pem -keystore mYkeystore2
Enter keystore password:  Re-enter new password: Owner: O=Default Company Ltd, L=Default City, C=XX
Issuer: O=Default Company Ltd, L=Default City, C=XX
Serial number: b4984987daae9882
Valid from: Wed Nov 15 15:35:37 CET 2017 until: Thu Nov 15 15:35:37 CET 2018
Certificate fingerprints:
	 MD5:  05:DA:19:E3:36:B4:22:85:E2:83:D6:47:71:FA:BD:31
	 SHA1: 04:C6:B9:50:B8:EA:23:06:FE:54:9C:2D:77:E8:1E:2C:A1:67:EB:22
	 SHA256: 67:14:29:CC:E2:8A:6F:3B:02:94:F0:90:56:D0:81:2B:B7:F2:A6:AC:F0:DA:21:58:B2:DA:94:20:02:4F:D9:B7
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 4096-bit RSA key
Version: 3

Extensions: 

#1: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: EF 1A 2E FA 5C 95 16 5B   ED 0B C8 D9 EB A0 FA AC  ....\..[........
0010: 21 09 34 A0                                        !.4.
]
]

#2: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:2147483647
]

#3: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: EF 1A 2E FA 5C 95 16 5B   ED 0B C8 D9 EB A0 FA AC  ....\..[........
0010: 21 09 34 A0                                        !.4.
]
]

Trust this certificate? [no]:  Certificate was added to keystore

This is keytool from java-1.8.0-openjdk 151-b12:
$ which keytool
/usr/bin/keytool
$ ls -l /usr/bin/keytool
lrwxrwxrwx. 1 root root 25 Oct 26 09:59 /usr/bin/keytool -> /etc/alternatives/keytool
$ ls -l /etc/alternatives/keytool
lrwxrwxrwx. 1 root root 75 Oct 26 09:59 /etc/alternatives/keytool -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc25.x86_64/jre/bin/keytool

Comment 9 Andrew John Hughes 2017-11-24 06:20:23 UTC
Added link to new OpenJDK bug for the fix to the translations, JDK-8191840.

Comment 15 errata-xmlrpc 2018-04-10 15:52:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0872


Note You need to log in before you can comment on or make changes to this bug.