Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Two questions about applet security

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two questions about applet security.
1. Can an unsigned JAR be trusted by Java Plugin?
2. A JAR is signed. If I add/delete/modify some files to/from/in it, can it stilly be verified?
Thanks.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for applet to be trusted.
it HAS TO BE Digitally signed.
unsigned applet is NOT TRUSTED
if a signed jar is modified, it can be verified..but verification process will fail ..data integreity check is done by public/private key algo
 
Leo Liao
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean "verification process will fail"?
Do you mean if I use "jarsigner -verify a.jar", some failure infomation will appear?
 
sowmya thiru
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, if someone has exploded a signed JAR file, has modified
one of its files, and has rebuilt the JAR file, when we try to verify the
signature using jarsigner, we get the following error message:

jarsigner: java.lang.SecurityException: SHA1 digest error for
itso.class
 
Leo Liao
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by sowmya thiru:
For example, if someone has exploded a signed JAR file, has modified
one of its files, and has rebuilt the JAR file, when we try to verify the
signature using jarsigner, we get the following error message:

jarsigner: java.lang.SecurityException: SHA1 digest error for
itso.class


That's true.
But if I ADD or DELETE files in the JAR, the verification still succeeds.
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Leo Liao:

But if I ADD or DELETE files in the JAR, the verification still succeeds.


I believe the signature is on a per-file bases (files in the Jar).
Any files that are unchanged after signing the JAR should still verify
successfully even if other files were added or deleted.
The added files would not verify unless the Jar is signed again after the Add. (I'm too lazy to try this out, however.
reply
    Bookmark Topic Watch Topic
  • New Topic