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

Handle more unknown password errors #432

Merged
merged 1 commit into from
Oct 5, 2023
Merged

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Oct 5, 2023

When using keytool on a truststore the error is different than on a keystore.

Fixes: 6fea0bb ("Support changing passwords on keystores & truststores")

When using keytool on a truststore the error is different than on a
keystore.

Fixes: 6fea0bb ("Support changing passwords on keystores & truststores")
@@ -20,7 +20,7 @@ def exists?
'-storepass:file', resource[:password_file],
)
rescue Puppet::ExecutionFailure => e
if e.message.include?('java.security.UnrecoverableKeyException')
if e.message.include?('java.security.UnrecoverableKeyException') || e.message.include?('keystore password was incorrect')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I debated treating any error as "it doesn't exist" and still wonder if we should take that route.

@ekohl ekohl added the Bug label Oct 5, 2023
@ekohl ekohl merged commit b0451d1 into theforeman:master Oct 5, 2023
7 checks passed
@ekohl ekohl deleted the fix-truststore branch October 5, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants