# Security Problem

Asgar Ali (asgar.ali@citicorp.com)
Fri, 12 Jun 1998 11:30:03 +0100

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Todd M Greanier: "Question"
- Previous message: David Brownell: "Re: Technical Question: SSLSocket Class versus SSLSocketImpl Class"

    Message-Id: <199806121030.GAA10011@egate.citicorp.com>

    Date: Fri, 12 Jun 1998 11:30:03 +0100

    From: Asgar Ali <asgar.ali@citicorp.com>

    To: java-security@web2.javasoft.com

    Subject: Security Problem

Hi.

I have an applet that connects using sockets to a JAVA application
server running on the same DEC Unix machine. I get the following error
on connect. The connection works if I use a console JAVA application
instead of an applet.
Any ideas on how to fix this.

sun.applet.AppletSecurityException: checkconnect.networkhost1
at sun.applet.AppletSecurity.checkConnect(Compiled Code)
at sun.applet.AppletSecurity.checkConnect(Compiled Code)
at sun.applet.AppletSecurity.checkConnect(Compiled Code)
at java.net.Socket.<init>(Compiled Code)
at java.net.Socket.<init>(Compiled Code)
at DCJClient2.send(Compiled Code)
at DCJClient2.capture(Compiled Code)
at Button1Handler.actionPerformed(Compiled Code)
at java.awt.Button.processActionEvent(Compiled Code)
at java.awt.Button.processEvent(Compiled Code)
at java.awt.Component.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)

Here is the extract of code:-
public void send( String deal )
{
Socket asocket = null;
PrintWriter out = null;
BufferedReader in = null;

try
{
//asocket = new Socket( "lonu17", 4444 );
asocket = new Socket( "163.38.16.82", 4444 );

out = new PrintWriter(
asocket.getOutputStream(), true );
in = new BufferedReader(
new InputStreamReader(
asocket.getInputStream() ) );

out.println( deal );
out.close();
in.close();
asocket.close();
}

catch( UnknownHostException e )
{
System.out.println("Unknown host");
showStatus( "Unknown host " );
System.exit(1);
}
catch( IOException e )
{
System.out.println("Could not get I/O
connetion");
showStatus( "Could not get I/O connection" );
System.exit(1);
}

/*
catch( Exception e )
{
System.out.println("Other error ");
showStatus("Other error");
}
.
.
.

Asgar.

- Next message: Todd M Greanier: "Question"
- Previous message: David Brownell: "Re: Technical Question: SSLSocket Class versus SSLSocketImpl Class"