Thread: [asio-users] Error context: asio.ssl:336539714
Brought to you by:
chris_kohlhoff
From: Sorin C. <cns...@ya...> - 2022-06-21 10:34:40
|
Hello, I designed a shared library(boost 1.78 , g++ 4.8.5) containing a method like this: void f() { try { boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23); } catch(std::exception& e) { cout<<"exception depicted as: "<<e.what(); } cout<<"OKAY"; } Then I test my library from the same machine in two different ways: a) It works ok when calling this method from a cprogram with dlopen() ( output: "OKAY") b) From a custome application, if I load this library and then I call the same method, I have this output "exception depicted as: context: asio.ssl error [asio.ssl:336539714]" Any thought, please? Regards, |
From: Kasper L. <la...@st...> - 2022-06-21 11:16:44
Attachments:
OpenPGP_signature
OpenPGP_0xE5D9CAC64AAA55EB.asc
|
On 21/06/2022 12.34, Sorin Cernescu via asio-users wrote: > Hello, > > I designed a shared library(boost 1.78 , g++ 4.8.5) containing a method like this: > void f() > { > try > { > boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23); > } > catch(std::exception& e) > { > cout<<"exception depicted as: "<<e.what(); > } > cout<<"OKAY"; > } > > Then I test my library from the same machine in two different ways: > > a) It works ok when calling this method from a cprogram with dlopen() ( output: "OKAY") > b) From a custome application, if I load this library and then I call the same method, I have this output "exception depicted as: context: asio.ssl error [asio.ssl:336539714]" > > Any thought, please? > Some thoughts that haven't really been well investigated. OpenSSL error codes (which is what asio.ssl errors really are) can be quite tricky to deal with. It can sometimes be helpful to use the OpenSSL command line tool with the errstr command. There isn't a corresponding error string for 336539714, but converting it to hex gives: ❯ openssl errstr 140f3042 error:140F3042:SSL routines:func(243):called a function you should not call Which sounds more reasonable but still not very helpful. Then I noticed you are attempting to use sslv23. SSL in general is deprecated and version 2.3 of SSL is very deprecated which sounds like it might fit with the error string. Are you simply trying to use SSL v2.3 with a version of OpenSSL that has deprecated/disabled that protocol (as it should be)? Hope that helps a bit. Kind regards, Kasper Laudrup |
From: Sorin C. <cns...@ya...> - 2022-06-21 15:12:17
|
Hello Kasper, Thanks for your reply. I'm using openssl 1.0.1e-fips. I imagine sslv23 is till supported there (will check). It is strange that same library.method can be called with dlopen from the same machine, but fails when loading the library from 3rd party app (Siebel CRM). => it is possiblle that process (from Siebel) to also use ssl and hence the possible issue? Thanks On Tuesday, June 21, 2022, 01:59:06 PM GMT+3, Kasper Laudrup <la...@st...> wrote: On 21/06/2022 12.34, Sorin Cernescu via asio-users wrote: > Hello, > > I designed a shared library(boost 1.78 , g++ 4.8.5) containing a method like this: > void f() > { > try > { > boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23); > } > catch(std::exception& e) > { > cout<<"exception depicted as: "<<e.what(); > } > cout<<"OKAY"; > } > > Then I test my library from the same machine in two different ways: > > a) It works ok when calling this method from a cprogram with dlopen() ( output: "OKAY") > b) From a custome application, if I load this library and then I call the same method, I have this output "exception depicted as: context: asio.ssl error [asio.ssl:336539714]" > > Any thought, please? > Some thoughts that haven't really been well investigated. OpenSSL error codes (which is what asio.ssl errors really are) can be quite tricky to deal with. It can sometimes be helpful to use the OpenSSL command line tool with the errstr command. There isn't a corresponding error string for 336539714, but converting it to hex gives: ❯ openssl errstr 140f3042 error:140F3042:SSL routines:func(243):called a function you should not call Which sounds more reasonable but still not very helpful. Then I noticed you are attempting to use sslv23. SSL in general is deprecated and version 2.3 of SSL is very deprecated which sounds like it might fit with the error string. Are you simply trying to use SSL v2.3 with a version of OpenSSL that has deprecated/disabled that protocol (as it should be)? Hope that helps a bit. Kind regards, Kasper Laudrup |
From: Kasper L. <la...@st...> - 2022-06-21 16:39:46
Attachments:
OpenPGP_signature
OpenPGP_0xE5D9CAC64AAA55EB.asc
|
On 21/06/2022 17.12, Sorin Cernescu wrote: > I'm using openssl 1.0.1e-fips. > I imagine sslv23 is till supported there (will check). > No matter if it's supported or not you definitely shouldn't be using SSL in any version. Why not just change your code to use TLS v1.2+? > It is strange that same library.method can be called with dlopen from > the same machine, but fails when loading the library from 3rd party app > (Siebel CRM). > My guess was that it might be using different versions/configurations of OpenSSL. I still have no idea if that is the actual cause of the error. Just trying to help with something that might be worth looking into. > => it is possiblle that process (from Siebel) to also use ssl and hence > the possible issue? > I have no idea what Siebel CRM is and from a quick search it seems like I should be quite happy to keep it that way. To be honest I don't think I can provide much more help. Also, this is probably not really related to Asio. Hope you'll resolve your issue. Kind regards, Kasper Laudrup |