public class Signer extends Object
| Modifier and Type | Field and Description |
|---|---|
File |
canonical |
List<File> |
certificates |
File |
privateKey |
List<File> |
rootCA |
| Constructor and Description |
|---|
Signer() |
| Modifier and Type | Method and Description |
|---|---|
Signer |
configureFromEnvironment()
Parses JENKINS_SIGNER environment variable as the argument list and configure the instance.
|
protected List<X509Certificate> |
getCertificateChain()
Loads a certificate chain and makes sure it's valid.
|
boolean |
isConfigured()
Checks if the signer is properly configured to generate a signature
|
net.sf.json.JSONObject |
sign(net.sf.json.JSONObject o)
Generates a canonicalized JSON format of the given object, and put the signature in it.
|
public Signer configureFromEnvironment() throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineExceptionpublic boolean isConfigured()
throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineException - If the configuration is partial and it's not clear whether the user intended to sign or not to sign.public net.sf.json.JSONObject sign(net.sf.json.JSONObject o)
throws GeneralSecurityException,
IOException,
org.kohsuke.args4j.CmdLineException
GeneralSecurityExceptionIOExceptionorg.kohsuke.args4j.CmdLineExceptionprotected List<X509Certificate> getCertificateChain() throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionCopyright © 2004-2018. All Rights Reserved.