Skip to content

Conversation

@kiwi1969
Copy link

Description

Fix erroneous warning message output when loading client cert from keystore with password in non-GUI mode, when password is actually present.
Add extra condition for z/OS operating system, so warning message will appear if keystore password is ever null.

Code changes made are :

  1. Added specific rule for operating system = "z/OS", to force validation of password for keystore to be non-null (ie we are always forced to set a password in keytool when using z/OS).
    This will then trigger the warning message to appear if defaultpw = null.
  2. method getPassword() incorrectly gives warning regarding no password provided, when running without GUI and password the is actually fine. ie It seems to be a prior coding error on placement of else statement.

Motivation and Context

Misleading error messages that confused debugging issues around keystore loading and jmeter configuration files

How Has This Been Tested?

Unit tested in own environment.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.

1) Added rule for "z/OS" to force validation of password for keystore to be present (ie we always have set a password in z/OS)
2) method getPassword() incorrectly gives warning regarding no password provided, when running without GUI and password is actually fine.
ie seems to be a coding error on placement of else statement
@kiwi1969
Copy link
Author

Dunno why Travis CI failed.
Seems to be unrelated to my changes.
Converting to draft

@kiwi1969 kiwi1969 marked this pull request as draft March 31, 2021 16:30
@mawasak
Copy link
Contributor

mawasak commented Mar 31, 2021

It looks like Daylight Saving Time problem.

@FSchumacher
Copy link
Contributor

Can you give more information on your real problem? Why should z/OS be different in handling non-GUI case than other operating systems?

@kiwi1969
Copy link
Author

kiwi1969 commented Aug 24, 2021 via email

@kiwi1969
Copy link
Author

kiwi1969 commented Aug 24, 2021 via email

@kiwi1969
Copy link
Author

kiwi1969 commented Aug 24, 2021 via email

@FSchumacher
Copy link
Contributor

So, the real problem here is, that we currently don't distinguish between no key and wrong password, right?
Which keystore type do you use?

@kiwi1969
Copy link
Author

kiwi1969 commented Sep 7, 2021 via email

asfgit pushed a commit that referenced this pull request Sep 11, 2021
Currently a user can not differentiate between a wrong password and missing or
wrong keys, algorithms, etc. So try do handle the excpetions, that the API
gives us and log different error messages to better inform our users.

Part of #654
@FSchumacher
Copy link
Contributor

I have tried to differentiate the exceptions a bit more. Could you those changes out and report back, whether they would have helped you?

asfgit pushed a commit that referenced this pull request Sep 11, 2021
@pmouawad
Copy link
Contributor

This seems to have been done differently in:

bc23dca

Closing

@pmouawad pmouawad closed this Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants