Class GpgSignatureValidator

java.lang.Object
org.wildfly.channel.gpg.GpgSignatureValidator
All Implemented Interfaces:
org.wildfly.channel.spi.SignatureValidator

public class GpgSignatureValidator extends Object implements org.wildfly.channel.spi.SignatureValidator
Implementation of a GPG signature validator. Uses a combination of a local GpgKeystore and GPG keyservers to resolve certificates. To resolve a public key required by the artifact signature:
  • check if the key is present in the local GpgKeystore.
  • check if one of the configured remote keystores contains the key.
  • try to download the keys linked in the gpgUrls
The GpgKeystore acts as a source of trusted keys. A new key, resolved from either the keyserver or the gpgUrls is added to the GpgKeystore and used in subsequent checks.
  • Constructor Details

    • GpgSignatureValidator

      public GpgSignatureValidator(GpgKeystore keystore)
    • GpgSignatureValidator

      public GpgSignatureValidator(GpgKeystore keystore, Keyserver keyserver)
  • Method Details

    • addListener

      public void addListener(GpgSignatureValidatorListener listener)
    • validateSignature

      public org.wildfly.channel.spi.SignatureResult validateSignature(org.wildfly.channel.spi.ArtifactIdentifier artifactId, InputStream artifactStream, InputStream signatureStream, List<String> gpgUrls) throws org.wildfly.channel.spi.SignatureValidator.SignatureException
      Specified by:
      validateSignature in interface org.wildfly.channel.spi.SignatureValidator
      Throws:
      org.wildfly.channel.spi.SignatureValidator.SignatureException