Bug in SRTP when pjsua_acc_config.use_srtp == PJMEDIA_SRTP_OPTIONAL

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

 



I think I found a bug in the way that PJSIP handles the SRTP settings.
Would someone please confirm this?

When pjsua_acc_config.use_srtp is not PJMEDIA_SRTP_DISABLED, PJSIP
requires SRTP and all calls must be addressed to a sips: URI. PJSIP
rejects calls to sip: URIs with the status code
PJSIP_ESESSIONINSECURE.

The behavior I expect is for PJSIP to fall back to an insecure call
when the destination URI is sip: and the value of
pjsua_acc_config.use_srtp is PJMEDIA_SRTP_OPTIONAL.

The mistake is in pjsua_media.c:call_media_init_cb().  Here is the code:

    /* Check if SRTP requires secure signaling */
    if (acc->cfg.use_srtp != PJMEDIA_SRTP_DISABLED) {
        if (security_level < acc->cfg.srtp_secure_signaling) {
        err_code = PJSIP_SC_NOT_ACCEPTABLE;
        status = PJSIP_ESESSIONINSECURE;
        goto on_return;
        }
    }

I don't have a working solution yet.  It looks easy but perhaps there
will be unintended consequences.

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux