mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02: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:
parent
534e3ba01c
commit
c05424b947
19 changed files with 242 additions and 165 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue