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
-
-
Field Summary
Fields Modifier and Type Field Description static int
DETAIL
static int
SUMMARY
static int
TEXT
static int
TITLE
static boolean
useCaCerts
-
Constructor Summary
Constructors Constructor Description ValidateSignedMail()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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(javax.mail.internet.MimeMessage msg, java.security.cert.PKIXParameters param)
-
-
-
Field Detail
-
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
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
verifySignedMail
public static void verifySignedMail(javax.mail.internet.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)
-
-