首页 > 解决方案 > soap_ssl_service_context 给出错误 30,gSoap

问题描述

我正在向soap_ssl_server_context 发出请求,我的EXE 文件夹中有我的证书server.pem,但此请求返回30 错误代码。此错误也打印在屏幕上。

SOAP 1.2 错误 SOAP-ENV:Receiver [无子代码]

“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");
        }

标签: c++sslgsoap

解决方案


推荐阅读