Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Signed Applet - Using same alias while development

 
Pt Patel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on Embedded Java Signed Applet. My applet using the TCP/IP thus required to load each time to my Lantronix XPort.
The problem is, every time I change something in the applet, I need to run the following commands again and finally load to Lantronix XPort.
And every time, I required to change the alias name i.e. signapplet17 in the following commands.

Is there any easy way while developing the signed applet
e.g. we can use the same alias name each time i.e. signapplet1 ( I reached to signapplet17)
Or we can avoid the following commands while developing.
---------------------------------------------------------------------------
jar cmf mainClass.txt DataMain.jar *.class

: Generate key pairs
keytool -genkey -alias signapplet17 -keystore mykeystore -keypass mykeypass -storepass mystorepass

: Sign the JAR file
jarsigner -keystore mykeystore -storepass mystorepass -keypass mykeypass -signedjar SDataMain.jar DataMain.jar signapplet17

: Export the public key certificate
keytool -export -keystore mykeystore -storepass mystorepass -alias signapplet17 -file mycertificate.cer
---------------------------------------------------------------------------

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And every time, I required to change the alias name

Why is that?
 
Pt Patel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply,

Every time I change something in my Applet, I need to generate key pair, sign the jar file and export the key etc.
If I run the same command "keytool", I have to change the alias i.e. "signapplet17" in my last post. Because It is giving me error, alias already exist/used.

Actually I made a bat file for all these command given between dotted line in my last post. And every time after compiling the java file, I have to change to new alias name in my bat file and run that bat.

Up to this now, I have changed my alias from "signapplet1" to "signapplet17". I am evev not sure, where these alias stored and whether it is bad thing to have too many unnecessary alias.
Is there any way, I can simplify all this steps while developing the signed applet. And later at the end, put all these security back.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need to export the certificate each time you change something in the applet? You can reuse the file.

If -for some reason- you want to export the certificate repeatedly, just delete the old certificate file before doing so.
 
Pt Patel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have removed the "Generate Key Pairs" and "Export Public Key Certificate" lines and it is still working with the previously generated certificate.
I was in the impression that, it will require to generate new every time.
Thanks for all your help. I got another question regarding applet, but I will create the new post.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic