Top Description Fields Constructors Methods
org.eclipse.jgit.internal.signing.ssh

public Class SshSignatureVerifier

extends Object
implements SignatureVerifier
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.lib.SignatureVerifier
Imports
java.io.IOException, java.security.MessageDigest, .NoSuchAlgorithmException, .PublicKey, java.text.MessageFormat, java.time.Instant, java.util.Date, .Locale, org.apache.sshd.common.config.keys.KeyUtils, .OpenSshCertificate, org.apache.sshd.common.keyprovider.KeyPairProvider, org.apache.sshd.common.signature.BuiltinSignatures, .Signature, org.apache.sshd.common.util.buffer.Buffer, .ByteArrayBuffer, org.eclipse.jgit.internal.transport.sshd.SshdText, org.eclipse.jgit.lib.GpgConfig, .PersonIdent, .Repository, .SignatureVerifier, org.eclipse.jgit.signing.ssh.CachingSigningKeyDatabase, .SigningKeyDatabase, .VerificationException, org.eclipse.jgit.util.Base64, .RawParseUtils, .StringUtils, org.slf4j.Logger, .LoggerFactory

A SignatureVerifier for SSH signatures.

Field Summary

Modifier and TypeField and Description
private static final Logger
private static final byte[]
private static final byte[]
private static final byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Implements org.eclipse.jgit.lib.SignatureVerifier.clear.

A SignatureVerifier may cache public keys to speed up verifying signatures on multiple objects.

private static byte[]
dearmor(byte[] data)

private static PersonIdent
getGitIdentity(byte[] rawObject)

public String
getName()

Implements org.eclipse.jgit.lib.SignatureVerifier.getName.

Retrieves the name of this verifier.

public SignatureVerifier.SignatureVerification
verify(Repository
the Repository the data comes from.
repository
,
GpgConfig config, byte[]
the signature is for
data
,
byte[]
the ASCII-armored signature
signatureData
)

Implements org.eclipse.jgit.lib.SignatureVerifier.verify.

Verifies a given signature for given data.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG
OBJECTback to summary
private static final byte[] OBJECT
TREEback to summary
private static final byte[] TREE
TYPEback to summary
private static final byte[] TYPE

Constructor Detail

SshSignatureVerifierback to summary
public SshSignatureVerifier()

Method Detail

clearback to summary
public void clear()

Implements org.eclipse.jgit.lib.SignatureVerifier.clear.

Doc from org.eclipse.jgit.lib.SignatureVerifier.clear.

A SignatureVerifier may cache public keys to speed up verifying signatures on multiple objects. This clears this cache, if any.

Annotations
@Override
dearmorback to summary
private static byte[] dearmor(byte[] data)
getGitIdentityback to summary
private static PersonIdent getGitIdentity(byte[] rawObject)
getNameback to summary
public String getName()

Implements org.eclipse.jgit.lib.SignatureVerifier.getName.

Doc from org.eclipse.jgit.lib.SignatureVerifier.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:String

the name

Annotations
@Override
verifyback to summary
public SignatureVerifier.SignatureVerification verify(Repository repository, GpgConfig config, byte[] data, byte[] signatureData) throws IOException

Implements org.eclipse.jgit.lib.SignatureVerifier.verify.

Doc from org.eclipse.jgit.lib.SignatureVerifier.verify.

Verifies a given signature for given data.

Parameters
repository:Repository

the Repository the data comes from.

config:GpgConfig

the GpgConfig

data:byte[]

the signature is for

signatureData:byte[]

the ASCII-armored signature

Returns:SignatureVerifier.SignatureVerification

a SignatureVerification describing the outcome

Annotations
@Override
Exceptions
IOException:
if the signature cannot be parsed