@@ -138,10 +138,10 @@ void TLSWrap::NewSessionDoneCb() {
138
138
139
139
void TLSWrap::InitSSL () {
140
140
// 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 ());
145
145
146
146
SSL_set_bio (ssl_, enc_in_, enc_out_);
147
147
@@ -170,15 +170,15 @@ void TLSWrap::InitSSL() {
170
170
SSL_set_accept_state (ssl_);
171
171
} else if (is_client ()) {
172
172
// Enough space for server response (hello, cert)
173
- NodeBIO::FromBIO (enc_in_)->set_initial (kInitialClientBufferLength );
173
+ crypto:: NodeBIO::FromBIO (enc_in_)->set_initial (kInitialClientBufferLength );
174
174
SSL_set_connect_state (ssl_);
175
175
} else {
176
176
// Unexpected
177
177
ABORT ();
178
178
}
179
179
180
180
// Initialize ring for queud clear data
181
- clear_in_ = new NodeBIO ();
181
+ clear_in_ = new crypto:: NodeBIO ();
182
182
clear_in_->AssignEnvironment (env ());
183
183
}
184
184
@@ -310,7 +310,9 @@ void TLSWrap::EncOut() {
310
310
char * data[kSimultaneousBufferCount ];
311
311
size_t size[arraysize (data)];
312
312
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);
314
316
CHECK (write_size_ != 0 && count != 0 );
315
317
316
318
Local<Object> req_wrap_obj =
@@ -356,7 +358,7 @@ void TLSWrap::EncOutCb(WriteWrap* req_wrap, int status) {
356
358
}
357
359
358
360
// Commit
359
- NodeBIO::FromBIO (wrap->enc_out_ )->Read (nullptr , wrap->write_size_ );
361
+ crypto:: NodeBIO::FromBIO (wrap->enc_out_ )->Read (nullptr , wrap->write_size_ );
360
362
361
363
// Ensure that the progress will be made and `InvokeQueued` will be called.
362
364
wrap->ClearIn ();
@@ -674,7 +676,7 @@ void TLSWrap::OnAllocImpl(size_t suggested_size, uv_buf_t* buf, void* ctx) {
674
676
}
675
677
676
678
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);
678
680
buf->len = size;
679
681
}
680
682
@@ -737,7 +739,7 @@ void TLSWrap::DoRead(ssize_t nread,
737
739
}
738
740
739
741
// Commit read data
740
- NodeBIO* enc_in = NodeBIO::FromBIO (enc_in_);
742
+ crypto:: NodeBIO* enc_in = crypto:: NodeBIO::FromBIO (enc_in_);
741
743
enc_in->Commit (nread);
742
744
743
745
// Parse ClientHello first
@@ -808,7 +810,7 @@ void TLSWrap::EnableSessionCallbacks(
808
810
" EnableSessionCallbacks after destroySSL" );
809
811
}
810
812
wrap->enable_session_callbacks ();
811
- NodeBIO::FromBIO (wrap->enc_in_ )->set_initial (kMaxHelloLength );
813
+ crypto:: NodeBIO::FromBIO (wrap->enc_in_ )->set_initial (kMaxHelloLength );
812
814
wrap->hello_parser_ .Start (SSLWrap<TLSWrap>::OnClientHello,
813
815
OnClientHelloParseEnd,
814
816
wrap);
0 commit comments