More tests, private key and cert are now taken as OpenSSL objects rather than paths to the files