Open nshdigt opened 7 years ago
Error: read Error read cms
../src/wrapper/cms/signed_data.cpp:127
read PEM_read_bio_CMS
../src/wrapper/cms/signed_data.cpp:93
140031159080832:error:0906D06C:PEM routines:PEM_read_bio:no start line:../deps/openssl/openssl/crypto/pem/pem_lib.c:701:Expecting: CMS
Примерно такой тест: console.log("Export"); var cms; var buf; cms = new trusted.cms.SignedData(); buf = cms.export(trusted.DataFormat.PEM); assert.equal(buf.length !==0, true, "Wrong sign export");
console.log("Import"); var cms; cms = new trusted.cms.SignedData(); cms.import(buf, trusted.DataFormat.PEM); // console.log(cms.certificates().length); // assert.equal(cms.signers().length, 1, "Wrong signers length"); // assert.equal(cms.certificates().length, 1, "Wrong certificates length"); // assert.equal(cms.isDetached(), false, "Detached");