Skip to content

Commit

Permalink
fix: clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
junfuchen99 committed Sep 29, 2023
1 parent 6b596d7 commit 4ae6ca8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
import javax.inject.Inject;

public class CertificateManager {
private static final Logger logger = LogManager.getLogger(CertificateManager.class);
private static final String pkcs11Scheme = "pkcs11";
private final CertificateStore certificateStore;
private final ConnectivityInformation connectivityInformation;
private final CertificateExpiryMonitor certExpiryMonitor;
Expand All @@ -74,9 +76,8 @@ public class CertificateManager {
private final GreengrassServiceClientFactory clientFactory;
private final SecurityService securityService;
private final DomainEvents domainEvent;
@Getter
private CertificatesConfig certificatesConfig;
private static final Logger logger = LogManager.getLogger(CertificateManager.class);
private static final String pkcs11Scheme = "pkcs11";

/**
* Construct a new CertificateManager.
Expand Down Expand Up @@ -268,16 +269,15 @@ public void unsubscribeFromCertificateUpdates(GetCertificateRequest getCertifica
}
}


private void removeCGFromMonitors(CertificateGenerator gen) {
certExpiryMonitor.removeFromMonitor(gen);
cisShadowMonitor.removeFromMonitor(gen);
caConfigurationMonitor.removeFromMonitor(gen);
}

@SuppressWarnings("PMD.AvoidCatchingGenericException")
private X509Certificate[] getCertificateChainFromConfiguration(CAConfiguration configuration) throws
CertificateChainLoadingException {
private X509Certificate[] getCertificateChainFromConfiguration(CAConfiguration configuration)
throws CertificateChainLoadingException {
try {
Optional<URI> certificateChainUri = configuration.getCertificateChainUri();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public CustomGeneratorCertificateRequest(String serviceName,
super(serviceName, certificateRequestOptions, certificateUpdateConsumer);
this.certificateGenerator = certificateGenerator;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.stream.Stream;

import static com.aws.greengrass.clientdevices.auth.ClientDevicesAuthService.CLIENT_DEVICES_AUTH_SERVICE_NAME;
Expand Down

0 comments on commit 4ae6ca8

Please sign in to comment.