Index: net/cert/x509_cert_types_win.cc |
diff --git a/net/cert/x509_cert_types_win.cc b/net/cert/x509_cert_types_win.cc |
index 570f5fc80133d6e92be42aa50f78093aa1a15ab9..55fcb5e3bbe55d485c7d513918d75a6bedd18305 100644 |
--- a/net/cert/x509_cert_types_win.cc |
+++ b/net/cert/x509_cert_types_win.cc |
@@ -21,23 +21,16 @@ namespace { |
// A list of OIDs to decode. Any OID not on this list will be ignored for |
// purposes of parsing. |
-const char* kOIDs[] = { |
- szOID_COMMON_NAME, |
- szOID_LOCALITY_NAME, |
- szOID_STATE_OR_PROVINCE_NAME, |
- szOID_COUNTRY_NAME, |
- szOID_STREET_ADDRESS, |
- szOID_ORGANIZATION_NAME, |
- szOID_ORGANIZATIONAL_UNIT_NAME, |
- szOID_DOMAIN_COMPONENT |
-}; |
+const char* kOIDs[] = {szOID_COMMON_NAME, szOID_LOCALITY_NAME, |
+ szOID_STATE_OR_PROVINCE_NAME, szOID_COUNTRY_NAME, |
+ szOID_STREET_ADDRESS, szOID_ORGANIZATION_NAME, |
+ szOID_ORGANIZATIONAL_UNIT_NAME, szOID_DOMAIN_COMPONENT}; |
// Converts the value for |attribute| to an UTF-8 string, storing the result |
// in |value|. Returns false if the string cannot be converted. |
-bool GetAttributeValue(PCERT_RDN_ATTR attribute, |
- std::string* value) { |
- DWORD chars_needed = CertRDNValueToStrW(attribute->dwValueType, |
- &attribute->Value, NULL, 0); |
+bool GetAttributeValue(PCERT_RDN_ATTR attribute, std::string* value) { |
+ DWORD chars_needed = |
+ CertRDNValueToStrW(attribute->dwValueType, &attribute->Value, NULL, 0); |
if (chars_needed == 0) |
return false; |
if (chars_needed == 1) { |
@@ -48,9 +41,10 @@ bool GetAttributeValue(PCERT_RDN_ATTR attribute, |
return true; |
} |
std::wstring wide_name; |
- DWORD chars_written = CertRDNValueToStrW( |
- attribute->dwValueType, &attribute->Value, |
- WriteInto(&wide_name, chars_needed), chars_needed); |
+ DWORD chars_written = CertRDNValueToStrW(attribute->dwValueType, |
+ &attribute->Value, |
+ WriteInto(&wide_name, chars_needed), |
+ chars_needed); |
if (chars_written <= 1) |
return false; |
wide_name.resize(chars_written - 1); |
@@ -102,7 +96,8 @@ bool CertPrincipal::ParseDistinguishedName(const void* ber_name_data, |
length, |
CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_NOCOPY_FLAG, |
&decode_para, |
- &name_info, &name_info_size); |
+ &name_info, |
+ &name_info_size); |
if (!rv) |
return false; |
scoped_ptr<CERT_NAME_INFO, base::FreeDeleter> scoped_name_info(name_info); |
@@ -111,13 +106,10 @@ bool CertPrincipal::ParseDistinguishedName(const void* ber_name_data, |
country_names; |
std::vector<std::string>* values[] = { |
- &common_names, &locality_names, |
- &state_names, &country_names, |
- &this->street_addresses, |
- &this->organization_names, |
- &this->organization_unit_names, |
- &this->domain_components |
- }; |
+ &common_names, &locality_names, |
+ &state_names, &country_names, |
+ &this->street_addresses, &this->organization_names, |
+ &this->organization_unit_names, &this->domain_components}; |
DCHECK(arraysize(kOIDs) == arraysize(values)); |
for (DWORD cur_rdn = 0; cur_rdn < name_info->cRDN; ++cur_rdn) { |