Top Description Methods
org.eclipse.jgit.signing.ssh

public Interface SigningKeyDatabase

Known Direct Subinterfaces
org.eclipse.jgit.signing.ssh.CachingSigningKeyDatabase
Imports
java.io.IOException, java.security.PublicKey, org.eclipse.jgit.annotations.NonNull, org.eclipse.jgit.internal.signing.ssh.SigningDatabase, org.eclipse.jgit.lib.GpgConfig, .PersonIdent, .Repository

A database storing meta-information about signing keys and certificates.
Since
7.1

Method Summary

Modifier and TypeMethod and Description
public static SigningKeyDatabase

Returns:

the global SigningKeyDatabase
getInstance
()

Obtains the current global instance.

public String

Returns:

null if the database does not contain any information about the given key; the principal if it does and all checks passed
isAllowed
(Repository
Repository the key is being used in
repository
,
GpgConfig
GpgConfig to use
config
,
PublicKey
PublicKey to check
key
,
String
of the signature
namespace
,
PersonIdent
optional PersonIdent giving a signer's e-mail address and a signature time
ident
)

Checks whether the given key is allowed to be used for signing, and if allowed returns the principal.

public boolean

Returns:

true if the key has been revoked, false otherwise
isRevoked
(Repository
Repository the key is being used in
repository
,
GpgConfig
GpgConfig to use
config
,
PublicKey
PublicKey to check
key
)

Determines whether the gives key has been revoked.

public static SigningKeyDatabase

Returns:

the previously set SigningKeyDatabase
setInstance
(SigningKeyDatabase
to set; if null a default database using the OpenSSH allowed signers file and the OpenSSH revocation list mechanism is used.
database
)

Sets the global SigningKeyDatabase.

Method Detail

getInstanceback to summary
public static SigningKeyDatabase getInstance()

Obtains the current global instance.

Returns:SigningKeyDatabase

the global SigningKeyDatabase

isAllowedback to summary
public String isAllowed(Repository repository, GpgConfig config, PublicKey key, String namespace, PersonIdent ident) throws IOException, VerificationException

Checks whether the given key is allowed to be used for signing, and if allowed returns the principal.

Parameters
repository:Repository

Repository the key is being used in

config:GpgConfig

GpgConfig to use

key:PublicKey

PublicKey to check

namespace:String

of the signature

ident:PersonIdent

optional PersonIdent giving a signer's e-mail address and a signature time

Returns:String

null if the database does not contain any information about the given key; the principal if it does and all checks passed

Exceptions
IOException:
if an I/O problem occurred
VerificationException:
if the database contains information about the key and the checks determined that the key is not allowed to be used for signing
isRevokedback to summary
public boolean isRevoked(Repository repository, GpgConfig config, PublicKey key) throws IOException

Determines whether the gives key has been revoked.

Parameters
repository:Repository

Repository the key is being used in

config:GpgConfig

GpgConfig to use

key:PublicKey

PublicKey to check

Returns:boolean

true if the key has been revoked, false otherwise

Exceptions
IOException:
if an I/O problem occurred
setInstanceback to summary
public static SigningKeyDatabase setInstance(SigningKeyDatabase database)

Sets the global SigningKeyDatabase.

Parameters
database:SigningKeyDatabase

to set; if null a default database using the OpenSSH allowed signers file and the OpenSSH revocation list mechanism is used.

Returns:SigningKeyDatabase

the previously set SigningKeyDatabase