Index: net/cert/x509_certificate_ios.cc |
diff --git a/net/cert/x509_certificate_ios.cc b/net/cert/x509_certificate_ios.cc |
index 48f833f2ec7b15a5c760c1e81dd7298b553ca5bc..159912e17f7f2880f0d467beec01c39e4d40fdb9 100644 |
--- a/net/cert/x509_certificate_ios.cc |
+++ b/net/cert/x509_certificate_ios.cc |
@@ -76,13 +76,11 @@ bool X509Certificate::IsIssuedByEncoded( |
// Convert to scoped CERTName* list. |
std::vector<CERTName*> issuers; |
crypto::ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); |
- if (!x509_util::GetIssuersFromEncodedList(valid_issuers, |
- arena.get(), |
- &issuers)) { |
+ if (!x509_util::GetIssuersFromEncodedList( |
+ valid_issuers, arena.get(), &issuers)) { |
return false; |
} |
- return x509_util::IsCertificateIssuedBy( |
- nss_chain.cert_chain(), issuers); |
+ return x509_util::IsCertificateIssuedBy(nss_chain.cert_chain(), issuers); |
} |
void X509Certificate::GetSubjectAltName( |
@@ -123,16 +121,20 @@ bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a, |
ScopedCFTypeRef<CFDataRef> b_data(SecCertificateCopyData(b)); |
return a_data && b_data && |
CFDataGetLength(a_data) == CFDataGetLength(b_data) && |
- memcmp(CFDataGetBytePtr(a_data), CFDataGetBytePtr(b_data), |
+ memcmp(CFDataGetBytePtr(a_data), |
+ CFDataGetBytePtr(b_data), |
CFDataGetLength(a_data)) == 0; |
} |
// static |
X509Certificate::OSCertHandle X509Certificate::CreateOSCertHandleFromBytes( |
- const char* data, int length) { |
- ScopedCFTypeRef<CFDataRef> cert_data(CFDataCreateWithBytesNoCopy( |
- kCFAllocatorDefault, reinterpret_cast<const UInt8 *>(data), length, |
- kCFAllocatorNull)); |
+ const char* data, |
+ int length) { |
+ ScopedCFTypeRef<CFDataRef> cert_data( |
+ CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, |
+ reinterpret_cast<const UInt8*>(data), |
+ length, |
+ kCFAllocatorNull)); |
if (!cert_data) |
return NULL; |
OSCertHandle cert_handle = SecCertificateCreateWithData(NULL, cert_data); |
@@ -167,8 +169,7 @@ void X509Certificate::FreeOSCertHandle(OSCertHandle cert_handle) { |
} |
// static |
-SHA1HashValue X509Certificate::CalculateFingerprint( |
- OSCertHandle cert) { |
+SHA1HashValue X509Certificate::CalculateFingerprint(OSCertHandle cert) { |
SHA1HashValue sha1; |
memset(sha1.data, 0, sizeof(sha1.data)); |
@@ -193,21 +194,20 @@ SHA1HashValue X509Certificate::CalculateCAFingerprint( |
CC_SHA1_CTX sha1_ctx; |
CC_SHA1_Init(&sha1_ctx); |
for (size_t i = 0; i < intermediates.size(); ++i) { |
- ScopedCFTypeRef<CFDataRef> |
- cert_data(SecCertificateCopyData(intermediates[i])); |
+ ScopedCFTypeRef<CFDataRef> cert_data( |
+ SecCertificateCopyData(intermediates[i])); |
if (!cert_data) |
return sha1; |
- CC_SHA1_Update(&sha1_ctx, |
- CFDataGetBytePtr(cert_data), |
- CFDataGetLength(cert_data)); |
+ CC_SHA1_Update( |
+ &sha1_ctx, CFDataGetBytePtr(cert_data), CFDataGetLength(cert_data)); |
} |
CC_SHA1_Final(sha1.data, &sha1_ctx); |
return sha1; |
} |
// static |
-X509Certificate::OSCertHandle |
-X509Certificate::ReadOSCertHandleFromPickle(PickleIterator* pickle_iter) { |
+X509Certificate::OSCertHandle X509Certificate::ReadOSCertHandleFromPickle( |
+ PickleIterator* pickle_iter) { |
return x509_util::ReadOSCertHandleFromPickle(pickle_iter); |
} |