@Immutable public final class AS2Helper extends Object
| Modifier and Type | Method and Description |
|---|---|
static IMessageMDN |
createMDN(IAS2Session aSession,
AS2Message aMsg,
DispositionType aDisposition,
String sText)
Create a new MDN
|
static void |
createMDNData(IAS2Session aSession,
IMessageMDN aMdn,
boolean bSignMDN,
boolean bIncludeCertificateInSignedContent,
ECryptoAlgorithmSign eMICAlg,
boolean bUseOldRFC3851MicAlgs,
boolean bRemoveCmsAlgorithmProtect)
Create and fill the MDN parameter
|
static ICryptoHelper |
getCryptoHelper() |
static String |
getWithoutSpaces(String s) |
static void |
parseMDN(IMessage aMsg,
X509Certificate aReceiverCert,
boolean bUseCertificateInBodyPart,
Consumer<? super X509Certificate> aEffectiveCertificateConsumer,
AS2ResourceHelper aResHelper) |
@Nonnull public static ICryptoHelper getCryptoHelper()
public static void createMDNData(@Nonnull IAS2Session aSession, @Nonnull IMessageMDN aMdn, boolean bSignMDN, boolean bIncludeCertificateInSignedContent, @Nullable ECryptoAlgorithmSign eMICAlg, boolean bUseOldRFC3851MicAlgs, boolean bRemoveCmsAlgorithmProtect) throws Exception
aSession - Session to retrieve the certificate factory for signingaMdn - The MDN object to be filledbSignMDN - true to sign the MDNbIncludeCertificateInSignedContent - true if the passed certificate should be part of the
signed content, false if the certificate should not be
put in the content. E.g. for PEPPOL this must be true.eMICAlg - The MIC algorithm to be used. Must be present if bSignMDN is
true.bUseOldRFC3851MicAlgs - true to use the old RFC 3851 MIC algorithm names (e.g.
sha1), false to use the new RFC 5751 MIC
algorithm names (e.g. sha-1).bRemoveCmsAlgorithmProtect - if true, the CMS attribute "AlgorithmProtect" will be
removed. This is needed in compatibility with e.g. IBM Sterling.
Default value should be false. Since 4.10.1. See Issue
#137.Exception - In case something internally goes wrong@Nonnull public static IMessageMDN createMDN(@Nonnull IAS2Session aSession, @Nonnull AS2Message aMsg, @Nonnull DispositionType aDisposition, @Nonnull String sText) throws Exception
aSession - AS2 session to be used. May not be null.aMsg - The source AS2 message for which the MDN is to be created. May not
be null.aDisposition - The disposition - either success or error. May not be
null.sText - The text to be send. May not be null.Exception - In case of an errorpublic static void parseMDN(@Nonnull IMessage aMsg, @Nullable X509Certificate aReceiverCert, boolean bUseCertificateInBodyPart, @Nullable Consumer<? super X509Certificate> aEffectiveCertificateConsumer, @Nonnull AS2ResourceHelper aResHelper) throws Exception
ExceptionCopyright © 2013–2022 Philip Helger. All rights reserved.