public interface GpgSignatureVerifier
GpgVerifier
can verify GPG signatures on git commits and tags.Modifier and Type | Interface and Description |
---|---|
static interface |
GpgSignatureVerifier.SignatureVerification
A
SignatureVerification returns data about a (positively or
negatively) verified signature. |
static class |
GpgSignatureVerifier.TrustLevel
The owner's trust in a public key.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
A
GpgSignatureVerifier may cache public keys to speed up
verifying signatures on multiple objects. |
String |
getName()
Retrieves the name of this verifier.
|
GpgSignatureVerifier.SignatureVerification |
verify(byte[] data,
byte[] signatureData)
Verifies a given signature for given data.
|
GpgSignatureVerifier.SignatureVerification |
verifySignature(RevObject object,
GpgConfig config)
Verifies the signature on a signed commit or tag.
|
@Nullable GpgSignatureVerifier.SignatureVerification verifySignature(@NonNull RevObject object, @NonNull GpgConfig config) throws IOException
object
- to verifyconfig
- the GpgConfig
to useGpgSignatureVerifier.SignatureVerification
describing the outcome of the
verification, or null
if the object was not signedIOException
- if an error occurs getting a public keyJGitInternalException
- if signature verification failsGpgSignatureVerifier.SignatureVerification verify(byte[] data, byte[] signatureData) throws IOException
data
- the signature is forsignatureData
- the ASCII-armored signatureGpgSignatureVerifier.SignatureVerification
describing the outcomeIOException
- if the signature cannot be parsedJGitInternalException
- if signature verification fails@NonNull String getName()
void clear()
GpgSignatureVerifier
may cache public keys to speed up
verifying signatures on multiple objects. This clears this cache, if any.Copyright © 2021 Eclipse JGit Project. All rights reserved.