public static <T> Signed<T> of(T content, X509Certificate certificate) { return of(content, certificate, null); }
@Override public <S> Signed<S> ofSubset(S s) { return new Signed<>(s, certificate, timestamp); }
public ServiceMetadata getServiceMetadata(ParticipantIdentifier participantIdentifier, DocumentTypeIdentifier documentTypeIdentifier) throws LookupException, PeppolSecurityException { URI location = locator.lookup(participantIdentifier); URI provider = this.provider.resolveServiceMetadata(location, participantIdentifier, documentTypeIdentifier); FetcherResponse fetcherResponse; try { fetcherResponse = fetcher.fetch(provider); } catch (FileNotFoundException e) { throw new LookupException(String.format( "Combination of receiver (%s) and document type identifier (%s) is not supported.", participantIdentifier.toString(), documentTypeIdentifier.toString()), e); } PotentiallySigned<ServiceMetadata> serviceMetadata = reader.parseServiceMetadata(fetcherResponse); if (serviceMetadata instanceof Signed) validator.validate(Service.SMP, ((Signed) serviceMetadata).getCertificate()); return serviceMetadata.getContent(); }
public static Signed<Evidence> read(Node node) throws RemEvidenceException, PeppolSecurityException { if (!(node instanceof Document)) throw new RemEvidenceException("Node of type Document required."); X509Certificate certificate = XmldsigVerifier.verify((Document) node); return Signed.of(EvidenceReader.read(node), certificate); } }
public static <T> Signed<T> of(T content, X509Certificate certificate, Date timestamp) { return new Signed<>(content, certificate, timestamp); }
return Signed.of(ServiceMetadata.of( ParticipantIdentifier.of( serviceInformation.getParticipantIdentifier().getValue(),
return Signed.of(ServiceMetadata.of( ParticipantIdentifier.of( serviceInformation.getParticipantIdentifier().getValue(),
return Signed.of(ServiceMetadata.of( ParticipantIdentifier.of( serviceInformation.getParticipantIdentifier().getValue(),