Package org.wildfly.security.x500
Class TrustedAuthority
- java.lang.Object
-
- org.wildfly.security.x500.TrustedAuthority
-
- All Implemented Interfaces:
ASN1Encodable
- Direct Known Subclasses:
TrustedAuthority.CertificateTrustedAuthority
,TrustedAuthority.HashTrustedAuthority
,TrustedAuthority.NameTrustedAuthority
public abstract class TrustedAuthority extends Object implements ASN1Encodable
A representation of a trusted certificate authority.- Author:
- Farah Juma
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TrustedAuthority.CertificateTrustedAuthority
A trusted authority that is identified by its certificate.static class
TrustedAuthority.HashTrustedAuthority
A trusted authority that is identified by a hash.static class
TrustedAuthority.IssuerKeyHashTrustedAuthority
A trusted authority that is identified by the hash of its public key.static class
TrustedAuthority.IssuerNameHashTrustedAuthority
A trusted authority that is identified by the hash of its name.static class
TrustedAuthority.NameTrustedAuthority
A trusted authority that is identified by its name.static class
TrustedAuthority.PKCS15KeyHashTrustedAuthority
A trusted authority that is identified by the PKCS #15 key hash.
-
Field Summary
Fields Modifier and Type Field Description static int
AUTHORITY_CERTIFICATE
static int
AUTHORITY_NAME
static int
ISSUER_KEY_HASH
static int
ISSUER_NAME_HASH
static int
PKCS_15_KEY_HASH
private int
type
-
Constructor Summary
Constructors Constructor Description TrustedAuthority(int type)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
encodeTo(ASN1Encoder encoder)
Encode thisTrustedAuth
element using the given trusted authority and DER encoder, whereTrustedAuth
is defined as:abstract Object
getIdentifier()
Get the identifier for this trusted authority.int
getType()
Get the type of this trusted authority.
-
-
-
Field Detail
-
AUTHORITY_NAME
public static final int AUTHORITY_NAME
- See Also:
- Constant Field Values
-
ISSUER_NAME_HASH
public static final int ISSUER_NAME_HASH
- See Also:
- Constant Field Values
-
ISSUER_KEY_HASH
public static final int ISSUER_KEY_HASH
- See Also:
- Constant Field Values
-
AUTHORITY_CERTIFICATE
public static final int AUTHORITY_CERTIFICATE
- See Also:
- Constant Field Values
-
PKCS_15_KEY_HASH
public static final int PKCS_15_KEY_HASH
- See Also:
- Constant Field Values
-
type
private final int type
-
-
Method Detail
-
getType
public int getType()
Get the type of this trusted authority.- Returns:
- the type of this trusted authority
-
getIdentifier
public abstract Object getIdentifier()
Get the identifier for this trusted authority.- Returns:
- the identifier for this trusted authority
-
encodeTo
public abstract void encodeTo(ASN1Encoder encoder) throws ASN1Exception
Encode this
TrustedAuth
element using the given trusted authority and DER encoder, whereTrustedAuth
is defined as:TrustedAuth ::= CHOICE { authorityName [0] Name, -- SubjectName from CA certificate issuerNameHash [1] OCTET STRING, -- SHA-1 hash of Authority's DN issuerKeyHash [2] OCTET STRING, -- SHA-1 hash of Authority's public key authorityCertificate [3] Certificate, -- CA certificate pkcs15KeyHash [4] OCTET STRING -- PKCS #15 key hash }
- Specified by:
encodeTo
in interfaceASN1Encodable
- Parameters:
encoder
- the DER encoder (must not benull
)- Throws:
ASN1Exception
- if any of the trusted authorities are invalid
-
-