Interface SignatureValidator


public interface SignatureValidator
Called to validate detached signatures of artifacts resolved in the channel
  • Field Details

    • REJECTING_VALIDATOR

      static final SignatureValidator REJECTING_VALIDATOR
      A default validator, rejecting all artifacts
  • Method Details

    • validateSignature

      SignatureResult validateSignature(ArtifactIdentifier artifactId, InputStream artifactStream, InputStream signatureStream, List<String> gpgUrls) throws SignatureValidator.SignatureException
      validates a signature of an artifact. The locally downloaded signature has to be an armour encoded GPG signature.
      Parameters:
      artifactId - - an identifier of the resource to be validated.
      artifactStream - - an InputStream of the artifact to be verified.
      signatureStream - - an InputStream of the armour encoded detached GPG signature for the artifact.
      gpgUrls - - URLs of the keys defined in the channel. Empty collection if channel does not define any signatures.
      Returns:
      SignatureResult with the result of validation
      Throws:
      SignatureValidator.SignatureException - - if an unexpected error occurred when handling the keys.