---
name: "globus_gsi_callback_functions"
section: "3"
platform: "linux"
package: "libglobus-gsi-callback-doc"
version: "6.2-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gsi_callback_functions"
---

# globus\_gsi\_callback\_functions(3)

Callback Functions - Callback Functions.

## NAME

globus\_gsi\_callback\_functions - Callback Functions

 \- Callback Functions.

## SYNOPSIS

### Functions

globus\_result\_t **globus\_gsi\_callback\_get\_X509\_STORE\_callback\_data\_index** (int \*index)\
 Get callback data index from X509\_STORE.  globus\_result\_t **globus\_gsi\_callback\_get\_SSL\_callback\_data\_index** (int \*index)\
 Get callback data index from SSL structure.  int **globus\_gsi\_callback\_X509\_verify\_cert** (X509\_STORE\_CTX \*context, void \*arg)\
 Certificate verify wrapper.  int **globus\_gsi\_callback\_create\_proxy\_callback** (int preverify\_ok, X509\_STORE\_CTX \*x509\_context)\
 Independent path validation callback.  int **globus\_gsi\_callback\_handshake\_callback** (int preverify\_ok, X509\_STORE\_CTX \*x509\_context)\
 SSL path validation callback.  int **globus\_gsi\_callback\_check\_issued** (X509\_STORE\_CTX \*context, X509 \*cert, X509 \*issuer)\
 OpenSSL X509\_check\_issued() wrapper.

## Detailed Description

Callback Functions.

Functions that plug into various plug points in the OpenSSL path validation mechanism. These functions add CRL checking, X509 Extension handling and proxy validation.

## Function Documentation

### int globus\_gsi\_callback\_check\_issued (X509\_STORE\_CTX \* context, X509 \* cert, X509 \* issuer)

OpenSSL X509\_check\_issued() wrapper. This function wraps the OpenSSL X509\_check\_issued() call and catches the error caused by the fact that a proxy certificate issuer may not have to have the correct KeyUsage fields set.

**Parameters**

*context* The validation state object. \
 *cert* The certificate to check \
 *issuer* The issuer certificate to check

**Returns**

1 on success 0 on failure

### int globus\_gsi\_callback\_create\_proxy\_callback (int preverify\_ok, X509\_STORE\_CTX \* x509\_context)

Independent path validation callback. This function provides a path validation callback for validation outside of a SSL session. It should be used in X509\_STORE\_set\_verify\_cb\_func().

**Parameters**

*preverify\_ok* Communicates the result of default validation steps performed by OpenSSL \

*x509\_context* The validation state object

**Returns**

1 on success 0 on failure

### globus\_result\_t globus\_gsi\_callback\_get\_SSL\_callback\_data\_index (int \* index)

Get callback data index from SSL structure. Retrieve or create the index for our callback data structure in the SSL structure.

**Parameters**

*index* Will contain the index upon return

**Returns**

GLOBUS\_SUCCESS unless an error occurred, in which case, a globus error object ID is returned

### globus\_result\_t globus\_gsi\_callback\_get\_X509\_STORE\_callback\_data\_index (int \* index)

Get callback data index from X509\_STORE. Retrieve or create the index for our callback data structure in the X509\_STORE.

**Parameters**

*index* Will contain the index upon return

**Returns**

GLOBUS\_SUCCESS unless an error occurred, in which case, a globus error object ID is returned

### int globus\_gsi\_callback\_handshake\_callback (int preverify\_ok, X509\_STORE\_CTX \* x509\_context)

SSL path validation callback. This function provides a path validation callback for the validation part of establishing a SSL session. It handles proxy certificates, X509 Extensions and CRL checking. It should be used in SSL\_CTX\_set\_verify().

**Parameters**

*preverify\_ok* Communicates the result of default validation steps performed by OpenSSL \

*x509\_context* The validation state object.

**Returns**

1 on success 0 on failure

### int globus\_gsi\_callback\_X509\_verify\_cert (X509\_STORE\_CTX \* context, void \* arg)

Certificate verify wrapper. This function wraps the OpenSSL certificate verification callback for the purpose of a replacing the standard issuer check with one that deals with proxy certificates. Should be used with SSL\_CTX\_set\_cert\_verify\_callback()

**Parameters**

*context* The X509\_STORE\_CTX for which to register the callback. \
 *arg* Arguments to the callback. Currently ignored.

**Returns**

1 on success 0 on failure

## Author

Generated automatically by Doxygen for globus\_gsi\_callback from the source code.
