在 soap_ssl_server_context(..) 中使用继承时 gsoap 中的分段错误
Segmentation fault in gsoap when use inheritance in soap_ssl_server_context(...)
我已经建立了一个gsoap Web服务,它可以工作。我需要使用SSL。我按照以下链接中提到的步骤进行操作:https://www.genivia.com/doc/guide/html/index.html#serveropenssl我的程序崩溃了:(
肥皂文件是使用从肥皂类继承的"soapcpp2 -i"开关生成的。
我的 QT .pro 文件:
...
LIBS += -lgsoapssl++ -lssl -lcrypto
QMAKE_CXXFLAGS += -DWITH_OPENSSL
...
最后,即使所有参数都使用 NULL 参数,我的程序在以下函数"soap_ssl_server_context"时崩溃。
if (soap_ssl_server_context(soap,
SOAP_SSL_DEFAULT,
"server.pem", /* keyfile: required when server must authenticate to clients (see SSL docs on how to obtain this file) */
"password", /* password to read the key file (not used with GNUTLS) */
"cacert.pem", /* optional cacert file to store trusted certificates */
NULL, /* optional capath to directory with trusted certificates */
"dh512.pem", /* 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 */
NULL /* optional server identification to enable SSL session caching to speed up TLS (must be a unique name) */
))
{
soap_print_fault(soap, stderr);
exit(EXIT_FAILURE);
}
不幸的是,在我将 Gsoap 服务转换为使用 SSL 后,我没有删除 libgsoap++ 并附加 libgsoapssl++。所以应用程序崩溃了:|
相关文章:
- 继承函数的重载解析
- 继承期间显示未知行为的子类
- 头文件-继承c++
- 为什么在保护模式下继承升级不起作用
- 通过继承类使用来自不同命名空间的运算符
- 子目录是否继承属性,例如add_definitions,include_directories和父Cmakelist.t
- 混合组合和继承的C++问题
- 继承:构造函数,初始化C++11中基类的类C数组成员
- 从类继承时,继承的类是否会通过父类重新定义继承的变量
- 公共与私人继承
- 如何创建从同一类继承的不同对象的向量
- 如何从另一个文件继承私有成员变量和公共函数
- 使用GSoap实现ONVIF
- 在模板基类中为继承类中的可选重写生成虚拟方法
- 带有继承的C++工厂
- 我应该避免多重实现继承吗
- C++继承更改成员
- 从具有默认值的部分指定模板类继承时发生SWIG错误,具有不带默认值的正向声明
- 关于C++中具有多重继承"this"指针的说明
- 在 soap_ssl_server_context(..) 中使用继承时 gsoap 中的分段错误