Package org.apache.tomcat.util.buf
Class Asn1Parser
java.lang.Object
org.apache.tomcat.util.buf.Asn1Parser
This is a very basic ASN.1 parser that provides the limited functionality required by Tomcat. It is a long way from a
complete parser.
TODO: Consider extending/re-writing this parser and refactoring the SpnegoTokenFixer to use it.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
eof()
int
byte[]
parseAttributeAsBytes
(int index) void
parseBytes
(byte[] dest) void
parseInt()
int
void
byte[]
byte[]
void
parseTag
(int tag) void
int
peekTag()
-
Field Details
-
TAG_INTEGER
public static final int TAG_INTEGER- See Also:
-
TAG_OCTET_STRING
public static final int TAG_OCTET_STRING- See Also:
-
TAG_NULL
public static final int TAG_NULL- See Also:
-
TAG_OID
public static final int TAG_OID- See Also:
-
TAG_UTF8STRING
public static final int TAG_UTF8STRING- See Also:
-
TAG_SEQUENCE
public static final int TAG_SEQUENCE- See Also:
-
TAG_ATTRIBUTE_BASE
public static final int TAG_ATTRIBUTE_BASE- See Also:
-
-
Constructor Details
-
Asn1Parser
public Asn1Parser(byte[] source)
-
-
Method Details
-
eof
public boolean eof() -
peekTag
public int peekTag() -
parseTagSequence
public void parseTagSequence() -
parseTag
public void parseTag(int tag) -
parseFullLength
public void parseFullLength() -
parseLength
public int parseLength() -
parseInt
-
parseOctetString
public byte[] parseOctetString() -
parseNull
public void parseNull() -
parseOIDAsBytes
public byte[] parseOIDAsBytes() -
parseUTF8String
-
parseAttributeAsBytes
public byte[] parseAttributeAsBytes(int index) -
parseBytes
public void parseBytes(byte[] dest) -
getNestedSequenceLevel
public int getNestedSequenceLevel()
-