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

Issue 8387032: OpenSSL: fix serial number tests. (Closed)

Created:
9 years, 1 month ago by agl
Modified:
9 years, 1 month ago
Reviewers:
joth
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

OpenSSL: fix serial number tests. OpenSSL internally performs the removal of the leading zero bytes that we previously did ourselves. Since the X509Certificate API now specifies that the serial number should be returned in ASN.1 form, we have to put the leading zero byte back for positive numbers with the MSB set. BUG=none TEST=net_unittests

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M net/base/x509_certificate_openssl.cc View 1 chunk +7 lines, -0 lines 4 comments Download

Messages

Total messages: 4 (0 generated)
agl
9 years, 1 month ago (2011-10-31 17:00:28 UTC) #1
joth
LGTM thanks! 2 very optional comments... http://codereview.chromium.org/8387032/diff/1/net/base/x509_certificate_openssl.cc File net/base/x509_certificate_openssl.cc (right): http://codereview.chromium.org/8387032/diff/1/net/base/x509_certificate_openssl.cc#newcode337 net/base/x509_certificate_openssl.cc:337: num->data[0] >= 0x80) ...
9 years, 1 month ago (2011-10-31 17:17:45 UTC) #2
agl
Cheers. Will land once the tryservers look happy. http://codereview.chromium.org/8387032/diff/1/net/base/x509_certificate_openssl.cc File net/base/x509_certificate_openssl.cc (right): http://codereview.chromium.org/8387032/diff/1/net/base/x509_certificate_openssl.cc#newcode337 net/base/x509_certificate_openssl.cc:337: num->data[0] ...
9 years, 1 month ago (2011-10-31 17:23:45 UTC) #3
joth
9 years, 1 month ago (2011-10-31 17:54:21 UTC) #4
thanks,

On 31 October 2011 17:23, <agl@chromium.org> wrote:

> Cheers. Will land once the tryservers look happy.
>
>
>
> http://codereview.chromium.**org/8387032/diff/1/net/base/**
>
x509_certificate_openssl.cc<http://codereview.chromium.org/8387032/diff/1/net/base/x509_certificate_openssl.cc>
> File net/base/x509_certificate_**openssl.cc (right):
>
> http://codereview.chromium.**org/8387032/diff/1/net/base/**
>
x509_certificate_openssl.cc#**newcode337<http://codereview.chromium.org/8387032/diff/1/net/base/x509_certificate_openssl.cc#newcode337>
> net/base/x509_certificate_**openssl.cc:337: num->data[0] >= 0x80) {
> On 2011/10/31 17:17:45, joth wrote:
>
>> nit: I find the last term slightly easier to read as
>> && num->data[0] & 0x80
>>
>
>  but I don't care that much either way.
>>
>
> Done.
>
>
> http://codereview.chromium.**org/8387032/diff/1/net/base/**
>
x509_certificate_openssl.cc#**newcode339<http://codereview.chromium.org/8387032/diff/1/net/base/x509_certificate_openssl.cc#newcode339>
> net/base/x509_certificate_**openssl.cc:339: // byte in order that the MSB
> isn't set.
> On 2011/10/31 17:17:45, joth wrote:
>
>> is there a reasonable hint you could add here as to why this is only
>>
> needed on
>
>> openssl? maybe useful if anyone is ever diffing this with nss etc.
>>
>
> Have expanded the comment.
>
>
http://codereview.chromium.**org/8387032/<http://codereview.chromium.org/8387...
>

Powered by Google App Engine
This is Rietveld 408576698