Package org.xwiki.rendering.macro
Interface SignableMacro
-
- All Known Implementing Classes:
AbstractNoParameterSignableMacro
,AbstractSignableMacro
public interface SignableMacro
Mixin interface providing additional signature functionality to a macro.- Since:
- 6.1M2
- Version:
- $Id: 7167191218e3f9e4c3d0a435946eccf6388b4c2e $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
sign(org.xwiki.rendering.block.Block block, org.xwiki.crypto.signer.param.CMSSignedDataGeneratorParameters parameters)
Sign the given macro block.org.xwiki.crypto.signer.param.CMSSignedDataVerified
verify(org.xwiki.rendering.block.Block block, org.xwiki.crypto.pkix.CertificateProvider certificateProvider)
Verify signature of the given macro block.
-
-
-
Method Detail
-
sign
void sign(org.xwiki.rendering.block.Block block, org.xwiki.crypto.signer.param.CMSSignedDataGeneratorParameters parameters) throws MacroSignatureException
Sign the given macro block.- Parameters:
block
- the block to sign. This block should have a known content source and could be either aMacroBlock
or aMacroMarkerBlock
.parameters
- the signature generation parameters.- Throws:
MacroSignatureException
- on error.
-
verify
org.xwiki.crypto.signer.param.CMSSignedDataVerified verify(org.xwiki.rendering.block.Block block, org.xwiki.crypto.pkix.CertificateProvider certificateProvider) throws MacroSignatureException
Verify signature of the given macro block.- Parameters:
block
- the block to verify. This block should have a known content source and could be either aMacroBlock
or aMacroMarkerBlock
.certificateProvider
- a certificate provider providing available certificates.- Returns:
- signature verification results, or null no signature where found for the given block.
- Throws:
MacroSignatureException
- on error.
-
-