Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: net/base/x509_certificate_mac.cc

Issue 8381017: net: retain leading zero bytes in X.509 serial numbers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/x509_certificate_mac.cc
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
index c47d1a51f675e50b61ad09c8cb4aa1890a440fab..33b3dcf9083524db26f530e4882c2a0528517eeb 100644
--- a/net/base/x509_certificate_mac.cc
+++ b/net/base/x509_certificate_mac.cc
@@ -203,10 +203,6 @@ std::string GetCertSerialNumber(X509Certificate::OSCertHandle cert_handle) {
break;
}
- // Remove leading zeros.
- while (ret.size() > 1 && ret[0] == 0)
- ret = ret.substr(1, ret.size() - 1);
-
return ret;
}

Powered by Google App Engine
This is Rietveld 408576698