Changes between Initial Version and Version 3 of Ticket #1943
- Timestamp:
- Aug 8, 2016 11:36:17 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1943 – Description
initial v3 1 Currently, to support this, you need to do the following:1 For GNU targets: 2 2 3 1. Insert this lines in the "crypto_suites" definition in transport_srtp.c:3 1. 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: 4 4 {{{ 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}, 5 checking for EVP_aes_128_gcm in -lssl... yes 6 OpenSSL has AES GCM support, SRTP will use OpenSSl version 8 7 }}} 9 8 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)9 2. Enable the desired AES GCM cryptos in your config_site.h (by default, it's not enabled), for example: 11 10 {{{ 12 #define OPENSSL 11 #define PJMEDIA_SRTP_HAS_AES_GCM_256 1 12 #define PJMEDIA_SRTP_HAS_AES_GCM_128 1 13 13 }}} 14 14 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 }}} 15 3. Rebuild PJSIP. 21 16 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. 17 For Windows: 18 19 1. [https://trac.pjsip.org/repos/wiki/Getting-Started/Installing-OpenSSL-Windows Install OpenSSL]. 20 21 2. In Visual Studio, go to {{{libsrtp}}} project, into folder {{{crypto}}}. 22 23 3. 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 26 4. 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 29 5. 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 32 6. Rebuild libsrtp.