• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem signing jar file

 
Scott Lynch
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, I finally got what I think is an actual certificate, had no trouble importing it into my keystore, but when I try to sign the JAR, it can't find the certificate:
$ jarsigner -keystore PromptsKeystore jar/authprompts.jar prompts
Enter Passphrase for keystore: ************************
jarsigner: certificate not found for: prompts
$ keytool -list -keystore PromptsKeystore
Enter keystore password: ************************
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry:
prompts, Fri Mar 14 09:12:47 CST 2003, trustedCertEntry,
Certificate fingerprint (MD5): 1E:46:E4:6C:BA:5C:27:A3:78:92:1C:B19:FF:67:86
[ March 14, 2003: Message edited by: Scott Lynch ]
 
Paul McCaffery
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i just want to read a txt file. can this be done doing the same thing?
 
Scott Lynch
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul McCaffery:
i just want to read a txt file. can this be done doing the same thing?

I assume you're asking if a signed applet can read a TXT file? I'm pretty sure it can, but I haven't tried it. My native library can write a file without a problem, so I imagine that you could use the java.io package to read/write as long as the jar is signed.
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An applet that has been properly authorized and signed can read (or write) any type of file. But an unsigned applet can't.
Personally, I recommend that in general, you don't have applets store files on the local computer. It's much easier to keep things backed up and secured when they're server-based rather than splattered across a thousand desktops.
IF, however, your need to keep a local copy of information on a machine that will be frequently disconnected from the network, that's obviously not feasible.
It's not a bad idea when keeping files on laptops to encrypt them while you're at it. Laptops get stolen. Often without even leaving the office.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic