diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 21:44:03 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 21:44:03 +0000 |
commit | a9811ccc5038ac2cf99919ea763a2792010e31dd (patch) | |
tree | 808b9826903ba89a82729cd32fc03d0517c3f223 /net/third_party | |
parent | b9adda9d33fa3bdfd1a78f1dc24b8d87a66a7bdd (diff) | |
download | chromium_src-a9811ccc5038ac2cf99919ea763a2792010e31dd.zip chromium_src-a9811ccc5038ac2cf99919ea763a2792010e31dd.tar.gz chromium_src-a9811ccc5038ac2cf99919ea763a2792010e31dd.tar.bz2 |
Revert 140697 - Maybe caused sizes regression (which would be acceptable
and this will be relanded), but revert to be sure it wasn't something else.
Move the core state machine of SSLClientSocketNSS into a thread-safe Core
NSS SSL functions may block on the underlying PKCS#11 modules or on
user input. On ChromeOS, which has a hardware TPM, calls may take upwards
of several seconds, preventing any IPC due to the I/O thread being
blocked.
To avoid blocking the I/O thread on ChromeOS, move the core SSL
implementation to a dedicated worker thread, so that only SSL sockets
are blocked.
BUG=122355
TEST=existing net_unittests + see bug.
Review URL: https://chromiumcodereview.appspot.com/10454066
TBR=rsleevi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10546033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/third_party')
-rw-r--r-- | net/third_party/nss/ssl/sslinfo.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/net/third_party/nss/ssl/sslinfo.c b/net/third_party/nss/ssl/sslinfo.c index fe6b6f5..0cb46d6 100644 --- a/net/third_party/nss/ssl/sslinfo.c +++ b/net/third_party/nss/ssl/sslinfo.c @@ -376,13 +376,8 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, return SECFailure; } - ssl_GetRecvBufLock(ss); - ssl_GetSSL3HandshakeLock(ss); - if (ss->version < SSL_LIBRARY_VERSION_3_1_TLS) { PORT_SetError(SSL_ERROR_UNSUPPORTED_VERSION); - ssl_ReleaseSSL3HandshakeLock(ss); - ssl_ReleaseRecvBufLock(ss); return SECFailure; } @@ -393,17 +388,13 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, } val = PORT_Alloc(valLen); if (!val) { - ssl_ReleaseSSL3HandshakeLock(ss); - ssl_ReleaseRecvBufLock(ss); return SECFailure; } i = 0; - PORT_Memcpy(val + i, &ss->ssl3.hs.client_random.rand, SSL3_RANDOM_LENGTH); i += SSL3_RANDOM_LENGTH; PORT_Memcpy(val + i, &ss->ssl3.hs.server_random.rand, SSL3_RANDOM_LENGTH); i += SSL3_RANDOM_LENGTH; - if (hasContext) { val[i++] = contextLen >> 8; val[i++] = contextLen; @@ -424,8 +415,6 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, valLen, out, outLen); } ssl_ReleaseSpecReadLock(ss); - ssl_ReleaseSSL3HandshakeLock(ss); - ssl_ReleaseRecvBufLock(ss); PORT_ZFree(val, valLen); return rv; |