diff options
author | George Joseph <george.joseph@fairview5.com> | 2015-12-08 16:49:20 -0700 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2015-12-08 16:49:20 -0700 |
commit | 21962dad93fdb887899676597779a6ae47ff1edb (patch) | |
tree | 2796e99fa3df059027e65ac96c033361b6a41558 /res/res_pjsip/pjsip_configuration.c | |
parent | 246e513110e8b24dc9469472668a23f580a355bc (diff) |
res_pjsip: Add existence and readablity checks for tls related files
Both transport and endpoint now check for the existence and readability
of tls certificate and key files before passing them on to pjproject.
This will cause the object to not load rather than waiting for pjproject
to discover that there's a problem when a session is attempted.
NOTE: chan_sip also uses ast_rtp_dtls_cfg_parse but it's located
in build_peer which is gigantic and I didn't want to disturb it.
Error messages will emit but it won't interrupt chan_sip loading.
ASTERISK-25618 #close
Change-Id: Ie43f2c1d653ac1fda6a6f6faecb7c2ebadaf47c9
Reported-by: George Joseph
Tested-by: George Joseph
Diffstat (limited to 'res/res_pjsip/pjsip_configuration.c')
-rw-r--r-- | res/res_pjsip/pjsip_configuration.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index 1b0d6e2e9..746a45742 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -683,7 +683,7 @@ static int media_encryption_handler(const struct aco_option *opt, struct ast_var endpoint->media.rtp.encryption = AST_SIP_MEDIA_ENCRYPT_SDES; } else if (!strcasecmp("dtls", var->value)) { endpoint->media.rtp.encryption = AST_SIP_MEDIA_ENCRYPT_DTLS; - ast_rtp_dtls_cfg_parse(&endpoint->media.rtp.dtls_cfg, "dtlsenable", "yes"); + return ast_rtp_dtls_cfg_parse(&endpoint->media.rtp.dtls_cfg, "dtlsenable", "yes"); } else { return -1; } |