Esempio n. 1
0
void WebRequest::sslClientCert(EVP_PKEY* pkey, scoped_refptr<net::X509Certificate> chain)
{
    base::ScopedOpenSSL<EVP_PKEY, EVP_PKEY_free> privateKey(pkey);
    if (privateKey.get() == NULL || chain.get() == NULL) {
        m_request->ContinueWithCertificate(NULL);
        return;
    }
    GURL gurl(m_url);
    net::OpenSSLPrivateKeyStore::GetInstance()->StorePrivateKey(gurl, privateKey.release());
    m_request->ContinueWithCertificate(chain.release());
}
Esempio n. 2
0
	bool RefCountedMemory::Equals(
		const scoped_refptr<RefCountedMemory>& other) const {
		return other.get() &&
			size() == other->size() &&
			(memcmp(front(), other->front(), size()) == 0);
	}