diff options
author | Brian Carlstrom <bdc@google.com> | 2010-09-21 02:09:29 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2010-09-21 12:13:43 -0700 |
commit | 84f161268b8ae93a9046c40ca8381aa92148f2f6 (patch) | |
tree | 5e65c94cac2b8b12cd9f2fbb44707504ce098d8e /luni/src/main/files/cacerts/1e8e7201.0 | |
parent | 03a4818d5b95c77585be7df437b6fe28507529a9 (diff) | |
download | libcore-84f161268b8ae93a9046c40ca8381aa92148f2f6.zip libcore-84f161268b8ae93a9046c40ca8381aa92148f2f6.tar.gz libcore-84f161268b8ae93a9046c40ca8381aa92148f2f6.tar.bz2 |
Make SSL network I/O interruptible
- Changed NativeCrypto code to hold onto java.io.FileDescriptor so it
can see observe when another thread calls Socket.close and sets the
FileDescriptor's fd to -1. Changed AppData::setEnv to check
NetFd::isClosed, it was already being used before each SSL I/O
operation.
- Changed sslSelect to no longer take an int fd, it now uses the
AppData to get access the FileDescriptor. Within sslSelect, the
select call is now protected with AsynchronousSocketCloseMonitor.
The select call is now retried on EINTR, checking for socket close
similar to NET_FAILURE_RETRY. sslSelect now returns
THROWN_SOCKETEXCEPTION to indicate that NetFd::isClosed has already
thrown.
- sslRead and sslWrite now similarly returns THROWN_SOCKETEXCEPTION to
indicate that Net::isClosed detected a closed FileDescriptor.
luni/src/main/native/NativeCrypto.cpp
Moved NetFd from OSNetworkSystem.cpp to new NetFd.h for reuse by NativeCrypto
luni/src/main/native/NetFd.h
luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp
Added test of 4 Socket/SSLSocket interrupt cases
1.) read Socket / close Socket (redundant with AsynchronousCloseExceptionTest)
2.) read Socket / close SSLSocket
3.) read SSLSocket / close Socket
4.) read SSLSocket / close SSLSocket
luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
Bug: 2973020
Change-Id: I9037738dd1d1c09c03c99e3403e086366aa25109
Diffstat (limited to 'luni/src/main/files/cacerts/1e8e7201.0')
0 files changed, 0 insertions, 0 deletions