Package org.xwiki.rendering.signature
Interface BlockSignatureVerifier
-
@Role public interface BlockSignatureVerifier
Verify signature of aBlock
.- Since:
- 6.1M2
- Version:
- $Id: d7afeda9e4636298bd07d7f57684e7e0239fb293 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isSupported(org.xwiki.rendering.block.Block block)
Check if the given block can be supported by this signer.org.xwiki.crypto.signer.param.CMSSignedDataVerified
verify(byte[] signature, org.xwiki.rendering.block.Block block, org.xwiki.crypto.pkix.CertificateProvider certificateProvider)
Verify a signature.
-
-
-
Method Detail
-
verify
org.xwiki.crypto.signer.param.CMSSignedDataVerified verify(byte[] signature, org.xwiki.rendering.block.Block block, org.xwiki.crypto.pkix.CertificateProvider certificateProvider) throws GeneralSecurityException, IOException
Verify a signature. The signature of the certificate is verified as well, but not the certificate chain.- Parameters:
signature
- a signature produced by this signer.block
- a rendering block to sign.certificateProvider
- provider of certificates.- Returns:
- the certified public key that have signed the given block or null if the signature is invalid.
- Throws:
GeneralSecurityException
- on signature verification operation error.IOException
- on encoding/decoding operation error.
-
isSupported
boolean isSupported(org.xwiki.rendering.block.Block block)
Check if the given block can be supported by this signer.- Parameters:
block
- the block to check.- Returns:
- true if this block can be signed/verified by this signer.
-
-