1
0
mirror of https://github.com/moparisthebest/SSLDroid synced 2024-11-27 03:12:18 -05:00

Added a bunch of TODO's to the appropriate files

Signed-off-by: Balint Kovacs <blint@blint.hu>
This commit is contained in:
Balint Kovacs 2011-04-28 15:40:17 +02:00
parent de7a264296
commit 5e276bf69c
3 changed files with 9 additions and 5 deletions

View File

@ -76,6 +76,7 @@ public class SSLDroid extends Service {
@Override
public void onDestroy() {
super.onDestroy();
dbHelper.close();
try {
for (TcpProxy proxy : tp) {

View File

@ -30,6 +30,9 @@ import android.widget.EditText;
import android.widget.Toast;
import hu.blint.ssldroid.db.SSLDroidDbAdapter;
//TODO: cacert + crl should be configurable for the tunnel
//TODO: test connection button
public class SSLDroidTunnelDetails extends Activity {
private EditText name;
private EditText localport;

View File

@ -47,6 +47,7 @@ public class TcpProxyServerThread extends Thread {
// Create a trust manager that does not validate certificate chains
// TODO: handle this somehow properly (popup if cert is untrusted?)
// TODO: cacert + crl should be configurable
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
@ -154,7 +155,7 @@ public class TcpProxyServerThread extends Thread {
public void run() {
while (true) {
try {
//TODO: close client sockets if no data network is available
Thread fromBrowserToServer = null;
Thread fromServerToBrowser = null;
@ -177,7 +178,6 @@ public class TcpProxyServerThread extends Thread {
}
Socket st = null;
try {
st = (SSLSocket) getSocketFactory(this.keyFile, this.keyPass, this.sessionid).createSocket(this.tunnelHost, this.tunnelPort);
((SSLSocket) st).startHandshake();
@ -190,7 +190,7 @@ public class TcpProxyServerThread extends Thread {
return;
}
if (sc == null){
if (sc == null || st == null){
Log.d("SSLDroid", tunnelName+"/"+sessionid+": Trying socket operation on a null socket, returning");
return;
}
@ -208,8 +208,8 @@ public class TcpProxyServerThread extends Thread {
fromBrowserToServer.start();
fromServerToBrowser.start();
} catch (Exception ee) {
Log.d("SSLDroid", tunnelName+"/"+sessionid+": Ouch: " + ee.getMessage());
} catch (IOException ee) {
Log.d("SSLDroid", tunnelName+"/"+sessionid+": Ouch: " + ee.toString());
}
}
}