[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iaik-jce] Multipart/signed errors



As an attachment there is a problematic multipart/signed message,
which gives this error:

java.io.IOException: Next ASN.1 object is no SEQUENCE!
        at iaik.asn1.DerInputStream.readSequence(Unknown Source)
        at iaik.security.smime.SMimeSigned.decode(Unknown Source)
        at iaik.security.smime.SignedContent.<init>(Unknown Source)
        at iaik.security.smime.signed_content.getContent(Unknown Source)
        at
javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:755)
        at javax.activation.DataHandler.getContent(DataHandler.java:511)
        at
javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1068)

I tried also with the newer 26beta1 versions of S/MIME and JCE
and using SMimeBodyPart instead of MimeBodyPart.
This error occurs with the newer version, too.

Regards,

Jaripekka Salminen

---

Dieter Bratko wrote:
> > 1. multipart/signed error
> 
> Would it be possible for you to provide a sample multipart/signed message so
> that we may parse it?
> 
> > 2. Missing constructor from SMimeBodyPart
> Sorry, we will include this constructor in the next release.
> 
> Regards,
> Dieter Bratko
> 
> ----- Original Message -----
> From: Jaripekka Salminen <jps@medios.fi>
> To: <iaik-jce@iaik.tu-graz.ac.at>
> Sent: Wednesday, February 09, 2000 3:47 PM
> Subject: [iaik-jce] Multipart/signed errors
> 
> > We have been using your IAIK S/MIME 2.52 and IAIK JCE 2.51
> > in our development project for quite a while now.
> > I have found two severe problems. I would appreciate
> > your comments on these issues. They might be related to each other.
> >
> > 1. multipart/signed error
> > -------------------------
> >
> > S/MIME 2.52 - Windows 98 - JRE 1.2.2:
> > Some multipart/signed messages could not be opened properly, and there
> > was an error message "Next ASN.1 object is no SEQUENCE!".
> > The problem can be reproduced by sending the same
> > message again, consisting only of simple ascii text.
> > Most messages do not give this error.
> > We use MimeBodyPart in SMimeMultiPart.
> > S/MIME provides two formats for signed messages:
> >     explicit, clear-signed: multipart/signed
> >     implicit: application/pkcs7-mime and SignedData
> > Now the problem disappeared when using "implicit" signatures.
> >
> > 2. Missing constructor from SMimeBodyPart
> > -----------------------------------------
> >
> > S/MIME 2.6Beta1 - Windows 98 - JRE 1.2.2:
> > The new S/MIME requires now that
> > "Multipart/signed messages where the contents itself is composed of
> > parts have to be built with classes SMimeBodyPart and SMimeMultipart
> > for ensuring proper canonicalization."
> > We use MimeBodyPart constructor
> > MimeBodyPart(InternetHeaders headers, byte[] content)
> > Such constructor is missing from the SMimeBodyPart implementation.
> > There is no easy work-around.
> >
> >
> > --
> > Jaripekka Salminen
> > Senior Software Engineer
> > Medios Finland Oy
> > Helsinki, Finland
> > tel +358 9 323 4336
> >
>From jps@medios.fi  Sun Feb 13 20:22:02 2000
Return-Path: <jps@medios.fi>
Received: from medios.fi (ab194d1hel.dial.kolumbus.fi [212.54.16.194])
	by medios.fi (8.8.8/8.8.5) with SMTP id UAA16850
	for <jps@medios.fi>; Sun, 13 Feb 2000 20:22:01 +0200
Message-ID: <295546490.950466280090.JavaMail.jps@jps>
Date: Sun, 13 Feb 2000 20:24:31 +0200 (GMT+02:00)
From: Jaripekka Salminen <jps@medios.fi>
To: jps@medios.fi
Subject: [Signed: x]
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=SHA-1; boundary="-1254510983.950466271360.JavaMail.jps@jps"

---1254510983.950466271360.JavaMail.jps@jps
Content-Type: multipart/mixed; boundary="-558780807.950466271250.JavaMail.jps@jps"

---558780807.950466271250.JavaMail.jps@jps
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit
Content-Disposition: inline

Message-ID: <38A6F6DE.2F88C37A@medios.fi>
Date: Sun, 13 Feb 2000 20:24:30 +0200
From: Jaripekka Salminen <jps@medios.fi>
X-Mailer: Mozilla 4.06 [en] (Win98; I)
MIME-Version: 1.0
To: jps@medios.fi
Subject: x
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Tässä toimikorttivalmiuden arviointia ja problematiikkaa.

java.security näkökohtia
------------------------
Javan kannalta selkeä ja yleinen rajapinta olisi, jos
toimikorttia voitaisiin käyttää vakio KeyStore -luokan kautta.
KeyStore pitää sisällään sekä yksityisiä avaimia että julkisia
varmenteita.
(katso java.security.KeyStore: "Whether keystores are persistent, 
and the mechanisms used by the keystore if it is persistent, 
are not specified here. This allows use of a variety of 
techniques for protecting sensitive (e.g., private or 
secret) keys. Smart cards or other integrated cryptographic engines
(SafeKeyper) are one option, and simpler mechanisms such 
as files may also be used (in a variety of formats).")

---558780807.950466271250.JavaMail.jps@jps--

---1254510983.950466271360.JavaMail.jps@jps
Content-Type: application/x-pkcs7-signature; name=smime.p7s
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7s

Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PSItNTU4NzgwODA3Ljk1MDQ2
NjI3MTI1MC5KYXZhTWFpbC5qcHNAanBzIg0KDQotLS01NTg3ODA4MDcuOTUwNDY2MjcxMjUwLkph
dmFNYWlsLmpwc0BqcHMNCkNvbnRlbnQtVHlwZTogbWVzc2FnZS9yZmM4MjINCkNvbnRlbnQtVHJh
bnNmZXItRW5jb2Rpbmc6IDhiaXQNCkNvbnRlbnQtRGlzcG9zaXRpb246IGlubGluZQ0KDQpNZXNz
YWdlLUlEOiA8MzhBNkY2REUuMkY4OEMzN0FAbWVkaW9zLmZpPg0KRGF0ZTogU3VuLCAxMyBGZWIg
MjAwMCAyMDoyNDozMCArMDIwMA0KRnJvbTogSmFyaXBla2thIFNhbG1pbmVuIDxqcHNAbWVkaW9z
LmZpPg0KWC1NYWlsZXI6IE1vemlsbGEgNC4wNiBbZW5dIChXaW45ODsgSSkNCk1JTUUtVmVyc2lv
bjogMS4wDQpUbzoganBzQG1lZGlvcy5maQ0KU3ViamVjdDogeA0KQ29udGVudC1UeXBlOiB0ZXh0
L3BsYWluOyBjaGFyc2V0PWlzby04ODU5LTENCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDhi
aXQNCg0KVORzc+QgdG9pbWlr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