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

AW: [iaik-ssl]cu|| Verify signeddata created with CAPICOM



Hello,

I can successfully decode and parse the SignedData object you sent, but I
cannot verify it because the data is not included; did you tried
TestContentInfo.getSignedData() in explicit mode in a way like:


    ContentInfoStream cis = new ContentInfoStream(new ASN1InputStream(is));
    SignedDataStream signed_data = // explicitly signed; set the data stream
for digesting the message
    AlgorithmID[] algIDs = ...};
    SignedDataStream  signed_data = new SignedDataStream(contentStream,
algIDs);

    // get an InputStream for reading the signed content
    InputStream data = signed_data.getInputStream();
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    StreamCopier sc = new StreamCopier(data, os);
    sc.copyStream();
    // explicitly signed ==> read now the DER encoded object
    signed_data.decode(cis.getContentInputStream());


    System.out.println("SignedData contains the following signer
information:");
    SignerInfo[] signer_infos = signed_data.getSignerInfos();

    X509Certificate signer_cert = signed_data.verify(0);
    ...

Regards,
Dieter

-----Ursprüngliche Nachricht-----
Von: iaik-ssl-owner@iaik.at [mailto:iaik-ssl-owner@iaik.at]Im Auftrag
von Iglesias Gomez, German
Gesendet: Freitag, 08. November 2002 17:01
An: iaik-ssl@iaik.at
Betreff: [iaik-ssl]cu|| Verify signeddata created with CAPICOM


Hi,

I´ve sign a document using the CAPICOM, and it returns a PKCS#7, but when
I´m trying to verify with IAIK classes, said that isn´t the correct sign.
I can get the signedData from the PKCS#7 and Microsoft say that it´s
encripted using RSA. (also the signedInfo object say the same). In other
side, I´ve seen a Cipher class, and in it documenttation there are explian 7
modes of RSA.
Also I´ve used as model the example TestContentInfo.java and the
getSignedData() method, but tell me the same, the sign it´s wrong.

Does anybody knows what mode I must use to verify CAPICOM sign? Does anybody
do it before? Can anybody help me? I´m block with it !!!

Thanks Awards


Germán Iglesias Gómez
----------------------------------------------------------
TAO - grupo gedas
CC e-Projects
c/Villanueva, 13, 1Ş Planta
28001   Madrid
Teléfono	+34 91 400 04 00
Fax	+34 91 400 04 36
Mailto:german.iglesias@tao.es
http://www.tao.es
----------------------------------------------------------

--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-ssl/sslthreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content:
UNSUBSCRIBE iaik-ssl


--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-ssl/sslthreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-ssl