I have got the SignedContent from the Crypto.signText call, and I don't know how to get the digest from it. Firstly, because I don't know EXACTLY how the signature is constructed. I've read PKCS#7 and the WAP specs, but they're not specific enough.
All i've done so far is decoded it from base64.
Possibly it is BER encoded and if it is how do I extract the message digest ???
The WAP gateway doesn't convert to PKCS#7 SignedData.
No you can't specify it to do so.
One needs to work out how many bytes to skip using the WMLCryptoScript WAP Spec section 6 and work out the position of the signature to extract it. Also one needs to refer to the WTLS WAP Spec. Note the SignedContent is a hash containing a hash.
<NES>Thanks a lot for the help from Nokia</NES>
Also one more thing - Nokia doesn't like to always follow the WAP specs and I agree with them on this one. Appendix C UTCTime (WAP2.0 spec) states the format of the time is YYMMDDHHMMSS where YY shows the last 2 digits of the year. The Nokia implementation covers the whole 4 digit year eg 2004. This can be checked by converting the hex to decimal. This also eliminates the y2k problem. FFFF however is the largest year we can cover so problems will happen after the year 65355.
For those 114|\/|45 out there, NES means Note Extreme Sarcasm.