Commit eb8e118a authored by davidben's avatar davidben Committed by Commit bot

Add missing logging codepaths for client certificate lookup.

BUG=666796

Review-Url: https://codereview.chromium.org/2565843002
Cr-Commit-Position: refs/heads/master@{#437675}
parent a7e77f9e
......@@ -221,8 +221,10 @@ scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey(
const CSSM_KEY* cssm_key;
OSStatus status = SecKeyGetCSSMKey(private_key.get(), &cssm_key);
if (status != noErr)
if (status != noErr) {
OSSTATUS_LOG(WARNING, status);
return nullptr;
}
SSLPrivateKey::Type key_type;
size_t max_length;
......
......@@ -71,7 +71,8 @@ bool GetClientCertInfo(const X509Certificate* certificate,
return false;
}
switch (EVP_PKEY_id(key.get())) {
int key_type = EVP_PKEY_id(key.get());
switch (key_type) {
case EVP_PKEY_RSA:
*out_type = SSLPrivateKey::Type::RSA;
break;
......@@ -90,12 +91,14 @@ bool GetClientCertInfo(const X509Certificate* certificate,
*out_type = SSLPrivateKey::Type::ECDSA_P384;
break;
default:
LOG(ERROR) << "Unsupported curve type " << curve;
return false;
}
break;
}
default:
LOG(ERROR) << "Unsupported key type " << key_type;
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment