Gheek.net

July 22, 2011

How to use curl to access a HTTPS URL using a Client Certificate

Filed under: Apache, linux, nix, shell scripts, tomcat — lancevermilion @ 11:14 am

I needed to check a HTTPS URL that required authentication of a client Certificate from the command line.

Using curl was a perfect fit.

curl --insecure --cert-type pem --cert /home/dummyuser/client-cert-stacked.pem --interface eth0:1 "https://192.168.1.2/GetKeepAlive"

Note: I use double quotes " " around the url because if there are any special characters or spaces it will not be read correctly.

Options Option Description
--insecure or -k Disable Certificate Verification against a Root/Intermediate
--cert or -E (HTTPS) Tells curl to use the specified certificate file. The certificate must be in PEM format.

If the optional password isn’t specified, it will be queried for on the terminal. Note that this certificate is the
private key and the private certificate concatenated!

If this option is used several times, the last one will be used.

--cert-type (SSL) Private key file type (DER, PEM, and ENG are supported).
--interface Query the URL using a specified interface.
Advertisement

July 12, 2011

A single tool to compare text, binary, picture, etc files.

Filed under: Uncategorized — lancevermilion @ 1:29 pm

Just a thought for those of you that need to use a text, binary compare tool here and there.

Today I had to waste some time and figure out what text, binary, picture, etc compare tool was the best. I Compared a handful of tools I used in the past and some I haven’t used. gVIM Diff, WinMerge, Beyond Compare, Perforce, and DiffMerge. I decided that a few of my needs was to do a diff on the fly without creating a file, show special characters, syntax highlighting, merging, line numbering, pic split view, search within both files, SVN integration, etc. I ended up going with Beyond Comapre since we have a corp license and kep WinMerge because it was a very close second and has integration to TortoiseSVN which I use as well.

gVIM – http://www.vim.org/download.php
WinMerge – http://winmerge.org/downloads/
BeyondComapre – http://www.scootersoftware.com/download.php
Perforce (P4V) – http://www.perforce.com/perforce/downloads/index.html
DiffMerge – http://www.sourcegear.com/diffmerge/downloads.php
TortoiseSVN – http://tortoisesvn.net/downloads.html

Create a free website or blog at WordPress.com.