save certificate using CERTINFO API
openssl
move OpenSSL-specific code to openssl.c

TODO: some files in server still include openssl/ stuff directly