public class SANCertificateIdentityMapping extends Object implements CertificateIdentityMapping
Modifier and Type | Field and Description |
---|---|
static String |
OTHERNAME_SRV_OID
id-on-dnsSRV Object Identifier.
|
static String |
OTHERNAME_UPN_OID
User Principal Name (UPN) Object Identifier.
|
static String |
OTHERNAME_XMPP_OID
id-on-xmppAddr Object Identifier.
|
Constructor and Description |
---|
SANCertificateIdentityMapping() |
Modifier and Type | Method and Description |
---|---|
List<String> |
mapIdentity(X509Certificate certificate)
Returns the JID representation of an XMPP entity contained as a SubjectAltName extension
in the certificate.
|
String |
name()
Returns the short name of mapping.
|
protected String |
parseOtherName(org.bouncycastle.asn1.ASN1ObjectIdentifier typeId,
org.bouncycastle.asn1.ASN1Primitive value)
Allow sub-class to support additional OID values, possibly taking typeId into account
|
String |
parseOtherName(byte[] item)
Parses the byte-array representation of a subjectAltName 'otherName' entry.
|
protected String |
parseOtherNameDnsSrv(org.bouncycastle.asn1.ASN1Primitive srvName)
Parses a SRVName value as specified by RFC 4985.
|
protected String |
parseOtherNameUpn(org.bouncycastle.asn1.ASN1Primitive value)
Parse a UPN value
|
protected String |
parseOtherNameXmppAddr(org.bouncycastle.asn1.ASN1Primitive xmppAddr)
Parse a XmppAddr value as specified in RFC 6120.
|
public static final String OTHERNAME_XMPP_OID
public static final String OTHERNAME_SRV_OID
public static final String OTHERNAME_UPN_OID
public List<String> mapIdentity(X509Certificate certificate)
mapIdentity
in interface CertificateIdentityMapping
certificate
- the certificate presented by the remote entity.public String name()
name
in interface CertificateIdentityMapping
public String parseOtherName(byte[] item)
The provided 'OtherName' is expected to have this format:
OtherName ::= SEQUENCE {
type-id OBJECT IDENTIFIER,
value [0] EXPLICIT ANY DEFINED BY type-id }
item
- A byte array representation of a subjectAltName 'otherName' entry (cannot be null).protected String parseOtherName(org.bouncycastle.asn1.ASN1ObjectIdentifier typeId, org.bouncycastle.asn1.ASN1Primitive value)
typeId
- The ASN.1 object identifier (cannot be null).value
- The ASN.1 representation of the value (cannot be null).protected String parseOtherNameDnsSrv(org.bouncycastle.asn1.ASN1Primitive srvName)
srvName
- The ASN.1 representation of the srvName value (cannot be null).protected String parseOtherNameXmppAddr(org.bouncycastle.asn1.ASN1Primitive xmppAddr)
xmppAddr
- The ASN.1 representation of the xmppAddr value (cannot be null).protected String parseOtherNameUpn(org.bouncycastle.asn1.ASN1Primitive value)
value
- The ASN.1 representation of the UPN (cannot be null).Copyright © 2003–2019 Ignite Realtime. All rights reserved.