You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per RFC 2315, various PKCS#7 content types shall be encoded using indefinite length form. Right now, it is not possible to choose such type of BER length encoding. For instance, PKCS#7 objects created by the library (with enveloped-data) can't be decoded by Microsoft Outlook (S/MIME format) because of that.
Here is the code used to create PKCS#7:
// create a p7 enveloped message
var p7 = forge.pkcs7.createEnvelopedData();
// add recipient's certificate
p7.addRecipient(cert);
// set content
p7.content = forge.util.createBuffer();
p7.content.putString(content);
// encrypt
p7.encrypt();
// get DER bytes (!!!Definite length form is used!!!)
forge.asn1.toDer(p7.toAsn1()).getBytes();
I expect that forge.asn1.toDer generates DER data with indefinite length form.
The text was updated successfully, but these errors were encountered:
As per RFC 2315, various PKCS#7 content types shall be encoded using indefinite length form. Right now, it is not possible to choose such type of BER length encoding. For instance, PKCS#7 objects created by the library (with enveloped-data) can't be decoded by Microsoft Outlook (S/MIME format) because of that.
Here is the code used to create PKCS#7:
I expect that
forge.asn1.toDer
generates DER data with indefinite length form.The text was updated successfully, but these errors were encountered: