perf(crypto): use forced certificate rediscovery when hint is not present in cache
This commit is contained in:
+4
-4
@@ -97,8 +97,8 @@ public class SigningService {
|
||||
if (hint != null && !hint.isBlank()) {
|
||||
Optional<ManagedCertificate> found = certificateManager.findByHint(hint);
|
||||
if (found.isEmpty()) {
|
||||
// Tenta rediscovery caso um token tenha acabado de ser conectado
|
||||
certificateManager.discoverCertificates();
|
||||
// Tenta rediscovery forçado caso um token tenha acabado de ser conectado
|
||||
certificateManager.discoverCertificates(true);
|
||||
found = certificateManager.findByHint(hint);
|
||||
}
|
||||
if (found.isPresent()) {
|
||||
@@ -113,8 +113,8 @@ public class SigningService {
|
||||
// Sem hint: seleciona automaticamente se houver apenas um certificado operacional disponível
|
||||
List<ManagedCertificate> available = certificateManager.getAvailableCertificates();
|
||||
if (available.isEmpty()) {
|
||||
// Tenta redescobrir
|
||||
certificateManager.discoverCertificates();
|
||||
// Tenta redescobrir forçando consulta aos provedores
|
||||
certificateManager.discoverCertificates(true);
|
||||
available = certificateManager.getAvailableCertificates();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user