From 7aad1e18fef7b33ae42d24d9474fc51e35fe6332 Mon Sep 17 00:00:00 2001 From: Ties de Kock Date: Mon, 9 Oct 2023 09:02:55 +0200 Subject: [PATCH] Use the generic parser from rpki-commons 1.35 --- .../java/net/ripe/rpki/rsyncit/rrdp/RrdpFetcher.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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);