Check a host to make sure ssl is working

$ openssl s_client -host www.example.com -port 443

Check to see if you can make an ssl connection

$ openssl s_client -connect host:port

An example would be: openssl s_client -connect 123.123.123.123:22.

Encrypt and Decrypt a file

(encrypt)

$ openssl aes-256-cbc -e -in file.untouched -out file.encrypted -pass pass:yourpassword

(decrypt)

$ openssl aes-256-cbc -d -in file.encrypted -out file.decrypted -pass pass:yourpassword

SSL in Apache - Create a key and sign it yourself for free

Run the three following commands. Leave off -des3 in the first command if you don't want to password protect your key. If you leave -des3, you will have to enter this password every time you start or restart your Apache server. I think most leave it off, but I'm not for sure -- don't hold me to that. I certainly leave off -des3.

$ openssl genrsa -des3 -rand file1:file2:file3 -out my.key 1024
$ openssl req -new -key my.key -out my.csr
$ openssl x509 -req -days 365 -in my.csr -signkey my.key -out my.cert

This key will be good for 365 days, and will be 1024 bits long. You can change these things if you want.

Connection Partially Encrypted

I was getting the Connection Partially Encrypted error in Firefox when trying to force SSL on a page.

The best way to debug this is to view the source via your browser. If there's any URL that has http in it, you'll get this. The following html will produce the connection partially encrypted error.

<html>
<head>
<title>Connection Partially Encrypted</title>
</head>
<body>
<img src="http://www.example.com/example.jpg" alt="example" />
</body>
</html>

All it takes is one unencrypted connection to throw this error.

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.