kz.gamma.asn1.x500.style
Class RFC4519Style

java.lang.Object
  extended by kz.gamma.asn1.x500.style.RFC4519Style
All Implemented Interfaces:
X500NameStyle

public class RFC4519Style
extends java.lang.Object
implements X500NameStyle


Field Summary
static DERObjectIdentifier businessCategory
           
static DERObjectIdentifier c
           
static DERObjectIdentifier cn
           
static DERObjectIdentifier dc
           
private static java.util.Hashtable DefaultLookUp
          look up table translating common symbols into their OIDS.
private static java.util.Hashtable DefaultSymbols
          default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras
static DERObjectIdentifier description
           
static DERObjectIdentifier destinationIndicator
           
static DERObjectIdentifier distinguishedName
           
static DERObjectIdentifier dnQualifier
           
static DERObjectIdentifier enhancedSearchGuide
           
static DERObjectIdentifier facsimileTelephoneNumber
           
static DERObjectIdentifier generationQualifier
           
static DERObjectIdentifier givenName
           
static DERObjectIdentifier houseIdentifier
           
static DERObjectIdentifier initials
           
static X500NameStyle INSTANCE
           
static DERObjectIdentifier internationalISDNNumber
           
static DERObjectIdentifier l
           
static DERObjectIdentifier member
           
static DERObjectIdentifier name
           
static DERObjectIdentifier o
           
static DERObjectIdentifier ou
           
static DERObjectIdentifier owner
           
static DERObjectIdentifier physicalDeliveryOfficeName
           
static DERObjectIdentifier postalAddress
           
static DERObjectIdentifier postalCode
           
static DERObjectIdentifier postOfficeBox
           
static DERObjectIdentifier preferredDeliveryMethod
           
static DERObjectIdentifier registeredAddress
           
static DERObjectIdentifier roleOccupant
           
static DERObjectIdentifier searchGuide
           
static DERObjectIdentifier seeAlso
           
static DERObjectIdentifier serialNumber
           
static DERObjectIdentifier sn
           
static DERObjectIdentifier st
           
static DERObjectIdentifier street
           
static DERObjectIdentifier telephoneNumber
           
static DERObjectIdentifier teletexTerminalIdentifier
           
static DERObjectIdentifier telexNumber
           
static DERObjectIdentifier title
           
static DERObjectIdentifier uid
           
static DERObjectIdentifier uniqueMember
           
static DERObjectIdentifier userPassword
           
static DERObjectIdentifier x121Address
           
static DERObjectIdentifier x500UniqueIdentifier
           
 
Constructor Summary
protected RFC4519Style()
           
 
Method Summary
 boolean areEqual(X500Name name1, X500Name name2)
          Return true if the two names are equal.
 DERObjectIdentifier attrNameToOID(java.lang.String attrName)
          Return the OID associated with the passed in name.
private  int calcHashCode(ASN1Encodable enc)
           
 int calculateHashCode(X500Name name)
          Calculate a hashCode for the passed in name.
private  boolean foundMatch(boolean reverse, RDN rdn, RDN[] possRDNs)
           
 RDN[] fromString(java.lang.String dirName)
          Return an array of RDN generated from the passed in String.
 java.lang.String[] oidToAttrNames(DERObjectIdentifier oid)
          Return the acceptable names in a String DN that map to OID.
 java.lang.String oidToDisplayName(DERObjectIdentifier oid)
          Return the display name for toString() associated with the OID.
protected  boolean rdnAreEqual(RDN rdn1, RDN rdn2)
           
 ASN1Encodable stringToValue(DERObjectIdentifier oid, java.lang.String value)
          Convert the passed in String value into the appropriate ASN.1 encoded object.
 java.lang.String toString(X500Name name)
          Convert the passed in X500Name to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final X500NameStyle INSTANCE

businessCategory

public static final DERObjectIdentifier businessCategory

c

public static final DERObjectIdentifier c

cn

public static final DERObjectIdentifier cn

dc

public static final DERObjectIdentifier dc

description

public static final DERObjectIdentifier description

destinationIndicator

public static final DERObjectIdentifier destinationIndicator

distinguishedName

public static final DERObjectIdentifier distinguishedName

dnQualifier

public static final DERObjectIdentifier dnQualifier

enhancedSearchGuide

public static final DERObjectIdentifier enhancedSearchGuide

facsimileTelephoneNumber

public static final DERObjectIdentifier facsimileTelephoneNumber

generationQualifier

public static final DERObjectIdentifier generationQualifier

givenName

public static final DERObjectIdentifier givenName

houseIdentifier

public static final DERObjectIdentifier houseIdentifier

initials

public static final DERObjectIdentifier initials

internationalISDNNumber

public static final DERObjectIdentifier internationalISDNNumber

l

public static final DERObjectIdentifier l

member

public static final DERObjectIdentifier member

