dstucrypt / agent

47 stars 31 forks source link

Ошибка на тестовых ключах для Мирный #16

Closed irbismaestro closed 3 years ago

irbismaestro commented 3 years ago

Вот по ссылке https://tax.gov.ua/elektronna-zvitnist/perelik/ Можно скачать тестовые ключи...так вот первые две /home/shop/node-v10.16.3/bin/node index.js --sign --key e.dat:tectfom(tect4 или 3) --cert e.cer --input open.xml --output 2.xml.sign --no-tax --tsp all

Работают ...а на Мирного...исключение

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'extension' of undefined at do_sc (/home/shop/WebstormProjects/agent-master/agent.js:101:38) at Object.main (/home/shop/WebstormProjects/agent-master/agent.js:273:13) at process._tickCallback (internal/process/next_tick.js:68:7) at Function.Module.runMain (internal/modules/cjs/loader.js:834:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) (node:9053) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:9053) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

muromec commented 3 years ago

Привіт,

Беріть той сертифікат шо 8030938, а не 8030939 і вказуйте --role personal бо --no-role. 39 -- це сертифікат для шифрування.

irbismaestro commented 3 years ago

Дякую ...Спрацювало.

skarbovskiy commented 3 years ago

@muromec , подскажите, пожалуйста. Беру ключи и сертификаты из списка https://tax.gov.ua/elektronna-zvitnist/perelik/ "Тестовий платник 3" вызываю либу через

node index.js --sign --crypt  tax.cer \
            --recipient_cert tax.cer \
            --tsp all \
            --key Key-6.dat:tect3 \
            --input 24120034554362J1391801100010172610520212412.XML --output zvit.xml.sign.enc \
            --cert 1.cer \
            --cert 2.cer \
            --email george.skarbovskiy@gmail.com

tax.cer - сертификат налоговой отсюда https://tax.gov.ua/elektronna-zvitnist/platnikam-podatkiv-pro/edina-adresa/ (последнее от 19ого года)

сертификаты подставлял как физ лица с ролью директора, так и юр лица, параметры --role personal / --no-role пробовал, результат всегда один No key-certificate pair found for given op encrypt and role false (/director / personal)

skarbovskiy commented 3 years ago

проверил на "тестовий 4", работает успешно

muromec commented 3 years ago

оновіться за мастера, зробіть `npm i' й повинно запрацювать. там був якійсь новий інтересний мікс з pfx / pbes2 / raw ключів, такого раніше не було.