@@ -138,10 +138,10 @@ void TLSWrap::NewSessionDoneCb() {
138138
139139void TLSWrap::InitSSL () {
140140 // Initialize SSL
141- enc_in_ = NodeBIO::New ();
142- enc_out_ = NodeBIO::New ();
143- NodeBIO::FromBIO (enc_in_)->AssignEnvironment (env ());
144- NodeBIO::FromBIO (enc_out_)->AssignEnvironment (env ());
141+ enc_in_ = crypto:: NodeBIO::New ();
142+ enc_out_ = crypto:: NodeBIO::New ();
143+ crypto:: NodeBIO::FromBIO (enc_in_)->AssignEnvironment (env ());
144+ crypto:: NodeBIO::FromBIO (enc_out_)->AssignEnvironment (env ());
145145
146146 SSL_set_bio (ssl_, enc_in_, enc_out_);
147147
@@ -170,15 +170,15 @@ void TLSWrap::InitSSL() {
170170 SSL_set_accept_state (ssl_);
171171 } else if (is_client ()) {
172172 // Enough space for server response (hello, cert)
173- NodeBIO::FromBIO (enc_in_)->set_initial (kInitialClientBufferLength );
173+ crypto:: NodeBIO::FromBIO (enc_in_)->set_initial (kInitialClientBufferLength );
174174 SSL_set_connect_state (ssl_);
175175 } else {
176176 // Unexpected
177177 ABORT ();
178178 }
179179
180180 // Initialize ring for queud clear data
181- clear_in_ = new NodeBIO ();
181+ clear_in_ = new crypto:: NodeBIO ();
182182 clear_in_->AssignEnvironment (env ());
183183}
184184
@@ -310,7 +310,9 @@ void TLSWrap::EncOut() {
310310 char * data[kSimultaneousBufferCount ];
311311 size_t size[arraysize (data)];
312312 size_t count = arraysize (data);
313- write_size_ = NodeBIO::FromBIO (enc_out_)->PeekMultiple (data, size, &count);
313+ write_size_ = crypto::NodeBIO::FromBIO (enc_out_)->PeekMultiple (data,
314+ size,
315+ &count);
314316 CHECK (write_size_ != 0 && count != 0 );
315317
316318 Local<Object> req_wrap_obj =
@@ -356,7 +358,7 @@ void TLSWrap::EncOutCb(WriteWrap* req_wrap, int status) {
356358 }
357359
358360 // Commit
359- NodeBIO::FromBIO (wrap->enc_out_ )->Read (nullptr , wrap->write_size_ );
361+ crypto:: NodeBIO::FromBIO (wrap->enc_out_ )->Read (nullptr , wrap->write_size_ );
360362
361363 // Ensure that the progress will be made and `InvokeQueued` will be called.
362364 wrap->ClearIn ();
@@ -674,7 +676,7 @@ void TLSWrap::OnAllocImpl(size_t suggested_size, uv_buf_t* buf, void* ctx) {
674676 }
675677
676678 size_t size = 0 ;
677- buf->base = NodeBIO::FromBIO (wrap->enc_in_ )->PeekWritable (&size);
679+ buf->base = crypto:: NodeBIO::FromBIO (wrap->enc_in_ )->PeekWritable (&size);
678680 buf->len = size;
679681}
680682
@@ -737,7 +739,7 @@ void TLSWrap::DoRead(ssize_t nread,
737739 }
738740
739741 // Commit read data
740- NodeBIO* enc_in = NodeBIO::FromBIO (enc_in_);
742+ crypto:: NodeBIO* enc_in = crypto:: NodeBIO::FromBIO (enc_in_);
741743 enc_in->Commit (nread);
742744
743745 // Parse ClientHello first
@@ -808,7 +810,7 @@ void TLSWrap::EnableSessionCallbacks(
808810 " EnableSessionCallbacks after destroySSL" );
809811 }
810812 wrap->enable_session_callbacks ();
811- NodeBIO::FromBIO (wrap->enc_in_ )->set_initial (kMaxHelloLength );
813+ crypto:: NodeBIO::FromBIO (wrap->enc_in_ )->set_initial (kMaxHelloLength );
812814 wrap->hello_parser_ .Start (SSLWrap<TLSWrap>::OnClientHello,
813815 OnClientHelloParseEnd,
814816 wrap);
0 commit comments