Fix linux redux build
Follow up to http://codereview.chromium.org/7342047/ stl_util.h seems out of favor, so calling stl method directly as required. BUG=None TEST=Greeness on http://build.chromium.org/p/chromium.fyi/builders/Chromium%20Linux%20Redux/ Review URL: http://codereview.chromium.org/7457021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93181 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -40,8 +40,7 @@ bool ExportKey(EVP_PKEY* key,
|
|||||||
if (!data || len < 0)
|
if (!data || len < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::vector<uint8> for_output(data, data + len);
|
output->assign(data, data + len);
|
||||||
output->swap(for_output);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,11 +75,12 @@ RSAPrivateKey* RSAPrivateKey::CreateSensitive(uint16 num_bits) {
|
|||||||
// static
|
// static
|
||||||
RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
|
RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
|
||||||
const std::vector<uint8>& input) {
|
const std::vector<uint8>& input) {
|
||||||
OpenSSLErrStackTracer err_tracer(FROM_HERE);
|
if (input.empty())
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
OpenSSLErrStackTracer err_tracer(FROM_HERE);
|
||||||
// BIO_new_mem_buf is not const aware, but it does not modify the buffer.
|
// BIO_new_mem_buf is not const aware, but it does not modify the buffer.
|
||||||
char* data = reinterpret_cast<char*>(const_cast<uint8*>(
|
char* data = reinterpret_cast<char*>(const_cast<uint8*>(&input[0]));
|
||||||
vector_as_array(&input)));
|
|
||||||
ScopedOpenSSL<BIO, BIO_free_all> bio(BIO_new_mem_buf(data, input.size()));
|
ScopedOpenSSL<BIO, BIO_free_all> bio(BIO_new_mem_buf(data, input.size()));
|
||||||
if (!bio.get())
|
if (!bio.get())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user