soap_ssl_service_context给出错误30,gSoap

时间:2018-08-28 11:03:11

标签: c++ ssl gsoap

我正在请求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");
        }

0 个答案:

没有答案