Self sign applet without doing any change in policy file at client end
Hi all,
I developed an applet which make some webservice calls,
I have given following permission in policy file at client end
grant codeBase "http://nta2311:7001/-" {
permission java.lang.RuntimePermission "createClassLoader";
permission java.lang.RuntimePermission "getClassLoader";
permission java.util.PropertyPermission "*", "read, write";
permission java.net.SocketPermission "*", "connect, resolve";
with these settings applet is working fine
Now I want to make applet signed in order to avoid policy file modifications
for testing I want to self sign it
please help me
Signing applets:
http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
second post and reply 18 for the java class file using doprivileged
http://forum.java.sun.com/thread.jsp?forum=63&thread=409341
4th post explaining how to set up your own policy with your own keystore
Still problems?
A Full trace might help us out:
http://forum.java.sun.com/thread.jspa?threadID=656028
Similar Messages
-
Hello java gurus,
I have a self signed applet which must read and write from mysql DB.
The sign is OK, the popup "warning security" is here but I still have a SQL Exception :
java.security.AccessControlException: access denied (java.util.PropertPermission file.encoding read)
I don't want to change the java policy and I work on plugin 1.4.1_02.
I think the problem is with the certificate cause it should give permission to applet, but it doesn't.
Any help will be very pleasantFrom the plug-in control panel, click certificates
then the Signer CA radio button. These are the
certifying authorities that the client plug-in will
accept as valid for signed code. Obviously, if any
client would just accept self-signed code as trusted,
it wouldn't provide much security. For a purely
internal app, you can generate a cert and install it
on the clients which will accept your own signing as
trustworthy.I think I can deal with this properly if you just clear up one thing for me: when you say 'install it on the clients' do you mean use the Plug-In Control Panel to load the certificate using the "Certificates" tab? From there click the "Signed Applet" radio button and "Import" and browse for the cert file? Or does creating this HTML file and clicking on a link to the certificate do something else? I think I am generating my self-signed certificate correctly and signing my jar correctly, but my applet is failing to initialize. Any further help on this much-maligned topic? :)
Thanks,
B. Rintoul -
What are the default permissions for "self-signed" applets?
Hello!
I have a self-signed applet (=signed with a self made certificate) and under most plugin-enviroments java asks the user if it accepts this certificate as trustworth.
On my linux-box I do not have any problems to write files to the local filesystem after I accepted this self-signed applet.
However I've often read that users must grant some permissions even for signed applets, so is there a list of permissions that are denied by default?
Are there differences between java releases starting with 1.2.2?
Thanks in advance, lg ClemensDefault settings are like you said, jre asks the user and everything will work.
Unless.your applet uses classes that are not signed like with calls from javascript to your applet the plugin.jar is used and you'll get an exception when writing to files.
When writing to files the OS might not allowe the user to write to a certain file or folder.
Don't know what type of exception will be thrown if the OS doesn't allowe it but it has
nothing to do with applet permissions.
To change the default setting you can add the following line in the grant { bit of the
java.policy
permission java.lang.RuntimePermission "usePolicy";
When this line is there all signatures will be ignored and an applet can only do extra
things (like access to local files) if a policy is set up for this applet.
To find out what's wrong at your clients site you should ask them to send a full trace
and check that. I hope you did a .printStacktrace() on the exception in your code so
you can see if any other classes are involved when the exception is thrown.
To turn the full trace on (windows) you can start the java console, to be found here:
C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
In the advanced tab you can fill in something for runtime parameters fill in this:
-Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
if you cannot start the java console check here:
C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
I think for linux this is somewhere in youruserdir/java (hidden directory)
add or change the following line:
javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
for 1.5:
deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
The trace is here:
C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
I think for linux this is somewhere in youruserdir/java (hidden directory) -
How to run java signed applet in vista with changing IE security options
how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
without changing the security setting, how to run.j_nanaji9 wrote:
how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
without changing the security setting, how to run.Can't be done without changing the security setting. -
Self signed applets are not supported by plug-in
I am using Windows 2000.I am using self signing applet which i have signed with the help of netscape signing tool with test certificate.I have put the zip file in "c:\program Files\netscape\users\default " directory
after signing..While opening it is giving some exception
"java.lang.SecurityException: cannot verify signature block file META-INF/ZIGBERT".
please help me regarding this.
ashok das
otlsoft, bangalore.First you need to install your self signed sertificat into system - only then you'll be able to start applet without problem.
-
Getting Error while saving a transaction without making any changes to it.
Hi All,
I have a page where in the advance table I add few rows and save the transaction. First time when I save it everything works fine, but when I save it again without making any changes to the fields I get following error:
"Unable to perform transaction on the record. \nCause: The record has been deleted by another user. \nAction: Cancel the transaction and re-query the records to get the new data."
In the same page if I make any changes again it allows me to save the transaction.
Please guide how we can avoid it..
I have already checked many threads related to the issue but nothing has worked. Please help!!
Any help would be highly appreciated..
Regards,
NisheethHi All,
please help!! -
Hi
I have an uploading problem to the server. The problem is when I try to upload a file it goes through the correct proceedure,
but does not change the remote file i.e.Index.htm, or three stages1.htm.
My Localroot folder is C:\Gods Plan Web\
The site map layout is C:\Gods Plan Web\Index.htm
The folder for the remote site is /public_html/
Should the local root folder mirror the remote site, i.e./public_html/
if this is so, what should I put into the
(a) Local Root Folder box?
(b) site map layout box?
The FTP is performing well other than changing the intended file.You should be uploading only the contents of your local root to the public_html folder (remote root).
The index.html you use as your site's home page needs to be in your site root. If you look at your Files window in DW, you should have something like the following...
Site - Whatever you named your site
index.html
images
pages
page1.html
page2.html
If you have any folder between Site - and the index.html page, like...
Site - Whatever you named your site
mywebsite
index.html
It will upload to the public_html while still in that folder, so to find your page online, you would need to type something like...
www.mydomain.com/mywebsite
public_html should NOT appear within your local files and if it existed there, would cause a redundancy if uploaded. You would need to type www.yourdomain.com/public_html to see the uploaded pages.
If you could post a screen shot of your expanded Files window while connected to the server (just connect and click the Expand button in Files, don't drill down into any of the directories), we may be able to see the issue. -
Can I increase heap memory without specify any class or jar file??
Hi,
I tried to increase my heap memory in this way :
java -Xms256m -Xmx256m
but I got an error ... it's seem that I must specify a class java or a .jar file ...
This is the error :
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
can I increase heap memory without specify any class or jar file??
thxchiara wrote:
Hi,
I tried to increase my heap memory in this way :
java -Xms256m -Xmx256m
but I got an error ... it's seem that I must specify a class java or a .jar file ...
This is the error :
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
can I increase heap memory without specify any class or jar file??The job of java.exe is to execute java bytecode.
What is it supposed to do with your request to use 256m of memory for heap
when you are not giving it a class or a jar to run? -
Anyone know of a good way to move finalcut pro X to an external HD without loosing any of the project files?
If you're looking for improved performance, you should move your events and projects to an external FW800 or faster drive.
The FCP X application itself should reside in your Applications folder on your system drive.
If you're talking about backing up to another drive, I use a cloning application (SuperDuper) to clone my working drive to my backup drive two or three times a day.
If you want to install FCP X on another computer, simply download it again from the App Store (using the same Apple ID you used to purchase the app).
Andy -
Install ReachIt 2.0.5.2, go to video folder to select a file, select shareit to send the video file to another machine, the progress bar don't have any changes after the file have been sent successfully.
-
How can I change the policy file?
I have designed an applet to read a file from the local Machine.
This applet thro a servlet reads the contents of the file specified.
I use Tomcat 4.1.12 server and this is an client-server application.
To read the file in the local machine, I set the permission as follows in the .java.policy file in the Local Machine.
grant codeBase "http://MyMachine:8080/Example" {
permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete, execute";
as the applet file is in the Example of the server "MyMachine".
Its working and my applet is able to read the file from the local machine it runs.
Now my problem is I cannot set/change the policy file in every machine where my applet runs.
Instead if there is a way to change the policy when the applet downloads,that'll be effective.
That is I donot want to go and change the policy file manually in each and every machine where my applet runs(I donot even know which are the machines going to run the applet).
Is there any means to acheieve my need?
Please explain me in detail or direct me to the relevent web sites or links.
Thank youHi Hosuke,
I had the same problem, thanks for the advise.
Still I have a remark to make.
The thing is that, in order for the applet to have the permission granted (for whatever), you need to have a policy file which you can include in the JAR file (like you explained before) AND also you need to add an entry in the java.security file (located for me: "C:\Program Files\Java\j2re1.4.1_01\lib\security\java.security") that tells the applet where to find all the .policy files.
Something like: policy.url.4=file:/c:/java.policy
But since we are talking about an applet we are not able to make changes to this file.
Maybe you or anyone else knows a workaround for this problem.
Thanks in advance,
Ronald Vromans. -
"I do not get any message or option to add exception" - Using Self signed cert -Images does not load
Wr are have two web servers one for app and another for loading images. Both are behind Kemp Load balancer and are using self signed certs from the load balancer. The images does not load when using Firefox 3.x. I load with IE and Firefox 2.x. With firefox 3.x it does not give a message to "add exception". I only get one certificate message to add exception for the app server. I do not get the certificate message or pop up for the imaging server with Firefox 3.x.
== This happened ==
Every time Firefox opened
== Always ==
== User Agent ==
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)You have a lot of information in packed in the "More system details..." (in the right-hand column), where it looks like you found a solution. If not take a look at "Problematic Extensions" the AVG Free installation of their "'''AVG Free Search'''" can cause such problems. Directions to fix that are specific and involve reinstalling AVG Free without the Link Scanner component.
* http://kb.mozillazine.org/Problematic_extensions -
Why my self-signed applet could not read local disk but could write?
I used a self-signed certificate for the applet yesterday and it worked
fine at the beginning time, that is, it could write/read file to/from
local disk, and it could connect to other MDS servers. But later, a
problem happens. It could write file to local disk(I tested it and created
files to C:/ under windows) but when it try to read that file, it got a
io acessing exception. It could connect to other servers. I am puzzled
about this problem, and I wonder why I could write but could not
read. Need I deal with any policy file issue here?hi,
i 'am doing something which is similar to the stuff ur doing .I wanted to write into file on the local disk on which the applet is running.for this i have signed the applet .do i need to make it self signed wat is difference between the self signed and signed applet .The problem which i facing is that it still gives me the security exception even if i define the policy file for that applet............Can u help me reagrding this
Thanks in advance
your great help would be apprecriated
rao_lavs -
Install self-signed Application without internet connection
I am in Window Xp. I build a simple adobe air application(myapp.air which is self signed). I have my PC installed with the latest Adobe Air Runtime. Disconnected from the network, And install myapp.air. The install process is finished without any error. But then I can not see any screen of my application. I can see the process is running with Ctrl+Alt+Del, but no application is running. It happen them same when I click the exe file.
I try this over different other application and found that:
1) in Marketplace which is signed do not have this problem
http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offering&offeringid=1 1541&marketplaceid=1
2) in Marketplace which is self-signed do not have this problem
http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offering&marketplacei d=1&offeringid=10309
3) third party software which is self-signed have this problem
http://code.google.com/p/gmdesk/downloads/list
Below is the log when I install the GMdesk which I didn't see any error:
[2011-06-14:11:09:51] Application Installer begin with version 2.6.0.19140 on Windows XP x86
[2011-06-14:11:09:51] Commandline is: "C:\Documents and Settings\Administrator\Desktop\GMDesk-1.01(1).air"
[2011-06-14:11:09:51] Installed runtime (2.6.0.19140) located at c:\Program Files\Common Files\Adobe AIR
[2011-06-14:11:09:52] Unpackaging file:///C:/Documents%20and%20Settings/Administrator/Desktop/GMDesk-1.01(1).air to C:\Documents and Settings\Administrator\Local Settings\Temp\flaB7.tmp
[2011-06-14:11:09:53] Application signature verified
[2011-06-14:11:09:53] Unpackaging/validation complete
[2011-06-14:11:09:53] No app located for appID 'robertnyman.gmdesk' and pubID 'D5F5507284D8257BC26108689093DFA1D0D2BABB.1'
[2011-06-14:11:09:55] Converting unpackaged application to a native installation package in C:\Documents and Settings\Administrator\Local Settings\Temp\flaB8.tmp
[2011-06-14:11:09:56] Native installation package creation succeeded
[2011-06-14:11:09:56] Starting app installation to C:\Program Files. Installing app robertnyman.gmdesk.D5F5507284D8257BC26108689093DFA1D0D2BABB.1 version 1.01 using the source file at file:///C:/Documents%20and%20Settings/Administrator/Desktop/GMDesk-1.01(1).air
[2011-06-14:11:09:56] Installing msi at C:\Documents and Settings\Administrator\Local Settings\Temp\flaB8.tmp\setup.msi with guid {071038FB-83F6-7491-F6E9-B2C552BDEDF3}
[2011-06-14:11:09:57] Launching subprocess with commandline C:\Program Files\GMDesk\GMDesk.exe
[2011-06-14:11:09:57] Application Installer end with exit code 0
Did the same situation happen on your PC? I am not sure with the signing is the reason? Or I missing some step when release my application?Anyone can help?? Thanks
-
Navigate to next document without saving any changes in last document in AxWebBrowser
Hi,
I am opening MS Office Document file in AxWebBrowser after that i navigate to next Office Document ,before navigating i saved the last document like this
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE, SHDocVw.OLECMDF.OLECMDF_ENABLED)
but how can i navigate to next Document without saving it if it also have any changes?
if i do not use above line of code it ask for "Save","Don't Save" and "Cancel" before navigating to next document.
help me thankxHi,
I am opening MS Office Document file in AxWebBrowser after that i navigate to next Office Document ,before navigating i saved the last document like this
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE, SHDocVw.OLECMDF.OLECMDF_ENABLED)
but how can i navigate to next Document without saving it if it also have any changes?
if i do not use above line of code it ask for "Save","Don't Save" and "Cancel" before navigating to next document.
help me thankx
Hello,
In this case, we need to get the object for that document inside the NavigateComplete2 event.
And then we could call its
close method before we navigate to the other document.
For get the document object we could refer to the sample shared in
How to use the WebBrowser control in Visual Basic to open an Office document
Public Class Form1
Dim OpenFileDialog1 As OpenFileDialog = New OpenFileDialog()
Dim oDocument As Object
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim strFileName As String
'Find the Office document.
With OpenFileDialog1
.FileName = ""
.ShowDialog()
strFileName = .FileName
End With
'If the user does not cancel, open the document.
If strFileName.Length Then
oDocument = Nothing
AxWebBrowser1.Navigate(strFileName)
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Button1.Text = "Browse"
With OpenFileDialog1
.Filter = "Office Documents " & _
"(*.docx, *.xlsx, *.ppt)|*.docx;*.xlsx;*.ppt"
.FilterIndex = 1
End With
End Sub
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As _
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
oDocument = Nothing
End Sub
Private Sub AxWebBrowser1_NavigateComplete2(ByVal sender As Object, _
ByVal e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event) _
Handles AxWebBrowser1.NavigateComplete2
On Error Resume Next
oDocument = e.pDisp.Document
'Note: You can use the reference to the document object to
' automate the document server.
MsgBox("File opened by: " & oDocument.Application.Name)
End Sub
End Class
And for closing part, we could refer to
How to: Programmatically Close Documents.
Regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
DISPLAY ONLY CUSTOM MESSAGE WITH SRW.MESSAGE
Hi.I created a report with Report Builder 9i.I also created two form parameters of type date.I put inside the validation trigger in the property inspector the following plsql code. function FROM_DATEValidTrigger return boolean is v_date VARCHAR2(12);
-
I simply want to uninstall Mozilla FireFox 3.6.3. I tried both recommendations of using the control panel to add/remove program and running the helper.exe in Program Files/Mozilla FireFox/uninstall. I am running Windows 7 Home Premium Edition(64bit).
-
Waveburner 1.1.2 - Burned CD has pops / click in the track
This is a huge problem. I'm finding that when burning a CD using Waveburner, I get random pops that show up. There are so few, that they are hard to catch (a couple in a 20 minute CD). Is anyone else having this problem? Is there a solution? Just to
-
Uploading logo into interactive reports and ALV rerports
hi experts, how to upload logo into interactive reports and ALV reports. thank u.
-
Dell with Windows 7 Enterprise will not download iTunes
I fill in my e-mail address, click "download" button, pop-up opens and I click "Save", webpage goes to "thank you for downloading", and iTunes is never downloaded. I'm using Firefox. I check the downloads folder, not there.