RFR: 8273646: Add openssl from path variable also in to Default System Openssl Path in OpensslArtifactFetcher
Thejasvi Voniadka
tvoniadka at openjdk.java.net
Mon Sep 20 05:30:50 UTC 2021
On Wed, 15 Sep 2021 21:49:01 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> The test "sun/security/pkcs12/KeytoolOpensslInteropTest.java" performs interoperability checks between JDK and openssl with respect to certain keystore operations. The test requires a suitable version of openssl to be available on the machine it runs. Some mechanisms are used to discover openssl, among which searching through a predefined set of paths is also one. The test at present looks only at the following absolute paths (in that order):
>
> My understanding is that the $PATH variable usually already contains `/usr/bin` and `/usr/local/bin`. If you switch to $PATH, maybe it's no more necessary to try out those 2 anymore?
>
> Just curious, what is the full path of openssl on your Cygwin?
@wangweij, just a quick follow-up to make sure this change makes sense given the value of PATH variable on some of those machines (I mentioned it in the comment above). It appears it is true that openssl is indeed found inside /usr/local/bin directory, but on Cygwin-based systems, this actually translates to something like "C:\Cygwin\usr\local\bin" system path. Since we are explicitly passing "/usr/local/bin/openssl" to the process launcher, it fails to launch on such machines. We could have probably passed "C:\Cygwin...", but that would indicate some sort of prior knowledge towards where Cygwin is installed exactly. Hence, just an additional attempt with no absolute paths could succeed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5523
More information about the security-dev
mailing list