Using javamail 1.4
Jdk 1.5
BouncyCastle 1.35
=================
Hi
I am following the combining sign with encryption code:
MimeMessage msg = (MimeMessage)cGenerator.submitTask(lineByteArray);
The msg object is not null, as I can see some part of it
-----------------------------------------------------------
===> msg.writeTo(System.out);
From:
ctg@cme.epiphany.com
To:
aodrisco01@epiphany.com
Message-ID: 20070110032519.1148042987.0.-1.1522@@cme.epiphany.com
Subject: French content
MIME-Version: 1.0
Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type=enveloped-data
Content-Transfer-Encoding: 7bit
---------------------------------------------------------------
when I do the following, I get the null pointer.
Could you pl guide me how to debug this part.
SMIMEEnveloped enveloped = new SMIMEEnveloped(msg);
Time: 5.516
There was 1 error:
1) testSmime(com.infor.jobfile.TestCTGSecurity)java.l ang.NullPointerException
at org.bouncycastle.asn1.cms.ContentInfo.getInstance( Unknown Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
at org.bouncycastle.cms.CMSEnvelopedData.<init>(Unkno wn Source)
at org.bouncycastle.mail.smime.SMIMEEnveloped.<init>( Unknown Source)
at com.infor.jobfile.TestCTGSecurity.testSmime(TestCT GSecurity.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at com.infor.jobfile.TestCTGSecurity.main(TestCTGSecu rity.java:207)