RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v4]

Jayashree Huttanagoudar duke at openjdk.org
Fri Jul 8 09:07:39 UTC 2022


On Fri, 8 Jul 2022 09:00:56 GMT, Jayashree Huttanagoudar <duke at openjdk.org> wrote:

>> Could you please review the changes?
>> This is to address the issue: https://bugs.openjdk.org/browse/JDK-8283082?jql=labels%20%3D%20starter-bug
>
> Jayashree Huttanagoudar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review comment to polish regression test.
>   - Verified the newly added test case before and after the patch.

I made the suggested changes to the test case and verified before and after the patch with jtreg.
Steps followed are as below:

export JTREG_JAVA=/usr/bin/java

Before Patch:

jtreg/bin/jtreg -jdk:/root/jdk/build.master/linux-x86_64-server-release/images/jdk/ test/jdk/sun/security/x509/X509CertImpl/
Test results: passed: 5; failed: 1
Report written to /root/jdk/JTreport/html/report.html
Results written to /root/jdk/JTwork
Error: Some tests failed or other problems occurred.

# cat /root/jdk/JTwork/jtData/harness.trace
# Trace file started at 2022-07-08T04:47:29-0400
# JT Harness version 6.0
# class directory: /root/jdk/jtreg/lib/javatest.jar
# using java: /usr/lib/jvm/java-18-openjdk-18.0.1.0.10-1.rolling.fc36.x86_64
2022-07-08T04:47:29-0400 Starting tests.
Test suite class: com.sun.javatest.regtest.config.RegressionTestSuite
Test finder class: com.sun.javatest.regtest.config.RegressionTestFinder
2022-07-08T04:47:30-0400 Test starting: sun/security/x509/X509CertImpl/CertificateValidation.java
2022-07-08T04:47:30-0400 Test finished: sun/security/x509/X509CertImpl/CertificateValidation.java: Passed. Execution successful
2022-07-08T04:47:30-0400 Test starting: sun/security/x509/X509CertImpl/ECSigParamsVerifyWithCert.java
2022-07-08T04:47:31-0400 Test finished: sun/security/x509/X509CertImpl/ECSigParamsVerifyWithCert.java: Passed. Execution successful
2022-07-08T04:47:31-0400 Test starting: sun/security/x509/X509CertImpl/GetFingerprintError.java
2022-07-08T04:47:31-0400 Test finished: sun/security/x509/X509CertImpl/GetFingerprintError.java: Passed. Execution successful
2022-07-08T04:47:31-0400 Test starting: sun/security/x509/X509CertImpl/JDK8283082.java
2022-07-08T04:47:31-0400 Test finished: sun/security/x509/X509CertImpl/JDK8283082.java: Failed. Execution failed: `main' threw exception: java.lang.NullPointerException: Cannot invoke "sun.security.x509.X509CertInfo.set(String, Object)" because "this.info" is null
2022-07-08T04:47:31-0400 Test starting: sun/security/x509/X509CertImpl/V3Certificate.java
2022-07-08T04:47:32-0400 Test finished: sun/security/x509/X509CertImpl/V3Certificate.java: Passed. Execution successful
2022-07-08T04:47:32-0400 Test starting: sun/security/x509/X509CertImpl/Verify.java
2022-07-08T04:47:32-0400 Test finished: sun/security/x509/X509CertImpl/Verify.java: Passed. Execution successful
2022-07-08T04:47:32-0400 Doing post-run cleanup
2022-07-08T04:47:32-0400 Completed: Some tests did not pass


After Patch:

jtreg/bin/jtreg -jdk:/root/jdk/build.8283082/linux-x86_64-server-release/images/jdk/ test/jdk/sun/security/x509/X509CertImpl/
Directory "JTwork" not found: creating
Directory "JTreport" not found: creating
Test results: passed: 6
Report written to /root/jdk/JTreport/html/report.html
Results written to /root/jdk/JTwork

# cat /root/jdk/JTwork/jtData/harness.trace
# Trace file started at 2022-07-08T04:44:58-0400
# JT Harness version 6.0
# class directory: /root/jdk/jtreg/lib/javatest.jar
# using java: /usr/lib/jvm/java-18-openjdk-18.0.1.0.10-1.rolling.fc36.x86_64
2022-07-08T04:44:58-0400 Starting tests.
Test suite class: com.sun.javatest.regtest.config.RegressionTestSuite
Test finder class: com.sun.javatest.regtest.config.RegressionTestFinder
2022-07-08T04:44:58-0400 Test starting: sun/security/x509/X509CertImpl/CertificateValidation.java
2022-07-08T04:44:59-0400 Test finished: sun/security/x509/X509CertImpl/CertificateValidation.java: Passed. Execution successful
2022-07-08T04:44:59-0400 Test starting: sun/security/x509/X509CertImpl/ECSigParamsVerifyWithCert.java
2022-07-08T04:45:00-0400 Test finished: sun/security/x509/X509CertImpl/ECSigParamsVerifyWithCert.java: Passed. Execution successful
2022-07-08T04:45:00-0400 Test starting: sun/security/x509/X509CertImpl/GetFingerprintError.java
2022-07-08T04:45:01-0400 Test finished: sun/security/x509/X509CertImpl/GetFingerprintError.java: Passed. Execution successful
2022-07-08T04:45:01-0400 Test starting: sun/security/x509/X509CertImpl/JDK8283082.java
2022-07-08T04:45:02-0400 Test finished: sun/security/x509/X509CertImpl/JDK8283082.java: Passed. Execution successful
2022-07-08T04:45:02-0400 Test starting: sun/security/x509/X509CertImpl/V3Certificate.java
2022-07-08T04:45:04-0400 Test finished: sun/security/x509/X509CertImpl/V3Certificate.java: Passed. Execution successful
2022-07-08T04:45:04-0400 Test starting: sun/security/x509/X509CertImpl/Verify.java
2022-07-08T04:45:05-0400 Test finished: sun/security/x509/X509CertImpl/Verify.java: Passed. Execution successful
2022-07-08T04:45:05-0400 Doing post-run cleanup
2022-07-08T04:45:05-0400 Completed: All tests passed


So, this confirms that our test case is exercising the changes and producing the right results.
Could you please have a look at the recent changes?

-------------

PR: https://git.openjdk.org/jdk/pull/9306



More information about the security-dev mailing list