public interface SignatureVerifier
A
SignatureVerifier can verify signatures on git commits and tags.- Since:
- 7.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordASignatureVerificationreturns data about a (positively or negatively) verified signature.static enumThe owner's trust in a public key. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()ASignatureVerifiermay cache public keys to speed up verifying signatures on multiple objects.getName()Retrieves the name of this verifier.verify(Repository repository, GpgConfig config, byte[] data, byte[] signatureData) Verifies a given signature for given data.
-
Method Details
-
verify
SignatureVerifier.SignatureVerification verify(@NonNull Repository repository, @NonNull GpgConfig config, byte[] data, byte[] signatureData) throws IOException Verifies a given signature for given data.- Parameters:
repository- theRepositorythe data comes from.config- theGpgConfigdata- the signature is forsignatureData- the ASCII-armored signature- Returns:
- a
SignatureVerifier.SignatureVerificationdescribing the outcome - Throws:
IOException- if the signature cannot be parsedJGitInternalException- if signature verification fails
-
getName
Retrieves the name of this verifier. This should be a short string identifying the engine that verified the signature, like "gpg" if GPG is used, or "bc" for a BouncyCastle implementation.- Returns:
- the name
-
clear
void clear()ASignatureVerifiermay cache public keys to speed up verifying signatures on multiple objects. This clears this cache, if any.
-