Package net.ripe.rpki.commons.crypto.cms
Class RpkiSignedObjectParser
- java.lang.Object
-
- net.ripe.rpki.commons.crypto.cms.RpkiSignedObjectParser
-
- Direct Known Subclasses:
AspaCmsParser,GenericRpkiSignedObjectParser,GhostbustersCmsParser,ManifestCmsParser,RoaCmsParser
public abstract class RpkiSignedObjectParser extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.bouncycastle.asn1.ASN1ObjectIdentifiercontentType
-
Constructor Summary
Constructors Constructor Description RpkiSignedObjectParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecodeAsn1Content(org.bouncycastle.asn1.ASN1Encodable content)voiddecodeRawContent(InputStream content)protected X509ResourceCertificategetCertificate()protected org.bouncycastle.asn1.ASN1ObjectIdentifiergetContentType()protected byte[]getEncoded()protected X509ResourceCertificategetResourceCertificate()protected org.joda.time.DateTimegetSigningTime()protected static Optional<BigInteger>getTaggedVersion(int tagNo, org.bouncycastle.asn1.ASN1Sequence seq)Parse the version field in a signed object.ValidationResultgetValidationResult()voidparse(String location, byte[] encoded)voidparse(ValidationResult result, byte[] encoded)protected voidparseContent(org.bouncycastle.cms.CMSSignedDataParser sp)
-
-
-
Method Detail
-
parse
public final void parse(String location, byte[] encoded)
-
parse
public void parse(ValidationResult result, byte[] encoded)
-
getEncoded
protected byte[] getEncoded()
-
getValidationResult
public ValidationResult getValidationResult()
-
getCertificate
protected X509ResourceCertificate getCertificate()
-
getResourceCertificate
protected X509ResourceCertificate getResourceCertificate()
-
getContentType
protected org.bouncycastle.asn1.ASN1ObjectIdentifier getContentType()
-
getSigningTime
protected org.joda.time.DateTime getSigningTime()
-
decodeRawContent
public void decodeRawContent(InputStream content) throws IOException
- Throws:
IOException
-
decodeAsn1Content
public void decodeAsn1Content(org.bouncycastle.asn1.ASN1Encodable content)
-
parseContent
protected void parseContent(org.bouncycastle.cms.CMSSignedDataParser sp)
-
getTaggedVersion
protected static Optional<BigInteger> getTaggedVersion(int tagNo, org.bouncycastle.asn1.ASN1Sequence seq) throws IllegalAsn1StructureException
Parse the version field in a signed object. By convention, the version is the first field in the sequence, and it is explicitly tagged.- Parameters:
tagNo- tag numberseq- sequence of content- Returns:
- version number if present, empty otherwise.
- Throws:
IllegalAsn1StructureException
-
-