diff --git a/pom.xml b/pom.xml index 7c38f05b0..2406464fe 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.esupportail esup-signature - 1.31.0 + 1.31.1-SNAPSHOT esup-signature org.esupportail.esupsignature.EsupSignatureApplication diff --git a/src/main/java/org/esupportail/esupsignature/config/GlobalProperties.java b/src/main/java/org/esupportail/esupsignature/config/GlobalProperties.java index 100f4eb8a..531d70afb 100644 --- a/src/main/java/org/esupportail/esupsignature/config/GlobalProperties.java +++ b/src/main/java/org/esupportail/esupsignature/config/GlobalProperties.java @@ -290,7 +290,7 @@ public enum TokenType { private SignRequestParams externalSignatureParams = new SignRequestParams(); /** - * Activation de l'intro d'aide + * Activation de l’intro d’aide */ private Boolean enableHelp = true; @@ -299,6 +299,9 @@ public enum TokenType { */ private String testEmail; + /** + * Activer la vérification des numéros de téléphone français pour l’OTP + */ Boolean frenchPhoneNumberOnly = false; public String getRootUrl() { diff --git a/src/main/java/org/esupportail/esupsignature/service/CertificatService.java b/src/main/java/org/esupportail/esupsignature/service/CertificatService.java index 7c36fe351..0d09639b9 100644 --- a/src/main/java/org/esupportail/esupsignature/service/CertificatService.java +++ b/src/main/java/org/esupportail/esupsignature/service/CertificatService.java @@ -171,8 +171,8 @@ public SignatureTokenConnection getSealToken() { } public AbstractKeyStoreTokenConnection getPkcsToken() throws EsupSignatureKeystoreException { - if(!StringUtils.hasText(globalProperties.getSealCertificatPin())) { - if (!StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) { + if(StringUtils.hasText(globalProperties.getSealCertificatPin())) { + if (StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) { KeyStore.PasswordProtection passwordProtection = new KeyStore.PasswordProtection(globalProperties.getSealCertificatPin().toCharArray()); return new eu.europa.esig.dss.token.Pkcs11SignatureToken(globalProperties.getSealCertificatDriver(), passwordProtection); } else if (!StringUtils.hasText(globalProperties.getSealCertificatFile()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS12)) { @@ -199,7 +199,7 @@ public List getSealCertificats() { if(privateKeysCache.getIfPresent("keys") != null) return privateKeysCache.getIfPresent("keys"); List dssPrivateKeyEntries = new ArrayList<>(); try { - if ((!StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) || globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS12)) { + if ((StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) || globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS12)) { dssPrivateKeyEntries = getPkcsToken().getKeys(); } else if (globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.OPENSC)) { dssPrivateKeyEntries = openSCSignatureToken.getKeys(); diff --git a/src/main/resources/templates/fragments/new.html b/src/main/resources/templates/fragments/new.html index bd67f10f3..894e82809 100644 --- a/src/main/resources/templates/fragments/new.html +++ b/src/main/resources/templates/fragments/new.html @@ -44,7 +44,7 @@
Outils de signature

Circuits
-