| Index: net/base/x509_certificate_mac.cc
|
| diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
|
| index 0b65c7726ed6c57397fbb661ed6fa56caaa73fd4..fced2234ee1f9ad699c2fc5f2193b4c80056f50c 100644
|
| --- a/net/base/x509_certificate_mac.cc
|
| +++ b/net/base/x509_certificate_mac.cc
|
| @@ -968,15 +968,15 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
|
| return OK;
|
| }
|
|
|
| -bool X509Certificate::GetDEREncoded(std::string* encoded) {
|
| - encoded->clear();
|
| +// static
|
| +bool X509Certificate::GetDEREncoded(X509Certificate::OSCertHandle cert_handle,
|
| + std::string* encoded) {
|
| CSSM_DATA der_data;
|
| - if (SecCertificateGetData(cert_handle_, &der_data) == noErr) {
|
| - encoded->append(reinterpret_cast<char*>(der_data.Data),
|
| - der_data.Length);
|
| - return true;
|
| - }
|
| - return false;
|
| + if (SecCertificateGetData(cert_handle, &der_data) != noErr)
|
| + return false;
|
| + encoded->assign(reinterpret_cast<char*>(der_data.Data),
|
| + der_data.Length);
|
| + return true;
|
| }
|
|
|
| // static
|
|
|