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

# globus\_openssl\_error\_utility(3)

Error Object Helper Functions - Error Object Helper Functions.

## NAME

globus\_openssl\_error\_utility - Error Object Helper Functions

 \- Error Object Helper Functions.

## SYNOPSIS

### Functions

globus\_bool\_t **globus\_error\_match\_openssl\_error** (globus\_object\_t \*error, unsigned long library, unsigned long function, unsigned long reason)\
 globus\_object\_t \* **globus\_error\_wrap\_openssl\_error** (globus\_module\_descriptor\_t \*base\_source, int error\_type, const char \*source\_file, const char \*source\_func, int source\_line, const char \*format,...)\

## Detailed Description

Error Object Helper Functions.

The functions in the **Error Object Helper Functions**  section deal with Globus error objects constructed with OpenSSL error data. These functions manipulate the generic globus\_object\_t representation of an OpenSSL error.

## Function Documentation

### globus\_bool\_t globus\_error\_match\_openssl\_error (globus\_object\_t \* error, unsigned long library, unsigned long function, unsigned long reason)

Check whether the error originated from a specific library, from a specific function and is of a specific type. \<\>

This function checks whether the error or any of it's causative errors originated from a specific library, specific function and is of a specific type.

**Parameters**

*error* The error object for which to perform the check \
 *library* The library to check for \
 *function* The function to check for \
 *reason* The type to check for

**Return values**

*GLOBUS\_TRUE* Error matched \
 *GLOBUS\_FALSE* Error failed to match

### globus\_object\_t \* globus\_error\_wrap\_openssl\_error (globus\_module\_descriptor\_t \* base\_source, int error\_type, const char \* source\_file, const char \* source\_func, int source\_line, const char \* format, ...)

Wrap the OpenSSL error and create a wrapped globus error object from the error.

This function gets all the OpenSSL errors from the error list, and chains them using the globus error string object. The resulting globus error object is a wrapper to the OpenSSL error at the end of the chain.

**Parameters**

*base\_source* The module that the error was generated from \
 *error\_type* The type of error encapsulating the OpenSSL error \
 *source\_file* Name of file. Use **FILE** \
 *source\_func* Name of function. Use \_globus\_func\_name and declare your func with GlobusFuncName(\<name\>) \
 *source\_line* Line number. Use **LINE** \
 *format* format string for the description of the error entry point where the OpenSSL error occurred, should be followed by parameters to fill the format string (like in printf).

**Returns**

The globus error object. A globus\_result\_t object can be created using the globus\_error\_put function

**See also**

globus\_error\_put()

## Author

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