Package org.wildfly.channel.gpg
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
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.wildfly.channel.spi.SignatureValidator
org.wildfly.channel.spi.SignatureValidator.SignatureException -
Field Summary
Fields inherited from interface org.wildfly.channel.spi.SignatureValidator
REJECTING_VALIDATOR -
Constructor Summary
ConstructorsConstructorDescriptionGpgSignatureValidator(GpgKeystore keystore) GpgSignatureValidator(GpgKeystore keystore, Keyserver keyserver) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(GpgSignatureValidatorListener listener) org.wildfly.channel.spi.SignatureResultvalidateSignature(org.wildfly.channel.spi.ArtifactIdentifier artifactId, InputStream artifactStream, InputStream signatureStream, List<String> gpgUrls)
-
Constructor Details
-
GpgSignatureValidator
-
GpgSignatureValidator
-
-
Method Details
-
addListener
-
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:
validateSignaturein interfaceorg.wildfly.channel.spi.SignatureValidator- Throws:
org.wildfly.channel.spi.SignatureValidator.SignatureException
-