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

Function main

lib_acl_cpp/samples/ssl/ssl_server/ssl_server.cpp:437–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435//////////////////////////////////////////////////////////////////////////
436
437int main(int argc, char* argv[])
438{
439#ifdef WIN32
440 acl::acl_cpp_init();
441#endif
442 acl::log::stdout_open(true);
443
444#ifdef USE_MBEDTLS
445# ifdef __APPLE__
446# define USE_ONE
447# ifdef USE_ONE
448 const char* libssl_path = "../libmbedtls_all.dylib";
449 acl::mbedtls_conf::set_libpath(libssl_path);
450# else
451 const char* libcrypto_path = "../libmbedcrypto.dylib";
452 const char* libx509_path = "../libmbedx509.dylib";
453 const char* libssl_path = "../libmbedtls.dylib";
454 acl::mbedtls_conf::set_libpath(libcrypto_path, libx509_path, libssl_path);
455# endif
456# elif defined(_WIN32) || defined(_WIN64)
457 const char* libssl_path = "../mbedtls.dll";
458 acl::mbedtls_conf::set_libpath(libssl_path); // һ���ܵĶ�̬��
459# elif defined(__linux__)
460# define USE_ONE
461# ifdef USE_ONE
462 const char* libssl_path = "../libmbedtls_all.so";
463 acl::mbedtls_conf::set_libpath(libssl_path);
464# else
465 const char* libcrypto_path = "../libmbedcrypto.so";
466 const char* libx509_path = "../libmbedx509.so";
467 const char* libssl_path = "../libmbedtls.so";
468 acl::mbedtls_conf::set_libpath(libcrypto_path, libx509_path, libssl_path);
469# endif
470# endif
471 if (!acl::mbedtls_conf::load()) {
472 printf("load %s error\r\n", libssl_path);
473 return 1;
474 }
475#else
476# ifdef __APPLE__
477 const char* libssl_path = "../libpolarssl.dylib";
478 acl::polarssl_conf::set_libpath(libssl_path);
479# else
480 const char* libssl_path = "../libpolarssl.so";
481 acl::polarssl_conf::set_libpath(libssl_path);
482# endif
483 if (!acl::polarssl_conf::load()) {
484 printf("load %s error\r\n", libssl_path);
485 return 1;
486 }
487#endif
488
489 // ��ʼ����
490 if (argc >= 2 && strcmp(argv[1], "alone") == 0) {
491#ifdef USE_MBEDTLS
492 acl::mbedtls_verify_t verify_mode;
493#else
494 acl::polarssl_verify_t verify_mode;

Callers

nothing calls this directly

Calls 3

acl_cpp_initFunction · 0.85
do_cgiFunction · 0.70
do_aloneFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…