summaryrefslogtreecommitdiff
path: root/src/tls_wrap.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-11-12 16:25:07 +0100
committerFedor Indutny <fedor@indutny.com>2014-11-18 22:56:10 +0300
commit83d2cb634e15546d50f135f1761ff19414b364c3 (patch)
tree7b488c2c04137f69797bed8feed8892e092a866f /src/tls_wrap.h
parent8ba39b01899fd51554fbfb5c906e88adf5b0035c (diff)
downloadnode-new-83d2cb634e15546d50f135f1761ff19414b364c3.tar.gz
src: remove static variables from tls_wrap
Remove the error message globals. More prep work for multi-isolate support. Reviewed-By: Fedor Indutny <fedor@indutny.com> PR-URL: https://github.com/node-forward/node/pull/58
Diffstat (limited to 'src/tls_wrap.h')
-rw-r--r--src/tls_wrap.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/tls_wrap.h b/src/tls_wrap.h
index f6ccb50ab8..d25c2e6f36 100644
--- a/src/tls_wrap.h
+++ b/src/tls_wrap.h
@@ -52,7 +52,8 @@ class TLSCallbacks : public crypto::SSLWrap<TLSCallbacks>,
v8::Handle<v8::Value> unused,
v8::Handle<v8::Context> context);
- const char* Error() override;
+ const char* Error() const override;
+ void ClearError() override;
int TryWrite(uv_buf_t** bufs, size_t* count) override;
int DoWrite(WriteWrap* w,
uv_buf_t* bufs,
@@ -124,12 +125,10 @@ class TLSCallbacks : public crypto::SSLWrap<TLSCallbacks>,
}
}
+ // If |msg| is not nullptr, caller is responsible for calling `delete[] *msg`.
v8::Local<v8::Value> GetSSLError(int status, int* err, const char** msg);
- const char* PrintErrors();
- static int PrintErrorsCb(const char* str, size_t len, void* arg);
static void OnClientHelloParseEnd(void* arg);
-
static void Wrap(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Receive(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Start(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -168,9 +167,6 @@ class TLSCallbacks : public crypto::SSLWrap<TLSCallbacks>,
#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
v8::Persistent<v8::Value> sni_context_;
#endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB
-
- static size_t error_off_;
- static char error_buf_[1024];
};
} // namespace node