|
ADK CVS | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttryllian.are.security.DNASigner
Helper class for DNAComposer for dealing with jar signing related stuff.
Mostly a wrapper class for
our jarsigner,
with a some additional
setter methods to facilitate signing multiple files with the same settings.
| Method Summary | |
java.lang.String |
getAlias()
Getter for alias. |
java.io.File |
getKeyStoreFile()
Getter for keystore. |
static boolean |
isSigned(java.io.File file)
Test if a given file appears to be signed. |
boolean |
isSignedWithSameCertificate(java.io.File file)
Test if a given File is already validly signed using the current settings for keystore, alias and password. |
void |
setAlias(java.lang.String alias)
Setter for alias. |
void |
setKeyStore(java.io.File keyStore)
Setter for keyStore. |
void |
setPassword(char[] password)
Setter for password. |
void |
sign(java.io.File fileToSign,
java.io.File signedFile)
Signs an existing JAR file, creating a new signed file. |
static void |
unsign(java.io.File fileToUnsign,
java.io.File unsignedFile)
Given a URL to a signed JAR file, creates a copy with the same content, minus the signing info in the original. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void setKeyStore(java.io.File keyStore)
public java.io.File getKeyStoreFile()
public void setAlias(java.lang.String alias)
public java.lang.String getAlias()
public void setPassword(char[] password)
public static boolean isSigned(java.io.File file)
file - the file to test
public boolean isSignedWithSameCertificate(java.io.File file)
file - the file to test
public static void unsign(java.io.File fileToUnsign,
java.io.File unsignedFile)
throws DNAComposerException
fileToUnsign - File location for the original signed JAR fileunsignedFile - File location to use for the result.
DNAComposerException - if anything goes wrong
public void sign(java.io.File fileToSign,
java.io.File signedFile)
throws DNAComposerException
fileToSign - the file that should be signedsignedFile - where the resulting file should be written
DNAComposerException - if :
|
Copyright 2005, Tryllian Solutions B.V. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||