Make OpenSSL UpdateServerCert() OS independent.

UpdateServerCert currently creates the server cert chain
directly from the openssl struct X509. This works since
OSCertHandle currently is an OpenSSL X509 struct when
OpenSSL is used on Android and Linux.

This patch makes the UpdateServerCert() OS independent by creating
the X509Certificate from DER data instead of OSCertHandle to make
it compile on the other platforms when USE_OPENSSL is off.

Keep the USE_OPENSSL code to avoid converting back and forth
between X509 and DER twice and OsCertHandle is X509.

I see that there is a DER cache in x509_certificate_openssl.cc
which could have simplified the patch a bit. However, if I understand
a comment correctly,  it shouldn't be mixed with certificates that comes
from network, which is the case here. Also, that API is not exposed.

Also remove some unused NSS code from x509_certificate_mac.cc.

Review URL: https://codereview.chromium.org/173853014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257449 0039d316-1c4b-4281-b951-d872f2087c98
8 files changed