soap_ssl_service_context дает ошибку 30, gSoap - PullRequest
0 голосов
/ 28 августа 2018

Я делаю запрос к soap_ssl_server_context, у меня есть мой сертификат server.pem в моей папке EXE, но этот запрос возвращает 30 Код ошибки. Эта ошибка также выводится на экран.

Ошибка SOAP 1.2 SOAP-ENV: получатель [без субкода]

«Ошибка SSL / TLS»

Сведения: не удается прочитать файл ключа

if( (k = soap_ssl_server_context(&objSoap,
                                        SOAP_SSL_DEFAULT | SOAP_SSL_SKIP_HOST_CHECK,
                                        "server.pem", /* keyfile: required when server must authenticate to clients (see SSL docs on how to obtain this file) */
                                        "abcabc", /* password to read the key file */
                                        NULL, /* optional cacert file to store trusted certificates */
                                        NULL, /* optional capath to directory with trusted certificates */
                                        NULL, /* DH file name or DH key len bits (minimum is 512, e.g. "512") to generate DH param, if NULL use RSA */
                                        NULL, /* if randfile!=NULL: use a file with random data to seed randomness */
                                        "sslserver" /* optional server identification to enable SSL session cache (must be a unique name) */
                                        ) ))
        {
                soap_print_fault(&objSoap,stderr);
                mPtrLogger->logMsg(CF, "", String("--[[[Error Code[[[")+k+"][[[", INFO);
                Terminate(-1, "Certificate files missing...terminating");
        }
...