diff options
Diffstat (limited to 'net/ocsp')
-rw-r--r-- | net/ocsp/nss_ocsp.cc | 4 | ||||
-rw-r--r-- | net/ocsp/nss_ocsp_unittest.cc | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc index 350cdc9..55ac036 100644 --- a/net/ocsp/nss_ocsp.cc +++ b/net/ocsp/nss_ocsp.cc @@ -300,7 +300,7 @@ class OCSPRequestSession response_code_ = request_->GetResponseCode(); response_headers_ = request_->response_headers(); response_headers_->GetMimeType(&response_content_type_); - request_->Read(buffer_, kRecvBufferSize, &bytes_read); + request_->Read(buffer_.get(), kRecvBufferSize, &bytes_read); } OnReadCompleted(request_, bytes_read); } @@ -314,7 +314,7 @@ class OCSPRequestSession if (!request_->status().is_success() || bytes_read <= 0) break; data_.append(buffer_->data(), bytes_read); - } while (request_->Read(buffer_, kRecvBufferSize, &bytes_read)); + } while (request_->Read(buffer_.get(), kRecvBufferSize, &bytes_read)); if (!request_->status().is_io_pending()) { delete request_; diff --git a/net/ocsp/nss_ocsp_unittest.cc b/net/ocsp/nss_ocsp_unittest.cc index 076e9bd..be29d5f 100644 --- a/net/ocsp/nss_ocsp_unittest.cc +++ b/net/ocsp/nss_ocsp_unittest.cc @@ -73,8 +73,7 @@ class NssHttpTest : public ::testing::Test { : context_(false), handler_(NULL), verify_proc_(new CertVerifyProcNSS), - verifier_(new MultiThreadedCertVerifier(verify_proc_)) { - } + verifier_(new MultiThreadedCertVerifier(verify_proc_.get())) {} virtual ~NssHttpTest() {} virtual void SetUp() { @@ -136,16 +135,21 @@ TEST_F(NssHttpTest, TestAia) { ImportCertFromFile(GetTestCertsDirectory(), "aia-root.pem")); ASSERT_TRUE(test_root.get()); - ScopedTestRoot scoped_root(test_root); + ScopedTestRoot scoped_root(test_root.get()); CertVerifyResult verify_result; TestCompletionCallback test_callback; CertVerifier::RequestHandle request_handle; int flags = CertVerifier::VERIFY_CERT_IO_ENABLED; - int error = verifier()->Verify(test_cert, "aia-host.invalid", flags, NULL, - &verify_result, test_callback.callback(), - &request_handle, BoundNetLog()); + int error = verifier()->Verify(test_cert.get(), + "aia-host.invalid", + flags, + NULL, + &verify_result, + test_callback.callback(), + &request_handle, + BoundNetLog()); ASSERT_EQ(ERR_IO_PENDING, error); error = test_callback.WaitForResult(); |