The PEP client API for C is used to authorize requests with the Argus PEP Server, and receive authorization decisions.
Version 2.X of the PEP client C API is multi-thread friendly. However, you are not allowed to share a PEP handle among multiple threads:
If your threads are object (OO programming, ...), it is recommended you to create (pep_initialize) the PEP handle in the constructor, and release it (pep_destroy) in the destructor.
If the application using the PEP client API uses libcurl too, then it is recommended to bootstrap your application with curl_global_init(CURL_GLOBAL_ALL). The PEP client API uses SSL for its connections with the Argus server, therefore the flag CURL_GLOBAL_ALL should be used to initialize the libcurl library. See the man pages for libcurl(3) , curl_global_init(3) and curl_global_cleanup(3) for more information.
The global functions pep_global_init() and pep_global_cleanup() are NOT THREAD SAFE. These functions wrap the underlying libcurl curl_global_init(CURL_GLOBAL_ALL) and curl_global_cleanup() functions, the same restriction applies. See the man pages for libcurl(3) , curl_global_init(3) and curl_global_cleanup(3) for more information.