Package org.omegat.core.team2.impl
Class GITExternalGpgSigner
- java.lang.Object
-
- org.eclipse.jgit.lib.GpgSigner
-
- org.omegat.core.team2.impl.GITExternalGpgSigner
-
public class GITExternalGpgSigner extends org.eclipse.jgit.lib.GpgSigner
-
-
Constructor Summary
Constructors Constructor Description GITExternalGpgSigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canLocateSigningKey(java.lang.String gpgSigningKey, org.eclipse.jgit.lib.PersonIdent committer, org.eclipse.jgit.transport.CredentialsProvider credentialsProvider)
Indicates if a signing key is available for the specified committer and/or signing key.void
sign(org.eclipse.jgit.lib.CommitBuilder commit, java.lang.String gpgSigningKey, org.eclipse.jgit.lib.PersonIdent committer, org.eclipse.jgit.transport.CredentialsProvider credentialsProvider)
Signs the specified commit.
-
-
-
Method Detail
-
sign
public void sign(org.eclipse.jgit.lib.CommitBuilder commit, java.lang.String gpgSigningKey, org.eclipse.jgit.lib.PersonIdent committer, org.eclipse.jgit.transport.CredentialsProvider credentialsProvider) throws org.eclipse.jgit.api.errors.CanceledException
Signs the specified commit.Implementors should obtain the payload for signing from the specified commit via
CommitBuilder.build()
and create a properGpgSignature
. The generated signature must be set on the specifiedcommit
(seeObjectBuilder.setGpgSignature(GpgSignature)
).Any existing signature on the commit must be discarded prior obtaining the payload via
CommitBuilder.build()
.- Specified by:
sign
in classorg.eclipse.jgit.lib.GpgSigner
- Parameters:
commit
- the commit to sign (must not benull
and must be complete to allow proper calculation of payload)gpgSigningKey
- the signing key to locate (passed as is to the GPG signing tool as is; eg., value ofuser.signingkey
)committer
- the signing identity (to help with key lookup in case signing key is not specified)credentialsProvider
- provider to use when querying for signing key credentials (eg. passphrase)- Throws:
org.eclipse.jgit.api.errors.CanceledException
- when signing was canceled (eg., user aborted when entering passphrase)
-
canLocateSigningKey
public boolean canLocateSigningKey(java.lang.String gpgSigningKey, org.eclipse.jgit.lib.PersonIdent committer, org.eclipse.jgit.transport.CredentialsProvider credentialsProvider) throws org.eclipse.jgit.api.errors.CanceledException
Indicates if a signing key is available for the specified committer and/or signing key.- Specified by:
canLocateSigningKey
in classorg.eclipse.jgit.lib.GpgSigner
- Parameters:
gpgSigningKey
- the signing key to locate (passed as is to the GPG signing tool as is; eg., value ofuser.signingkey
)committer
- the signing identity (to help with key lookup in case signing key is not specified)credentialsProvider
- provider to use when querying for signing key credentials (eg. passphrase)- Returns:
true
if a signing key is available,false
otherwise- Throws:
org.eclipse.jgit.api.errors.CanceledException
- when signing was canceled (eg., user aborted when entering passphrase)
-
-