Package net.jsign.jca
Class DigiCertOneSigningService
- java.lang.Object
-
- net.jsign.jca.DigiCertOneSigningService
-
- All Implemented Interfaces:
SigningService
public class DigiCertOneSigningService extends Object implements SigningService
DigiCert ONE signing service.- Since:
- 4.0
- See Also:
- Secure Software Manager REST API
-
-
Constructor Summary
Constructors Constructor Description DigiCertOneSigningService(String apiKey, File keystore, String storepass)Creates a new DigiCert ONE signing service.DigiCertOneSigningService(String apiKey, X509KeyManager keyManager)Creates a new DigiCert ONE signing service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>aliases()Returns the certificate aliases available.Certificate[]getCertificateChain(String alias)Returns the certificate chain for the alias specified.StringgetName()Returns the name of the service.SigningServicePrivateKeygetPrivateKey(String alias, char[] password)Returns the private key for the certificate alias specified.byte[]sign(SigningServicePrivateKey privateKey, String algorithm, byte[] data)Sign the data with the private key specified.
-
-
-
Constructor Detail
-
DigiCertOneSigningService
public DigiCertOneSigningService(String apiKey, File keystore, String storepass)
Creates a new DigiCert ONE signing service.- Parameters:
apiKey- the DigiCert ONE API access tokenkeystore- the keystore holding the client certificate to authenticate with the serverstorepass- the password of the keystore
-
DigiCertOneSigningService
public DigiCertOneSigningService(String apiKey, X509KeyManager keyManager)
Creates a new DigiCert ONE signing service.- Parameters:
apiKey- the DigiCert ONE API access tokenkeyManager- the key manager to authenticate the client with the server
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:SigningServiceReturns the name of the service.- Specified by:
getNamein interfaceSigningService
-
aliases
public List<String> aliases() throws KeyStoreException
Description copied from interface:SigningServiceReturns the certificate aliases available.- Specified by:
aliasesin interfaceSigningService- Throws:
KeyStoreException
-
getCertificateChain
public Certificate[] getCertificateChain(String alias) throws KeyStoreException
Description copied from interface:SigningServiceReturns the certificate chain for the alias specified.- Specified by:
getCertificateChainin interfaceSigningService- Parameters:
alias- the name of the certificate- Throws:
KeyStoreException
-
getPrivateKey
public SigningServicePrivateKey getPrivateKey(String alias, char[] password) throws UnrecoverableKeyException
Description copied from interface:SigningServiceReturns the private key for the certificate alias specified.- Specified by:
getPrivateKeyin interfaceSigningService- Parameters:
alias- the name of the certificatepassword- the secret required to access the key- Throws:
UnrecoverableKeyException
-
sign
public byte[] sign(SigningServicePrivateKey privateKey, String algorithm, byte[] data) throws GeneralSecurityException
Description copied from interface:SigningServiceSign the data with the private key specified.- Specified by:
signin interfaceSigningService- Parameters:
privateKey- the private keyalgorithm- the signing algorithm (for example SHA256withRSA)data- the data to be signed- Throws:
GeneralSecurityException
-
-