mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Fix a few stylistic issues in preparation for Checkstyle addition
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=230524735
This commit is contained in:
parent
2c2b1da836
commit
701ebc6a28
8 changed files with 25 additions and 13 deletions
|
@ -84,7 +84,7 @@ public class RestoreCommitLogsAction implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
checkArgument( // safety
|
||||
checkArgument(
|
||||
RegistryEnvironment.get() == RegistryEnvironment.ALPHA
|
||||
|| RegistryEnvironment.get() == RegistryEnvironment.CRASH
|
||||
|| RegistryEnvironment.get() == RegistryEnvironment.UNITTEST,
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
package google.registry.keyring;
|
||||
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
|
|
|
@ -160,9 +160,8 @@ public class RequestAuthenticator {
|
|||
for (AuthMethod authMethod : auth.methods()) {
|
||||
switch (authMethod) {
|
||||
// App Engine internal authentication, using the queue name header
|
||||
case INTERNAL:
|
||||
case INTERNAL: {
|
||||
// checkAuthConfig will have insured that the user policy is not USER.
|
||||
{
|
||||
AuthResult authResult = appEngineInternalAuthenticationMechanism.authenticate(req);
|
||||
if (authResult.isAuthenticated()) {
|
||||
logger.atInfo().log("Authenticated via internal auth: %s", authResult);
|
||||
|
|
|
@ -185,7 +185,7 @@ final class RegistrarContactCommand extends MutatingCommand {
|
|||
case CREATE:
|
||||
stageEntityChange(null, createContact(registrar));
|
||||
if ((visibleInDomainWhoisAsAbuse != null) && visibleInDomainWhoisAsAbuse) {
|
||||
unsetOtherWhoisAbuseFlags(contacts, null /* emailAddressNotToChange */ );
|
||||
unsetOtherWhoisAbuseFlags(contacts, null);
|
||||
}
|
||||
break;
|
||||
case UPDATE:
|
||||
|
|
|
@ -51,7 +51,7 @@ final class UpdateServerLocksCommand extends MutatingEppToolCommand {
|
|||
names = {"-a", "--apply"},
|
||||
description = "Comma-delimited set of locks to apply (or 'all'). "
|
||||
+ "Valid locks: serverDeleteProhibited, serverHold, serverRenewProhibited, "
|
||||
+ "serverTransferProhibited, serverUpdateProhibited" )
|
||||
+ "serverTransferProhibited, serverUpdateProhibited")
|
||||
private List<String> locksToApply = new ArrayList<>();
|
||||
|
||||
@Parameter(
|
||||
|
|
|
@ -57,7 +57,7 @@ public class KillAllCommitLogsAction implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
checkArgument( // safety
|
||||
checkArgument(
|
||||
RegistryEnvironment.get() == RegistryEnvironment.CRASH
|
||||
|| RegistryEnvironment.get() == RegistryEnvironment.UNITTEST,
|
||||
"DO NOT RUN ANYWHERE ELSE EXCEPT CRASH OR TESTS.");
|
||||
|
|
|
@ -53,7 +53,7 @@ public class KillAllEppResourcesAction implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
checkArgument( // safety
|
||||
checkArgument(
|
||||
RegistryEnvironment.get() == RegistryEnvironment.CRASH
|
||||
|| RegistryEnvironment.get() == RegistryEnvironment.UNITTEST,
|
||||
"DO NOT RUN ANYWHERE ELSE EXCEPT CRASH OR TESTS.");
|
||||
|
|
|
@ -17,7 +17,11 @@ package google.registry.testing;
|
|||
/** Utility methods for tests that involve certificates. */
|
||||
public final class CertificateSamples {
|
||||
|
||||
// openssl req -new -nodes -x509 -days 10000 -newkey rsa:2048 -keyout client1.key -out client1.crt -subj "/C=US/ST=New York/L=New York/O=Google/OU=domain-registry-test/CN=client1"
|
||||
|
||||
/*
|
||||
* openssl req -new -nodes -x509 -days 10000 -newkey rsa:2048 -keyout client1.key -out client1.crt
|
||||
* -subj "/C=US/ST=New York/L=New York/O=Google/OU=domain-registry-test/CN=client1"
|
||||
*/
|
||||
public static final String SAMPLE_CERT = ""
|
||||
+ "-----BEGIN CERTIFICATE-----\n"
|
||||
+ "MIIDvTCCAqWgAwIBAgIJAK/PgPT0jTwRMA0GCSqGSIb3DQEBCwUAMHUxCzAJBgNV\n"
|
||||
|
@ -43,10 +47,16 @@ public final class CertificateSamples {
|
|||
+ "Ug==\n"
|
||||
+ "-----END CERTIFICATE-----\n";
|
||||
|
||||
// python -c "import sys;print sys.argv[1].decode('hex').encode('base64').strip('\n=')" $(openssl x509 -fingerprint -sha256 -in client1.cert | grep -Po '(?<=Fingerprint=).*' | sed s/://g)
|
||||
/*
|
||||
* python -c "import sys;print sys.argv[1].decode('hex').encode('base64').strip('\n=')" $(openssl
|
||||
* x509 -fingerprint -sha256 -in client1.cert | grep -Po '(?<=Fingerprint=).*' | sed s/://g)
|
||||
*/
|
||||
public static final String SAMPLE_CERT_HASH = "vue+ZFJC2R7/LedIDQ53NbMoIMSVpqjEJA1CAJVumos";
|
||||
|
||||
// openssl req -new -nodes -x509 -days 10000 -newkey rsa:2048 -keyout client2.key -out client2.crt -subj "/C=US/ST=New York/L=New York/O=Google/OU=domain-registry-test/CN=client2"
|
||||
/*
|
||||
* openssl req -new -nodes -x509 -days 10000 -newkey rsa:2048 -keyout client2.key -out client2.crt
|
||||
* -subj "/C=US/ST=New York/L=New York/O=Google/OU=domain-registry-test/CN=client2"
|
||||
*/
|
||||
public static final String SAMPLE_CERT2 = ""
|
||||
+ "-----BEGIN CERTIFICATE-----\n"
|
||||
+ "MIIDvTCCAqWgAwIBAgIJANoEy6mYwalPMA0GCSqGSIb3DQEBCwUAMHUxCzAJBgNV\n"
|
||||
|
@ -72,7 +82,10 @@ public final class CertificateSamples {
|
|||
+ "Bg==\n"
|
||||
+ "-----END CERTIFICATE-----\n";
|
||||
|
||||
// python -c "import sys;print sys.argv[1].decode('hex').encode('base64').strip('\n=')" $(openssl x509 -fingerprint -sha256 -in client2.crt | grep -Po '(?<=Fingerprint=).*' | sed s/://g)
|
||||
/*
|
||||
* python -c "import sys;print sys.argv[1].decode('hex').encode('base64').strip('\n=')" $(openssl
|
||||
* x509 -fingerprint -sha256 -in client2.crt | grep -Po '(?<=Fingerprint=).*' | sed s/://g)
|
||||
*/
|
||||
public static final String SAMPLE_CERT2_HASH = "GNd6ZP8/n91t9UTnpxR8aH7aAW4+CpvufYx9ViGbcMY";
|
||||
|
||||
private CertificateSamples() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue