Use this command to verify the SSL certificate for the domain www.somedomain.com
openssl s_client -showcerts -connect www.somedomain.com:443
If the certificate is correctly installed the result should contain at the end:
Verify return code: 0 (ok)
That’s it
I am found of keeping password protected backups and most of the time I lost my super secret password thus unable to open my super important backups 🙂 just kidding.
Like in windows we can simple right click and zip folders/files with passwords in text based terminals of linux I always want the same.
So here is the trick I normally use.
For encrypting a file:
openssl enc -aes-256-cbc -e > out.file
It will ask for password like:
enter aes-256-cbc encryption password:
Verifying - enter aes-256-cbc encryption password:
If you want to encrypt a folder with compression (tar.gz)
tar -cz foldername | openssl enc -aes-256-cbc -e > out.tar.gz
Now the important part, decrypting your encrypted files….
openssl enc -aes-256-cbc -d -in out.file > new.file
Installing MinGW/MSYS
http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
http://www.mingw.org/wiki/MSYS
Install MinGW (before MSYS)
Download the MinGW Installer from http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download
- Select Save File when prompted.
- Open the downloaded exe.
- Click Yes when Windows asks if you want to allow it.
- Click Next > on the Welcome screen.
- Select Download and Install and click Next >
- Read the License Agreement and click I agree
- Select Current to install the current MinGW package and click Next >
- Check the MinGW base tools and g++ compiler click Next
- Destination Folder should be C:\MinGW
- Click Next >
- Leave the default folder and click Install
- When Installation is complete, click Next >
- Click Finish
Install MSYS:
- Download MSYS
- Run the downloaded exe.
- Click Yes when Windows asks if you want to allow it.
- Click Yes you want to install in the Setup pop-up.
- Click Next in the Welcome Window.
- Read the License Agreement and click Yes
- Read the Information and click Next >
- The Default Destination of C:\msys\1.0 is fine, so click Next >
- The default folder of MinGW is fine, so click Next >
- Click Install
- A cmd shell will pop-up asking if you want to continue with the post install, enter y enter
- Answer y you do have MinGW Installed.
- Enter c:/mingw as the path where MinGW is installed.
- It should confirm that you have make.exe installed, press any key to continue.
- Click Finish you are done the installation. (It is up to you if you want to open the documents.)
OpenSSL
OpenSSL is a library for Secure Sockets Layer (SSL), Transport Layer Security (TLS) protocols, and cryptography. Some tools require openSSL, if so, here are some instructions:
I downloaded an openssl installer from: http://www.slproweb.com/products/Win32OpenSSL.html
I installed into /mingw/openssl/. I then linked the includes:
cd /mingw/include
ln -s ../openssl/include/openssl openssl
That's it.