mirror of
https://github.com/google/nomulus
synced 2026-01-04 04:04:22 +00:00
Remove registrar certificate state dead code
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130418304
This commit is contained in:
@@ -21,7 +21,6 @@ import static com.google.common.base.Predicates.equalTo;
|
||||
import static com.google.common.base.Predicates.in;
|
||||
import static com.google.common.base.Predicates.notNull;
|
||||
import static com.google.common.base.Strings.emptyToNull;
|
||||
import static com.google.common.base.Strings.isNullOrEmpty;
|
||||
import static com.google.common.base.Strings.nullToEmpty;
|
||||
import static com.google.common.collect.Sets.immutableEnumSet;
|
||||
import static com.google.common.io.BaseEncoding.base64;
|
||||
@@ -162,10 +161,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||
|
||||
private static final RegistryEnvironment ENVIRONMENT = RegistryEnvironment.get();
|
||||
|
||||
/** Reports the type of data on file re: registrar certificates (full cert, hash only, none). */
|
||||
// Note: May be unnecessary, pending a conversation on how to best report on this data.
|
||||
public enum CertificateState { NONE, CERTIFICATE_HASH, CERTIFICATE }
|
||||
|
||||
/** Regex for E.164 phone number format specified by {@code contact.xsd}. */
|
||||
private static final Pattern E164_PATTERN = Pattern.compile("\\+[0-9]{1,3}\\.[0-9]{1,14}");
|
||||
|
||||
@@ -407,16 +402,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||
return ACTIVE_STATES.contains(state) && PUBLICLY_VISIBLE_TYPES.contains(type);
|
||||
}
|
||||
|
||||
public CertificateState getCertificateState() {
|
||||
if (!isNullOrEmpty(clientCertificate)) {
|
||||
return CertificateState.CERTIFICATE;
|
||||
} else if (!isNullOrEmpty(clientCertificateHash)) {
|
||||
return CertificateState.CERTIFICATE_HASH;
|
||||
} else {
|
||||
return CertificateState.NONE;
|
||||
}
|
||||
}
|
||||
|
||||
public String getClientCertificate() {
|
||||
return clientCertificate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user