[asterisk-bugs] [JIRA] (ASTERISK-22961) [patch] DTLS-SRTP not working with SHA-256

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Mar 31 11:04:18 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216936#comment-216936 ] 

Richard Mudgett edited comment on ASTERISK-22961 at 3/31/14 11:03 AM:
----------------------------------------------------------------------

I want to get this working on the lastest asterisk version.
I am using 12.1.1 and I have manually applied this patch
srtp_dtls.patch [ 49083 ] 10/Jan/14 9:32 AM

However it comes up with an error. I am not sure what is required to fix.
{noformat}
res_pjsip_sdp_rtp.c: In function ‘add_crypto_to_stream’:
res_pjsip_sdp_rtp.c:822: warning: passing argument 2 of ‘dtls->get_fingerprint’ makes pointer from integer without a cast
res_pjsip_sdp_rtp.c:822: note: expected ‘const struct ast_rtp_dtls_cfg *’ but argument is of type ‘int’
res_pjsip_sdp_rtp.c:822: error: too few arguments to function ‘dtls->get_fingerprint’
make[1]: *** [res_pjsip_sdp_rtp.o] Error 1
make: *** [res] Error 2

                if ((crypto_attribute = dtls->get_fingerprint(session_media->rtp, AST_RTP_DTLS_HASH_SHA1))) {
                        RAII_VAR(struct ast_str *, fingerprint, ast_str_create(64), ast_free);
                        if (!fingerprint) {
                                return -1;
                        }

                        ast_str_set(&fingerprint, 0, "SHA-1 %s", crypto_attribute);

                        attr = pjmedia_sdp_attr_create(pool, "fingerprint", pj_cstr(&stmp, ast_str_buffer(fingerprint)));
                        media->attr[media->attr_count++] = attr;
                }
{noformat}


was (Author: jaflong):
I want to get this working on the lastest asterisk version.
I am using 12.1.1 and I have manually applied this patch
srtp_dtls.patch [ 49083 ] 10/Jan/14 9:32 AM

However it comes up with an error. I am not sure what is required to fix.

res_pjsip_sdp_rtp.c: In function ‘add_crypto_to_stream’:
res_pjsip_sdp_rtp.c:822: warning: passing argument 2 of ‘dtls->get_fingerprint’ makes pointer from integer without a cast
res_pjsip_sdp_rtp.c:822: note: expected ‘const struct ast_rtp_dtls_cfg *’ but argument is of type ‘int’
res_pjsip_sdp_rtp.c:822: error: too few arguments to function ‘dtls->get_fingerprint’
make[1]: *** [res_pjsip_sdp_rtp.o] Error 1
make: *** [res] Error 2

                if ((crypto_attribute = dtls->get_fingerprint(session_media->rtp, AST_RTP_DTLS_HASH_SHA1))) {
                        RAII_VAR(struct ast_str *, fingerprint, ast_str_create(64), ast_free);
                        if (!fingerprint) {
                                return -1;
                        }

                        ast_str_set(&fingerprint, 0, "SHA-1 %s", crypto_attribute);

                        attr = pjmedia_sdp_attr_create(pool, "fingerprint", pj_cstr(&stmp, ast_str_buffer(fingerprint)));
                        media->attr[media->attr_count++] = attr;
                }



> [patch] DTLS-SRTP not working with SHA-256
> ------------------------------------------
>
>                 Key: ASTERISK-22961
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22961
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Channels/chan_sip/SRTP, Channels/chan_sip/WebSocket
>    Affects Versions: 11.6.0, 12.0.0-beta2
>            Reporter: Jay Jideliov
>         Attachments: 11.7 patched.zip, asterisk_dtls.patch, chan_sip.c, dtls_retransmission.patch, ice_session.c, res_rtp_asterisk.c, res_rtp_asterisk.c, srtp_dtls.patch, srtp_dtls.patch
>
>
> Recently it became possible to use websocket on asterisk without a proxy previously necessary to make calls from the web browser. Although partial support has been added, full browser cross-operability has not been achieved yet. However, it seems to be a relatively easy task.
> Tested on Chrome+SIPML5+Asterisk 11, the connection can be established and works fine. However, due to the fact that Firefox sends SHA-256 packets which are not supported by asterisk, hence the support for this browser is limited by this issue.
> Step 1: Adding certificates to support DTLS
> dtlsenable = yes
> dtlsverify = no
> dtlscertfile=/etc/asterisk/keys/softphone.pem
> dtlsprivatekey=/etc/asterisk/keys/key.pem
> dtlscafile=/etc/asterisk/keys/key.pem
> Step 2: Making a call
> [Nov 25 15:05:50] WARNING[5628][C-0000005c]: chan_sip.c:11034 process_sdp_a_dtls: Unsupported fingerprint hash type 'sha-2' received on dialog '38f43a1f-15cd-ad69-c2b3-72c21b9de5fd'



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list