@@ -81,8 +81,10 @@ This file is part of the iText (R) project.
81
81
import com .itextpdf .bouncycastle .asn1 .x509 .ExtensionsBC ;
82
82
import com .itextpdf .bouncycastle .asn1 .x509 .GeneralNameBC ;
83
83
import com .itextpdf .bouncycastle .asn1 .x509 .GeneralNamesBC ;
84
+ import com .itextpdf .bouncycastle .asn1 .x509 .IssuingDistributionPointBC ;
84
85
import com .itextpdf .bouncycastle .asn1 .x509 .KeyPurposeIdBC ;
85
86
import com .itextpdf .bouncycastle .asn1 .x509 .KeyUsageBC ;
87
+ import com .itextpdf .bouncycastle .asn1 .x509 .ReasonFlagsBC ;
86
88
import com .itextpdf .bouncycastle .asn1 .x509 .SubjectPublicKeyInfoBC ;
87
89
import com .itextpdf .bouncycastle .asn1 .x509 .TBSCertificateBC ;
88
90
import com .itextpdf .bouncycastle .asn1 .x509 .TimeBC ;
@@ -186,8 +188,10 @@ This file is part of the iText (R) project.
186
188
import com .itextpdf .commons .bouncycastle .asn1 .x509 .IExtensions ;
187
189
import com .itextpdf .commons .bouncycastle .asn1 .x509 .IGeneralName ;
188
190
import com .itextpdf .commons .bouncycastle .asn1 .x509 .IGeneralNames ;
191
+ import com .itextpdf .commons .bouncycastle .asn1 .x509 .IIssuingDistributionPoint ;
189
192
import com .itextpdf .commons .bouncycastle .asn1 .x509 .IKeyPurposeId ;
190
193
import com .itextpdf .commons .bouncycastle .asn1 .x509 .IKeyUsage ;
194
+ import com .itextpdf .commons .bouncycastle .asn1 .x509 .IReasonFlags ;
191
195
import com .itextpdf .commons .bouncycastle .asn1 .x509 .ISubjectPublicKeyInfo ;
192
196
import com .itextpdf .commons .bouncycastle .asn1 .x509 .ITBSCertificate ;
193
197
import com .itextpdf .commons .bouncycastle .asn1 .x509 .ITime ;
@@ -282,10 +286,14 @@ This file is part of the iText (R) project.
282
286
import org .bouncycastle .asn1 .x509 .AlgorithmIdentifier ;
283
287
import org .bouncycastle .asn1 .x509 .BasicConstraints ;
284
288
import org .bouncycastle .asn1 .x509 .CRLDistPoint ;
289
+ import org .bouncycastle .asn1 .x509 .DistributionPointName ;
285
290
import org .bouncycastle .asn1 .x509 .Extension ;
286
291
import org .bouncycastle .asn1 .x509 .Extensions ;
287
292
import org .bouncycastle .asn1 .x509 .GeneralNames ;
293
+ import org .bouncycastle .asn1 .x509 .IssuingDistributionPoint ;
294
+ import org .bouncycastle .asn1 .x509 .KeyPurposeId ;
288
295
import org .bouncycastle .asn1 .x509 .KeyUsage ;
296
+ import org .bouncycastle .asn1 .x509 .ReasonFlags ;
289
297
import org .bouncycastle .asn1 .x509 .TBSCertificate ;
290
298
import org .bouncycastle .asn1 .x509 .Time ;
291
299
import org .bouncycastle .cert .jcajce .JcaCertStore ;
@@ -1196,6 +1204,38 @@ public ICRLDistPoint createCRLDistPoint(Object object) {
1196
1204
((ASN1EncodableBC ) object ).getEncodable () : object ));
1197
1205
}
1198
1206
1207
+ /**
1208
+ * {@inheritDoc}
1209
+ */
1210
+ @ Override
1211
+ public IIssuingDistributionPoint createIssuingDistributionPoint (Object point ) {
1212
+ return new IssuingDistributionPointBC (IssuingDistributionPoint .getInstance (point instanceof ASN1EncodableBC ?
1213
+ ((ASN1EncodableBC ) point ).getEncodable () : point ));
1214
+ }
1215
+
1216
+ /**
1217
+ * {@inheritDoc}
1218
+ */
1219
+ @ Override
1220
+ public IIssuingDistributionPoint createIssuingDistributionPoint (IDistributionPointName distributionPoint ,
1221
+ boolean onlyContainsUserCerts ,
1222
+ boolean onlyContainsCACerts ,
1223
+ IReasonFlags onlySomeReasons , boolean indirectCRL ,
1224
+ boolean onlyContainsAttributeCerts ) {
1225
+ return new IssuingDistributionPointBC (new IssuingDistributionPoint (distributionPoint == null ? null :
1226
+ ((DistributionPointNameBC ) distributionPoint ).getDistributionPointName (), onlyContainsUserCerts ,
1227
+ onlyContainsCACerts , onlySomeReasons == null ? null :
1228
+ ((ReasonFlagsBC ) onlySomeReasons ).getReasonFlags (), indirectCRL , onlyContainsAttributeCerts ));
1229
+ }
1230
+
1231
+ /**
1232
+ * {@inheritDoc}
1233
+ */
1234
+ @ Override
1235
+ public IReasonFlags createReasonFlags (int reasons ) {
1236
+ return new ReasonFlagsBC (new ReasonFlags (reasons ));
1237
+ }
1238
+
1199
1239
/**
1200
1240
* {@inheritDoc}
1201
1241
*/
@@ -1204,6 +1244,14 @@ public IDistributionPointName createDistributionPointName() {
1204
1244
return DistributionPointNameBC .getInstance ();
1205
1245
}
1206
1246
1247
+ /**
1248
+ * {@inheritDoc}
1249
+ */
1250
+ @ Override
1251
+ public IDistributionPointName createDistributionPointName (IGeneralNames generalNames ) {
1252
+ return new DistributionPointNameBC (new DistributionPointName (((GeneralNamesBC )generalNames ).getGeneralNames ()));
1253
+ }
1254
+
1207
1255
/**
1208
1256
* {@inheritDoc}
1209
1257
*/
@@ -1558,6 +1606,14 @@ public IBasicConstraints createBasicConstraints(boolean b) {
1558
1606
return new BasicConstraintsBC (new BasicConstraints (b ));
1559
1607
}
1560
1608
1609
+ /**
1610
+ * {@inheritDoc}
1611
+ */
1612
+ @ Override
1613
+ public IBasicConstraints createBasicConstraints (int pathLength ) {
1614
+ return new BasicConstraintsBC (new BasicConstraints (pathLength ));
1615
+ }
1616
+
1561
1617
/**
1562
1618
* {@inheritDoc}
1563
1619
*/
@@ -1582,6 +1638,15 @@ public IKeyPurposeId createKeyPurposeId() {
1582
1638
return KeyPurposeIdBC .getInstance ();
1583
1639
}
1584
1640
1641
+ /**
1642
+ * {@inheritDoc}
1643
+ */
1644
+ @ Override
1645
+ public IKeyPurposeId createKeyPurposeId (IASN1ObjectIdentifier objectIdentifier ) {
1646
+ return new KeyPurposeIdBC (KeyPurposeId .getInstance (
1647
+ ((ASN1ObjectIdentifierBC ) objectIdentifier ).getASN1ObjectIdentifier ()));
1648
+ }
1649
+
1585
1650
/**
1586
1651
* {@inheritDoc}
1587
1652
*/
@@ -1590,6 +1655,14 @@ public IExtendedKeyUsage createExtendedKeyUsage(IKeyPurposeId purposeId) {
1590
1655
return new ExtendedKeyUsageBC (purposeId );
1591
1656
}
1592
1657
1658
+ /**
1659
+ * {@inheritDoc}
1660
+ */
1661
+ @ Override
1662
+ public IExtendedKeyUsage createExtendedKeyUsage (IKeyPurposeId [] purposeIds ) {
1663
+ return new ExtendedKeyUsageBC (purposeIds );
1664
+ }
1665
+
1593
1666
/**
1594
1667
* {@inheritDoc}
1595
1668
*/
@@ -1697,6 +1770,14 @@ public ITime createTime(Date date) {
1697
1770
return new TimeBC (new Time (date ));
1698
1771
}
1699
1772
1773
+ /**
1774
+ * {@inheritDoc}
1775
+ */
1776
+ @ Override
1777
+ public ITime createEndDate (X509Certificate certificate ) {
1778
+ return createTime (certificate .getNotAfter ());
1779
+ }
1780
+
1700
1781
/**
1701
1782
* {@inheritDoc}
1702
1783
*/
0 commit comments