chapter9
Class Utils
java.lang.Object
chapter2.Utils
chapter3.Utils
chapter4.Utils
chapter5.Utils
chapter6.Utils
chapter7.Utils
chapter8.Utils
chapter9.Utils
- Direct Known Subclasses:
- Utils
public class Utils
- extends Utils
Chapter 9 Utils
Constructor Summary |
Utils()
|
Method Summary |
static java.security.cert.PKIXCertPathBuilderResult |
buildPath(java.security.cert.X509Certificate rootCert,
java.security.cert.X509CertSelector endConstraints,
java.security.cert.CertStore certsAndCRLs)
Build a path using the given root as the trust anchor, and the passed
in end constraints and certificate store. |
static java.security.KeyStore |
createCredentials()
Create a KeyStore containing the a private credential with
certificate chain and a trust anchor. |
static javax.mail.internet.MimeMessage |
createMimeMessage(java.lang.String subject,
java.lang.Object content,
java.lang.String contentType)
Create a MIME message from using the passed in content. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_PASSWD
public static char[] KEY_PASSWD
Utils
public Utils()
createCredentials
public static java.security.KeyStore createCredentials()
throws java.lang.Exception
- Create a KeyStore containing the a private credential with
certificate chain and a trust anchor.
- Throws:
java.lang.Exception
buildPath
public static java.security.cert.PKIXCertPathBuilderResult buildPath(java.security.cert.X509Certificate rootCert,
java.security.cert.X509CertSelector endConstraints,
java.security.cert.CertStore certsAndCRLs)
throws java.lang.Exception
- Build a path using the given root as the trust anchor, and the passed
in end constraints and certificate store.
Note: the path is built with revocation checking turned off.
- Throws:
java.lang.Exception
createMimeMessage
public static javax.mail.internet.MimeMessage createMimeMessage(java.lang.String subject,
java.lang.Object content,
java.lang.String contentType)
throws javax.mail.MessagingException
- Create a MIME message from using the passed in content.
- Throws:
javax.mail.MessagingException
Examples from "Beginning Cryptography with Java"