ARC SDK
|
Class for handling X509* variables in a multi-threaded environment. More...
#include <arc/UserConfig.h>
Public Member Functions | |
CertEnvLocker (const UserConfig &cfg) | |
Create a lock on X509 environment variables. Blocks if another instance exists. More... | |
~CertEnvLocker (void) | |
Release lock on X509 environment variables and set back to old values if they were changed. More... | |
Class for handling X509* variables in a multi-threaded environment.
This class is useful when using external libraries which depend on X509* environment variables in a multi-threaded environment. When an instance of this class is created it holds a lock on these variables until the instance is destroyed. Additionally, if the credentials pointed to by the those variables are owned by a different uid from the uid of the current process, a temporary copy is made owned by the uid of the current process and the X509 variable points there instead. This is to comply with some restrictions in third-party libraries which insist on the credential files being owned by the current uid.
Arc::CertEnvLocker::CertEnvLocker | ( | const UserConfig & | cfg | ) |
Create a lock on X509 environment variables. Blocks if another instance exists.
Arc::CertEnvLocker::~CertEnvLocker | ( | void | ) |
Release lock on X509 environment variables and set back to old values if they were changed.