Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 215a50d8 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

update pull requests

parent ad3369c8
No related branches found
No related tags found
No related merge requests found
......@@ -76,9 +76,6 @@ export class UserComponent implements OnInit {
openEditTruststoreDialog() {
const formRef: MatDialogRef<any> = this.dialog.open(TruststoreEditDialogComponent);
formRef.afterClosed().subscribe(result => {
if (result) {
// close
}
});
}
}
......@@ -11,7 +11,7 @@ import java.util.List;
import java.util.Properties;
public class DatabaseProperties extends Properties {
SMPLogger LOG = SMPLoggerFactory.getLogger(PropertyInitialization.class);
SMPLogger LOG = SMPLoggerFactory.getLogger(DatabaseProperties.class);
private static final long serialVersionUID = 1L;
private LocalDateTime lastUpdate;
......@@ -27,7 +27,7 @@ public class DatabaseProperties extends Properties {
dc.getProperty().toLowerCase().contains("password")?"******": dc.getValue());
setProperty(dc.getProperty(), dc.getValue());
}
lastUpdate = lastUpdate==null || lastUpdate.isBefore(dc.getLastUpdatedOn())? dc.getLastUpdatedOn() :lastUpdate;
lastUpdate = (lastUpdate==null || lastUpdate.isBefore(dc.getLastUpdatedOn()) )? dc.getLastUpdatedOn() :lastUpdate;
}
}
......
......@@ -71,7 +71,7 @@ public class CRLVerifierService {
List<String> crlDistPoints = X509CertificateUtils.getCrlDistributionPoints(cert);
if (crlDistPoints.isEmpty()) {
LOG.warn("The certificate: [" + cert.getSubjectX500Principal() + "] has no CRL Lists");
LOG.warn("The certificate: '{}' has no CRL Lists.", cert.getSubjectX500Principal() );
return;
}
String crlUrl = X509CertificateUtils.extractHttpCrlDistributionPoint(crlDistPoints);
......@@ -88,11 +88,8 @@ public class CRLVerifierService {
public void verifyCertificateCRLs(BigInteger serial, String crlDistributionPointURL) throws CertificateRevokedException {
LOG.info("Download CRL " + crlDistributionPointURL);
LOG.info("Download CRL {}." ,crlDistributionPointURL);
X509CRL crl = getCRLByURL(crlDistributionPointURL);
LOG.debug("GOT CRL " + crlDistributionPointURL + " CRL " + crl);
if (crl != null && crl.getRevokedCertificates() != null) {
validateCertificeCRL(crl, serial);
}
......@@ -108,7 +105,6 @@ public class CRLVerifierService {
if (crlCacheMap.containsKey(url)) {
X509CRL crlTmp = crlCacheMap.get(url);
Long nextRefresh = crlCacheNextRefreshMap.getOrDefault(url, NULL_LONG);
;
if (nextRefresh > currentDate.getTime()) {
x509CRL = crlTmp;
}
......@@ -177,7 +173,7 @@ public class CRLVerifierService {
if (useProxy() && !doesTargetMatchNonProxy(targetUrl.getHost(), configurationService.getHttpNoProxyHosts())
) {
LOG.debug("Using proxy for downloading URL " + crlURL);
LOG.debug("Using proxy for downloading URL: {}.", crlURL);
String decryptedPassword = configurationService.getProxyCredentialToken();
inputStream = downloadURLViaProxy(crlURL, configurationService.getHttpProxyHost(), configurationService.getHttpProxyPort(),
configurationService.getProxyUsername(), decryptedPassword);
......@@ -208,8 +204,8 @@ public class CRLVerifierService {
RequestConfig config = RequestConfig.custom().setProxy(new HttpHost(proxyHost, proxyPort)).build();
HttpGet httpget = new HttpGet(url);
httpget.setConfig(config);
LOG.debug("Executing request " + url + " via proxy " + proxyHost +
(credentialsProvider == null ? " with no authentication." : "with username: " + proxyHost + "."));
LOG.debug("Executing request '{}' via proxy '{}' {}",url, proxyHost,
(credentialsProvider == null ? " with no authentication." : "with username: " + proxyUser + "."));
return execute(httpclient, httpget);
}
......@@ -260,7 +256,7 @@ public class CRLVerifierService {
int nphLength = nonProxyHosts != null ? nonProxyHosts.length : 0;
if (nonProxyHosts == null || nphLength < 1) {
LOG.debug("host:'" + uriHost + "' : DEFAULT (0 non proxy host)");
LOG.debug("host:'{}' : DEFAULT (0 non proxy host)",uriHost );
return false;
}
......@@ -268,11 +264,11 @@ public class CRLVerifierService {
for (String nonProxyHost : nonProxyHosts) {
String mathcRegExp = (nonProxyHost.startsWith("*") ? "." : "") + nonProxyHost;
if (uriHost.matches(mathcRegExp)) {
LOG.debug(" host:'" + uriHost + "' matches nonProxyHost '" + mathcRegExp + "' : NO PROXY");
LOG.debug(" host:'{}' matches nonProxyHost '{}'", uriHost, mathcRegExp);
return true;
}
}
LOG.debug(" host:'" + uriHost + "' : DEFAULT (no match of " + Arrays.toString(nonProxyHosts) + " non proxy host)");
LOG.debug(" host:'{}' : DEFAULT (no match of [{}] non proxy host)", uriHost, Arrays.toString(nonProxyHosts));
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment