'Client Hello'请求中的FreeSWITCH TLS错误

时间:2013-12-09 16:22:43

标签: ssl freeswitch

我正在尝试使用TLS设置FreeSWITCH,

这是索菲亚的状态:

  

内部简介sip:mod_sofia@172.16.250.7:5060 RUNNING(0)

     

内部资料sip:mod_sofia@172.16.250.7:5061 RUNNING(0)(TLS)

TLS的端口可以正常运行。

我可以使用FSClient连接TLS。

当我使用SIP电话,3CX或EyeBeam时,我无法连接到此服务器。

我已经在windows客户端和SoftPhone中安装了cafile.pem作为受信任的根证书,但在NEGOTIATING过程中存在问题:

  

tport.c:2754 tport_wakeup_pri()tport_wakeup_pri(0xb6c0ce38):事件IN
  tport.c:869 tport_alloc_secondary()tport_alloc_secondary(0xb6c0ce38):新的辅助tport 0xb6c20dc8
  tport_type_tls.c:607 tport_tls_accept()tport_tls_accept(0xb6c20dc8):来自tls / 172.16.250.181的新连接:32741 / sips
  tport_tls.c:873 tls_connect()tls_connect(0xb6c20dc8):事件谈判
  tport_tls.c:908 tls_connect()tls_connect(0xb6c20dc8):self-> tp_accepted:1,ret:-1。
  tport_tls.c:965 tls_connect()tls_connect(0xb6c20dc8):TLS设置失败(错误:00000001:lib(0):func(0):reason(1))
  tport.c:2095 tport_close()tport_close(0xb6c20dc8):tls / 172.16.250.181:32741 / sips
  tport.c:2268 tport_set_secondary_timer()tport(0xb6c20dc8):设置定时器为0 ms因为zap

我使用WireShark来嗅探数据包,我发现的是“Hello Client' FSClient的请求与3CX发送的请求相比具有不同的大小和扩展名。 3CX没有指定任何明显不是强制性的扩展。

FSClient发送此请求数据包:

  

安全套接字层
     TLSv1记录层:握手协议:客户端Hello          内容类型:握手(22)          版本:TLS 1.0(0x0301)          长度:195          握手协议:客户你好              握手类型:客户你好(1)              长度:191              版本:TLS 1.0(0x0301)              随机                  gmt_unix_time:2013年12月4日15:15:52.000000000伊朗标准时间                  random_bytes:fc7d8f292251a0e81da8e7ed81182027805acf20ac036386 ...              会话ID长度:0              密码套房长度:82              密码套房(41间套房)                  密码套件:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA(0xc014)                  密码套件:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA(0xc00a)                  密码套件:TLS_DHE_RSA_WITH_AES_256_CBC_SHA(0x0039)                  密码套件:TLS_DHE_DSS_WITH_AES_256_CBC_SHA(0x0038)                  密码套件:TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA(0x0088)                  密码套件:TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA(0x0087)                  密码套件:TLS_ECDH_anon_WITH_AES_256_CBC_SHA(0xc019)                  密码套件:TLS_ECDH_RSA_WITH_AES_256_CBC_SHA(0xc00f)                  密码套件:TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA(0xc005)                  密码套件:TLS_RSA_WITH_AES_256_CBC_SHA(0x0035)                  密码套件:TLS_RSA_WITH_CAMELLIA_256_CBC_SHA(0x0084)                  密码套件:TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA(0xc012)                  密码套件:TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA(0xc008)                  密码套件:TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA(0x0016)                  密码套件:TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA(0x0013)                  密码套件:TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA(0xc017)                   密码套件:TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA(0xc00d)                   密码套件:TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA(0xc003)                   密码套件:TLS_RSA_WITH_3DES_EDE_CBC_SHA(0x000a)                   密码套件:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA(0xc013)                   密码套件:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA(0xc009)                   密码套件:TLS_DHE_RSA_WITH_AES_128_CBC_SHA(0x0033)                   密码套件:TLS_DHE_DSS_WITH_AES_128_CBC_SHA(0x0032)                   密码套件:TLS_DHE_RSA_WITH_SEED_CBC_SHA(0x009a)                   密码套件:TLS_DHE_DSS_WITH_SEED_CBC_SHA(0x0099)                   密码套件:TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA(0x0045)                   密码套件:TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA(0x0044)                   密码套件:TLS_ECDH_anon_WITH_AES_128_CBC_SHA(0xc018)                   密码套件:TLS_ECDH_RSA_WITH_AES_128_CBC_SHA(0xc00e)                   密码套件:TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA(0xc004)                   密码套件:TLS_RSA_WITH_AES_128_CBC_SHA(0x002f)                   密码套件:TLS_RSA_WITH_SEED_CBC_SHA(0x0096)                   密码套件:TLS_RSA_WITH_CAMELLIA_128_CBC_SHA(0x0041)                   密码套件:TLS_RSA_WITH_IDEA_CBC_SHA(0x0007)                   密码套件:TLS_ECDHE_RSA_WITH_RC4_128_SHA(0xc011)                   密码套件:TLS_ECDHE_ECDSA_WITH_RC4_128_SHA(0xc007)                   密码套件:TLS_ECDH_anon_WITH_RC4_128_SHA(0xc016)                   密码套件:TLS_ECDH_RSA_WITH_RC4_128_SHA(0xc00c)                   密码套件:TLS_ECDH_ECDSA_WITH_RC4_128_SHA(0xc002)                   密码套件:TLS_RSA_WITH_RC4_128_SHA(0x0005)                   密码套件:TLS_EMPTY_RENEGOTIATION_INFO_SCSV(0x00ff)               压缩方法长度:1               压缩方法(1种方法)                   压缩方法:null(0)               扩展时长:68               扩展名:ec_point_formats                   键入:ec_point_formats(0x000b)                   长度:4                   EC点格式长度:3                   椭圆曲线点格式(3)                       EC点格式:未压缩(0)                       EC点格式:ansiX962_compressed_prime(1)                       EC点格式:ansiX962_compressed_char2(2)               扩展名:elliptic_curves                   类型:elliptic_curves(0x000a)                   长度:52                   椭圆曲线长度:50                   椭圆曲线(25条曲线)                       椭圆曲线:sect163k1(0x0001)                       椭圆曲线:sect163r1(0x0002)                       椭圆曲线:sect163r2(0x0003)                       椭圆曲线:sect193r1(0x0004)                       椭圆曲线:sect193r2(0x0005)                       椭圆曲线:sect233k1(0x0006)                       椭圆曲线:sect233r1(0x0007)                       椭圆曲线:sect239k1(0x0008)                       椭圆曲线:sect283k1(0x0009)                       椭圆曲线:sect283r1(0x000a)                       椭圆曲线:sect409k1(0x000b)                       椭圆曲线:sect409r1(0x000c)                       椭圆曲线:sect571k1(0x000d)                       椭圆曲线:sect571r1(0x000e)                       椭圆曲线:secp160k1(0x000f)                       椭圆曲线:secp160r1(0x0010)                       椭圆曲线:secp160r2(0x0011)                       椭圆曲线:secp192k1(0x0012)                       椭圆曲线:secp192r1(0x0013)                       椭圆曲线:secp224k1(0x0014)                       椭圆曲线:secp224r1(0x0015)                       椭圆曲线:secp256k1(0x0016)                       椭圆曲线:secp256r1(0x0017)                       椭圆曲线:secp384r1(0x0018)                       椭圆曲线:secp521r1(0x0019)               扩展:SessionTicket TLS                   类型:SessionTicket TLS(0x0023)                   长度:0                   数据(0字节)

3CX' Hello Client'包:

  

安全套接字层       TLSv1记录层:握手协议:客户端Hello           内容类型:握手(22)           版本:TLS 1.0(0x0301)           长度:95           握手协议:客户你好               握手类型:客户你好(1)               长度:91               版本:TLS 1.0(0x0301)               随机                   gmt_unix_time:2013年12月4日15:30:15.000000000伊朗标准时间                   random_bytes:bea9192de02164ba455c963dd752aea54abc853fb0ef3934 ...               会话ID长度:0               密码套房长度:52               密码套房(26间套房)                   密码套件:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA(0xc014)                   密码套件:TLS_ECDH_RSA_WITH_AES_256_CBC_SHA(0xc00f)                   密码套件:TLS_DHE_RSA_WITH_AES_256_CBC_SHA(0x0039)                   密码套件:TLS_RSA_WITH_AES_256_CBC_SHA(0x0035)                   密码套件:TLS_DHE_DSS_WITH_AES_256_CBC_SHA(0x0038)                   密码套件:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA(0xc013)                   密码套件:TLS_ECDH_RSA_WITH_AES_128_CBC_SHA(0xc00e)                   密码套件:TLS_DHE_RSA_WITH_AES_128_CBC_SHA(0x0033)                   密码套件:TLS_RSA_WITH_AES_128_CBC_SHA(0x002f)                   密码套件:TLS_DHE_DSS_WITH_AES_128_CBC_SHA(0x0032)                   密码套件:TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA(0xc012)                   密码套件:TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA(0xc00d)                   密码套件:TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA(0x0016)                   密码套件:TLS_RSA_WITH_3DES_EDE_CBC_SHA(0x000a)                   密码套件:TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA(0x0013)                   密码套件:TLS_ECDHE_RSA_WITH_RC4_128_SHA(0xc011)                   密码套件:TLS_ECDH_RSA_WITH_RC4_128_SHA(0xc00c)                   密码套件:TLS_RSA_WITH_RC4_128_SHA(0x0005)                   密码套件:TLS_RSA_WITH_RC4_128_MD5(0x0004)                   密码套件:TLS_DHE_RSA_WITH_DES_CBC_SHA(0x0015)                   密码套件:TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA(0x0014)                   密码套件:TLS_RSA_WITH_DES_CBC_SHA(0x0009)                   密码套件:TLS_RSA_EXPORT_WITH_DES40_CBC_SHA(0x0008)                   密码套件:TLS_DHE_DSS_WITH_DES_CBC_SHA(0x0012)                   密码套件:TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA(0x0011)                   密码套件:TLS_RSA_EXPORT_WITH_RC4_40_MD5(0x0003)               压缩方法长度:1               压缩方法(1种方法)                   压缩方法:null(0)

并且有来自Freeswitch的共鸣信息包:

  

安全套接字层    - TLSv1记录层:警报(级别:致命,描述:握手失败)
          内容类型:警报(21)
          版本:TLS 1.0(0x0301)
          长度:2
          提醒信息
              等级:致命(2)
              描述:握手失败(40)

1 个答案:

答案 0 :(得分:1)

我不是专家,但这对我有所帮助:

FSClient使用此TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA密码套件与FS进行TLS握手。

所以,你必须检查你的软电话是否支持。如果没有,请尝试下载某些旧版本的FS(1.0.6),并在脚本目录中将gentls_cert.ingentle_cert.in进行比较。修改更改,反转旧版本。您可以在GitHub上看到更改。如果这对您没有帮助,请在此脚本中查找解决方案。我认为有问题。我希望我帮忙:)