2002/07/02 00:17:23
[org.ibex.core.git] / src / org / xwt / TinySSL.java
index e3f90ab..44b998c 100644 (file)
@@ -137,8 +137,8 @@ public class TinySSL extends Socket {
 
     public X509CertificateStructure server_cert = null;
 
-    public SSLOutputStream os;
-    public SSLInputStream is;
+    public SSLOutputStream os = null;
+    public SSLInputStream is = null;
 
     String hostname;
 
@@ -148,8 +148,8 @@ public class TinySSL extends Socket {
     /** true iff we're using SSL_RSA_EXPORT_WITH_RC4_40_MD5 */
     boolean export = false;
 
-    public InputStream getInputStream() { return is; }
-    public OutputStream getOutputStream() { return os; }
+    public InputStream getInputStream() throws IOException { return is != null ? is : super.getInputStream(); }
+    public OutputStream getOutputStream() throws IOException { return os != null ? os : super.getOutputStream(); }
 
     public TinySSL(String host, int port) throws IOException { this(host, port, true); }
     public TinySSL(String host, int port, boolean negotiateImmediately) throws IOException {