<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[HTTPS/WSS WebSockets doesn't works with Let's Encrypt Certificates (tested on FOP2 2.31.33)]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I configured ssl certificates  (Let's Encrypt Certificates) files into <code>fop2.cfg</code> with the same paths used into Apache webserver:</p>
<pre><code>ssl_certificate_file=/etc/asterisk/keys/default.crt
ssl_certificate_key_file=/etc/asterisk/keys/default.key
</code></pre>
<p dir="auto">the https page of freepbx works good, but when connecting to FOP2 I get in the Browser console these errors:</p>
<p dir="auto"><code>WebSocket connection to 'wss://pbx.example.com:4445/' failed: </code></p>
<p dir="auto">Looking deeper I see that the private key is in EC (Elliptic Curve) format and not RSA.</p>
<p dir="auto">Is the secp384r1 private key supported by FOP2?</p>
<p dir="auto">Follow some details of private key:</p>
<pre><code># openssl asn1parse -in /etc/asterisk/keys/default.key
    0:d=0  hl=3 l= 182 cons: SEQUENCE          
    3:d=1  hl=2 l=   1 prim: INTEGER           :00
    6:d=1  hl=2 l=  16 cons: SEQUENCE          
    8:d=2  hl=2 l=   7 prim: OBJECT            :id-ecPublicKey
   17:d=2  hl=2 l=   5 prim: OBJECT            :secp384r1
</code></pre>
<p dir="auto">I think this is a problem of FOP2 because testing the 4445 port with openssl command it doesn't return the Certificate info:</p>
<pre><code>$ openssl s_client -showcerts -connect pbx.example.com:4445
CONNECTED(00000003)
C0E148ADE87F0000:error:0A000126:SSL routines:ssl3_read_n:unexpected eof while reading:ssl/record/rec_layer_s3.c:308:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 334 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
</code></pre>
<p dir="auto">Let's me know if you need more info.</p>
<p dir="auto">Thank you in advance</p>
]]></description><link>http://localhost:4567/topic/3105/https-wss-websockets-doesn-t-works-with-let-s-encrypt-certificates-tested-on-fop2-2.31.33</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 04:22:29 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/3105.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Oct 2022 22:24:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to HTTPS/WSS WebSockets doesn't works with Let's Encrypt Certificates (tested on FOP2 2.31.33) on Mon, 20 Nov 2023 15:36:02 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys, I have the same issue. Apache works fine, but fop2 can't catch the certificate. I have these in my /usr/local/fop2/fop2.cfg:</p>
<pre><code>ssl_certificate_file=/etc/letsencrypt/live/pbx-02.[...cut...].net/fullchain.pem
ssl_certificate_key_file=/etc/letsencrypt/live/pbx-02.[...cut...].net/privkey.pem
</code></pre>
<p dir="auto">I've also tried to enable debug logs via OPTIONS, but I couldn't find anything related to the certificates.<br />
I'm on fop2_server version 2.31.34<br />
Do you guys know any path to troubleshoot this issue?</p>
]]></description><link>http://localhost:4567/post/12562</link><guid isPermaLink="true">http://localhost:4567/post/12562</guid><dc:creator><![CDATA[throathlete]]></dc:creator><pubDate>Mon, 20 Nov 2023 15:36:02 GMT</pubDate></item><item><title><![CDATA[Reply to HTTPS/WSS WebSockets doesn't works with Let's Encrypt Certificates (tested on FOP2 2.31.33) on Tue, 27 Dec 2022 15:56:08 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicolas" aria-label="Profile: nicolas">@<bdi>nicolas</bdi></a> said:<br />
The certs in the fop2.cfg file are only read by the websocket server (fop2_server), not your web server. If the user panel is not loading is because most probably it is using incorrect certs. There is a script provided /usr/local/fop2/setSSL.sh that tries to find the cert files from the apache config files and set them accordingly. You might want to try running that script and see if it find the certs and set it up on your fop2.cfg file.</p>
</blockquote>
<p dir="auto">I have the certs setup right, is working on apache2 already, but the panel cant do the WSS connection, I can even telnet to the port from internal and external networks, do you have any ideas to fix this?</p>
]]></description><link>http://localhost:4567/post/12561</link><guid isPermaLink="true">http://localhost:4567/post/12561</guid><dc:creator><![CDATA[Guilherme]]></dc:creator><pubDate>Tue, 27 Dec 2022 15:56:08 GMT</pubDate></item><item><title><![CDATA[Reply to HTTPS/WSS WebSockets doesn't works with Let's Encrypt Certificates (tested on FOP2 2.31.33) on Fri, 18 Nov 2022 14:24:31 GMT]]></title><description><![CDATA[<p dir="auto">The certs in the fop2.cfg file are only read by the websocket server (fop2_server), not your web server. If the user panel is not loading is because most probably it is using incorrect certs. There is a script provided /usr/local/fop2/setSSL.sh that tries to find the cert files from the apache config files and set them accordingly. You might want to try running that script and see if it find the certs and set it up on your fop2.cfg file.</p>
]]></description><link>http://localhost:4567/post/12560</link><guid isPermaLink="true">http://localhost:4567/post/12560</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Fri, 18 Nov 2022 14:24:31 GMT</pubDate></item><item><title><![CDATA[Reply to HTTPS/WSS WebSockets doesn't works with Let's Encrypt Certificates (tested on FOP2 2.31.33) on Thu, 27 Oct 2022 17:08:00 GMT]]></title><description><![CDATA[<p dir="auto">This is what we have in fop2.cfg that seems to work. The user panel still isn't loading, but the page displays the correct cert info.<br />
ssl_certificate_file=/etc/httpd/pki/webserver.crt<br />
ssl_certificate_key_file=/etc/httpd/pki/webserver.key</p>
]]></description><link>http://localhost:4567/post/12559</link><guid isPermaLink="true">http://localhost:4567/post/12559</guid><dc:creator><![CDATA[FreerPBXer]]></dc:creator><pubDate>Thu, 27 Oct 2022 17:08:00 GMT</pubDate></item><item><title><![CDATA[Reply to HTTPS/WSS WebSockets doesn't works with Let's Encrypt Certificates (tested on FOP2 2.31.33) on Fri, 21 Oct 2022 23:00:44 GMT]]></title><description><![CDATA[<p dir="auto">I'm having similar issues, but I don't think that's the correct location for the LetsEncrypt certs that FreePBX manages. Those appears to be the self-signed certs. What we need is either in /etc/asterisk/keys/integration/ or /etc/asterisk/keys/integration/www.yourdomain.com<br />
There are files that appear to be the certificate and key file in both locations. But no matter what I put into fop2.cfg it doesn't work.</p>
]]></description><link>http://localhost:4567/post/12558</link><guid isPermaLink="true">http://localhost:4567/post/12558</guid><dc:creator><![CDATA[FreerPBXer]]></dc:creator><pubDate>Fri, 21 Oct 2022 23:00:44 GMT</pubDate></item></channel></rss>