@@ -117,10 +117,10 @@ void TLSWrap::NewSessionDoneCb() {
117
117
118
118
void TLSWrap::InitSSL () {
119
119
// Initialize SSL
120
- enc_in_ = NodeBIO::New ();
121
- enc_out_ = NodeBIO::New ();
122
- NodeBIO::FromBIO (enc_in_)->AssignEnvironment (env ());
123
- NodeBIO::FromBIO (enc_out_)->AssignEnvironment (env ());
120
+ enc_in_ = crypto:: NodeBIO::New ();
121
+ enc_out_ = crypto:: NodeBIO::New ();
122
+ crypto:: NodeBIO::FromBIO (enc_in_)->AssignEnvironment (env ());
123
+ crypto:: NodeBIO::FromBIO (enc_out_)->AssignEnvironment (env ());
124
124
125
125
SSL_set_bio (ssl_, enc_in_, enc_out_);
126
126
@@ -149,15 +149,15 @@ void TLSWrap::InitSSL() {
149
149
SSL_set_accept_state (ssl_);
150
150
} else if (is_client ()) {
151
151
// Enough space for server response (hello, cert)
152
- NodeBIO::FromBIO (enc_in_)->set_initial (kInitialClientBufferLength );
152
+ crypto:: NodeBIO::FromBIO (enc_in_)->set_initial (kInitialClientBufferLength );
153
153
SSL_set_connect_state (ssl_);
154
154
} else {
155
155
// Unexpected
156
156
ABORT ();
157
157
}
158
158
159
159
// Initialize ring for queud clear data
160
- clear_in_ = new NodeBIO ();
160
+ clear_in_ = new crypto:: NodeBIO ();
161
161
clear_in_->AssignEnvironment (env ());
162
162
}
163
163
@@ -289,7 +289,9 @@ void TLSWrap::EncOut() {
289
289
char * data[kSimultaneousBufferCount ];
290
290
size_t size[arraysize (data)];
291
291
size_t count = arraysize (data);
292
- write_size_ = NodeBIO::FromBIO (enc_out_)->PeekMultiple (data, size, &count);
292
+ write_size_ = crypto::NodeBIO::FromBIO (enc_out_)->PeekMultiple (data,
293
+ size,
294
+ &count);
293
295
CHECK (write_size_ != 0 && count != 0 );
294
296
295
297
Local<Object> req_wrap_obj =
@@ -335,7 +337,7 @@ void TLSWrap::EncOutCb(WriteWrap* req_wrap, int status) {
335
337
}
336
338
337
339
// Commit
338
- NodeBIO::FromBIO (wrap->enc_out_ )->Read (nullptr , wrap->write_size_ );
340
+ crypto:: NodeBIO::FromBIO (wrap->enc_out_ )->Read (nullptr , wrap->write_size_ );
339
341
340
342
// Ensure that the progress will be made and `InvokeQueued` will be called.
341
343
wrap->ClearIn ();
@@ -653,7 +655,7 @@ void TLSWrap::OnAllocImpl(size_t suggested_size, uv_buf_t* buf, void* ctx) {
653
655
}
654
656
655
657
size_t size = 0 ;
656
- buf->base = NodeBIO::FromBIO (wrap->enc_in_ )->PeekWritable (&size);
658
+ buf->base = crypto:: NodeBIO::FromBIO (wrap->enc_in_ )->PeekWritable (&size);
657
659
buf->len = size;
658
660
}
659
661
@@ -717,7 +719,7 @@ void TLSWrap::DoRead(ssize_t nread,
717
719
}
718
720
719
721
// Commit read data
720
- NodeBIO* enc_in = NodeBIO::FromBIO (enc_in_);
722
+ crypto:: NodeBIO* enc_in = crypto:: NodeBIO::FromBIO (enc_in_);
721
723
enc_in->Commit (nread);
722
724
723
725
// Parse ClientHello first
@@ -788,7 +790,7 @@ void TLSWrap::EnableSessionCallbacks(
788
790
" EnableSessionCallbacks after destroySSL" );
789
791
}
790
792
wrap->enable_session_callbacks ();
791
- NodeBIO::FromBIO (wrap->enc_in_ )->set_initial (kMaxHelloLength );
793
+ crypto:: NodeBIO::FromBIO (wrap->enc_in_ )->set_initial (kMaxHelloLength );
792
794
wrap->hello_parser_ .Start (SSLWrap<TLSWrap>::OnClientHello,
793
795
OnClientHelloParseEnd,
794
796
wrap);
0 commit comments