> 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...
Ramesh Bhagavatam Gangadhar has updated the pull request incrementally with one additional commit since the last revision: Commit for Review Comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/30561/files - new: https://git.openjdk.org/jdk/pull/30561/files/091c61b6..97f50ba1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=30561&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30561&range=04-05 Stats: 8 lines in 1 file changed: 0 ins; 2 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/30561.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30561/head:pull/30561 PR: https://git.openjdk.org/jdk/pull/30561
