The format is specified in RFC 2743 section 3.1.
| Modifier and Type | Field and Description |
|---|---|
| private final ObjectIdentifier | |
| private final byte[] | |
| private final int | |
| public static final int | TOKEN_ID
The tag defined in the GSS-API mechanism independent token format. |
| Access | Constructor and Description |
|---|---|
| public | GSSHeader(ObjectIdentifier
the Oid of the mechanism which generated the token mechOid, int the length of the subsequent portion that
the mechanism will be adding. mechTokenLength)Creates a GSSHeader instance whose encoding can be used as the prefix for a particular mechanism token. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the number of bytes that are output as a result of this encodingthe OutputStream to which the token should be written. os)Encodes this GSSHeader instance onto the provided OutputStream. |
| private int | getLenFieldSize(int len)
Used to determine the number of bytes that will be need to encode the length field of the GSSHeader. |
| public int | Returns: the length of the encoding of this GSSHeader instance.Used to obtain the length of the encoding of this GSSHeader. |
| private int | Returns: the length or -1 if indefinite length found.Get a length from the input stream, allowing for at most 32 bits of encoding to be used. |
| private int | Returns: the length or -1 if indefinite length found.Get a length from the input stream, allowing for at most 32 bits of encoding to be used. |
| public static int | Returns: the maximum size of mechanism token that can be used so as to not exceed maxTotalSize with the GSS-API tokenthe Oid of the mechanism that will generate
this GSS-API token mechOid, int the pre-determined value that serves as a
maximum size for the complete GSS-API token (including a
GSSHeader) maxTotalSize)Used to determine what the maximum possible mechanism token size is if the complete GSSToken returned to the application (including a GSSHeader) is not to exceed some pre-determined value in size. |
| public int | Returns: the length of the mechanism specific token portion that will follow this GSSHeader.Used to obtain the length of the mechanism specific token that will follow the encoding of this GSSHeader instance. |
| public ObjectIdentifier | |
| private int | Returns: the number of bytes writtenthe length of the attribute. len, OutputStream the outputstream to write the length to out)Put the encoding of the length in the specified stream. |
| mechOid | back to summary |
|---|---|
| private final ObjectIdentifier mechOid | |
| mechOidBytes | back to summary |
|---|---|
| private final byte[] mechOidBytes | |
| mechTokenLength | back to summary |
|---|---|
| private final int mechTokenLength | |
| TOKEN_ID | back to summary |
|---|---|
| public static final int TOKEN_ID The tag defined in the GSS-API mechanism independent token format. | |
| GSSHeader | back to summary |
|---|---|
| public GSSHeader(ObjectIdentifier mechOid, int mechTokenLength) throws IOException Creates a GSSHeader instance whose encoding can be used as the prefix for a particular mechanism token.
| |
| GSSHeader | back to summary |
|---|---|
| public GSSHeader(InputStream is) throws IOException, GSSException Reads in a GSSHeader from an InputStream. Typically, this would be used as part of reading the complete token from an InputStream that is obtained from a socket. | |
| encode | back to summary |
|---|---|
| public int encode(OutputStream os) throws IOException Encodes this GSSHeader instance onto the provided OutputStream.
| |
| getLenFieldSize | back to summary |
|---|---|
| private int getLenFieldSize(int len) Used to determine the number of bytes that will be need to encode the length field of the GSSHeader. | |
| getLength | back to summary |
|---|---|
| public int getLength() Used to obtain the length of the encoding of this GSSHeader.
| |
| getLength | back to summary |
|---|---|
| private int getLength(InputStream in) throws IOException Get a length from the input stream, allowing for at most 32 bits of encoding to be used. (Not the same as getting a tagged integer!)
| |
| getLength | back to summary |
|---|---|
| private int getLength(int lenByte, InputStream in) throws IOException Get a length from the input stream, allowing for at most 32 bits of encoding to be used. (Not the same as getting a tagged integer!)
| |
| getMaxMechTokenSize | back to summary |
|---|---|
| public static int getMaxMechTokenSize(ObjectIdentifier mechOid, int maxTotalSize) Used to determine what the maximum possible mechanism token size is if the complete GSSToken returned to the application (including a GSSHeader) is not to exceed some pre-determined value in size.
| |
| getMechTokenLength | back to summary |
|---|---|
| public int getMechTokenLength() Used to obtain the length of the mechanism specific token that will follow the encoding of this GSSHeader instance.
| |
| getOid | back to summary |
|---|---|
| public ObjectIdentifier getOid() Used to obtain the Oid stored in this GSSHeader instance.
| |
| putLength | back to summary |
|---|---|
| private int putLength(int len, OutputStream out) throws IOException Put the encoding of the length in the specified stream.
| |