xades4j.providers.impl
Class DirectKeyingDataProvider
java.lang.Object
xades4j.providers.impl.DirectKeyingDataProvider
- All Implemented Interfaces:
- KeyingDataProvider
public class DirectKeyingDataProvider
- extends Object
- implements KeyingDataProvider
An implementation of KeyingDataProvider that allows direct specification
of the signing key and certificate.
- Author:
- Luís
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectKeyingDataProvider
public DirectKeyingDataProvider(X509Certificate certificate,
PrivateKey key)
getSigningCertificateChain
public List<X509Certificate> getSigningCertificateChain()
throws SigningCertChainException,
UnexpectedJCAException
- Description copied from interface:
KeyingDataProvider
- Gets the signing certificate chain to be used in an ongoing signature operation.
At least the signing certificate must be present. Other certificates may
be present, possibly up to the trust anchor.
- Specified by:
getSigningCertificateChain in interface KeyingDataProvider
- Returns:
- the signing certificate (chain)
- Throws:
SigningCertChainException - if the signing certificate (chain) couldn't be obtained
UnexpectedJCAException - when an unexpected platform error occurs
getSigningKey
public PrivateKey getSigningKey(X509Certificate signingCert)
throws SigningKeyException,
UnexpectedJCAException
- Description copied from interface:
KeyingDataProvider
- Gets the signing key that matches a signing certificate. The certificate
supplied to this method is ALWAYS the first of the collection returned in
the previous call to
getSigningCertificateChain.
- Specified by:
getSigningKey in interface KeyingDataProvider
- Parameters:
signingCert - the certificate for which the corresponding key should be returned
- Returns:
- the private key that matches
signingCert
- Throws:
SigningKeyException - if the signing key couldn't be obtained
UnexpectedJCAException - when an unexpected platform error occurs
Copyright © 2012. All Rights Reserved.