diff --git a/utils/src/openssl_utils.cpp b/utils/src/openssl_utils.cpp index ee9e514ceb195cae28462b3e1ec7b77a54f64d14..d3ac4006c217fae07f22b777fcdc41adb433b22c 100644 --- a/utils/src/openssl_utils.cpp +++ b/utils/src/openssl_utils.cpp @@ -15,6 +15,7 @@ #include "openssl_utils.h" +#include #include #include "log.h" @@ -101,6 +102,8 @@ STACK_OF(X509) *MakeStackOfCerts(const std::vector &certChain) int CreateNIDFromOID(const std::string &oid, const std::string &shortName, const std::string &longName) { + static std::mutex oidLock; + std::lock_guard lock(oidLock); int nid = OBJ_txt2nid(oid.c_str()); if (nid == NID_undef) { nid = OBJ_create(oid.c_str(), shortName.c_str(), longName.c_str());