[jdk17u-dev] RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v2]

Goetz Lindenmaier goetz at openjdk.org
Tue Mar 4 13:19:38 UTC 2025


> I backport this for parity with 17.0.16-oracle.
> 
> I had to resolve a hand full of files, but the conflicts are all
> trivial. Wasn't there the copyright change in SignerOrder.java
> I think it would be clean.
> 
> src/java.base/share/classes/sun/security/pkcs/SignerInfo.java
> src/java.base/share/classes/sun/security/pkcs10/PKCS10Attributes.java
> Removed import by hand.
> 
> src/java.base/share/classes/sun/security/util/DerEncoder.java
> Trivial resolve due to context
> 
> src/java.base/share/classes/sun/security/util/DerOutputStream.java
> Removed import by hand.
> 
> src/java.base/share/classes/sun/security/x509/BasicConstraintsExtension.java
> Resolved due to context.
> 
> src/java.base/share/classes/sun/security/x509/CRLExtensions.java
> Code formatted differently.
> 
> src/java.base/share/classes/sun/security/x509/CRLNumberExtension.java
> There is a dead variable in the context.
> 
> src/java.base/share/classes/sun/security/x509/CertificateIssuerExtension.java
> Copyright.
> 
> src/java.base/share/classes/sun/security/x509/DeltaCRLIndicatorExtension.java
> There is a dead variable in the context.
> 
> src/java.base/share/classes/sun/security/x509/Extension.java
> A bit more complex, but straight forward to resolve.
> 
> src/java.base/share/classes/sun/security/x509/FreshestCRLExtension.java
> Resolve imports.
> 
> src/java.base/share/classes/sun/security/x509/InvalidityDateExtension.java
> src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java
> test/jdk/sun/security/pkcs/pkcs7/SignerOrder.java
> Copyright
> 
> A follow up is needed: [JDK-8296167](https://bugs.openjdk.org/browse/JDK-8296167). It is included
> here.
> 
> I ran all of the following tests, and they pass:
> test/jdk/sun/security/
> 
> I had a look at the related issues.
> All of them were pushed after this change.
> Some are clear cleanups, marked as enhancements. Others
> are labeled as bug, but as I understand they are not
> caused by this change, so they aren't required follow ups.
> They rather are deficiencies of the previous implementation
> and fixing them depended on this change, so they could all
> be finished after pushing this.  In detail:
> 
> Bug JDK-8297723 asn1Encode methods in Kerberos throw IOException and Asn1Exception
>  Cleanup of exceptions. Not yet fixed. No issue for 17, omit.
> Bug JDK-8296736 Some PKCS9Attribute can be created but cannot be encoded
>   This looks like a useful bugfix, but I don't think it is directly related.
>   It was opened and fixed right after this change here.
> Bug JDK-8296741 Illegal X400Address and EDIPartyName should not be ...

Goetz Lindenmaier has updated the pull request incrementally with one additional commit since the last revision:

  Fix Coyright.

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

Changes:
  - all: https://git.openjdk.org/jdk17u-dev/pull/3313/files
  - new: https://git.openjdk.org/jdk17u-dev/pull/3313/files/12cbcb17..c7611971

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3313&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3313&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/3313.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3313/head:pull/3313

PR: https://git.openjdk.org/jdk17u-dev/pull/3313


More information about the jdk-updates-dev mailing list