@Test public void simpleApTest() throws PeppolLoadingException, CertificateValidationException, PeppolSecurityException { CertificateValidator validator = Mode.of(Mode.TEST).initiate(DifiCertificateValidator.class); validator.validate(Service.AP, Validator.getCertificate(getClass().getResourceAsStream("/ap-difi-test.cer"))); }
@Override public void validate(Service service, X509Certificate certificate) throws PeppolSecurityException { try { validator.validate(mode.getString(String.format("security.validator.%s", service.toString())), certificate); } catch (CertificateValidationException e) { throw new PeppolSecurityException(e.getMessage(), e); } }
DifiCertificateValidator implements CertificateValidator { @Override public void validate(Service service, X509Certificate certificate) throws PeppolSecurityException { try { validator.validate(mode.getString(String.format("security.validator.%s", service.toString())), certificate); } catch (CertificateValidationException e) { throw new PeppolSecurityException(e.getMessage(), e); } } }
DifiCertificateValidator implements CertificateValidator { @Override public void validate(Service service, X509Certificate certificate) throws PeppolSecurityException { try { validator.validate(mode.getString(String.format("security.validator.%s", service.toString())), certificate); } catch (CertificateValidationException e) { throw new PeppolSecurityException(e.getMessage(), e); } } DifiCertificateValidator(Mode mode);  DifiCertificateValidator(Mode mode, Map<String, Object> objectStorage); }
DifiCertificateValidator implements CertificateValidator { @Override public void validate(Service service, X509Certificate certificate) throws PeppolSecurityException { try { validator.validate(mode.getString(String.format("security.validator.%s", service.toString())), certificate); } catch (CertificateValidationException e) { throw new PeppolSecurityException(e.getMessage(), e); } } DifiCertificateValidator(Mode mode);  DifiCertificateValidator(Mode mode, Map<String, Object> objectStorage); @Override void validate(Service service, X509Certificate certificate); }
DifiCertificateValidator implements CertificateValidator { @Override public void validate(Service service, X509Certificate certificate) throws PeppolSecurityException { try { validator.validate(mode.getString(String.format("security.validator.%s", service.toString())), certificate); } catch (CertificateValidationException e) { throw new PeppolSecurityException(e.getMessage(), e); } } DifiCertificateValidator(Mode mode);  DifiCertificateValidator(Mode mode, Map<String, Object> objectStorage); @Override void validate(Service service, X509Certificate certificate);  }