Skip to content

Commit

Permalink
[RELEASE] iText 8.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
iText-CI committed Jul 12, 2024
2 parents e46013d + 7269b01 commit fc287bc
Show file tree
Hide file tree
Showing 618 changed files with 21,586 additions and 3,602 deletions.
2 changes: 1 addition & 1 deletion barcodes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.4</version>
<version>8.0.5</version>
</parent>

<artifactId>barcodes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bouncy-castle-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.4</version>
<version>8.0.5</version>
</parent>

<artifactId>bouncy-castle-adapter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,18 @@ public IExtensions createExtensions(IExtension extension) {
return new ExtensionsBC(extension);
}

/**
* {@inheritDoc}
*/
@Override
public IExtensions createExtensions(IExtension[] extensions) {
Extension[] exts = new Extension[extensions.length];
for (int i = 0; i < extensions.length; ++i) {
exts[i] = ((ExtensionBC) extensions[i]).getExtension();
}
return new ExtensionsBC(new Extensions(exts));
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -1468,6 +1480,14 @@ public IASN1GeneralizedTime createASN1GeneralizedTime(IASN1Encodable encodable)
return null;
}

/**
* {@inheritDoc}
*/
@Override
public IASN1GeneralizedTime createASN1GeneralizedTime(Date date) {
return new ASN1GeneralizedTimeBC(new ASN1GeneralizedTime(date));
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ This file is part of the iText (R) project.

import org.bouncycastle.asn1.ASN1GeneralizedTime;

import java.text.ParseException;
import java.util.Date;

/**
* Wrapper class for {@link ASN1GeneralizedTime}.
*/
Expand All @@ -47,4 +50,16 @@ public ASN1GeneralizedTimeBC(ASN1GeneralizedTime asn1GeneralizedTime) {
public ASN1GeneralizedTime getASN1GeneralizedTime() {
return (ASN1GeneralizedTime) getEncodable();
}

/**
* {@inheritDoc}
*
* @return {@inheritDoc}
*
* @throws ParseException {@inheritDoc}
*/
@Override
public Date getDate() throws ParseException {
return getASN1GeneralizedTime().getDate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public class OCSPObjectIdentifiersBC implements IOCSPObjectIdentifiers {
private static final IASN1ObjectIdentifier ID_PKIX_OCSP_NOCHECK =
new ASN1ObjectIdentifierBC(OCSPObjectIdentifiers.id_pkix_ocsp_nocheck);

private static final IASN1ObjectIdentifier ID_PKIX_OCSP_ARCHIVE_CUTOFF =
new ASN1ObjectIdentifierBC(OCSPObjectIdentifiers.id_pkix_ocsp_archive_cutoff);

private final OCSPObjectIdentifiers ocspObjectIdentifiers;

/**
Expand Down Expand Up @@ -97,6 +100,14 @@ public IASN1ObjectIdentifier getIdPkixOcspNoCheck() {
return ID_PKIX_OCSP_NOCHECK;
}

/**
* {@inheritDoc}
*/
@Override
public IASN1ObjectIdentifier getIdPkixOcspArchiveCutoff() {
return ID_PKIX_OCSP_ARCHIVE_CUTOFF;
}

/**
* Indicates whether some other object is "equal to" this one. Compares wrapped objects.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public class ExtensionBC extends ASN1EncodableBC implements IExtension {
private static final ASN1ObjectIdentifierBC SUBJECT_KEY_IDENTIFIER =
new ASN1ObjectIdentifierBC(Extension.subjectKeyIdentifier);

private static final IASN1ObjectIdentifier EXPIRED_CERTS_ON_CRL =
new ASN1ObjectIdentifierBC(Extension.expiredCertsOnCRL);

/**
* Creates new wrapper instance for {@link Extension}.
*
Expand Down Expand Up @@ -149,4 +152,12 @@ public IASN1ObjectIdentifier getAuthorityKeyIdentifier() {
public IASN1ObjectIdentifier getSubjectKeyIdentifier() {
return SUBJECT_KEY_IDENTIFIER;
}

/**
* {@inheritDoc}
*/
@Override
public IASN1ObjectIdentifier getExpiredCertsOnCRL() {
return EXPIRED_CERTS_ON_CRL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ This file is part of the iText (R) project.
*/
package com.itextpdf.bouncycastle.cert.ocsp;

import com.itextpdf.bouncycastle.asn1.ASN1EncodableBC;
import com.itextpdf.bouncycastle.asn1.ASN1ObjectIdentifierBC;
import com.itextpdf.bouncycastle.cert.X509CertificateHolderBC;
import com.itextpdf.bouncycastle.operator.ContentVerifierProviderBC;
import com.itextpdf.commons.bouncycastle.asn1.IASN1Encodable;
import com.itextpdf.commons.bouncycastle.asn1.IASN1ObjectIdentifier;
import com.itextpdf.commons.bouncycastle.cert.IX509CertificateHolder;
import com.itextpdf.commons.bouncycastle.cert.ocsp.IBasicOCSPResp;
import com.itextpdf.commons.bouncycastle.cert.ocsp.ISingleResp;
Expand All @@ -32,6 +36,8 @@ This file is part of the iText (R) project.
import java.io.IOException;
import java.util.Date;
import java.util.Objects;

import org.bouncycastle.asn1.x509.Extension;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cert.ocsp.BasicOCSPResp;
import org.bouncycastle.cert.ocsp.OCSPException;
Expand Down Expand Up @@ -119,6 +125,16 @@ public Date getProducedAt() {
return basicOCSPResp.getProducedAt();
}

/**
* {@inheritDoc}
*/
@Override
public IASN1Encodable getExtensionParsedValue(IASN1ObjectIdentifier objectIdentifier) {
Extension extension =
basicOCSPResp.getExtension(((ASN1ObjectIdentifierBC) objectIdentifier).getASN1ObjectIdentifier());
return new ASN1EncodableBC(extension == null ? null : extension.getParsedValue());
}

/**
* Indicates whether some other object is "equal to" this one. Compares wrapped objects.
*/
Expand Down
2 changes: 1 addition & 1 deletion bouncy-castle-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.4</version>
<version>8.0.5</version>
</parent>

<artifactId>bouncy-castle-connector</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ public IExtensions createExtensions(IExtension extension) {
throw new UnsupportedOperationException(BouncyCastleLogMessageConstant.BOUNCY_CASTLE_DEPENDENCY_MUST_PRESENT);
}

@Override
public IExtensions createExtensions(IExtension[] extension) {
throw new UnsupportedOperationException(BouncyCastleLogMessageConstant.BOUNCY_CASTLE_DEPENDENCY_MUST_PRESENT);
}

@Override
public IExtensions createNullExtensions() {
throw new UnsupportedOperationException(BouncyCastleLogMessageConstant.BOUNCY_CASTLE_DEPENDENCY_MUST_PRESENT);
Expand Down Expand Up @@ -773,6 +778,11 @@ public IASN1GeneralizedTime createASN1GeneralizedTime(IASN1Encodable encodable)
throw new UnsupportedOperationException(BouncyCastleLogMessageConstant.BOUNCY_CASTLE_DEPENDENCY_MUST_PRESENT);
}

@Override
public IASN1GeneralizedTime createASN1GeneralizedTime(Date date) {
throw new UnsupportedOperationException(BouncyCastleLogMessageConstant.BOUNCY_CASTLE_DEPENDENCY_MUST_PRESENT);
}

@Override
public IASN1UTCTime createASN1UTCTime(IASN1Encodable encodable) {
throw new UnsupportedOperationException(BouncyCastleLogMessageConstant.BOUNCY_CASTLE_DEPENDENCY_MUST_PRESENT);
Expand Down
2 changes: 1 addition & 1 deletion bouncy-castle-fips-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.4</version>
<version>8.0.5</version>
</parent>

<artifactId>bouncy-castle-fips-adapter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,18 @@ public IExtensions createExtensions(IExtension extension) {
return new ExtensionsBCFips(extension);
}

/**
* {@inheritDoc}
*/
@Override
public IExtensions createExtensions(IExtension[] extensions) {
Extension[] exts = new Extension[extensions.length];
for (int i = 0; i < extensions.length; ++i) {
exts[i] = ((ExtensionBCFips) extensions[i]).getExtension();
}
return new ExtensionsBCFips(new Extensions(exts));
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -1478,6 +1490,14 @@ public IASN1GeneralizedTime createASN1GeneralizedTime(IASN1Encodable encodable)
return null;
}

/**
* {@inheritDoc}
*/
@Override
public IASN1GeneralizedTime createASN1GeneralizedTime(Date date) {
return new ASN1GeneralizedTimeBCFips(new ASN1GeneralizedTime(date));
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ This file is part of the iText (R) project.

import org.bouncycastle.asn1.ASN1GeneralizedTime;

import java.text.ParseException;
import java.util.Date;

/**
* Wrapper class for {@link ASN1GeneralizedTime}.
*/
Expand All @@ -47,4 +50,16 @@ public ASN1GeneralizedTimeBCFips(ASN1GeneralizedTime asn1GeneralizedTime) {
public ASN1GeneralizedTime getASN1GeneralizedTime() {
return (ASN1GeneralizedTime) getEncodable();
}

/**
* {@inheritDoc}
*
* @return {@inheritDoc}
*
* @throws ParseException {@inheritDoc}
*/
@Override
public Date getDate() throws ParseException {
return getASN1GeneralizedTime().getDate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ public class OCSPObjectIdentifiersBCFips implements IOCSPObjectIdentifiers {
private static final IASN1ObjectIdentifier ID_PKIX_OCSP_NONCE =
new ASN1ObjectIdentifierBCFips(OCSPObjectIdentifiers.id_pkix_ocsp_nonce);


private static final IASN1ObjectIdentifier ID_PKIX_OCSP_NOCHECK =
new ASN1ObjectIdentifierBCFips(OCSPObjectIdentifiers.id_pkix_ocsp_nocheck);

private static final IASN1ObjectIdentifier ID_PKIX_OCSP_ARCHIVE_CUTOFF =
new ASN1ObjectIdentifierBCFips(OCSPObjectIdentifiers.id_pkix_ocsp_archive_cutoff);

private final OCSPObjectIdentifiers ocspObjectIdentifiers;

/**
Expand Down Expand Up @@ -98,6 +100,14 @@ public IASN1ObjectIdentifier getIdPkixOcspNoCheck() {
return ID_PKIX_OCSP_NOCHECK;
}

/**
* {@inheritDoc}
*/
@Override
public IASN1ObjectIdentifier getIdPkixOcspArchiveCutoff() {
return ID_PKIX_OCSP_ARCHIVE_CUTOFF;
}

/**
* Indicates whether some other object is "equal to" this one. Compares wrapped objects.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public class ExtensionBCFips extends ASN1EncodableBCFips implements IExtension {
private static final ASN1ObjectIdentifierBCFips SUBJECT_KEY_IDENTIFIER =
new ASN1ObjectIdentifierBCFips(Extension.subjectKeyIdentifier);

private static final IASN1ObjectIdentifier EXPIRED_CERTS_ON_CRL =
new ASN1ObjectIdentifierBCFips(Extension.expiredCertsOnCRL);

/**
* Creates new wrapper instance for {@link Extension}.
*
Expand Down Expand Up @@ -149,4 +152,12 @@ public IASN1ObjectIdentifier getAuthorityKeyIdentifier() {
public IASN1ObjectIdentifier getSubjectKeyIdentifier() {
return SUBJECT_KEY_IDENTIFIER;
}

/**
* {@inheritDoc}
*/
@Override
public IASN1ObjectIdentifier getExpiredCertsOnCRL() {
return EXPIRED_CERTS_ON_CRL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ This file is part of the iText (R) project.
*/
package com.itextpdf.bouncycastlefips.cert.ocsp;

import com.itextpdf.bouncycastlefips.asn1.ASN1EncodableBCFips;
import com.itextpdf.bouncycastlefips.asn1.ASN1ObjectIdentifierBCFips;
import com.itextpdf.bouncycastlefips.cert.X509CertificateHolderBCFips;
import com.itextpdf.bouncycastlefips.operator.ContentVerifierProviderBCFips;
import com.itextpdf.commons.bouncycastle.asn1.IASN1Encodable;
import com.itextpdf.commons.bouncycastle.asn1.IASN1ObjectIdentifier;
import com.itextpdf.commons.bouncycastle.cert.IX509CertificateHolder;
import com.itextpdf.commons.bouncycastle.cert.ocsp.IBasicOCSPResp;
import com.itextpdf.commons.bouncycastle.cert.ocsp.ISingleResp;
Expand All @@ -32,6 +36,8 @@ This file is part of the iText (R) project.
import java.io.IOException;
import java.util.Date;
import java.util.Objects;

import org.bouncycastle.asn1.x509.Extension;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cert.ocsp.BasicOCSPResp;
import org.bouncycastle.cert.ocsp.OCSPException;
Expand Down Expand Up @@ -118,6 +124,16 @@ public Date getProducedAt() {
return basicOCSPResp.getProducedAt();
}

/**
* {@inheritDoc}
*/
@Override
public IASN1Encodable getExtensionParsedValue(IASN1ObjectIdentifier objectIdentifier) {
Extension extension =
basicOCSPResp.getExtension(((ASN1ObjectIdentifierBCFips) objectIdentifier).getASN1ObjectIdentifier());
return new ASN1EncodableBCFips(extension == null ? null : extension.getParsedValue());
}

/**
* Indicates whether some other object is "equal to" this one. Compares wrapped objects.
*/
Expand Down
4 changes: 2 additions & 2 deletions commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.4</version>
<version>8.0.5</version>
</parent>

<artifactId>commons</artifactId>
Expand All @@ -14,7 +14,7 @@
<url>https://itextpdf.com/</url>

<properties>
<jackson.core.version>2.16.1</jackson.core.version>
<jackson.core.version>2.17.0</jackson.core.version>
<sonar.coverage.exclusions>**/com/itextpdf/commons/bouncycastle/**</sonar.coverage.exclusions>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This file is part of the iText (R) project.
public final class CommonsProductData {
static final String COMMONS_PUBLIC_PRODUCT_NAME = "Commons";
static final String COMMONS_PRODUCT_NAME = "commons";
static final String COMMONS_VERSION = "8.0.4";
static final String COMMONS_VERSION = "8.0.5";
static final String MINIMAL_COMPATIBLE_LICENSEKEY_VERSION = "4.1.0";
static final int COMMONS_COPYRIGHT_SINCE = 2000;
static final int COMMONS_COPYRIGHT_TO = 2024;
Expand Down
Loading

0 comments on commit fc287bc

Please sign in to comment.