views:

34

answers:

1

I have a signedCMS, and would like to know how to use Bouncy Castle API to remove the signature so I can have clear access to the plain text file underneath?

Thanks

+1  A: 

Something like this might work:

CMSSignedData signedData = new CMSSignedData(signedFileBytes);

// Now get the content contained in the CMS EncapsulatedContentInfo
CMSProcessable processable = signedData.getSignedContent();    

You should then be able to get a stream on processable from which the data can be read.

bignum