Interface SignableMacro

    • 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 a MacroBlock or a MacroMarkerBlock.
        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 a MacroBlock or a MacroMarkerBlock.
        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.