Package org.wildfly.security.evidence
Class X509PeerCertificateChainEvidence
- java.lang.Object
-
- org.wildfly.security.evidence.X509PeerCertificateChainEvidence
-
- All Implemented Interfaces:
AlgorithmEvidence
,Evidence
public final class X509PeerCertificateChainEvidence extends Object implements AlgorithmEvidence
A piece of evidence that is comprised of a verified peer certificate chain.
-
-
Constructor Summary
Constructors Constructor Description X509PeerCertificateChainEvidence(X509Certificate... peerCertificateChain)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getAlgorithm()
Get the certificate public key algorithm.Principal
getDecodedPrincipal()
Get thePrincipal
derived from this evidence using an evidence decoder (may benull
).X500Principal
getDefaultPrincipal()
Get the defaultPrincipal
associated with this evidence (may benull
).X509Certificate
getFirstCertificate()
Get the first certificate in the peer certificate chain.X509Certificate
getLastCertificate()
Get the last certificate in the peer certificate chain.X509Certificate[]
getPeerCertificateChain()
Get the peer certificate chain.X500Principal
getPrincipal()
Deprecated.UsegetDefaultPrincipal()
orgetDecodedPrincipal()
instead.void
setDecodedPrincipal(Principal decodedPrincipal)
Set thePrincipal
derived from this evidence using an evidence decoder (may benull
).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.evidence.AlgorithmEvidence
castAndApply
-
Methods inherited from interface org.wildfly.security.evidence.Evidence
castAndApply, castAs, castAs
-
-
-
-
Constructor Detail
-
X509PeerCertificateChainEvidence
public X509PeerCertificateChainEvidence(X509Certificate... peerCertificateChain)
Construct a new instance.- Parameters:
peerCertificateChain
- the peer certificate chain to use (must not benull
)
-
-
Method Detail
-
getPrincipal
@Deprecated public X500Principal getPrincipal()
Deprecated.UsegetDefaultPrincipal()
orgetDecodedPrincipal()
instead.Get thePrincipal
represented by the first certificate in the chain.- Specified by:
getPrincipal
in interfaceEvidence
- Returns:
- the
Principal
represented by the first certificate in the chain.
-
getDefaultPrincipal
public X500Principal getDefaultPrincipal()
Description copied from interface:Evidence
Get the defaultPrincipal
associated with this evidence (may benull
).- Specified by:
getDefaultPrincipal
in interfaceEvidence
- Returns:
- the default
Principal
associated with this evidence (may benull
)
-
getDecodedPrincipal
public Principal getDecodedPrincipal()
Description copied from interface:Evidence
Get thePrincipal
derived from this evidence using an evidence decoder (may benull
).- Specified by:
getDecodedPrincipal
in interfaceEvidence
- Returns:
- the
Principal
derived from this evidence using an evidence decoder (may benull
)
-
setDecodedPrincipal
public void setDecodedPrincipal(Principal decodedPrincipal)
Description copied from interface:Evidence
Set thePrincipal
derived from this evidence using an evidence decoder (may benull
). This method is a no-op by default. It is intended to be implemented by evidence types that can be associated with a principal derived from an evidence decoder.- Specified by:
setDecodedPrincipal
in interfaceEvidence
- Parameters:
decodedPrincipal
- the principal derived from this evidence using an evidence decoder (may benull
)
-
getPeerCertificateChain
public X509Certificate[] getPeerCertificateChain()
Get the peer certificate chain.- Returns:
- the peer certificate chain (not
null
)
-
getAlgorithm
public String getAlgorithm()
Get the certificate public key algorithm.- Specified by:
getAlgorithm
in interfaceAlgorithmEvidence
- Returns:
- the certificate public key algorithm (not
null
)
-
getFirstCertificate
public X509Certificate getFirstCertificate()
Get the first certificate in the peer certificate chain.- Returns:
- the first certificate in the peer certificate chain
-
getLastCertificate
public X509Certificate getLastCertificate()
Get the last certificate in the peer certificate chain.- Returns:
- the last certificate in the peer certificate chain
-
-