-
public interface GpgSignatureVerifierAGpgVerifiercan verify GPG signatures on git commits and tags.- Since:
- 5.11
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceGpgSignatureVerifier.SignatureVerificationASignatureVerificationreturns data about a (positively or negatively) verified signature.static classGpgSignatureVerifier.TrustLevelThe owner's trust in a public key.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()AGpgSignatureVerifiermay cache public keys to speed up verifying signatures on multiple objects.StringgetName()Retrieves the name of this verifier.GpgSignatureVerifier.SignatureVerificationverify(byte[] data, byte[] signatureData)Verifies a given signature for given data.GpgSignatureVerifier.SignatureVerificationverifySignature(RevObject object, GpgConfig config)Verifies the signature on a signed commit or tag.
-
-
-
Method Detail
-
verifySignature
@Nullable GpgSignatureVerifier.SignatureVerification verifySignature(@NonNull RevObject object, @NonNull GpgConfig config) throws IOException
Verifies the signature on a signed commit or tag.- Parameters:
object- to verifyconfig- theGpgConfigto use- Returns:
- a
GpgSignatureVerifier.SignatureVerificationdescribing the outcome of the verification, ornullif the object was not signed - Throws:
IOException- if an error occurs getting a public keyJGitInternalException- if signature verification fails
-
verify
GpgSignatureVerifier.SignatureVerification verify(byte[] data, byte[] signatureData) throws IOException
Verifies a given signature for given data.- Parameters:
data- the signature is forsignatureData- the ASCII-armored signature- Returns:
- a
GpgSignatureVerifier.SignatureVerificationdescribing the outcome - Throws:
IOException- if the signature cannot be parsedJGitInternalException- if signature verification fails
-
getName
@NonNull String 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()
AGpgSignatureVerifiermay cache public keys to speed up verifying signatures on multiple objects. This clears this cache, if any.
-
-