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
JDK-8293808: mscapi destroyKeyContainer enhance KeyStoreException: Access is denied exception #10280
Conversation
|
Webrevs
|
This is not a fix for the bug itself, therefore I suggest either create a new issue or create a subtask for this code change. Also, how about we enhance the existing Finally, with this change, do you have more clues on the "Access is denied" problem? |
Hi, this one is just for the better/more detailed exception . For the real issue we still have JDK-8293097 .
Sounds like a good idea.
Still not 100% sure whats happening there, it might be related to some special properties or missing privileges of the user executing those tests. |
After looking into a number of logs it looks more and more like some crappy (or awfully configured?) "security product" causes these "Access is denied" problems on a number of our Windows test machines. Having a detailed error message is of course good in this case , but it won't (and probably can't) tell you the reason / root cause of the issue. |
I see. Sorry. |
Is it possible to find a Windows command that tries to do something similar and shows the same error? If yes, then it's safe to say it's not an issue in JDK and we may even be able to add more info in the exception message. |
@MBaesken This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 27 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
Thanks for the review !
Unfortunately the "Access denied" can show up also in other situations like missing permissions etc. of the user running the JDK so it is not completely clear what it means. Regarding "finding a Windows tool" showing the same issues, so far I am not aware of one unfortunately. |
Oops, find an issue. |
|
||
DWORD res = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError, | ||
NULL, szMessage, sizeof(szMessage), NULL); | ||
if (res == 0) { | ||
strcpy(szMessage, "Unknown error"); | ||
} | ||
snprintf(szMessage2, sizeof(szMessage2), "error %lu, %s", msg, dwError, szMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msg
is from nowhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, had to remove msg you are correct of course ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks.
/integrate |
Going to push as commit 36c9034.
Your commit was automatically rebased without conflicts. |
Currently we see on various Windows machines the following exception :
https://bugs.openjdk.org/browse/JDK-8293097
java.security.KeyStoreException: Access is denied.
This should probably be enhanced a bit so that the exception tell us more about what went wrong exactly.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10280/head:pull/10280
$ git checkout pull/10280
Update a local copy of the PR:
$ git checkout pull/10280
$ git pull https://git.openjdk.org/jdk pull/10280/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10280
View PR using the GUI difftool:
$ git pr show -t 10280
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10280.diff