CRL TBSCertList lacks generics type parameter
cryptearth <[email protected]> Thu, 11 Jul 2019 18:03:46 +0200
| Newsgroups | gmane.comp.encryption.bouncy-castle.devel |
|---|---|
| Message-ID | <[email protected]> |
Hey there, Matt here. org.bouncycastle.asn1.x509.TBSCertList.getRevokedCertificateEnumeration() only returns raw-type Enumeration. To comply common practice and to match return type of getRevokedCertificates() enum should have generic type TBSCertList.CRLEntry. Using Enumeration<TBSCertList.CRLEntry> entryList=tbsCertList.getRevokedCertificateEnumeration(); causes compiler warning: D:\data\java>javac -Xlint:unchecked de\cryptearth\crypto\pki\Helper.java de\cryptearth\crypto\pki\Helper.java:173: warning: [unchecked] unchecked conversion Enumeration<TBSCertList.CRLEntry> entryList=tbsCertList.getRevokedCertificateEnumeration(); ^ required: Enumeration<CRLEntry> found: Enumeration 1 warning TBSCertList.java lines 106 and 127 should corrected to "implements Enumeration<TBSCertList.CRLEntry>". Matt