- java.lang.Object
-
- org.eclipse.jgit.transport.SignedPushConfig
-
public class SignedPushConfig extends Object
Configuration for server-side signed push verification.- Since:
- 4.1
-
-
Field Summary
Fields Modifier and Type Field Description static Config.SectionParser<SignedPushConfig>KEYKey forConfig.get(SectionParser).
-
Constructor Summary
Constructors Constructor Description SignedPushConfig()Create a new config with default values disabling push verification.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCertNonceSeed()Get the configured seed.intgetCertNonceSlopLimit()Get the configured nonce slop limit.NonceGeneratorgetNonceGenerator()Get theNonceGeneratorused for signed pushes.voidsetCertNonceSeed(String seed)Set the seed used by the nonce verifier.voidsetCertNonceSlopLimit(int limit)Set the nonce slop limit.voidsetNonceGenerator(NonceGenerator generator)Set theNonceGeneratorused for signed pushes.
-
-
-
Field Detail
-
KEY
public static final Config.SectionParser<SignedPushConfig> KEY
Key forConfig.get(SectionParser).
-
-
Method Detail
-
setCertNonceSeed
public void setCertNonceSeed(String seed)
Set the seed used by the nonce verifier.Setting this to a non-null value enables push certificate verification using the default
HMACSHA1NonceGeneratorimplementation, if a different implementation was not set usingsetNonceGenerator(NonceGenerator).- Parameters:
seed- new seed value.
-
getCertNonceSeed
public String getCertNonceSeed()
Get the configured seed.- Returns:
- the configured seed.
-
setCertNonceSlopLimit
public void setCertNonceSlopLimit(int limit)
Set the nonce slop limit.Old but valid nonces within this limit will be accepted.
- Parameters:
limit- new limit in seconds.
-
getCertNonceSlopLimit
public int getCertNonceSlopLimit()
Get the configured nonce slop limit.- Returns:
- the configured nonce slop limit.
-
setNonceGenerator
public void setNonceGenerator(NonceGenerator generator)
Set theNonceGeneratorused for signed pushes.Setting this to a non-null value enables push certificate verification. If this method is called, this implementation will be used instead of the default
HMACSHA1NonceGeneratoreven ifsetCertNonceSeed(String)was called.- Parameters:
generator- new nonce generator.
-
getNonceGenerator
public NonceGenerator getNonceGenerator()
Get theNonceGeneratorused for signed pushes.If
setNonceGenerator(NonceGenerator)was used to set a non-null implementation, that will be returned. If no custom implementation was set butsetCertNonceSeed(String)was called, returns a newly-createdHMACSHA1NonceGenerator.- Returns:
- the configured nonce generator.
-
-