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

Re: [iaik-jce] PKCS7 question



You have to pass a null to the SignerInfo constructor and then use the
setEncryptedDigest to put an already encrypted hash into it.
The code will appear like:

      SignerInfo signer_info = new SignerInfo(issuer,
iaik.asn1.structures.AlgorithmID.sha1, null);
      signer_info.setEncryptedDigest(encrypted_digest);

The rest will be the same as in the examples.
I think this is an undocumented feature: this information was passed to me
by
this mailing list some day ago.

----- Original Message -----
From: "Andrei Savitsky" <a.savitsky@belcaf.com>
To: <iaik-jce@iaik.at>
Sent: Wednesday, November 01, 2000 4:58 PM
Subject: [iaik-jce] PKCS7 question


> Hello,
>
>   I need to sign file with certificate. Certificate and Keys are on
>   smartcard, so I can't put Private Key to SignedData or
>   SignedDataStream Objects. I generate signature with the help of
>   other package. So, how can I make file in PKCS7 format, when I have
>   ready signature? Don't understand how to use setMessageDigest
>   function, if it can help me.
>
> --
> Best regards,
>  Andrey                          mailto:andrey.s@belcaf.minsk.by
>
>
> --
> Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html
>
> To unsubscribe send an email to listserv@iaik.at with the folowing
content:
UNSUBSCRIBE iaik-jce
>

--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

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