Opened 17 years ago

Closed 16 years ago

#61 closed enhancement (fixed)

Support for SRTP

Reported by: bennylp Owned by: nanang
Priority: major Milestone: release-0.9.0
Component: pjmedia Version: trunk
Keywords: SRTP Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

Please see the documentation in SRTP wiki page.

Attachments (2)

transport_srtp.patch (2.6 KB) - added by nanang 16 years ago.
streamutil.patch (841 bytes) - added by nanang 16 years ago.

Download all attachments as: .zip

Change History (29)

comment:1 Changed 17 years ago by bennylp

  • Milestone changed from release-0.7.0-rc2 to unassigned
  • Version changed from 0.5.10 to trunk

comment:2 Changed 16 years ago by bennylp

  • Milestone changed from unassigned to release-0.9.0
  • Priority changed from normal to major
  • Summary changed from Implement support for SRTP to Support for SRTP
  • Type changed from task to enhancement

comment:3 Changed 16 years ago by bennylp

  • Description modified (diff)
  • Owner changed from bennylp to nanang

The bulk of the work was done in separate branch, you can see the detailed changelogs for that branch in ticket #452.

Detailed changelogs on trunk is below.

r1729:

  • added <stdint.h> header detection in autoconf, and store the result in PJ_HAS_STDINT_H macro in <pj/compat/os_auto.h>

r1730:

  • imported libsrtp into third_party directory

r1732:

  • Added PJSIP_ESESSIONINSECURE error code in sip_errno.[hc] to require that secure session shall be used

r1733:

  • related to this ticket: added new invite session API pjsip_inv_verify_request2() which takes additional remote SDP, to avoid parsing SDP multiple times

r1735: (the bulk of SRTP changes, back-ported from SRTP branch)

  • new files in PJMEDIA: transport_srtp.[hc]
  • new configuration macro: PJMEDIA_HAS_SRTP (default=1)
  • modified project dependencies to include libsrtp
  • modified Samples-vc.mak, add libsrtp as third party library
  • modified transport interface:
    • modified transport_udp and transport_ice to follow the new interface
    • modified pjsua_media.c to use the new media transport interface
  • added new PJMEDIA error codes specific to SRTP, and map libsrtp error into PJMEDIA error code
  • modified PJSUA-LIB API:
    • added use_srtp and srtp_secure_signaling settings in both pjsua_config and pjsua_acc_config
  • added new --use-srtp option in pjsua

comment:4 Changed 16 years ago by bennylp

In r1736:

  • added eVC target for SRTP and libsrtp

comment:5 Changed 16 years ago by bennylp

In r1737:

  • fixed crashed on SRTP error string lookup

comment:6 Changed 16 years ago by bennylp

In r1738:

  • SRTP will TRY to use /dev/urandom if it's usable, otherwise it will fallback to using rand()
  • autoconf script is updated to detect <fcntl.h> (needed to open "/dev/urandom")

comment:7 Changed 16 years ago by bennylp

In r1739:

  • Fixed potential crash when performing SRTP error lookup
  • added more information in SRTP transport logging

comment:8 Changed 16 years ago by bennylp

r1740:

  • error in CPU type detection causing libsrtp initialization error

comment:9 Changed 16 years ago by bennylp

r1741:

  • Fixed libsrtp random string generation on Win32 (caused by r1738 above!)

r1742:

  • Return 406/Not Acceptable if SRTP negotiation failed instead of 500

comment:10 Changed 16 years ago by bennylp

r1745:

  • fix bug in secure signaling determination in pjsua_call.c, and added --srtp-secure option in pjsua to control signaling security requirement for SRTP"

comment:11 Changed 16 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

r1746:

  • disable CPU_RISC as it seems to be broken (tested on ARM)

comment:12 Changed 16 years ago by bennylp

r1758:

  • --srtp-use option in pjsua did not change account setting

comment:13 Changed 16 years ago by bennylp

r1759:

  • fixed bug: unable to accept RTP/AVP offer with a=crypto attribute when use_sdp is set to zero

Changed 16 years ago by nanang

Changed 16 years ago by nanang

comment:14 Changed 16 years ago by nanang

Attachment transport_srtp.patch:

  • added check for opt==NULL
  • added bad keys sample
  • changed flow for answerer receiving AVP with crypto attr

Attachment streamutil.patch:

  • moved block 'include' up, so usage/desc string recognize macro PJMEDIA_HAS_SRTP

comment:15 Changed 16 years ago by bennylp

r1760:

  • undo r1759 and replace it with other patches to fix unable to accept RTP/AVP offer with a=crypto attribute when use_sdp is set to zero. Also minor fix to streamutil

comment:16 Changed 16 years ago by bennylp

In r1763:

  • removed const from media transport's RTP and RTCP callback to allow packet to be modified in place.

comment:17 Changed 16 years ago by bennylp

In r1764:

  • mismatch in libsrtp output library name causing error when building samples in VC6

comment:18 Changed 16 years ago by bennylp

In r1774:

  • fixed signaling security level calculation in pjsua_call.c

comment:19 Changed 16 years ago by bennylp

r1780:

  • Removed const on on_rx_rtp() and on_rx_rtcp() functions arguments in stream.c and srtp.c

comment:20 Changed 16 years ago by bennylp

r1784:

  • disable SRTP support on Symbian

comment:21 Changed 16 years ago by bennylp

r1803:

  • crash on Win32 App because stderr is NULL. Thanks Truong Thanh Quang.

comment:22 Changed 16 years ago by bennylp

r1807:

  • Related to r1803 above removed fprintf()/printf() altogether and replaced it with err_report() call

comment:23 Changed 16 years ago by bennylp

In r1883:

  • Bug in pjsua-lib: if call is held and resumed, SRTP transport will use itself as the underlying transport.

comment:24 Changed 16 years ago by bennylp

In r1884:

  • Bug in previous patch which was applied to r1884. It has been rolled-back.
  • This revision is the real fix for that bug in pjsua-lib: if call is held and resumed, SRTP transport will use itself as the underlying transport.

comment:25 Changed 16 years ago by bennylp

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ticket reopened for porting SRTP to Symbian.

comment:26 Changed 16 years ago by nanang

In r1979: enabled SRTP on Symbian, initial source.

comment:27 Changed 16 years ago by nanang

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.