Menu

#27 Enable SSL/TLS support for Opal library

v1.0_(example)
closed
1
2018-08-26
2018-08-14
No

Hi,

I am using opal library to build sample fax application, I want to use SSL/TLS connection in my Fax application, I just wanted to know how to establish SSL/TLS support for Opal and how it is been used in application for incoming and outgoing connections ?

Thanks in Advance

Raveendra

P.S : By mistakenly, I have create the ticket under bugs section yesterday, pardon me.

Discussion

  • Robert Jongbloed

     
    • Raveendra Pai

      Raveendra Pai - 2018-08-22

      Thanks Robert for the link, the link was very useful for me.
      I installed open ssl (version 1.1.0) from this link :
      http://slproweb.com/products/Win32OpenSSL.html

      I have downloaded and installed both 32 bit and 64-bit installer (Developer Recomonded version). I tried building ptlib library post openssl installation, it detects automatically and enabled SSL support in the code. but I have encountered below compilation error in cypher.cxx of ptlib_static project :

      1>..\..\ptclib\cypher.cxx(1279): error C2079: 'hmac' uses undefined struct 'hmac_ctx_st'
      1>..\..\ptclib\cypher.cxx(1281): error C3861: 'HMAC_CTX_init': identifier not found
      1>..\..\ptclib\cypher.cxx(1282): error C2664: 'int HMAC_Init_ex(HMAC_CTX *,const void *,int,const EVP_MD *,ENGINE *)': cannot convert argument 1 from 'int *' to 'HMAC_CTX *'
      1>  ..\..\ptclib\cypher.cxx(1282): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
      1>..\..\ptclib\cypher.cxx(1283): error C2664: 'int HMAC_Update(HMAC_CTX *,const unsigned char *,std::size_t)': cannot convert argument 1 from 'int *' to 'HMAC_CTX *'
      1>  ..\..\ptclib\cypher.cxx(1283): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
      1>..\..\ptclib\cypher.cxx(1284): error C2664: 'int HMAC_Final(HMAC_CTX *,unsigned char *,unsigned int *)': cannot convert argument 1 from 'int *' to 'HMAC_CTX *'
      1>  ..\..\ptclib\cypher.cxx(1284): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
      1>..\..\ptclib\cypher.cxx(1286): error C3861: 'HMAC_CTX_cleanup': identifier not found
      1>..\..\ptclib\cypher.cxx(1292): error C2664: 'PHMAC_SHA::PHMAC_SHA(PHMAC_SHA &&)': cannot convert argument 1 from 'const EVP_MD *' to 'const PHMAC_SHA::Algorithm *'
      1>  ..\..\ptclib\cypher.cxx(1292): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
      1>..\..\ptclib\cypher.cxx(1298): error C2664: 'PHMAC_SHA::PHMAC_SHA(PHMAC_SHA &&)': cannot convert argument 1 from 'const EVP_MD *' to 'const PHMAC_SHA::Algorithm *'
      1>  ..\..\ptclib\cypher.cxx(1298): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
      1>..\..\ptclib\cypher.cxx(1304): error C2664: 'PHMAC_SHA::PHMAC_SHA(PHMAC_SHA &&)': cannot convert argument 1 from 'const EVP_MD *' to 'const PHMAC_SHA::Algorithm *'
      1>  ..\..\ptclib\cypher.cxx(1304): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
      1>..\..\ptclib\cypher.cxx(1310): error C2664: 'PHMAC_SHA::PHMAC_SHA(PHMAC_SHA &&)': cannot convert argument 1 from 'const EVP_MD *' to 'const PHMAC_SHA::Algorithm *'
      1>  ..\..\ptclib\cypher.cxx(1310): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
      

      Any suggestion on this compilation error. I am using Visual studio 2015 to compile the code. Please let me know how to troubleshoot this error or am I missing something ?

      Thanks in Advance,

      Raveendra

       
  • Robert Jongbloed

    • status: open --> closed
     
  • Robert Jongbloed

    Soeey only v1.0.2 is currently supported, do not use v1.1.

    I have updated the Wiki for this.

     
    • Raveendra Pai

      Raveendra Pai - 2018-08-24

      Thanks for the response :)

       
  • Raveendra Pai

    Raveendra Pai - 2018-08-26

    I have installed open ssl v1.0.2 and I could compile ptlib and opal. I just need to know is there any code samples for sample Fax application which works using TLS and support SIPS along with SRTP?

    Thanks in Advance,

    Raveendra

     

Log in to post a comment.