|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.emframe.dev.ASNOne
This class provides methods to convert a given LDAP OID string to a standard ASN1 ID sequence of bytes. An LDAP OID string is in the dotted decimal string format. For example, 1.2.840.
The following rules are applied to the LDAP string:
BER encoding. Primitive contents octets are as follows, where value1, ..., valueN denote the integer values of the components in the complete object identifier:
(From "A Layman's Guide to a Subst of ASN.1, BER, and DER" by Burton S. Kaliski Jr., Revised November 1, 1993.)
Example: The ASN.1 encoding for the LDAP OID string "1.2.840.113549" is 06 06 2A 86 48 86 F7 0D. 06 06 represents the length of the data following this byte. The first 06 in the 06 06 sequence is a special byte signifying that this data represents an OID.
The schema OIDs for the DNIP schema extensions are:
The LDAP OID for the "DNIP:Subnet Attr" attribute is represented as:
2.16.840.1.113719.1.25.4.1.1
The 1.1 at the end is the sequence number, which should be incremented for each new attribute type. The first 1 in the ending 1.1 sequence is the revision number of the attribute type (generally this is always 1).
The following table lists the currently-assigned OID to the various DNS/DHCP attribute types and object classes:
Attribute Type/Object Class | OID |
DNS/DHCP Attribute Types/DNIP:Subnet Attr | 2.16.840.1.113719.1.25.4.1.1 |
Constructor Summary | |
ASNOne(byte[] oidArray)
Constructor using a ASN1 ID byte array. |
|
ASNOne(java.lang.String ldapString)
Constructor using a ldap string representing an LDAP OID. |
Method Summary | |
protected java.lang.Byte |
firstOctetEncoder(java.lang.String firstComp,
java.lang.String secondComp)
Encodes two components of the LDAP OID String into a Byte object. |
byte[] |
getAsn1()
Returns the ASN1 ID sequence of bytes. |
byte[] |
getNullAsn1()
Returns an empty byte array sized to 32 bytes. |
java.lang.String |
getOid()
Returns the LDAP OID String value. |
byte[] |
parseLDAPComponent(java.lang.String ldapComponent)
Converts the given ldapComponent into a sequence of encoded bytes. |
java.lang.String |
toString()
Return the LDAP OID string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ASNOne(byte[] oidArray)
oidArray
- byte array containing an ASN1 ID sequence of bytespublic ASNOne(java.lang.String ldapString)
ldapString
- String containing and LDAP OID.Method Detail |
protected java.lang.Byte firstOctetEncoder(java.lang.String firstComp, java.lang.String secondComp)
firstComp
- The first component to encodesecondComp
- The second component to encode
public byte[] getAsn1()
public byte[] getNullAsn1()
public java.lang.String getOid()
public byte[] parseLDAPComponent(java.lang.String ldapComponent)
ldapComponent
- String containing the LDAP OID
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |