• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem signing jar file

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:B1:D9:FF:67:86
[ March 14, 2003: Message edited by: Scott Lynch ]
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic