org.bouncycastle.mail.smime.examples
Class ValidateSignedMail
java.lang.Object
org.bouncycastle.mail.smime.examples.ValidateSignedMail
public class ValidateSignedMail
- extends java.lang.Object
An Example that reads a signed mail and validates its signature. Also
validating the certificate path from the signers key to a trusted entity
Method Summary |
protected static java.security.cert.TrustAnchor |
getTrustAnchor(java.lang.String trustcert)
|
protected static java.security.cert.X509Certificate |
loadCert(java.lang.String certfile)
|
protected static java.security.cert.X509CRL |
loadCRL(java.lang.String crlfile)
|
static void |
main(java.lang.String[] args)
|
static void |
verifySignedMail(MimeMessage msg,
java.security.cert.PKIXParameters param)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
useCaCerts
public static final boolean useCaCerts
- See Also:
- Constant Field Values
TITLE
public static final int TITLE
- See Also:
- Constant Field Values
TEXT
public static final int TEXT
- See Also:
- Constant Field Values
SUMMARY
public static final int SUMMARY
- See Also:
- Constant Field Values
DETAIL
public static final int DETAIL
- See Also:
- Constant Field Values
ValidateSignedMail
public ValidateSignedMail()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
verifySignedMail
public static void verifySignedMail(MimeMessage msg,
java.security.cert.PKIXParameters param)
throws java.lang.Exception
- Throws:
java.lang.Exception
getTrustAnchor
protected static java.security.cert.TrustAnchor getTrustAnchor(java.lang.String trustcert)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadCert
protected static java.security.cert.X509Certificate loadCert(java.lang.String certfile)
loadCRL
protected static java.security.cert.X509CRL loadCRL(java.lang.String crlfile)