Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37384 - properly pass fips=false when checking keystore #446

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Apr 25, 2024

In a FIPS-enabled environment, calling keytool -list with a wrong password doesn't yield an error, unless we also pass fips=false like we do when creating the keystore:

# keytool -list -keystore ./store -storepass wrong-password
Keystore type: PKCS11
Keystore provider: SunPKCS11-NSS-FIPS

Your keystore contains 0 entries

Passing fips=false makes it correctly raise the expected exception:

# keytool -list -keystore ./store -storepass wrong-password -J-Dcom.redhat.fips=false
keytool error: java.io.IOException: keystore password was incorrect

Fixes: 6fea0bb
(cherry picked from commit b9667a0)

In a FIPS-enabled environment, calling `keytool -list` with a wrong
password doesn't yield an error, unless we also pass `fips=false` like
we do when creating the keystore:

    # keytool -list -keystore ./store -storepass wrong-password
    Keystore type: PKCS11
    Keystore provider: SunPKCS11-NSS-FIPS

    Your keystore contains 0 entries

Passing `fips=false` makes it correctly raise the expected exception:

    # keytool -list -keystore ./store -storepass wrong-password -J-Dcom.redhat.fips=false
    keytool error: java.io.IOException: keystore password was incorrect

Fixes: 6fea0bb
(cherry picked from commit b9667a0)
(cherry picked from commit d7e8d4e)
@evgeni evgeni merged commit 7208624 into 17.1-stable Apr 25, 2024
9 checks passed
@evgeni evgeni deleted the 1711 branch April 25, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants