|
DigiStamp.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdgs.tlkt.demo.VerifySignature
Verify that the time stamp for a particular file is authentic.
This source code is include with the SecureTime toolkit distribution.
This includes calculating the file's hash and using the public key certificate to verify the signature
Verify the signature using the RSA capabilities delivered with the VM.
| Field Summary | |
java.io.PrintStream |
myOut
where should the output go. |
boolean |
verbose
detailed output ? |
| Constructor Summary | |
VerifySignature()
Create a processing instance. |
|
VerifySignature(boolean verbose,
java.io.PrintStream myOut)
|
|
| Method Summary | |
java.security.cert.X509Certificate |
findCertInFile(CMSTsToken cms)
|
static void |
main(java.lang.String[] args)
|
java.security.cert.X509Certificate |
verifySignature(CMSTsToken cms)
Verify the signature using the RSA capabilities delivered with the VM. |
java.security.cert.X509Certificate |
verifySignature(java.lang.String timestampedFile,
CMSTsToken timeStamp)
Demonstrate the core steps in verifying the time stamp token. |
java.security.cert.X509Certificate |
verifyTSofFile(java.lang.String timestampedFile,
java.lang.String timestamp)
Give a file that was time stamped and a time stamp. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.io.PrintStream myOut
public boolean verbose
| Constructor Detail |
public VerifySignature()
verifySignature(String, CMSTsToken)
public VerifySignature(boolean verbose,
java.io.PrintStream myOut)
verbose - myOut - | Method Detail |
public java.security.cert.X509Certificate findCertInFile(CMSTsToken cms)
throws ExceptionDgsEncode,
java.security.cert.CertificateException,
java.io.FileNotFoundException
ExceptionDgsEncode
java.security.cert.CertificateException
java.io.FileNotFoundExceptionpublic static void main(java.lang.String[] args)
public java.security.cert.X509Certificate verifySignature(CMSTsToken cms)
throws java.security.NoSuchAlgorithmException,
ExceptionDgsEncode,
java.security.cert.CertificateException,
java.io.FileNotFoundException,
java.security.InvalidKeyException,
java.security.SignatureException
If the verify process is successful then it returns the x509 certificate that was used. Otherwise, returns null.
java.security.NoSuchAlgorithmException
ExceptionDgsEncode
java.security.cert.CertificateException
java.io.FileNotFoundException
java.security.InvalidKeyException
java.security.SignatureException
public java.security.cert.X509Certificate verifySignature(java.lang.String timestampedFile,
CMSTsToken timeStamp)
throws java.security.InvalidKeyException,
ExceptionDgsEncode,
java.security.cert.CertificateException,
java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.io.IOException
timestampedFile - -
file name of the data that was time stampedtimeStamp - -
the time stamp object
java.security.InvalidKeyException
ExceptionDgsEncode
java.security.cert.CertificateException
java.security.SignatureException
java.security.NoSuchAlgorithmException
java.io.IOException
public java.security.cert.X509Certificate verifyTSofFile(java.lang.String timestampedFile,
java.lang.String timestamp)
throws java.security.InvalidKeyException,
java.security.cert.CertificateException,
java.security.SignatureException,
java.security.NoSuchAlgorithmException,
java.io.IOException
If the verify process is successful then it returns the x509 certificate that was used. Otherwise, returns null.
timestampedFile - -
file name of the data that was time stampedtimestamp - -
file name where the time stamp is stored
java.security.InvalidKeyException
java.security.cert.CertificateException
java.security.SignatureException
java.security.NoSuchAlgorithmException
java.io.IOExceptionfor more details
|
Copyright 2000-2005 DigiStamp, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||