MCPcopy Create free account
hub / github.com/acl-dev/acl / handshake

Method handshake

lib_acl_cpp/src/stream/mbedtls_io.cpp:325–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325bool mbedtls_io::handshake()
326{
327#ifdef HAS_MBEDTLS
328 if (handshake_ok_) {
329 return true;
330 }
331
332 while (true) {
333 // SSL ���ֹ���
334 int ret = __ssl_handshake((mbedtls_ssl_context*) ssl_);
335 if (ret == 0) {
336 handshake_ok_ = true;
337 return true;
338 }
339
340 if (ret != MBEDTLS_ERR_SSL_WANT_READ
341 && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
342
343 logger_error("ssl_handshake failed: -0x%04x, %s",
344 -ret, ssl_strerror(ret));
345 return false;
346 }
347
348 if (nblock_) {
349 break;
350 }
351 }
352
353 return true;
354#else
355 logger_error("HAS_MBEDTLS not defined!");
356 return false;
357#endif
358}
359
360int mbedtls_io::get_version() const
361{

Callers 15

http_serverFunction · 0.45
echo_fiberFunction · 0.45
ssl_initFunction · 0.45
setup_sslFunction · 0.45
thread_on_readMethod · 0.45
read_wakeupMethod · 0.45
thread_on_readMethod · 0.45
read_wakeupMethod · 0.45
setup_sslMethod · 0.45
thread_on_readMethod · 0.45
read_wakeupMethod · 0.45
read_wakeupMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected