Top Description Fields Constructors Methods
org.bouncycastle.mail.smime.examples

public Class CreateSignedMail

extends Object
Class Inheritance
Imports
java.io.FileOutputStream, .IOException, java.math.BigInteger, java.security.GeneralSecurityException, .KeyPair, .KeyPairGenerator, .PrivateKey, .PublicKey, .SecureRandom, java.security.cert.X509Certificate, java.util.ArrayList, .Date, .List, .Properties, javax.mail.Address, .Message, .Session, javax.mail.internet.InternetAddress, .MimeBodyPart, .MimeMessage, .MimeMultipart, org.bouncycastle.asn1.ASN1EncodableVector, org.bouncycastle.asn1.cms.AttributeTable, .IssuerAndSerialNumber, org.bouncycastle.asn1.smime.SMIMECapabilitiesAttribute, .SMIMECapability, .SMIMECapabilityVector, .SMIMEEncryptionKeyPreferenceAttribute, org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.asn1.x509.AuthorityKeyIdentifier, .Extension, .SubjectKeyIdentifier, .SubjectPublicKeyInfo, org.bouncycastle.cert.X509v3CertificateBuilder, org.bouncycastle.cert.bc.BcX509ExtensionUtils, org.bouncycastle.cert.jcajce.JcaCertStore, .JcaX509CertificateConverter, .JcaX509v3CertificateBuilder, org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoGeneratorBuilder, org.bouncycastle.mail.smime.SMIMESignedGenerator, org.bouncycastle.operator.OperatorCreationException, org.bouncycastle.operator.jcajce.JcaContentSignerBuilder, org.bouncycastle.util.Store

a simple example that creates a single signed mail message.

Field Summary

Modifier and TypeField and Description
pack-priv static int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static AuthorityKeyIdentifier
pack-priv static SubjectKeyIdentifier
public static void
main(String[] args)

pack-priv static X509Certificate
makeCertificate(KeyPair subKP, String subDN, KeyPair issKP, String issDN)

create a basic X509 certificate from the given keys

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialNoback to summary
pack-priv static int serialNo

Constructor Detail

CreateSignedMailback to summary
public CreateSignedMail()

Method Detail

createAuthorityKeyIdback to summary
pack-priv static AuthorityKeyIdentifier createAuthorityKeyId(PublicKey pub) throws IOException
createSubjectKeyIdback to summary
pack-priv static SubjectKeyIdentifier createSubjectKeyId(PublicKey pub) throws IOException
mainback to summary
public static void main(String[] args) throws Exception
makeCertificateback to summary
pack-priv static X509Certificate makeCertificate(KeyPair subKP, String subDN, KeyPair issKP, String issDN) throws GeneralSecurityException, IOException, OperatorCreationException

create a basic X509 certificate from the given keys