OK, your problem is that you're trying to feed these bytes into the 
ASN.1 decoder as-is. They are base-64 encoded. That's why you got the 
error message complaining about the APPLICATION 13 tag.The ASN.1 decoder 
expects the raw, binary, DER encoding. You need to base-64 decode the 
message before you try to decode the DER.

Note that the sample program in org.mozilla.jss.pkix.crmf.CertReqMsg 
does almost exactly what you are doing, except it doesn't have to 
base64-decode the message first. 
(http://lxr.mozilla.org/mozilla/source/security/jss/org/mozilla/jss/pkix/crmf/CertReqMsg.java#265)

I don't think there's a way to base64-decode the data with JSS, but 
there's got to be some free code out there somewhere that does it. Or 
write your own!


Reply via email to