Questions tagged [ssl]

Secure Sockets Layer (SSL) is a cryptographic protocol, now superseded by Transport Layer Security (TLS) that provides secure communications over the Internet. Often, SSL is used as a blanket term and refers to both the SSL protocol and the Transport Layer Security (TLS) protocol. The most recent version of the protocol is TLS version 1.3, specified by the IETF in RFC 8446.

'Secure Sockets Layer' was originally a comp.sources Usenet post in the 1980s, using a fairly primitive security protocol. Netscape Communication Corp pioneered the current SSL protocol, in SSL 2.0, the first version deployed, followed by SSL 3.0. At that point the IETF decided to standardize on this protocol, so RFC 2246 defined the next version of this protocol. There was some uncertainty over the intellectual property rights to the SSL name so the IETF chose the name Transport Layer Security (TLS). Today the names SSL and TLS are essentially synonyms. However, if you refer to a specific version you should include the correct name, e.g SSL 3.0 or TLS 1.1. As a progression it goes SSL 2.0 < SSL 3.0 < TLS 1.0 < TLS 1.1 < TLS 1.2 < TLS 1.3, where "<" means "precedes".

Current security standards forbid running any SSL version or TLS 1.0 (due to their various flaws). It is recommended to run only TLS 1.2 and TLS 1.3.

TLS was originally developed to run above a connection-oriented protocol, i.e. TCP. Later, TLS modified to run over connectionless protocols like UDP by way of Datagram Transport Layer Security (DTLS).

TLS is a mature protocol, now more than 20 years old, with vast support on a multitude of clients, servers, platforms, and libraries. However, there is some complexity around the cipher suites, the TLS Extensions, and the certificate validation, that regularly introduced reasons ending in non-interoperability. Perhaps the most well-known protocol that uses TLS is the HTTPS protocol, which is the HTTP protocol running over TLS.

Stackoverflow is for programming questions, and that is also true for questions tagged with TLS or SSL. In particular, server configuration questions are off-topic and instead should be asked on ServerFault.

50662 questions
147
votes
1 answer

nginx the "ssl" directive is deprecated, use the "listen ... ssl"

After NGINX upgrade to v1.15.2 starts getting the warning. nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/etc/nginx/sites-enabled/confid-file-name:8 Where the 8th line is ssl on; how I can…
sambua
  • 2,274
  • 3
  • 22
  • 20
143
votes
7 answers

Docker container SSL certificates

Is there any elegant way to add SSL certificates to images that have come from docker pull?. I'm looking for a simple and reproducible way of adding a file into /etc/ssl/certs and run update-ca-certificates. (This should cover ubuntu and Debian…
Beau Trepp
  • 2,610
  • 4
  • 22
  • 30
142
votes
22 answers

How can I force users to access my page over HTTPS instead of HTTP?

I've got just one page that I want to force to be accessed as an HTTPS page (PHP on Apache). How do I do this without making the whole directory require HTTPS? Or, if you submit a form to an HTTPS page from an HTTP page, does it send it by HTTPS…
Wiki
142
votes
13 answers

How can I test https connections with Django as easily as I can non-https connections using 'runserver'?

I have an application that uses "secure" cookies and want to test it's functionality without needing to set up a complicated SSL enabled development server. Is there any way to do this as simply as I can test non-encrypted requests using…
Evan Grim
  • 5,045
  • 4
  • 25
  • 20
139
votes
1 answer

Proper use of the HsOpenSSL API to implement a TLS Server

I'm trying to figure out how to properly use the OpenSSL.Session API in a concurrent context E.g. assume I want to implement a stunnel-style ssl-wrapper, I'd expect to have the following basic skeleton structure, which implements a naive full-duplex…
hvr
  • 7,775
  • 3
  • 33
  • 47
139
votes
5 answers

Turn a simple socket into an SSL socket

I wrote simple C programs, which are using sockets ('client' and 'server'). (UNIX/Linux usage) The server side simply creates a socket: sockfd = socket(AF_INET, SOCK_STREAM, 0); And then binds it to sockaddr: bind(sockfd, (struct sockaddr *)…
David Mape
  • 1,407
  • 2
  • 10
  • 3
137
votes
4 answers

WebSocket with SSL

Is it possible to have WebSockets with HTTPS? When switching to HTTPS, my WebSocket returns a security error and works perfectly with regular HTTP. Below, a snippet; socket = new WebSocket("ws://my_www:1235");
Eric
  • 9,870
  • 14
  • 66
  • 102
137
votes
26 answers

Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."

I'm using requests in Python3 on Windows via Pycharm, and I'm receiving a "SSL module is not available" error. I've spent hours trying to figure out what could be causing this. I've reinstalled Anaconda, and I am completely stuck. When running the…
Frank Drin
  • 1,613
  • 2
  • 13
  • 18
137
votes
4 answers

Does Java support Let's Encrypt certificates?

I am developing a Java application that queries a REST API on a remote server over HTTP. For security reasons this communication should be switched to HTTPS. Now that Let's Encrypt started their public beta, I'd like to know if Java currently works…
Hexaholic
  • 3,299
  • 7
  • 30
  • 39
136
votes
10 answers

nodejs - error self signed certificate in certificate chain

I am facing a problem with client side https requests. A snippet can look like this: var fs = require('fs'); var https = require('https'); var options = { hostname: 'someHostName.com', port: 443, path: '/path', method: 'GET', …
kDoyle
  • 1,487
  • 2
  • 9
  • 7
136
votes
4 answers

Keystore type: which one to use?

By looking at the file java.security of my JRE, I see that the keystore type to use by default is set to JKS. Here, there is a list of the keystore types that can be used. Is there a recommended keystore type? What are the pros/cons of the different…
manash
  • 6,985
  • 12
  • 65
  • 125
134
votes
18 answers

How to handle invalid SSL certificates with Apache HttpClient?

I know, there are many different questions and so many answers about this problem... But I can't understand... I have: ubuntu-9.10-desktop-amd64 + NetBeans6.7.1 installed "as is" from off. rep. I need connecting to some site over the HTTPS. For this…
rauch
  • 1,815
  • 7
  • 20
  • 31
133
votes
1 answer

How can I generate a self-signed certificate with SubjectAltName using OpenSSL?

I am trying to generate a self-signed certificate with OpenSSL with SubjectAltName in it.While I am generating the csr for the certificate, my guess is I have to use v3 extensions of OpenSSL x509. I am using : openssl req -new -x509 -v3 -key…
mohanjot
  • 1,490
  • 2
  • 11
  • 15
131
votes
3 answers

When you use 'badidea' or 'thisisunsafe' to bypass a Chrome certificate/HSTS error, does it only apply for the current site?

Sometimes and especially very often when developing a web-application Chrome doesn't allow you to visit certain sites and throwing certificate/HSTS error. I've found that typing badidea (more recently thisisunsafe) in Chrome window will tell Chrome…
sk1llfull
  • 1,505
  • 2
  • 10
  • 14
130
votes
12 answers

Invalid self signed SSL cert - "Subject Alternative Name Missing"

Recently, Chrome has stopped working with my self signed SSL certs, and thinks they're insecure. When I look at the cert in the DevTools | Security tab, I can see that it says Subject Alternative Name Missing The certificate for this site does …
Brad Parks
  • 66,836
  • 64
  • 257
  • 336