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

Weijun Wang weijun at openjdk.org
Tue Jun 28 13:21:41 UTC 2022


On Tue, 28 Jun 2022 08:33:58 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

src/java.base/share/classes/sun/security/x509/X509CertImpl.java line 742:

> 740: 
> 741:         if (id.equalsIgnoreCase(INFO)) {
> 742:             if (!(attr.getSuffix() != null)) {

You can simply update the `!=` to `==`.

Also, please add a regression test. Since this is about testing an internal method, you are free to add `@modules java.base/sun.security.x509` to access it.

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

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


More information about the security-dev mailing list