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
115
votes
3 answers

How to convert a private key to an RSA private key?

Let me explain my question first. I bought a certificate from a CA and used the following format to generate the csr and the private key: openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr When I open the server.key file, I…
Silent User
  • 2,657
  • 7
  • 29
  • 36
114
votes
1 answer

How to disable cURL SSL certificate verification

Hello i want to use an API for a website but there an error with my curl command. I want to disable SSL certificate verification. curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here:…
Micky
  • 1,295
  • 3
  • 8
  • 5
114
votes
11 answers

Can you use a service worker with a self-signed certificate?

I have developer server that are used for testing. They have SSL self-signed certificates, which allow us to test the web application over HTTPS, but with prominent warnings that the certificates are not verifiable. That's fine, but I have a Service…
Keith
  • 150,284
  • 78
  • 298
  • 434
114
votes
17 answers

Ignoring SSL certificate in Apache HttpClient 4.3

How to ignore SSL certificate (trust all) for Apache HttpClient 4.3? All the answers that I have found on SO treat previous versions, and the API changed. Related: How to ignore SSL certificate errors in Apache HttpClient 4.0 How to handle invalid…
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
113
votes
4 answers

npm http-server with SSL

I'm using the npm package "http-server" (https://www.npmjs.com/package/http-server) to set up a simple webserver, but I cannot get it to use SSL. My command in package.json is http-server -p 8000 -o -S with a cert.pem and key.pem in my root…
delucasvb
  • 5,393
  • 4
  • 25
  • 35
112
votes
14 answers

"docker pull" certificate signed by unknown authority

I was trying to pull a docker image from a docker registry but hit the following issue: $ docker pull // Error response from daemon: Get /v1/_ping: x509: certificate signed by unknown authority I…
Chen Xie
  • 3,849
  • 8
  • 27
  • 46
112
votes
17 answers

Mac OSX python ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)

Many operations in Python require accessing things via https. This includes pip install command, or just using http.client.HTTPSConnection, or any modules or applications that use these things internally. If python was installed from the official…
Edward Ned Harvey
  • 6,525
  • 5
  • 36
  • 45
111
votes
6 answers

Disable SSL fallback and use only TLS for outbound connections in .NET? (Poodle mitigation)

I am trying to mitigate our vulnerability to the Poodle SSL 3.0 Fallback attack. Our admins have already started disabling SSL in favor of TLS for inbound connections to our servers. And we have also advised our team to disable SSL in their web…
Jordan Rieger
  • 3,025
  • 3
  • 30
  • 50
110
votes
13 answers

Heroku NodeJS http to https ssl forced redirect

I have an application up and running on Heroku with Express.js on Node.js with https. How do I identify the protocol to force a redirect to https with Node.js on Heroku? My app is just a simple http-server, it doesn't (yet) realize Heroku is sending…
Derek Bredensteiner
  • 2,906
  • 4
  • 23
  • 13
110
votes
21 answers

How to extract CN from X509Certificate in Java?

I am using a SslServerSocket and client certificates and want to extract the CN from the SubjectDN from the client's X509Certificate. At the moment I call cert.getSubjectX500Principal().getName() but this of course gives me the total formatted DN of…
Martin C.
  • 12,140
  • 7
  • 40
  • 52
110
votes
8 answers

Webpack Dev Server running on HTTPS/Web Sockets Secure

Normally in developer mode Webpack runs using HTTP. There is usually a web server serving content through HTTP and webpack using http/websockets on a separate port. Is it possible to run the web server on https and webpack on https/websocket secure…
Licx
  • 1,293
  • 2
  • 11
  • 12
109
votes
6 answers

How to get charles proxy work with Android 7 nougat?

Android 7 introduced some changes to the way certificates are handled (http://android-developers.blogspot.com/2016/07/changes-to-trusted-certificate.html) and somehow I cannot make my Charles proxy work any more. My…
mbonnin
  • 6,893
  • 3
  • 39
  • 55
108
votes
3 answers

Difference between pem, crt, key files

I'm having problems understanding the difference between files produced by openssl and how to detect them. For example I'm trying to generate Self-signed cert with private key and generate JKS file from p12 format. I'm googling like a madman but I…
sebastian_t
  • 2,241
  • 6
  • 23
  • 39
108
votes
8 answers

What RSA key length should I use for my SSL certificates?

I'm in the process of creating a CSR, and I wonder which is arguably the best length for my RSA key. Of course, 384 is probably too weak, and 16384 is probably too slow. Is there a consensus on the key length one should use, depending on the…
Brann
  • 31,689
  • 32
  • 113
  • 162
108
votes
19 answers

How to force Laravel Project to use HTTPS for all routes?

I am working on a project that requires a secure connection. I can set the route, uri, asset to use 'https' via: Route::get('order/details/{id}', ['uses' => 'OrderController@details', 'as' => 'order.details', 'https']); url($language.'/index', [],…
Nelson Melecio
  • 1,334
  • 3
  • 12
  • 19