[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-ssl] IAIK-SSL Applet Edition - AccessControlException !!



 
Hi,
 
 
I have the following code using IAIK SSL Applet Edition in my Applet-
#1         java.net.URL.setURLStreamHandlerFactory(new iaik.protocol.https.HttpsURLStreamHandlerFactory());
#2         URL url = new URL(urlstring); 
#3         iaik.protocol.https.HttpsURLConnection conn = (iaik.protocol.https.HttpsURLConnection)url.openConnection();
#4         iaik.security.ssl.SSLClientContext cltCtxt = new iaik.security.ssl.SSLClientContext();
#5         CipherSuite[] cs = new CipherSuite[] {
                                    CipherSuite.SSL_RSA_EXPORT_WITH_RC4_40_MD5
                                };
#6         cltCtxt.setEnabledCipherSuites(cs);
#7         cltCtxt.setDebugStream(System.out);
#8         conn.setSSLContext(cltCtxt);
#9         conn.setRequestMethod("POST");
#10       conn.setDoInput(true);
#11       conn.setDoOutput(true);
 
#12       OutputStream out = conn.getOutputStream();
#13       out.write("foobar".getBytes());
#14       out.flush();
#15       InputStream in = conn.getInputStream();
 
And I get the following exception at Line #11(conn.setDoOutput(true)) when I try to run it-
java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)
 at java.security.AccessControlContext.checkPermission(Unknown Source)
 at java.security.AccessController.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkPropertiesAccess(Unknown Source)
 at java.lang.System.getProperties(Unknown Source)
 at org.w3c.www.protocol.http.HttpManager.getManager(Unknown Source)
 at org.w3c.www.protocol.http.HttpManager.getManager(Unknown Source)
 at org.w3c.www.protocol.http.HttpURLConnection.checkRequest(Unknown Source)
 at org.w3c.www.protocol.http.HttpURLConnection.connect(Unknown Source)
 at org.w3c.www.protocol.http.HttpURLConnection.a(Unknown Source)
 at org.w3c.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at HttpsDemo.main0(HttpsDemo.java:100)
 at HttpsDemo.init(HttpsDemo.java:162)
 at SSLApplet1Swing.actionPerformed(SSLApplet1Swing.java:85)
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
 at java.awt.Component.processMouseEvent(Unknown Source)
 at java.awt.Component.processEvent(Unknown Source)
 at java.awt.Container.processEvent(Unknown Source)
 at java.awt.Component.dispatchEventImpl(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.EventQueue.dispatchEvent(Unknown Source)
 at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.run(Unknown Source)
Hit the <RETURN> key.
 
    Any ideas, inputs, suggestions will be very helpful !!!
 
Thanx in advance,
Yogesh