public class MessageValidator extends Object
| Constructor and Description |
|---|
MessageValidator() |
MessageValidator(Config config) |
| Modifier and Type | Method and Description |
|---|---|
static DeliveryInfo |
buildDeliveryInfo(MessageEnvelope env,
TDelivery delivery) |
static DeliveryInfo |
buildDeliveryInfo(TDelivery delivery) |
protected Message |
buildMessage(MessageEnvelope envelope,
TReturnedMessage message,
AttachmentStorer storer) |
DeliveryInfo |
createDeliveryInfo(byte[] asPCKS7) |
Message |
createMessage(byte[] content,
AttachmentStorer storer) |
Message |
createMessage(Content content,
AttachmentStorer storer) |
Message |
readZFO(byte[] input,
AttachmentStorer storer) |
protected static byte[] |
toByteArray(Element element) |
Message |
validateAndCreateMessage(byte[] asPKCS7,
AttachmentStorer storer,
boolean checkHash)
Na vstup dostane podepsanou zprávu v binárním formátu PKCS#7 (žádné XML),
a vrátí zprávu včetně příloh při splnění následujících podmínek:
- zpráva je podepsaná platným certifikátem
- časové razítko je podepsané platným certifikátem
- haš časového razítka a haš zprávy (element dmHash) jsou totožné a
souhlasí se spočítaným hašem ze zprávy způsobem definovaným
v dokumentaci k ISDS.
|
Message |
validateAndCreateMessage(Content content,
AttachmentStorer storer)
Wrapper nad metodou
validateAndCreateMessage(byte[], AttachmentStorer, boolean). |
public MessageValidator()
public MessageValidator(Config config)
public Message validateAndCreateMessage(Content content, AttachmentStorer storer) throws IOException
validateAndCreateMessage(byte[], AttachmentStorer, boolean).content - PKCS podepsany obsahstorer - uloziste pro prilohyIOExceptionpublic Message createMessage(Content content, AttachmentStorer storer) throws IOException
IOExceptionpublic Message createMessage(byte[] content, AttachmentStorer storer) throws IOException
IOExceptionpublic Message validateAndCreateMessage(byte[] asPKCS7, AttachmentStorer storer, boolean checkHash) throws DataBoxException
asPKCS7 - zpráva v obalu PKCS#7DataBoxException - při neúspěšné validacipublic DeliveryInfo createDeliveryInfo(byte[] asPCKS7)
public static DeliveryInfo buildDeliveryInfo(TDelivery delivery)
public static DeliveryInfo buildDeliveryInfo(MessageEnvelope env, TDelivery delivery)
protected Message buildMessage(MessageEnvelope envelope, TReturnedMessage message, AttachmentStorer storer)
public Message readZFO(byte[] input, AttachmentStorer storer)
protected static byte[] toByteArray(Element element)
Copyright © 2016. All rights reserved.