mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
crypto: make root_cert_store variable extern
Before this commit it was declared static (in a header file!), meaning it got duplicated in every file that includes it. A few duplicated pointers is not the end of the world but it introduces a lot of potential for confusion because root_cert_store in file A is not the root_cert_store in file B. Moral of the story: don't declare static variables in header files.
This commit is contained in:
1 parent
21911db392
commit
8e596c4e15
2 files changed
+3
-1
No files matched your search
@@ -118,6 +118,8 @@ static Persistent<FunctionTemplate> secure_context_constructor;
|
||||
|
||||
static uv_rwlock_t* locks;
|
||||
|
||||
X509_STORE* root_cert_store;
|
||||
|
||||
// Just to generate static methods
|
||||
template class SSLWrap<TLSCallbacks>;
|
||||
template void SSLWrap<TLSCallbacks>::AddMethods(Handle<FunctionTemplate> t);
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ namespace crypto {
|
||||
|
||||
extern int VerifyCallback(int preverify_ok, X509_STORE_CTX* ctx);
|
||||
|
||||
static X509_STORE* root_cert_store;
|
||||
extern X509_STORE* root_cert_store;
|
||||
|
||||
// Forward declaration
|
||||
class Connection;
|
||||
|
||||
Reference in new issue
Block a user