diff --git a/src/main/java/net/ripe/rpki/rsyncit/rrdp/RrdpFetcher.java b/src/main/java/net/ripe/rpki/rsyncit/rrdp/RrdpFetcher.java index c5dfbe9..0e5f24c 100644 --- a/src/main/java/net/ripe/rpki/rsyncit/rrdp/RrdpFetcher.java +++ b/src/main/java/net/ripe/rpki/rsyncit/rrdp/RrdpFetcher.java @@ -3,6 +3,7 @@ import com.google.common.annotations.VisibleForTesting; import lombok.Getter; import lombok.extern.slf4j.Slf4j; +import net.ripe.rpki.commons.crypto.cms.GenericRpkiSignedObjectParser; import net.ripe.rpki.commons.crypto.cms.RpkiSignedObject; import net.ripe.rpki.commons.crypto.cms.RpkiSignedObjectParser; import net.ripe.rpki.commons.crypto.crl.X509Crl; @@ -289,14 +290,10 @@ private Instant getTimestampForObject(final String objectUri, final byte[] decod case Aspa: case Roa: case Gbr: - var signedObjectParser = new RpkiSignedObjectParser() { - public DateTime getPublicSigningTime() { - return getSigningTime(); - } - }; + var signedObjectParser = new GenericRpkiSignedObjectParser(); signedObjectParser.parse(ValidationResult.withLocation(objectUri), decoded); - yield Instant.ofEpochMilli(signedObjectParser.getPublicSigningTime().getMillis()); + yield Instant.ofEpochMilli(signedObjectParser.getSigningTime().getMillis()); case Certificate: X509ResourceCertificateParser x509CertificateParser = new X509ResourceCertificateParser(); x509CertificateParser.parse(ValidationResult.withLocation(objectUri), decoded);