Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1628

Error: Handshake failure: certificate exception in twilio when i am trying to connect my application

$
0
0

I have an application that uses WebSockets. I generated an SSL certificate using Let's Encrypt, and I am using the Nginx web server. The problem I am facing is that my domain shows a secure connection in the browser, but when I use Twilio, the functionality implemented in my app, which is supposed to initiate a call automatically, is giving an error. also i have checked the ssl certicate with ssl labs, it is valid and will expire in 90 days.

Twilio was unable to fetch content from: https://example.com:8080/inbound

Error: Handshake failure: certificate exception

Account SID: [some_id]

SID: [some_id]

Request ID: [some_id]

Remote Host: abhiai.com

Request Method: POST

Request URI: https://example.com:8080/inbound

SSL Version: TLSv1.2

URL Fragment: true

i want to know where i am going wrong and i want to establish secure connection , in my application for reference here is my default nginx file :

# Default server configuration#server {        listen 80 default_server;        listen [::]:80 default_server;        # SSL configuration        #        # listen 443 ssl default_server;        #listen [::]:443 ssl default_server;        #        # Note: You should disable gzip for SSL traffic.        # See: https://bugs.debian.org/773332        #        # Read up on ssl_ciphers to ensure a secure configuration.        # See: https://bugs.debian.org/765782        #        # Self signed certs generated by the ssl-cert package        # Don't use them in a production server!        #        # include snippets/snakeoil.conf;        root /var/www/html;        # Add index.php to the list if you are using PHP        index index.html index.htm index.nginx-debian.html;        server_name _;   # ssl_protocols TLSv1.2 TLSv1.3;   #ssl_prefer_server_ciphers on;        location / {                # First attempt to serve request as file, then                # as directory, then fall back to displaying a 404.                try_files $uri $uri/ =404;        }        # pass PHP scripts to FastCGI server        #        #location ~ \.php$ {        #       include snippets/fastcgi-php.conf;        #        #       # With php-fpm (or other unix sockets):        #       fastcgi_pass unix:/run/php/php7.4-fpm.sock;        #       # With php-cgi (or other tcp sockets):        #       fastcgi_pass 127.0.0.1:9000;        #}        # deny access to .htaccess files, if Apache's document root        # concurs with nginx's one        #        #location ~ /\.ht {        #       deny all;        #}}server {    listen 443 ssl default_server;    listen [::]:443 ssl default_server;    # SSL certificates    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;    ssl_protocols TLSv1.2 TLSv1.3;    ssl_prefer_server_ciphers on;    ssl_ciphers 'HIGH:!aNULL:!MD5';    root /var/www/html;    index index.html index.htm index.nginx-debian.html;    location / {        try_files $uri $uri/ =404;    }}# Virtual Host configuration for example.com## You can move that to a different file under sites-available/ and symlink that# to sites-enabled/ to enable it.##server {#       listen 80;#       listen [::]:80;##       server_name example.com;##       root /var/www/example.com;#       index index.html;##       location / {#               try_files $uri $uri/ =404;#       }#}

i want to make secure connection using websockets using twilio , i have already enabled Tls version 1.2 in my config file. here is my node.js file for cert check

let options = {    key: fs.readFileSync('./ssl/privatekey.pem'),    cert: fs.readFileSync('./ssl/certificate.pem')};if (platform === "linux") {    options = {        key: fs.readFileSync('/etc/letsencrypt/live/example.com/privkey.pem'), // Update with your private key path        cert: fs.readFileSync('/etc/letsencrypt/live/example.com/cert.pem') // Update with your certificate path    };}

Viewing all articles
Browse latest Browse all 1628

Trending Articles