Skip to content

Commit 7589a00

Browse files
committed
crypto: make NewSessionDoneCb public
Generic friend classes do not work well with old compiler versions (and MSVC).
1 parent 75ea11f commit 7589a00

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/node_crypto.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ class Connection : public SSLWrap<Connection>, public AsyncWrap {
247247
}
248248

249249
static void Initialize(Environment* env, v8::Handle<v8::Object> target);
250+
void NewSessionDoneCb();
250251

251252
#ifdef OPENSSL_NPN_NEGOTIATED
252253
v8::Persistent<v8::Object> npnProtos_;
@@ -295,7 +296,6 @@ class Connection : public SSLWrap<Connection>, public AsyncWrap {
295296

296297
void ClearError();
297298
void SetShutdownFlags();
298-
void NewSessionDoneCb();
299299

300300
Connection(Environment* env,
301301
v8::Local<v8::Object> wrap,
@@ -324,7 +324,6 @@ class Connection : public SSLWrap<Connection>, public AsyncWrap {
324324

325325
friend class ClientHelloParser;
326326
friend class SecureContext;
327-
friend class SSLWrap<Connection>;
328327
};
329328

330329
class CipherBase : public BaseObject {

src/tls_wrap.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ class TLSCallbacks : public crypto::SSLWrap<TLSCallbacks>,
6767
uv_handle_type pending);
6868
int DoShutdown(ShutdownWrap* req_wrap, uv_shutdown_cb cb);
6969

70+
void NewSessionDoneCb();
71+
7072
protected:
7173
static const int kClearOutChunkSize = 1024;
7274

@@ -102,7 +104,6 @@ class TLSCallbacks : public crypto::SSLWrap<TLSCallbacks>,
102104
void ClearOut();
103105
void MakePending();
104106
bool InvokeQueued(int status);
105-
void NewSessionDoneCb();
106107

107108
inline void Cycle() {
108109
// Prevent recursion
@@ -163,8 +164,6 @@ class TLSCallbacks : public crypto::SSLWrap<TLSCallbacks>,
163164

164165
static size_t error_off_;
165166
static char error_buf_[1024];
166-
167-
friend class SSLWrap<TLSCallbacks>;
168167
};
169168

170169
} // namespace node

0 commit comments

Comments
 (0)