1
0
mirror of https://github.com/google/nomulus synced 2026-01-08 07:11:44 +00:00

Daggerize TMCH/signed mark util classes

This allows them to support injectable configuration.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143709052
This commit is contained in:
mcilwain
2017-01-05 14:26:18 -08:00
committed by Ben McIlwain
parent 534e3ba01c
commit c05424b947
19 changed files with 242 additions and 165 deletions

View File

@@ -48,7 +48,12 @@ import org.xml.sax.SAXException;
/** TMCH utility functions for domain flows. */
public final class DomainFlowTmchUtils {
@Inject public DomainFlowTmchUtils() {}
private final TmchXmlSignature tmchXmlSignature;
@Inject
public DomainFlowTmchUtils(TmchXmlSignature tmchXmlSignature) {
this.tmchXmlSignature = tmchXmlSignature;
}
public SignedMark verifySignedMarks(
ImmutableList<AbstractSignedMark> signedMarks, String domainLabel, DateTime now)
@@ -86,7 +91,7 @@ public final class DomainFlowTmchUtils {
}
try {
TmchXmlSignature.verify(signedMarkData);
tmchXmlSignature.verify(signedMarkData);
} catch (CertificateExpiredException e) {
throw new SignedMarkCertificateExpiredException();
} catch (CertificateNotYetValidException e) {