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

Issue 329036: Check cert_handle_ is not NULL to Verify() (Closed)

Created:
11 years, 1 month ago by ukai
Modified:
9 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Check cert_handle_ is not NULL to Verify() If X509Certificate is created in URLRequestAutomationJob or URLRequestInterceptJob, cert_handle_ is NULL. So if such certificate is being to be verified (not sure it happens), it would cause crash or some problem. BUG=15614 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30319

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix GetDNSNames as wtc suggested #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -10 lines) Patch
M net/base/x509_certificate_win.cc View 1 5 chunks +18 lines, -10 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ukai
11 years, 1 month ago (2009-10-27 09:29:50 UTC) #1
wtc
LGTM. http://codereview.chromium.org/329036/diff/1/2 File net/base/x509_certificate_win.cc (right): http://codereview.chromium.org/329036/diff/1/2#newcode506 Line 506: if (!cert_handle_) { Does the GetDNSNames method ...
11 years, 1 month ago (2009-10-27 21:37:18 UTC) #2
ukai
11 years, 1 month ago (2009-10-28 03:37:07 UTC) #3
http://codereview.chromium.org/329036/diff/1/2
File net/base/x509_certificate_win.cc (right):

http://codereview.chromium.org/329036/diff/1/2#newcode506
Line 506: if (!cert_handle_) {
On 2009/10/27 21:37:18, wtc wrote:
> Does the GetDNSNames method need to work with a null
> cert_handle_?

I'm not sure, but I think it would be safe to use subject_ in such case.
> 
> Instead of adding lines 506-509, let's put lines 510-521
> inside an if statement, like this:
> 
>   dns_names->clear();
>   if (cert_handle_) {
>     scoped_ptr_malloc<CERT_ALT_NAME_INFO> alt_name_info;
>     ...
>   }
>   if (dns_names->empty())
>     dns_names->push_back(subject_.common_name);

Done.

Powered by Google App Engine
This is Rietveld 408576698