public class SignedPushConfig extends Object
Modifier and Type | Field and Description |
---|---|
static Config.SectionParser<SignedPushConfig> |
KEY
Key for
Config.get(SectionParser) . |
Constructor and Description |
---|
SignedPushConfig()
Create a new config with default values disabling push verification.
|
Modifier and Type | Method and Description |
---|---|
String |
getCertNonceSeed() |
int |
getCertNonceSlopLimit() |
NonceGenerator |
getNonceGenerator()
Get the
NonceGenerator used for signed pushes. |
void |
setCertNonceSeed(String seed)
Set the seed used by the nonce verifier.
|
void |
setCertNonceSlopLimit(int limit)
Set the nonce slop limit.
|
void |
setNonceGenerator(NonceGenerator generator)
Set the
NonceGenerator used for signed pushes. |
public static final Config.SectionParser<SignedPushConfig> KEY
Config.get(SectionParser)
.public SignedPushConfig()
public void setCertNonceSeed(String seed)
Setting this to a non-null value enables push certificate verification
using the default HMACSHA1NonceGenerator
implementation, if a
different implementation was not set using setNonceGenerator(NonceGenerator)
.
seed
- new seed value.public String getCertNonceSeed()
public void setCertNonceSlopLimit(int limit)
Old but valid nonces within this limit will be accepted.
limit
- new limit in seconds.public int getCertNonceSlopLimit()
public void setNonceGenerator(NonceGenerator generator)
NonceGenerator
used 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 HMACSHA1NonceGenerator
even if setCertNonceSeed(String)
was called.
generator
- new nonce generator.public NonceGenerator getNonceGenerator()
NonceGenerator
used for signed pushes.
If setNonceGenerator(NonceGenerator)
was used to set a non-null
implementation, that will be returned. If no custom implementation was set
but setCertNonceSeed(String)
was called, returns a newly-created
HMACSHA1NonceGenerator
.
Copyright © 2016 Eclipse JGit Project. All rights reserved.