コード例 #1
0
        private bool UpdateSecurity()
        {
            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.TLS_PRIV_KEY_FILE, this.textBoxTLSPrivateKey.Text);
            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.TLS_PUB_KEY_FILE, this.textBoxTLSPublicKey.Text);
            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.TLS_CA_FILE, this.textBoxTLSCA.Text);

            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.IPSEC_SEC_AGREE, this.checkBoxIPSecSecAgreeEnabled.IsChecked.Value);
            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.IPSEC_ALGO, (this.comboBoxIPSecAlgorithm.SelectedValue as System.Windows.Controls.ComboBoxItem).Tag.ToString());
            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.IPSEC_EALGO, (this.comboBoxIPSecEAlgorithm.SelectedValue as System.Windows.Controls.ComboBoxItem).Tag.ToString());
            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.IPSEC_MODE, (this.comboBoxIPSecMode.SelectedValue as System.Windows.Controls.ComboBoxItem).Tag.ToString());
            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.IPSEC_PROTO, (this.comboBoxIPSecProtocol.SelectedValue as System.Windows.Controls.ComboBoxItem).Tag.ToString());

            tmedia_srtp_mode_t srtpMode = (this.comboBoxSRTPModes.SelectedValue as SRtpMode).Mode;

            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.SRTP_MODE, srtpMode.ToString());

            tmedia_srtp_type_t srtpType = (this.comboBoxSRTPTypes.SelectedValue as SRtpType).Type;

            this.configurationService.Set(Configuration.ConfFolder.SECURITY, Configuration.ConfEntry.SRTP_TYPE, srtpType.ToString());

            // Transmit values to the native part (global)
            MediaSessionMgr.defaultsSetSRtpMode(srtpMode);
            MediaSessionMgr.defaultsSetSRtpType(srtpType);
            if (this.sipService.SipStack != null)
            {
                this.sipService.SipStack.WrappedStack.setSSLCertificates(this.textBoxTLSPrivateKey.Text, this.textBoxTLSPublicKey.Text, this.textBoxTLSCA.Text);
            }

            return(true);
        }
コード例 #2
0
            public SRtpType(tmedia_srtp_type_t type)
            {
                mType = type;
                switch (type)
                {
                case tmedia_srtp_type_t.tmedia_srtp_type_dtls: mName = "DTLS"; break;

                case tmedia_srtp_type_t.tmedia_srtp_type_sdes: mName = "SDES"; break;

                case tmedia_srtp_type_t.tmedia_srtp_type_sdes_dtls: mName = "SDES-DTLS"; break;
                }
            }
コード例 #3
0
ファイル: MediaSessionMgr.cs プロジェクト: xueqing/doubango
        public static tmedia_srtp_type_t defaultsGetSRtpType()
        {
            tmedia_srtp_type_t ret = (tmedia_srtp_type_t)tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetSRtpType();

            return(ret);
        }
コード例 #4
0
ファイル: MediaSessionMgr.cs プロジェクト: xueqing/doubango
        public static bool defaultsSetSRtpType(tmedia_srtp_type_t srtp_type)
        {
            bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetSRtpType((int)srtp_type);

            return(ret);
        }
コード例 #5
0
 public static bool defaultsSetSRtpType(tmedia_srtp_type_t srtp_type)
 {
     bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetSRtpType((int)srtp_type);
     return ret;
 }