---
name: "globus_gsi_gss_assist_tokens"
section: "3"
platform: "linux"
package: "libglobus-gss-assist-doc"
version: "8.5-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gsi_gss_assist_tokens"
---

# globus\_gsi\_gss\_assist\_tokens(3)

## NAME

Security Token Transport -

### Token Get File Descriptor

int **globus\_gss\_assist\_token\_get\_fd** (void \*arg, void \*\*bufp, size\_t \*sizep)\

### Token Send File Descriptor

int **globus\_gss\_assist\_token\_send\_fd** (void \*arg, void \*buf, size\_t size)\

### Token Send File Descriptor Without Length

int **globus\_gss\_assist\_token\_send\_fd\_without\_length** (void \*arg, void \*buf, size\_t size)\

### Token Send File Descriptor Flag EX

int **globus\_gss\_assist\_token\_send\_fd\_ex** (void \*exp, void \*buf, size\_t size)\

## Detailed Description

Token routines using fread and fwrite.

Additional code has been added to detect tokens which are sent without a length field. These can currently be only SSL tokens. This does require some knowledge of the underlying GSSAPI, by the application, but is within the guidelines of the GSSAPI specifications.

The get routine will automaticly attempt this test, while a new send routine will check a flag. The old send routine will work as before, sending a 4-byte length.

## Function Documentation

### int globus\_gss\_assist\_token\_get\_fd (void \*arg, void \*\*bufp, size\_t \*sizep)

Use a open file discriptor to get a token. This function provides parameter types that allow it to be passed to **globus\_gss\_assist\_init\_sec\_context** and **globus\_gss\_assist\_accept\_sec\_context**

**Parameters:**

*arg* the FILE \* stream cast to a void pointer \
 *bufp* the resulting token \
 *sizep* the size (number of bytes) read into bufp

**Returns:**

0 on success \> 0 is internal return \< 0 is the -errno

### int globus\_gss\_assist\_token\_send\_fd (void \*arg, void \*buf, size\_tsize)

Write a token to the open file descriptor. WIll write it with a 4 byte length. This function provides parameter types that allow it to be passed to **globus\_gss\_assist\_init\_sec\_context** and **globus\_gss\_assist\_accept\_sec\_context**

**Parameters:**

*arg* the FILE \* stream to send the token on \
 *buf* the token \
 *size* the size of the token in bytes

**Returns:**

0 on success \>0 on error \<0 on errno error

### int globus\_gss\_assist\_token\_send\_fd\_without\_length (void \*arg, void \*buf, size\_tsize)

Write a token to the open file descripter. Will write it without a length. so as to

### int globus\_gss\_assist\_token\_send\_fd\_ex (void \*exp, void \*buf, size\_tsize)

Write a token to the open file descripter. will look at the flag to determine if the length field need to be written.

**Parameters:**

*exp* the globus\_gss\_assist\_ex variable that holds the FILE \* stream and flags to bet set \
 *buf* the token buffer to send \
 *size* size of the token buffer

**Returns:**

0 on success \>0 on error \<0 on errno error (-errno)

## Author

Generated automatically by Doxygen for globus gss assist from the source code.
