Changes between Initial Version and Version 3 of Ticket #1943


Ignore:
Timestamp:
Aug 8, 2016 11:36:17 AM (8 years ago)
Author:
ming
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1943 – Description

    initial v3  
    1 Currently, to support this, you need to do the following: 
     1For GNU targets: 
    22 
    3 1. Insert this lines in the "crypto_suites" definition in transport_srtp.c: 
     31. AES GCM crypto requires OpenSSL, so make sure OpenSSL is enabled. Also this requires PJSIP 2.5, as this version has newer libsrtp version. Then make sure that AES GCM is supported by {{{libcrypto}}} by checking the {{{configure}}} output: 
    44{{{ 
    5     /* cipher AES_GCM */ 
    6     {"AEAD_AES_128_GCM", AES_128_GCM, AES_128_GCM_KEYSIZE_WSALT, NULL_AUTH, 0, 16, 16, 
    7        sec_serv_conf}, 
     5checking for EVP_aes_128_gcm in -lssl... yes 
     6OpenSSL has AES GCM support, SRTP will use OpenSSl version 
    87}}} 
    98 
    10 2. Define macro "OPENSSL" in third_party/build/srtp/srtp_config.h, e.g: add this line in the end of the file (before #endif line) 
     92. Enable the desired AES GCM cryptos in your config_site.h (by default, it's not enabled), for example: 
    1110{{{ 
    12     #define OPENSSL 
     11    #define PJMEDIA_SRTP_HAS_AES_GCM_256      1 
     12    #define PJMEDIA_SRTP_HAS_AES_GCM_128      1 
    1313}}} 
    1414 
    15 3. Add third_party/srtp/crypto/cipher/aes_gcm_ossl.c file to libsrtp Makefile (third_party/build/srtp/Makefile), e.g: 
    16 {{{ 
    17 ciphers = crypto/cipher/cipher.o crypto/cipher/null_cipher.o      \ 
    18           crypto/cipher/aes.o crypto/cipher/aes_icm.o             \ 
    19           crypto/cipher/aes_cbc.o crypto/cipher/aes_gcm_ossl.c 
    20 }}} 
     153. Rebuild PJSIP. 
    2116 
    22 4. Note that the crypto requires OpenSSL, so make sure OpenSSL is enabled. Also this requires PJSIP 2.5, as this version has newer libsrtp version. 
     17For Windows: 
     18 
     191. [https://trac.pjsip.org/repos/wiki/Getting-Started/Installing-OpenSSL-Windows Install OpenSSL]. 
     20 
     212. In Visual Studio, go to {{{libsrtp}}} project, into folder {{{crypto}}}. 
     22 
     233. Multiple-select {{{cipher/aes_gcm_ossl.c, cipher/aes_icm_ossl.c, hash/hmac_ossl.c, rng/rand_source_ossl.c}}} [[br]] 
     24 Right-click, then click Properties. Change Configuration to {{{"All Configurations"}}} and Platform to {{{"All Platforms"}}}. Go to {{{Configuration Properties - General}}}, then change {{{Excluded From Build}}} from "Yes" to "No". 
     25 
     264. Multiple-select {{{cipher/aes.c cipher/aes_icm.c cipher/aes_cbc.c hash/sha1.c hash/hmac.c rng/rand_source.c rng/prng.c rng/ctr_prng.c}}} [[br]] 
     27 Right-click, then click Properties. Change Configuration to {{{"All Configurations"}}} and Platform to {{{"All Platforms"}}}. Go to {{{Configuration Properties - General}}}, then change {{{Excluded From Build}}} from "No" to "Yes". 
     28 
     295. Click on libsrtp project. [[br]] 
     30 Right-click, then click Properties. Change Configuration to {{{"All Configurations"}}} and Platform to {{{"All Platforms"}}}. Go to {{{Configuration Properties - C/C++ - Preprocessor}}}, then choose Preprocessor Definitions, and add {{{";OPENSSL"}}}. 
     31 
     326. Rebuild libsrtp.