name

public static final DERObjectIdentifier name

o

public static final DERObjectIdentifier o

ou

public static final DERObjectIdentifier ou

owner

public static final DERObjectIdentifier owner

physicalDeliveryOfficeName

public static final DERObjectIdentifier physicalDeliveryOfficeName

postalAddress

public static final DERObjectIdentifier postalAddress

postalCode

public static final DERObjectIdentifier postalCode

postOfficeBox

public static final DERObjectIdentifier postOfficeBox

preferredDeliveryMethod

public static final DERObjectIdentifier preferredDeliveryMethod

registeredAddress

public static final DERObjectIdentifier registeredAddress

roleOccupant

public static final DERObjectIdentifier roleOccupant

searchGuide

public static final DERObjectIdentifier searchGuide

seeAlso

public static final DERObjectIdentifier seeAlso

serialNumber

public static final DERObjectIdentifier serialNumber

sn

public static final DERObjectIdentifier sn

st

public static final DERObjectIdentifier st

street

public static final DERObjectIdentifier street

telephoneNumber

public static final DERObjectIdentifier telephoneNumber

teletexTerminalIdentifier

public static final DERObjectIdentifier teletexTerminalIdentifier

telexNumber

public static final DERObjectIdentifier telexNumber

title

public static final DERObjectIdentifier title

uid

public static final DERObjectIdentifier uid

uniqueMember

public static final DERObjectIdentifier uniqueMember

userPassword

public static final DERObjectIdentifier userPassword

x121Address

public static final DERObjectIdentifier x121Address

x500UniqueIdentifier

public static final DERObjectIdentifier x500UniqueIdentifier

DefaultSymbols

private static final java.util.Hashtable DefaultSymbols
default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras


DefaultLookUp

private static final java.util.Hashtable DefaultLookUp
look up table translating common symbols into their OIDS.

Constructor Detail

RFC4519Style

protected RFC4519Style()
Method Detail

stringToValue

public ASN1Encodable stringToValue(DERObjectIdentifier oid,
                                   java.lang.String value)
Description copied from interface: X500NameStyle
Convert the passed in String value into the appropriate ASN.1 encoded object.

Specified by:
stringToValue in interface X500NameStyle
Parameters:
oid - the OID associated with the value in the DN.
value - the value of the particular DN component.
Returns:
the ASN.1 equivalent for the value.

oidToDisplayName

public java.lang.String oidToDisplayName(DERObjectIdentifier oid)
Description copied from interface: X500NameStyle
Return the display name for toString() associated with the OID.

Specified by:
oidToDisplayName in interface X500NameStyle
Parameters:
oid - the OID of interest.
Returns:
the name displayed in toString(), null if no mapping provided.

oidToAttrNames

public java.lang.String[] oidToAttrNames(DERObjectIdentifier oid)
Description copied from interface: X500NameStyle
Return the acceptable names in a String DN that map to OID.

Specified by:
oidToAttrNames in interface X500NameStyle
Parameters:
oid - the OID of interest.
Returns:
an array of String aliases for the OID, zero length if there are none.

attrNameToOID

public DERObjectIdentifier attrNameToOID(java.lang.String attrName)
Description copied from interface: X500NameStyle
Return the OID associated with the passed in name.

Specified by:
attrNameToOID in interface X500NameStyle
Parameters:
attrName - the string to match.
Returns:
an OID

areEqual

public boolean areEqual(X500Name name1,
                        X500Name name2)
Description copied from interface: X500NameStyle
Return true if the two names are equal.

Specified by:
areEqual in interface X500NameStyle
Parameters:
name1 - first name for comparison.
name2 - second name for comparison.
Returns:
true if name1 = name 2, false otherwise.

foundMatch

private boolean foundMatch(boolean reverse,
                           RDN rdn,
                           RDN[] possRDNs)

rdnAreEqual

protected boolean rdnAreEqual(RDN rdn1,
                              RDN rdn2)

fromString

public RDN[] fromString(java.lang.String dirName)
Description copied from interface: X500NameStyle
Return an array of RDN generated from the passed in String.

Specified by:
fromString in interface X500NameStyle
Parameters:
dirName - the String representation.
Returns:
an array of corresponding RDNs.

calculateHashCode

public int calculateHashCode(X500Name name)
Description copied from interface: X500NameStyle
Calculate a hashCode for the passed in name.

Specified by:
calculateHashCode in interface X500NameStyle
Parameters:
name - the name the hashCode is required for.
Returns:
the calculated hashCode.

calcHashCode

private int calcHashCode(ASN1Encodable enc)

toString

public java.lang.String toString(X500Name name)
Description copied from interface: X500NameStyle
Convert the passed in X500Name to a String.

Specified by:
toString in interface X500NameStyle
Parameters:
name - the name to convert.
Returns:
a String representation.


Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.