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
129
votes
2 answers

Add Self Signed Certificate without promting Yes/No from User

Using some batch file, I want to add the untrusted self signed certificate within Java Keystore. Command is %JAVA_HOME%/bin/keytool -import -v -trustcacerts -alias server-alias -file server.cer -keystore cacerts.jks -keypass changeit -storepass…
Arun Kumar
  • 6,534
  • 13
  • 40
  • 67
128
votes
11 answers

Javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: Failure in SSL library, usually a protocol error

I am trying to run the following code in android URLConnection l_connection = null; // Create connection uzip=new UnZipData(mContext); l_url = new URL(serverurl); if ("https".equals(l_url.getProtocol())) { System.out.println("<<<<<<<<<<<<<…
127
votes
5 answers

How can I convert a PFX certificate file for use with Apache on a linux server?

How can I convert a PFX certificate file for use with Apache on a linux server? I created the PFX from Windows Certificate Services. The PFX contains the entire certificate chain. (Which is just a root and the main cert, no intermediate.) Lead me,…
AaronJAnderson
  • 1,698
  • 4
  • 18
  • 25
127
votes
14 answers

You must enable the openssl extension to download files via https

I wanted to install Zend Framework 2. So I downloaded the skeleton application. As mentioned in the ZF2 manual, we have to issue the command php composer.phar install Inside the skeleton. But I'm getting an error You must enable the openssl…
Uttam Dutta
  • 5,250
  • 4
  • 18
  • 21
124
votes
9 answers

Java client certificates over HTTPS/SSL

I am using Java 6 and am trying to create an HttpsURLConnection against a remote server, using a client certificate. The server is using an selfsigned root certificate, and requires that a password-protected client certificate is presented. I've…
Jan
  • 4,366
  • 6
  • 22
  • 21
124
votes
1 answer

SSL Error: unable to get local issuer certificate

I'm having trouble configuring SSL on a Debian 6.0 32bit server. I'm relatively new with SSL so please bear with me. I'm including as much information as I can. Note: The true domain name has been changed to protect the identity and integrity of the…
Jamie Counsell
  • 7,730
  • 6
  • 46
  • 81
124
votes
9 answers

Using psql to connect to PostgreSQL in SSL mode

I am trying to configure ssl certificate for PostgreSQL server. I have created a certificate file (server.crt) and key (server.key) in data directory and update the parameter SSL to "on" to enable secure connection. I just want only the server to be…
Lolly
  • 34,250
  • 42
  • 115
  • 150
123
votes
4 answers

What is the difference between X509Certificate2 and X509Certificate in .NET?

What is the difference between the two?
Kyle
  • 17,317
  • 32
  • 140
  • 246
122
votes
7 answers

Curl: Fix CURL (51) SSL error: no alternative certificate subject name matches

I am new to CURL world, coming from Windows + .NET domain. Trying to access Rest API for basic authentication at http://www.evercam.io/docs/api/v1/authentication. curl -X GET https://api.evercam.io/v1/... \ -u {username} Don't know how to use this…
theGeekster
  • 6,081
  • 12
  • 35
  • 47
121
votes
16 answers

ASP.NET MVC RequireHttps in Production Only

I want to use the RequireHttpsAttribute to prevent unsecured HTTP requests from being sent to an action method. C# [RequireHttps] //apply to all actions in controller public class SomeController { [RequireHttps] //apply to this action only …
Zack Peterson
  • 56,055
  • 78
  • 209
  • 280
120
votes
2 answers

limiting java ssl debug logging

Using JVM flag -Djavax.net.debug=ssl is producing a tremendous ammount of logging, the details for every SSL event on the server. Is there anyway to only have it log errors? or possibly there is some better subset of these flags that produce tidier…
Steve Renyolds
  • 1,341
  • 2
  • 9
  • 10
118
votes
9 answers

How to configure axios to use SSL certificate?

I'm trying to make a request with axios to an api endpoint and I'm getting the following error: Error: unable to verify the first certificate It seems the https module, which axios uses, is unable to verify the SSL certificate used on the…
Jemi Salo
  • 3,401
  • 3
  • 14
  • 25
118
votes
10 answers

Is there a way to make Firefox ignore invalid ssl-certificates?

I am maintaining a few web applications. The development and qa environments use invalid/outdated ssl-certificates. Although it is generally a good thing, that Firefox makes me click like a dozen times to accept the certificate, this is pretty…
Mo.
  • 15,033
  • 14
  • 47
  • 57
117
votes
5 answers

Python Requests - How to use system ca-certificates (debian/ubuntu)?

I've installed a self-signed root ca cert into debian's /usr/share/ca-certificates/local and installed them with sudo dpkg-reconfigure ca-certificates. At this point true | gnutls-cli mysite.local is happy, and true | openssl s_client -connect…
ThorSummoner
  • 16,657
  • 15
  • 135
  • 147
115
votes
3 answers

OpenSSL hangs during PKCS12 export with "Loading 'screen' into random state"

I am generating a self-signed SSL certificate with OpenSSL (not makecert), for use in IIS. openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '//CN=myhost' (The double slash is correct. The command above does…
TN.
  • 18,874
  • 30
  • 99
  • 157