On 2010-09-09 03:37 PDT, Vincent Agriesti wrote: > How do I get the CMS encoder in mozilla's NSS 3.12.7 to use definite > encodings on constructed types as well as data [?] [snip] > Researching into the code, I've found (in secasn1e.c) > > /* The !isString test below is apparently intended to ensure that all > ** constructed types receive indefinite length encoding. [snip] > which leads me to believe there is no way to do this easily. If know one > knows of an easy way to handle this, I'll probably submit bug/patch, just > thought this was suppose to be a std feature of CMS encoders? > > Thanks for any help! > Vinnie Agriesti
NSS has two encoders and two decoders for "PKCS7". The older one, whose functions use the SEC_PKCS7_ prefix, implements an older version of the standard, but IINM, allows for either DER or BER encoding. The newer one, which uses the NSS_CMS prefixes, was designed exclusively for use in an SMIME email package, where it was believed that BER encoding was always allowed. If the new encoder can be made to do DER encoding without a huge restructuring, we'd appreciate a patch to enable that. But if not, you may want to switch to the other encoder. -- /Nelson Bolyard -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto