Macro to support 3.0 and 1.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

         We are upgrading our code to openssl 3.0. But we need to keep the older
         version of code also which is 1.0. So, we tried by keeping the newer version 
         of the code as below but when we compiled the code for 3.0, evp.h is not
         getting included. Please suggest f our approach is correct

#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)

  /******higher version code************/

 #include <openssl/evp.h>

#else

  /*******lower version code *********/

 #include <openssl/aes.h>

#endif


       Also, we found that OPENSSL_VERSION_NUMBER is deprecated, so thought of using
       the below macros but we think since this macro is defined in newer version this might
       not work when we compile it for older versions. Please suggest how to handle this.

if (OPENSSL_VERSION_MAJOR >= 3)
  #include <openssl/evp.h>
else if (OPENSSL_VERSION_MAJOR < 3)
  #include <openssl/aes.h>


thanks, 
shiva kumar 


Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. and its Affiliates that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux