Tereius / libONVIF

Yet another ONVIF library
GNU General Public License v3.0
164 stars 47 forks source link

SSL error #3

Closed selmehtar closed 4 years ago

selmehtar commented 4 years ago

Hello, I am implementing a test project including the ONVIF library but I get an error when calling the GetProfiles() function: 'SOAP_SSL_ERROR'. Any idea about how could I solve it?

Tereius commented 4 years ago

I must admit I never tested the openssl integration. At first make sure that the CMake variables "OpenSSL_cryptro_PATH", "OpenSSL_include_DIR", "OpenSSL_ssl_PATH" are set correctly. After that you have to enable ssl support programmatically by calling SoapCtx::EnableSsl(). I would use the SoapCtx::Builder to create a ssl enabled soap ctx like so:

auto ctxBuilder = SoapCtx::Builder();
ctxBuilder.EnableSsl();
auto deviceClient = new OnvifDeviceClient(QUrl("https://[...]"), ctxBuilder.Build());
selmehtar commented 4 years ago

It worked, thank you!