Статус: Новичок
Группы: Участники
Зарегистрирован: 03.11.2020(UTC) Сообщений: 4
Сказал(а) «Спасибо»: 1 раз
|
Коллеги, подскажите, как правильно должна валидироваться подпись, подписанная тестовым сертификатом крипто про На форме https://testca.cryptopro.ru/certsrv/certrqma.asp заполняю: Тип требуемого сертификата: сертификат проверки подлинности клиента CSP: CryptoPro GOST 34.10-2012 Strong CryptoGrafic SP Добавляю корневой сертификат криптопро в доверенные keytool -importcert -file {path}\certnew.cer -keystore cacerts -alias "CryptoTest" На демо https://www.cryptopro.ru.../cades_xlong_sample.html подписываю данным сертификатом строку и сохраняю в файл signature.txt. Код:
@Test
public void test() throws Exception {
Security.addProvider(new JCP());
Security.addProvider(new RevCheck());
InputStream is = getClass().getClassLoader().getResourceAsStream("signature.txt");
byte[] bytes = IOUtils.toByteArray(is);
InputStream cadesCmsStream = new ByteArrayInputStream(org.bouncycastle.util.encoders.Base64.decode(bytes));
verifyCAdESLongSignature(cadesCmsStream);
}
/**
* Проверка CAdES-подписи.
*
* @param cadesCmsStream Подпись для проверки.
* @throws Exception
*/
public static CAdESSignature verifyCAdESLongSignature(InputStream cadesCmsStream) throws Exception {
// Подпись в тесте была совмещенная, потому данные равны null.
// Предположим, что подписей несколько, тогда лучше указать
// тип null и положиться на самоопределение типа подписи.
CAdESSignature cadesSignature = new CAdESSignature(cadesCmsStream,
null, null);
Configuration.printSignatureInfo(cadesSignature); //на основе samples из пакета jcp
// Если известно, что в SignedData подписи есть сертификаты (т.е.
// config.getCertificateStore() != null), то не станем передавать
// сертификаты извне. Аналогично с CRL.
cadesSignature.verify(Collections.<X509Certificate>emptySet());
CAdESSigner[] signers = cadesSignature.getCAdESSignerInfos();
printCAdESSignersInfo(signers);
return cadesSignature;
}
Получаю: Код:
Signer #1 has 4 signed attributes.
Attribute
type : 1.2.840.113549.1.9.4
value: [#77df995037b94299352612f4ff9c5d10b0ba805a883cee1a8b709ee0fd09af96dae65bf10d7c1cd7ae73429dec492d197a2230594ba4d5b9904bee3b2cb575d6]
Attribute
type : 1.2.840.113549.1.9.3
value: [1.2.840.113549.1.7.1]
Attribute
type : 1.2.840.113549.1.9.5
value: [201103091245Z]
Attribute
type : 1.2.840.113549.1.9.16.2.47
value: [[[[[1.2.643.7.1.1.2.3], #8a6e4b22af62864ac2dc32c7e41b4a5a7647b9ddd65846622ebb74f3206843f8c8db1b930a54afad2949a846a78c911f252dec6c78067bf431be42c2fd40ba97, [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 401439114317973051847005919886044213755479831]]]]]
Signer #1 has 6 unsigned attributes.
Attribute
type : 1.2.840.113549.1.9.16.2.22
value: [[[[1][[[[[1][[[2.5.4.3, Тестовая служба OCSP на testca.cryptopro.ru]], [[2.5.4.10, ООО "КРИПТО-ПРО"]], [[2.5.4.7, Москва]], [[2.5.4.6, RU]]], org.bouncycastle.asn1.ASN1GeneralizedTime@29c14d45], [[1.2.643.7.1.1.2.3], #81fdf8ae0db1c8317bdad59d72834e6bf333bffc0f05a8f9037ba18e4a61b85f8e055eb4057e9e224e973f622e51c68e2c2b4d780061915af7b21d7c2e02d1bb]]]]], [], []]]
Attribute
type : 1.2.840.113549.1.9.16.2.21
value: [[[[[1.2.643.7.1.1.2.3], #0422d9bc1bd4bd1ecabcaf9daeb01046250f740e5b226701b270e6fa2723440b07cb3734df3bb689040130c1d61c02b23bbf266120b17854e58f2a749bccad09], [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 73447807847235878354139319198818691644]], [[[1.2.643.7.1.1.2.3], #00dc604c38d8691e303857ae8226b384194d4a15403219874778ffb2d3aed7c70681b81e52a2d46b951d1478ef306824d9cdf861bcbd59aec006b6cf8523b1a4], [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 401438737472894424309259344548925857646406549]]]]
Attribute
type : 1.2.840.113549.1.9.16.2.14
value: [[1.2.840.113549.1.7.2, [0][3, [[1.2.643.2.2.9, NULL]], [1.2.840.113549.1.9.16.1.4, [0]#30818602010106072a850302022604304e300a06082a8503070101020304405d3cb5e61d9074b37028e4b8f502972e80b4df467f39c5e0910b52c8515ea6ddedb6267b1dffc988bf5beaa9c61c6fcb6f7ed742888fb57978ad4a94352dc633020d1480cca1d300000000019c46f3180f32303230313130333039313430305a02085b451a6ef35138c1], [[1, [[[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], 401438737737134828223379574759451140943408072], [1.2.643.2.2.9, NULL], [0][[1.2.840.113549.1.9.3, [1.2.840.113549.1.9.16.1.4]], [1.2.840.113549.1.9.4, [#775f5b60e26ad5165f93752b5cea0e6348003029222eda64df32af09541a1d76]], [1.2.840.113549.1.9.16.2.12, [[[[#79595d49f4211ebf3b92106522354b06513f868b, [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 401438737737134828223379574759451140943408072]]]]]], [1.2.840.113549.1.9.16.2.47, [[[[[1.2.643.2.2.9], #4d24a9b2400ceb5390a6da6abf28a05af1c6de78e5a5e6115e6b2bd75dac2438, [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 401438737737134828223379574759451140943408072]]]]]]], [1.2.643.2.2.19, NULL], #71929ea3d45f4737925f91237a3df3406b9155ef9cb1634d1ad687a4507c78b727d5e6c39c7a1f561cab9df1b7344b8bafd908f887525807184b532af4805faf, [1][[1.2.840.113549.1.9.16.2.22, [[[[1][[[[[1][[[2.5.4.3, Тестовая служба OCSP на testca.cryptopro.ru]], [[2.5.4.10, ООО "КРИПТО-ПРО"]], [[2.5.4.7, Москва]], [[2.5.4.6, RU]]], org.bouncycastle.asn1.ASN1GeneralizedTime@29c14d45], [[1.2.643.7.1.1.2.3], #d9595fceb4048e8bafa968777328b5ba0759713b55663c2f6d476c4004fe4fd108a9c975ae5045a39b972d234328a9519726a267909d2390e901167be00a6d54]]]]], [], []]]], [1.2.840.113549.1.9.16.2.24, [[[1][[[[1][[[2.5.4.3, Тестовая служба OCSP на testca.cryptopro.ru]], [[2.5.4.10, ООО "КРИПТО-ПРО"]], [[2.5.4.7, Москва]], [[2.5.4.6, RU]]], org.bouncycastle.asn1.ASN1GeneralizedTime@29c14d45, [[[[1.2.643.2.2.9], #b744d5301505bd3d364acb4fa56d35fbc2947bdd8f4f99141e715a23d96feb88, #c7ee9bce242c859b530939417492874d9c346c51fc0ef81b796d61c500593f95, 401438737737134828223379574759451140943408072], [0]#, org.bouncycastle.asn1.ASN1GeneralizedTime@29c14d45, [1][[1.3.6.1.5.5.7.48.1.3, #3019a10402020152a211180f32303230313130323130343534315a]]]], [1][[1.3.6.1.5.5.7.48.1.2, #0408e45e1c598fbca774]]], [1.2.643.2.2.3], #034100CC30DABA4EE8E143BBAD2E07C2AD08C34E5FF0077208FC99B247B6ED346E38EBBA82CC8EA89DA1D93DCD7E56005243D9B8B20404C36C939E27B3123E08933D54]]]]], [1.2.840.113549.1.9.16.2.21, [[[[[1.2.643.7.1.1.2.3], #0422d9bc1bd4bd1ecabcaf9daeb01046250f740e5b226701b270e6fa2723440b07cb3734df3bb689040130c1d61c02b23bbf266120b17854e58f2a749bccad09], [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 73447807847235878354139319198818691644]], [[[1.2.643.7.1.1.2.3], #00dc604c38d8691e303857ae8226b384194d4a15403219874778ffb2d3aed7c70681b81e52a2d46b951d1478ef306824d9cdf861bcbd59aec006b6cf8523b1a4], [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 401438737472894424309259344548925857646406549]]]]], [1.2.840.113549.1.9.16.2.23, [[[[[0]2, 401438737737134828223379574759451140943408072, [1.2.643.2.2.3], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [201005073619Z, 240526073405Z], [[[2.5.4.6, RU]], [[2.5.4.10, ООО КРИПТО-ПРО]], [[2.5.4.3, Тестовая служба TSP на testca.cryptopro.ru]]], [[1.2.643.2.2.19, [1.2.643.2.2.35.1, 1.2.643.2.2.30.1]], #0343000440AFBC6581D26601A5E755BA354D787D98AF50167EA3ECE477938F9CDE135A5ED0FA1629ABED573D3B177C2F0FB2441B1A41877409392241D41320B3E58595D923], [3][[2.5.29.37, TRUE, #300a06082b06010505070308], [1.3.6.1.4.1.311.21.10, TRUE, #300c300a06082b06010505070308], [2.5.29.14, #041458d8e7982bf4b5a954fcb9aaa30d2340002d389d], [2.5.29.15, TRUE, #03020780], [2.5.29.35, #301680144e833e1469efec5d7a952b5f11fe37321649552b], [2.5.29.31, #30533051a04fa04d864b687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f43525950544f2d50524f2532305465737425323043656e746572253230322831292e63726c], [1.3.6.1.5.5.7.1.1, #30819c306406082b060105050730028658687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f746573742d63612d323031345f43525950544f2d50524f2532305465737425323043656e746572253230322831292e637274303406082b060105050730018628687474703a2f2f7465737463612e63727970746f70726f2e72752f6f6373702f6f6373702e737266]]], [1.2.643.2.2.3], #034100E627F8420AF69F417AAB75A1F16BE8D6F00F4F1A412B2C6E1720E73764F0EF42E66FBF40CEDB131063D63E2AB1D37879E466E2EC1595845B82E3BC20F545C3FC], [[[0]2, 73447807847235878354139319198818691644, [1.2.643.2.2.3], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [190527072426Z, 240526073405Z], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [[1.2.643.2.2.19, [1.2.643.2.2.35.1, 1.2.643.2.2.30.1]], #0343000440149F1604A8AB76513B9F623B91C4BCBCC9AC602C677AC34505EEE6A8CA2ED5EB7BC2F489813352B32BC7CAE06DCA04D62BB3D711FEC3C3D48DBC1B1BF37BC392], [3][[2.5.29.15, #03020186], [2.5.29.19, TRUE, #30030101ff], [2.5.29.14, #04144e833e1469efec5d7a952b5f11fe37321649552b], [1.3.6.1.4.1.311.21.1, #0203010001], [1.3.6.1.4.1.311.21.2, #0414046255290b0eb1cdd1797d9ab8c81f699e3687f3]]], [1.2.643.2.2.3], #034100C4C5B2D5B13B7FA1282A83EE7373F26AD0F6688E1D5F11755A7B75114F039F16E5EE3E255821529C3EEDFC4E0643F1F5415E2919670224BB23DDE4AE584A5A48], [[[0]2, 401438737472894424309259344548925857646406549, [1.2.643.2.2.3], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [201005072055Z, 240526073405Z], [[[2.5.4.3, Тестовая служба OCSP на testca.cryptopro.ru]], [[2.5.4.10, ООО "КРИПТО-ПРО"]], [[2.5.4.7, Москва]], [[2.5.4.6, RU]]], [[1.2.643.2.2.19, [1.2.643.2.2.35.1, 1.2.643.2.2.30.1]], #0343000440BF6C36C480312BDFC51B2004D8188919530A5E63642C2A54DA181F5C6A54C91DA2A0F843E6800780FEC7E1C44E9BD818A1D2A883B5B3070EC400633E70BB9A93], [3][[2.5.29.37, #300a06082b06010505070309], [2.5.29.32, #300a300806062a8503647101], [1.3.6.1.5.5.7.48.1.5, #0500], [2.5.29.15, TRUE, #030206c0], [2.5.29.14, #0414e217d454fc70f14772e2c0bb20a273ffa1abcb18], [2.5.29.35, #301680144e833e1469efec5d7a952b5f11fe37321649552b], [2.5.29.31, #30533051a04fa04d864b687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f43525950544f2d50524f2532305465737425323043656e746572253230322831292e63726c], [1.3.6.1.5.5.7.1.1, #30819c306406082b060105050730028658687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f746573742d63612d323031345f43525950544f2d50524f2532305465737425323043656e746572253230322831292e637274303406082b060105050730018628687474703a2f2f7465737463612e63727970746f70726f2e72752f6f6373702f6f6373702e737266]]], [1.2.643.2.2.3], #034100C9003CC5BA78C2AA0F14794F2AFC4440A6E22EF9633CCA8ECDFF3757049C5A46091A563967BF082D74B8033184E00E3C10400A19D3864E3E730481D25A5905FF]]]]]]]]]]
Attribute
type : 1.2.840.113549.1.9.16.2.25
value: [[1.2.840.113549.1.7.2, [0][3, [[1.2.643.2.2.9, NULL]], [1.2.840.113549.1.9.16.1.4, [0]#30818602010106072a850302022604304e300a06082a8503070101020304401aa2cf85c8d0a52c371e872cf13a1e6d18a89dd0c6426bf39fbba2b6504b327b686e42ad42c2fc5e35ef5ba06dc58224f6ac082ad3e3a9dd1262f3b2e526fd60020d1480cca1d300000000019c46f4180f32303230313130333039313430305a02084cbcaf1ed1f2795d], [0][[[0]2, 401438737737134828223379574759451140943408072, [1.2.643.2.2.3], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [201005073619Z, 240526073405Z], [[[2.5.4.6, RU]], [[2.5.4.10, ООО КРИПТО-ПРО]], [[2.5.4.3, Тестовая служба TSP на testca.cryptopro.ru]]], [[1.2.643.2.2.19, [1.2.643.2.2.35.1, 1.2.643.2.2.30.1]], #0343000440AFBC6581D26601A5E755BA354D787D98AF50167EA3ECE477938F9CDE135A5ED0FA1629ABED573D3B177C2F0FB2441B1A41877409392241D41320B3E58595D923], [3][[2.5.29.37, TRUE, #300a06082b06010505070308], [1.3.6.1.4.1.311.21.10, TRUE, #300c300a06082b06010505070308], [2.5.29.14, #041458d8e7982bf4b5a954fcb9aaa30d2340002d389d], [2.5.29.15, TRUE, #03020780], [2.5.29.35, #301680144e833e1469efec5d7a952b5f11fe37321649552b], [2.5.29.31, #30533051a04fa04d864b687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f43525950544f2d50524f2532305465737425323043656e746572253230322831292e63726c], [1.3.6.1.5.5.7.1.1, #30819c306406082b060105050730028658687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f746573742d63612d323031345f43525950544f2d50524f2532305465737425323043656e746572253230322831292e637274303406082b060105050730018628687474703a2f2f7465737463612e63727970746f70726f2e72752f6f6373702f6f6373702e737266]]], [1.2.643.2.2.3], #034100E627F8420AF69F417AAB75A1F16BE8D6F00F4F1A412B2C6E1720E73764F0EF42E66FBF40CEDB131063D63E2AB1D37879E466E2EC1595845B82E3BC20F545C3FC], [[1, [[[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], 401438737737134828223379574759451140943408072], [1.2.643.2.2.9, NULL], [0][[1.2.840.113549.1.9.3, [1.2.840.113549.1.9.16.1.4]], [1.2.840.113549.1.9.4, [#17f4c3587a9d5da5ec37771ea50c43bc5757998430d115f149129a8e4715da9e]], [1.2.840.113549.1.9.16.2.12, [[[[#79595d49f4211ebf3b92106522354b06513f868b, [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 401438737737134828223379574759451140943408072]]]]]], [1.2.840.113549.1.9.16.2.47, [[[[[1.2.643.2.2.9], #4d24a9b2400ceb5390a6da6abf28a05af1c6de78e5a5e6115e6b2bd75dac2438, [[[4][[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]]], 401438737737134828223379574759451140943408072]]]]]]], [1.2.643.2.2.19, NULL], #dfb53f6f6209aa6f538f8485838545f11553351d23d1a4371e648d603f94bb1c81b037c4d884f5e73c82193686bafc9cafa557f8f4be259e02cc01c523c42909]]]]]
Attribute
type : 1.2.840.113549.1.9.16.2.24
value: [[[1][[[[1][[[2.5.4.3, Тестовая служба OCSP на testca.cryptopro.ru]], [[2.5.4.10, ООО "КРИПТО-ПРО"]], [[2.5.4.7, Москва]], [[2.5.4.6, RU]]], org.bouncycastle.asn1.ASN1GeneralizedTime@29c14d45, [[[[1.2.643.2.2.9], #b744d5301505bd3d364acb4fa56d35fbc2947bdd8f4f99141e715a23d96feb88, #c7ee9bce242c859b530939417492874d9c346c51fc0ef81b796d61c500593f95, 401439114317973051847005919886044213755479831], [0]#, org.bouncycastle.asn1.ASN1GeneralizedTime@29c14d45, [1][[1.3.6.1.5.5.7.48.1.3, #3019a10402020152a211180f32303230313130323130343534315a]]]], [1][[1.3.6.1.5.5.7.48.1.2, #0408ba368e6e5aaae653]]], [1.2.643.2.2.3], #034100A75E20616130AC1468B72E2EF508208AF560D2BEBC35E9F499D92A9D4F1A29487DDBC899C4CEAB250A975CC3214D65A34046176A4828C7D8A2B04D5A79205D50]]]]
Attribute
type : 1.2.840.113549.1.9.16.2.23
value: [[[[[0]2, 401439114317973051847005919886044213755479831, [1.2.643.2.2.3], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [201103090324Z, 210203091324Z], [[[2.5.4.3, PETROV]]], [[1.2.643.7.1.1.1.2, [1.2.643.7.1.2.1.2.1, 1.2.643.7.1.1.2.3]], #03818400048180F79E3D0826AD3A28D865F1AA5768B67162A62FC45ABFD86809280B0E28851D04662342C3651317DD101E2DAC90C633B0433A2B79327F40C9FA271D1058CC5A712612A432071EDEC08F3EE00F6B12B8BE126695967EA99B550CC5F61D25DD1692198BBC59E3AD68652923463C31BE1F0723F8D9F14C4FC99C4D9CA12107A7A80D], [3][[2.5.29.15, TRUE, #030204f0], [2.5.29.37, #300a06082b06010505070302], [2.5.29.14, #0414b6a586dbbd56aa7d6109e34b4ee2b67785834496], [2.5.29.35, #301680144e833e1469efec5d7a952b5f11fe37321649552b], [2.5.29.31, #30533051a04fa04d864b687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f43525950544f2d50524f2532305465737425323043656e746572253230322831292e63726c], [1.3.6.1.5.5.7.1.1, #30819c306406082b060105050730028658687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f746573742d63612d323031345f43525950544f2d50524f2532305465737425323043656e746572253230322831292e637274303406082b060105050730018628687474703a2f2f7465737463612e63727970746f70726f2e72752f6f6373702f6f6373702e737266]]], [1.2.643.2.2.3], #034100F7F1B8DDD2C570A4EBAC0A0698450E92E25FAB6680CD2B53590E0DA06CE763664897A39D6152403717D220AEEF753F77B73FF117B74005D58F2570DADA0260A8], [[[0]2, 73447807847235878354139319198818691644, [1.2.643.2.2.3], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [190527072426Z, 240526073405Z], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [[1.2.643.2.2.19, [1.2.643.2.2.35.1, 1.2.643.2.2.30.1]], #0343000440149F1604A8AB76513B9F623B91C4BCBCC9AC602C677AC34505EEE6A8CA2ED5EB7BC2F489813352B32BC7CAE06DCA04D62BB3D711FEC3C3D48DBC1B1BF37BC392], [3][[2.5.29.15, #03020186], [2.5.29.19, TRUE, #30030101ff], [2.5.29.14, #04144e833e1469efec5d7a952b5f11fe37321649552b], [1.3.6.1.4.1.311.21.1, #0203010001], [1.3.6.1.4.1.311.21.2, #0414046255290b0eb1cdd1797d9ab8c81f699e3687f3]]], [1.2.643.2.2.3], #034100C4C5B2D5B13B7FA1282A83EE7373F26AD0F6688E1D5F11755A7B75114F039F16E5EE3E255821529C3EEDFC4E0643F1F5415E2919670224BB23DDE4AE584A5A48], [[[0]2, 401438737472894424309259344548925857646406549, [1.2.643.2.2.3], [[[1.2.840.113549.1.9.1, support@cryptopro.ru]], [[2.5.4.6, RU]], [[2.5.4.7, Moscow]], [[2.5.4.10, CRYPTO-PRO LLC]], [[2.5.4.3, CRYPTO-PRO Test Center 2]]], [201005072055Z, 240526073405Z], [[[2.5.4.3, Тестовая служба OCSP на testca.cryptopro.ru]], [[2.5.4.10, ООО "КРИПТО-ПРО"]], [[2.5.4.7, Москва]], [[2.5.4.6, RU]]], [[1.2.643.2.2.19, [1.2.643.2.2.35.1, 1.2.643.2.2.30.1]], #0343000440BF6C36C480312BDFC51B2004D8188919530A5E63642C2A54DA181F5C6A54C91DA2A0F843E6800780FEC7E1C44E9BD818A1D2A883B5B3070EC400633E70BB9A93], [3][[2.5.29.37, #300a06082b06010505070309], [2.5.29.32, #300a300806062a8503647101], [1.3.6.1.5.5.7.48.1.5, #0500], [2.5.29.15, TRUE, #030206c0], [2.5.29.14, #0414e217d454fc70f14772e2c0bb20a273ffa1abcb18], [2.5.29.35, #301680144e833e1469efec5d7a952b5f11fe37321649552b], [2.5.29.31, #30533051a04fa04d864b687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f43525950544f2d50524f2532305465737425323043656e746572253230322831292e63726c], [1.3.6.1.5.5.7.1.1, #30819c306406082b060105050730028658687474703a2f2f7465737463612e63727970746f70726f2e72752f43657274456e726f6c6c2f746573742d63612d323031345f43525950544f2d50524f2532305465737425323043656e746572253230322831292e637274303406082b060105050730018628687474703a2f2f7465737463612e63727970746f70726f2e72752f6f6373702f6f6373702e737266]]], [1.2.643.2.2.3], #034100C9003CC5BA78C2AA0F14794F2AFC4440A6E22EF9633CCA8ECDFF3757049C5A46091A563967BF082D74B8033184E00E3C10400A19D3864E3E730481D25A5905FF]]]
$$$ Print counter signature information $$$
Timestamp is invalid
Timestamp is invalid; error codes: [34] 'Timestamp is invalid', {Error building certification path for CN=Тестовая служба TSP на testca.cryptopro.ru, O=ООО КРИПТО-ПРО, C=RU: ru.CryptoPro.reprov.certpath.JCPCertPathBuilderException: unable to find valid certification path to requested target; error codes: [33] 'PKIX failure: invalid parameters of certificate', }
at ru.CryptoPro.CAdES.CAdESSignerXLT1Impl.f(Unknown Source)
at ru.CryptoPro.CAdES.CAdESSignerXLT1Impl.verify(Unknown Source)
at ru.CryptoPro.CAdES.cl_1.verify(Unknown Source)
Судя по всему, отсутствует обязательный таймстамп, т.к если распечатать информацию о подписантах printCAdESSignersInfo(signers) будет исключение; Код:
TimeStampToken signTimestamp = cAdESSignerXLT1.getEarliestValidSignatureTimeStampToken();
if (signTimestamp == null) {
throw new Exception("Signature timestamp is null");
} // if
Уточните, пожалуйста, должен ли таймстамп быть обязательным и если да, то почему он не генерится при подписывании? Можно ли это исправить?
|