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

Unified Diff: net/ssl/ssl_platform_key_win.cc

Issue 2400033005: Use BoringSSL scopers in //net. (Closed)
Patch Set: eroman comments Created 4 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/ssl/ssl_platform_key_nss.cc ('k') | net/ssl/test_ssl_private_key.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_platform_key_win.cc
diff --git a/net/ssl/ssl_platform_key_win.cc b/net/ssl/ssl_platform_key_win.cc
index 0a3f89a968c115f71e5415d0adff0e4d0a29266e..e1dbd576b58ea01bbdd6353f4281f7a9d7d5ab8c 100644
--- a/net/ssl/ssl_platform_key_win.cc
+++ b/net/ssl/ssl_platform_key_win.cc
@@ -25,7 +25,6 @@
#include "crypto/wincrypt_shim.h"
#include "net/base/net_errors.h"
#include "net/cert/x509_certificate.h"
-#include "net/ssl/scoped_openssl_types.h"
#include "net/ssl/ssl_platform_key_task_runner.h"
#include "net/ssl/ssl_private_key.h"
#include "net/ssl/threaded_ssl_private_key.h"
@@ -220,7 +219,7 @@ class SSLPlatformKeyCNG : public ThreadedSSLPrivateKey::Delegate {
size_t order_len = signature->size() / 2;
// Convert the RAW ECDSA signature to a DER-encoded ECDSA-Sig-Value.
- crypto::ScopedECDSA_SIG sig(ECDSA_SIG_new());
+ bssl::UniquePtr<ECDSA_SIG> sig(ECDSA_SIG_new());
if (!sig || !BN_bin2bn(signature->data(), order_len, sig->r) ||
!BN_bin2bn(signature->data() + order_len, order_len, sig->s)) {
return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
@@ -260,10 +259,10 @@ bool GetKeyInfo(const X509Certificate* certificate,
&der_encoded))
return false;
const uint8_t* bytes = reinterpret_cast<const uint8_t*>(der_encoded.data());
- ScopedX509 x509(d2i_X509(nullptr, &bytes, der_encoded.size()));
+ bssl::UniquePtr<X509> x509(d2i_X509(nullptr, &bytes, der_encoded.size()));
if (!x509)
return false;
- crypto::ScopedEVP_PKEY key(X509_get_pubkey(x509.get()));
+ bssl::UniquePtr<EVP_PKEY> key(X509_get_pubkey(x509.get()));
if (!key)
return false;
switch (EVP_PKEY_id(key.get())) {
« no previous file with comments | « net/ssl/ssl_platform_key_nss.cc ('k') | net/ssl/test_ssl_private_key.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698