On Fri, 3 Apr 2026 05:06:20 GMT, Ramesh Bhagavatam Gangadhar <[email protected]> wrote:
> Analysis on Issue > ====================== > > There are two calls made in KeytoolOpensslInteropTest.java in Line 83 and > Line 84 > > https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java#L83-L84 > > a) String opensslPath = OpensslArtifactFetcher.getOpensslPath(); > b) generateInitialKeystores(opensslPath); > > > 1. Call made in > https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java#L83 > to get openssl path which returns "openssl" > > Execution Flow: > ============ > > https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java#L83 > calls > https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java#L62 > calls > https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java#L98 > and finally returns "openssl" from > https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java#L100 > > > > 2. return value of "openssl" is passed as argument to > generateInitialKeystores("openssl") and same value is navigated here as well > > https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java#L110 > and call made to > OpensslArtifactFetcher.getProviderPath("openssl") > > https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java#L133 > ==> this is the statement where we are seeing error > > Path openSslRootPath = Path.of("openssl").getParent().getParent(); > > =====> Path.of("openssl").getParent() = null > > > > Solution > ========== > > 1. We can remove complete System Installed Library dependency and rely on > artifacts installed through artifactory. > 2. Instead of returning "openssl" from > https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java#L100 > return the absolute path of openssl. > > > I have opted for Solution 2. and changed the code and i encountered one more > situation where ProviderPath doesn't contain "ossl-modules" folder at all. > > e.g. > > if > https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java#L83 > returns absolute path "/usr/bin/openssl" then call made to get Provider Path > here: > https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java#L110 > and finally returned value is "/usr/lib/ossl-modules" from here: https... This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/30561
