Fixes for OpenSSL
A couple of nit fixes following: + http://codereview.chromium.org/7247005 + http://codereview.chromium.org/6990036 + Fixes a typo (ctx / context) + Adds new abstract methods from stream_socket.h BUG= TEST= Review URL: http://codereview.chromium.org/7253038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91498 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -107,7 +107,7 @@ void SaltedIteratedS2K(uint32 cipher_key_length,
|
|||||||
uint8 zero[1] = {0};
|
uint8 zero[1] = {0};
|
||||||
|
|
||||||
EVP_MD_CTX ctx;
|
EVP_MD_CTX ctx;
|
||||||
EVP_MD_CTX_init(&context);
|
EVP_MD_CTX_init(&ctx);
|
||||||
|
|
||||||
for (uint32 i = 0; done < cipher_key_length; i++) {
|
for (uint32 i = 0; done < cipher_key_length; i++) {
|
||||||
CHECK_EQ(EVP_DigestInit_ex(&ctx, hash_function, NULL), 1);
|
CHECK_EQ(EVP_DigestInit_ex(&ctx, hash_function, NULL), 1);
|
||||||
@ -138,7 +138,7 @@ void SaltedIteratedS2K(uint32 cipher_key_length,
|
|||||||
done += todo;
|
done += todo;
|
||||||
}
|
}
|
||||||
|
|
||||||
EVP_MD_CTX_cleanup(&context);
|
EVP_MD_CTX_cleanup(&ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// These constants are the tag numbers for the various packet types that we
|
// These constants are the tag numbers for the various packet types that we
|
||||||
|
@ -61,7 +61,8 @@ void CertDatabase::ListModules(CryptoModuleList* modules, bool need_rw) const {
|
|||||||
|
|
||||||
int CertDatabase::ImportFromPKCS12(CryptoModule* module,
|
int CertDatabase::ImportFromPKCS12(CryptoModule* module,
|
||||||
const std::string& data,
|
const std::string& data,
|
||||||
const string16& password) {
|
const string16& password,
|
||||||
|
bool is_extractable) {
|
||||||
// TODO(bulach): implement me.
|
// TODO(bulach): implement me.
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
return ERR_NOT_IMPLEMENTED;
|
return ERR_NOT_IMPLEMENTED;
|
||||||
|
@ -1094,6 +1094,22 @@ bool SSLClientSocketOpenSSL::UsingTCPFastOpen() const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64 SSLClientSocketOpenSSL::NumBytesRead() const {
|
||||||
|
if (transport_.get() && transport_->socket())
|
||||||
|
return transport_->socket()->NumBytesRead();
|
||||||
|
|
||||||
|
NOTREACHED();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
base::TimeDelta SSLClientSocketOpenSSL::GetConnectTimeMicros() const {
|
||||||
|
if (transport_.get() && transport_->socket())
|
||||||
|
return transport_->socket()->GetConnectTimeMicros();
|
||||||
|
|
||||||
|
NOTREACHED();
|
||||||
|
return base::TimeDelta::FromMicroseconds(-1);
|
||||||
|
}
|
||||||
|
|
||||||
// Socket methods
|
// Socket methods
|
||||||
|
|
||||||
int SSLClientSocketOpenSSL::Read(IOBuffer* buf,
|
int SSLClientSocketOpenSSL::Read(IOBuffer* buf,
|
||||||
|
@ -69,6 +69,8 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
|
|||||||
virtual void SetOmniboxSpeculation();
|
virtual void SetOmniboxSpeculation();
|
||||||
virtual bool WasEverUsed() const;
|
virtual bool WasEverUsed() const;
|
||||||
virtual bool UsingTCPFastOpen() const;
|
virtual bool UsingTCPFastOpen() const;
|
||||||
|
virtual int64 NumBytesRead() const;
|
||||||
|
virtual base::TimeDelta GetConnectTimeMicros() const;
|
||||||
|
|
||||||
// Socket methods:
|
// Socket methods:
|
||||||
virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
|
virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
|
||||||
|
Reference in New Issue
Block a user