03-22-2011 02:01 PM
I am confused about using CMSSignedDataOutputStream class.
I am trying to sign five documents using the CMSSignedDataOutputStream class of CMS API, using a private key stored in a CryptoSmartCard, but for each document that I want to sign the CMSSignedDataOutputStream is asking the PIN access to the CryptoSmartCard... so that retyping smart card PIN N-times is frustating.
What I have tried, to avoid this, is open a crypto smart card session, get the private key with a KeyStoreDataTicket, and pass this private key through the CMSSigner class to the CMSSignedDataOutputStream class, but it hangs, becasue I assume that is trying to open another crypto smart card session, and by definition this could no be possible...
So, How can avoid the behavior of retyping PIN N-times? I just want to be asked for PIN one time, and apply five or N-signatures for each document.
I will appreciate any suggestion and thanks for you time.
03-23-2011 11:53 AM
Maybe this is not the way...for signing electronic documents
But, why the CMSDSignedDataInputStream class try to open an Smart Card session even when it is already open?