Error "Malformed content." in Signature Verification
<p>I want to verify my signature . my signature is a byte array. I use spongy castle
I get error "org.spongycastle.cms.CMSException: Malformed content." 
this is my code:</p>

<pre><code>   String base64 = Base64.toBase64String(signedchallenge);
   CMSSignedData cms = new CMSSignedData(Base64.decode(base64));
   Store store = cms.getCertificates();
   SignerInformationStore signers = cms.getSignerInfos();
   Collection c = signers.getSigners();
</code></pre>

<p>I get error in line " CMSSignedData cms = new CMSSignedData(Base64.decode(base64));"</p>

<p>also I used this method for signed challenge generation. It did in smart cart</p>

<pre><code>          Signature signature=Signature.getInstance(Signature.ALG_RSA_SHA_PKCS1,false);
      signature.init(thePrivateKey,Signature.MODE_SIGN);
      signLength=signature.sign(buffer,(short)(ISO7816.OFFSET_CDATA &amp; 0xFF), inputlength, buffer, (short)(0));
      apdu.setOutgoingAndSend((short)0,signLength);
</code></pre>