public final class X509CertificateChainPrivateCredential extends Object
NO_CREDENTIALS
Constructor and Description |
---|
X509CertificateChainPrivateCredential(PrivateKey privateKey,
X509Certificate... certificateChain)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canVerify(Class<? extends Evidence> evidenceClass,
String algorithmName)
Determine whether this credential can, generally speaking, verify the given evidence type.
|
X509CertificateChainPrivateCredential |
clone()
Creates and returns a copy of this
Credential . |
boolean |
equals(Object obj) |
String |
getAlgorithm()
Get the algorithm name associated with this credential (will never be
null ). |
X509Certificate[] |
getCertificateChain()
Get a copy of the certificate chain.
|
X509Certificate |
getFirstCertificate()
Get the first certificate in the chain.
|
X509Certificate |
getLastCertificate()
Get the last certificate in the chain.
|
<P extends AlgorithmParameterSpec> |
getParameters(Class<P> paramSpecClass)
Get the algorithm parameters of the given type from this credential.
|
PrivateKey |
getPrivateKey()
Get the private key.
|
int |
hashCode() |
boolean |
impliesSameParameters(AlgorithmCredential other)
Determine whether the other credential's parameters are implied by this one.
|
boolean |
supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)
Determine whether this credential instance supports the given algorithm parameter type.
|
boolean |
verify(Evidence evidence)
Verify the given evidence.
|
boolean |
verify(Supplier<Provider[]> providerSupplier,
Evidence evidence)
Verify the given evidence.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getParameters, impliesParameters, matches, matches, matches, supportsParameters
canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, fromKeyStoreEntry
public X509CertificateChainPrivateCredential(PrivateKey privateKey, X509Certificate... certificateChain)
privateKey
- the private key (not null
)certificateChain
- the certificate chain (not null
, cannot contain null
elements)public PrivateKey getPrivateKey()
public X509CertificateChainPrivateCredential clone()
X509CertificateChainCredential
Credential
.clone
in interface AlgorithmCredential
clone
in interface Credential
clone
in interface X509CertificateChainCredential
Credential
.public boolean canVerify(Class<? extends Evidence> evidenceClass, String algorithmName)
Credential
canVerify
in interface Credential
evidenceClass
- the evidence type (must not be null
)algorithmName
- the evidence algorithm name (may be null
if the type of evidence does not support
algorithm names)true
if the evidence can be verified by this credential, false
otherwisepublic boolean verify(Evidence evidence)
Credential
verify
in interface Credential
evidence
- the evidence to verify (must not be null
)true
if the evidence is verified, false
otherwisepublic boolean verify(Supplier<Provider[]> providerSupplier, Evidence evidence)
Credential
verify
in interface Credential
providerSupplier
- the provider supplier to use for verification purposesevidence
- the evidence to verify (must not be null
)true
if the evidence is verified, false
otherwisepublic String getAlgorithm()
AlgorithmCredential
null
).getAlgorithm
in interface AlgorithmCredential
public boolean supportsParameters(Class<? extends AlgorithmParameterSpec> paramSpecClass)
AlgorithmCredential
supportsParameters
in interface AlgorithmCredential
paramSpecClass
- the parameter specification class (must not be null
)true
if the parameter type is supported, false
otherwisepublic <P extends AlgorithmParameterSpec> P getParameters(Class<P> paramSpecClass)
AlgorithmCredential
getParameters
in interface AlgorithmCredential
paramSpecClass
- the parameter specification class (must not be null
)null
if no parameters are present or available or the given type
was not supported by this credentialpublic boolean impliesSameParameters(AlgorithmCredential other)
AlgorithmCredential
impliesSameParameters
in interface AlgorithmCredential
other
- the other credential (must not be null
)true
if the credentials have matching parameters, false
otherwisepublic X509Certificate[] getCertificateChain()
X509CertificateChainCredential
getCertificateChain
in interface X509CertificateChainCredential
public X509Certificate getFirstCertificate()
X509CertificateChainCredential
getFirstCertificate
in interface X509CertificateChainCredential
null
)public X509Certificate getLastCertificate()
X509CertificateChainCredential
getLastCertificate
in interface X509CertificateChainCredential
null
)Copyright © 2020 JBoss by Red Hat. All rights reserved.