Открытая проблема SSL и TLS в iOS для Pjsip - PullRequest
0 голосов
/ 10 января 2019

Я использую приведенный ниже код для настройки TLS. У меня была возможность включить в файле config_site.h

определить PJ_HAS_SSL_SOCK 1

pjsua_transport_config cfg;
    pjsua_transport_config_default(&cfg);
    cfg.port = 5061;
    cfg.tls_setting.ca_list_file = pj_str((char*)[[[NSBundle mainBundle] pathForResource:@"ca_list" ofType:@"pem"] cStringUsingEncoding:NSUTF8StringEncoding]); // location of cacert.pem

    cfg.tls_setting.cert_file = pj_str((char*)[[[NSBundle mainBundle] pathForResource:@"certificate" ofType:@"pem"] cStringUsingEncoding:NSUTF8StringEncoding]); // location of cacert.pem

    cfg.tls_setting.privkey_file = pj_str((char*)[[[NSBundle mainBundle] pathForResource:@"pvkey" ofType:@"pem"] cStringUsingEncoding:NSUTF8StringEncoding]); //

    cfg.tls_setting.password = pj_str("myPassword");
    cfg.tls_setting.verify_client = PJ_TRUE;
    cfg.tls_setting.verify_server = PJ_TRUE;
    cfg.tls_setting.method = PJSIP_TLSV1_METHOD;

    //
    NSLog(@"******TLS********");
    //pjsua_transport_id  transport_id = 1;
    status = pjsua_transport_create(PJSIP_TRANSPORT_TLS , &cfg, NULL);

    if (status != PJ_SUCCESS) error_exit("Error creating transport", status);

Ссылка Ссылка: Как применить поддержку TLS к PJSIP для ios

Я использую Pod "pjsip": версия pjsip 2.7.1 https://cocoapods.org/pods/pjsip

Я не вижу журналы:

...
checking for OpenSSL installations..
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... no
aconfigure: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!
aconfigure: WARNING: openssl/ssl.h: proceeding with the compiler's result
checking for openssl/ssl.h... yes
checking for ERR_load_BIO_strings in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
OpenSSL library found, SSL support enabled
...

Я получаю ошибку:

Error creating transport: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]
...