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

Unified Diff: net/base/x509_certificate_openssl.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
« no previous file with comments | « net/base/x509_certificate_nss.cc ('k') | net/base/x509_certificate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate_openssl.cc
diff --git a/net/base/x509_certificate_openssl.cc b/net/base/x509_certificate_openssl.cc
index a0601a7f10e12fd75404eb0a1bcb09f79a48ae47..96f7df6b49d32a675535c4525d199713b16588b6 100644
--- a/net/base/x509_certificate_openssl.cc
+++ b/net/base/x509_certificate_openssl.cc
@@ -331,9 +331,6 @@ void X509Certificate::Initialize() {
serial_number_ = std::string(
reinterpret_cast<char*>(num->data),
num->length);
- // Remove leading zeros.
- while (serial_number_.size() > 1 && serial_number_[0] == 0)
- serial_number_ = serial_number_.substr(1, serial_number_.size() - 1);
}
ParsePrincipal(cert_handle_, X509_get_subject_name(cert_handle_), &subject_);
« no previous file with comments | « net/base/x509_certificate_nss.cc ('k') | net/base/x509_certificate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698