mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +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
|
@ -31,14 +31,16 @@ public final class TmchCrlAction implements Runnable {
|
|||
|
||||
@Inject Marksdb marksdb;
|
||||
@Inject @Config("tmchCrlUrl") URL tmchCrlUrl;
|
||||
@Inject TmchCertificateAuthority tmchCertificateAuthority;
|
||||
@Inject TmchCrlAction() {}
|
||||
|
||||
/** Synchronously fetches latest ICANN TMCH CRL and saves it to datastore. */
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
TmchCertificateAuthority
|
||||
.updateCrl(new String(marksdb.fetch(tmchCrlUrl, Optional.<String>absent()), UTF_8));
|
||||
tmchCertificateAuthority.updateCrl(
|
||||
new String(marksdb.fetch(tmchCrlUrl, Optional.<String>absent()), UTF_8),
|
||||
tmchCrlUrl.toString());
|
||||
} catch (IOException | GeneralSecurityException e) {
|
||||
throw new RuntimeException("Failed to update ICANN TMCH CRL.", e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue