Hi All,
Please help me when you get a chance.
I’ve follow the instruction link below to configure TLS in my freeswitch server, but it failed with my FSClient 1.2.3.5. I copied cafile.pem from my freeswitch to my windows desktop and gived the right directory under “TLS Certificate Directory” shown as below screenshot (also attached).
https://freeswitch.org/
But I still cannot log in with tls, console log output, and configuration files are below. Kindly take a look and let me know if additional info is needed.
Below is the view of one cert:
root@ip-172-31-28-201:/usr/
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
be:37:19:a3:98:6e:82:19
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=52.35.22.204, O=52.35.22.204
Validity
Not Before: Nov 12 21:20:24 2016 GMT
Not After : Nov 11 21:20:24 2022 GMT
Subject: CN=52.35.22.204, O=52.35.22.204
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:bd:01:6a:df:ae:35:f2:82:1f:
2f:ec:a5:2d:ec:7c:3d:0a:c3:fb:
dc:c6:60:b6:14:eb:6e:5e:96:c2:
19:a1:36:a5:82:37:5b:8b:0a:5d:
90:77:e6:34:f1:36:b3:c9:62:8e:
0a:3e:67:32:57:c2:52:71:8a:9b:
15:e0:53:0c:46:d0:98:1a:05:8e:
b8:16:ea:24:80:1c:67:67:12:16:
ab:4b:b6:a4:b7:f7:a7:ad:11:34:
4a:da:9f:dd:14:71:7e:7d:b1:91:
a0:9f:56:ab:89:eb:91:fd:1e:74:
1d:94:1d:08:c7:26:2d:85:45:46:
68:83:e6:25:2b:fd:82:d5:7c:67:
de:00:85:62:d7:f7:ad:a8:c2:17:
a3:9e:d8:6d:55:f7:4d:a9:4f:73:
3b:1e:27:6b:fb:3c:40:49:80:55:
da:8c:a4:10:d8:bf:1b:12:15:56:
cc:d3
Exponent: 65537 (0x10001)
X509v3 extensions:
Netscape Comment:
FS Server Cert
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
74:5E:4B:09:21:37:50:1F:BB:F1:
X509v3 Authority Key Identifier:
keyid:0B:51:AF:BF:BF:8F:2A:94:
DirName:/CN=52.35.22.204/O=52.
serial:F5:5B:BD:AA:25:4E:16:0B
X509v3 Subject Alternative Name:
DNS:52.35.22.204
Netscape Cert Type:
SSL Server
X509v3 Extended Key Usage:
TLS Web Server Authentication
Signature Algorithm: sha1WithRSAEncryption
e7:35:1e:9a:70:6c:1c:61:2f:c8:
c0:7a:54:02:65:91:49:82:0b:86:
d6:50:5c:41:28:f3:80:ca:ea:2b:
fe:4e:8d:35:4f:ca:ec:cb:6b:05:
f7:85:f4:4a:3a:34:b6:4f:c1:5c:
3c:25:2a:70:24:6d:0e:3c:e4:e1:
38:d5:e3:91:de:4f:e5:60:27:44:
60:d5:01:48:01:39:1a:18:30:3a:
f7:4b:44:c9:c7:4d:02:2a:d3:d4:
69:2c:38:7f:04:e1:5e:9a:0c:13:
f4:09:73:e8:58:c5:c4:ba:33:28:
06:15:ad:29:1a:25:47:0c:91:be:
a6:95:84:cc:d3:bc:10:18:e5:43:
d3:dc:81:8c:ea:85:83:69:39:63:
c4:52:8c:25
Console output:
tport.c:2749 tport_wakeup_pri() tport_wakeup_pri(
tport.c:862 tport_alloc_secondary() tport_alloc_secondary(
tport_type_tcp.c:203 tport_tcp_init_secondary() tport_tcp_init_secondary(
tport_type_tcp.c:209 tport_tcp_init_secondary() tport_tcp_init_secondary(
tport_type_tls.c:610 tport_tls_accept() tport_tls_accept(
tport_tls.c:955 tls_connect() tls_connect(0x7fcee8252ea0): events NEGOTIATING
tport_tls.c:1044 tls_connect() tls_connect(0x7fcee8252ea0): TLS setup failed (error:00000001:lib(0):func(0)
tport.c:2090 tport_close() tport_close(0x7fcee8252ea0): tls/50.187.205.251:56612/sips
tport.c:2263 tport_set_secondary_timer() tport(0x7fcee8252ea0): set timer at 0 ms because zap
freeswitch@ip-172-31-28-201> sofia status
Name Type
==============================
external-ipv6 profile sip:mod_sofia@[::1]:5080 RUNNING (0)
172.31.28.201 alias
external profile sip:mod_sofia@52.35.22.204:
external::example.com gateway sip:joeuser@example.com NOREG
internal-ipv6 profile sip:mod_sofia@[::1]:5060 RUNNING (0)
internal-ipv6 profile sip:mod_sofia@[::1]:5061 RUNNING (0) (TLS)
internal profile sip:mod_sofia@52.35.22.204:
internal profile sip:mod_sofia@52.35.22.204:
==============================
4 profiles 1 alias
Under vars.xml:
<X-PRE-PROCESS cmd="set" data="sip_tls_version=sslv23"/
<!--
TLS cipher suite: default ALL:!ADH:!LOW:!EXP:!MD5:@
The actual ciphers supported will change per platform.
openssl ciphers -v 'ALL:!ADH:!LOW:!EXP:!MD5:@
Will show you what is available in your verion of openssl.
-->
<X-PRE-PROCESS cmd="set" data="sip_tls_ciphers=ALL:!
<!-- Internal SIP Profile -->
<X-PRE-PROCESS cmd="set" data="internal_auth_calls=
<X-PRE-PROCESS cmd="set" data="internal_sip_port=5060"/
<X-PRE-PROCESS cmd="set" data="internal_tls_port=5061"/
<X-PRE-PROCESS cmd="set" data="internal_ssl_enable=
<X-PRE-PROCESS cmd="set" data="internal_ssl_dir=/usr/
Under internel.xml:
<!-- TLS: disabled by default, set to "true" to enable -->
<param name="tls" value="true"/>
<!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
<param name="tls-only" value="false"/>
<!-- additional bind parameters for TLS -->
<param name="tls-bind-params" value="transport=tls"/>
<!-- Port to listen on for TLS requests. (5061 will be used if unspecified) -->
<param name="tls-sip-port" value="$${internal_tls_port}"/
<!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
<!--<param name="tls-cert-dir" value=""/>-->
<!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
<param name="tls-passphrase" value=""/>
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be$
<param name="tls-verify-policy" value="in"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>
<!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
<param name="tls-verify-in-subjects" value=""/>
<!-- TLS version default: tlsv1,tlsv1.1,tlsv1.2 -->
<param name="tls-version" value="$${sip_tls_version}"/>
<!-- TLS ciphers default: ALL:!ADH:!LOW:!EXP:!MD5:@
<param name="tls-ciphers" value="$${sip_tls_ciphers}"/>
Thanks,
Clarie