add ability to specify encoding of certificate

allows the encoding of a certificate to be specified for the openssl
command to retrieve the md5 fingerprint.

Change-Id: I2a3096f207d59d0e050a3be9f38ca94cff6f0008