DOCGroup / ACE_TAO

ACE and TAO
https://www.dre.vanderbilt.edu/~schmidt/TAO.html
694 stars 375 forks source link

Implemented OpenSSL 1.1.0 TLS methods and deprecated SSLv23 ones. #2231

Open akotulu opened 3 months ago

akotulu commented 3 months ago

SSLv23_method(), SSLv23_server_method() and SSLv23_client_method() were deprecated and the preferred TLS_method(), TLS_server_method() and TLS_client_method() functions were added in OpenSSL 1.1.0.

All version-specific methods were deprecated in OpenSSL 1.1.0.

SSLv23_method

jwillemsen commented 3 months ago

Doesn't this change break any user code which uses the SSLv23 ones?

akotulu commented 3 months ago

Here is quote from docs.

SSLv23_method(), SSLv23_server_method(), SSLv23_client_method() These functions do not exist anymore, they have been renamed to TLS_method(), TLS_server_method() and TLS_client_method() respectively. Currently, the old function calls are renamed to the corresponding new ones by preprocessor macros, to ensure that existing code which uses the old function names still compiles. However, using the old function names is deprecated and new code should call the new functions instead.

jwillemsen commented 3 months ago

Ok, but you do change the enum provided by ACE in such a way that when someone uses it, it will not compile unless they change their code

jwillemsen commented 3 months ago

https://github.com/DOCGroup/ACE_TAO/issues/958

akotulu commented 3 months ago

Ok, I will add the enum values back with corresponding TLS calls.

jwillemsen commented 3 months ago

Mark the old enums as deprecated so that we know they are deprecated and can be removed at some point, maybe use the C++14 https://en.cppreference.com/w/cpp/language/attributes/deprecated, C++17 is now required for ACE/TAO

akotulu commented 3 months ago

Made the changes. Is it ok now?

jwillemsen commented 3 months ago

What when ssl version is smaller as 0x10100000L, than the new defines are there. Also in ACE_SSL_Context::load_trusted_ca the old enums are not tested

akotulu commented 3 months ago

Huh, sorry about the mess. Haven't done such a backwards compatibility stuff before. It should now be ok.

jwillemsen commented 3 months ago

When < 0x10100000L the enums will still give a deprecated warning

akotulu commented 3 months ago

Idk if this is the best way to remove the deprecation warning, but here it is.

jwillemsen commented 3 months ago

Please fix fuzz errors

akotulu commented 3 months ago

Done.