Ключевое слово в защите информации
КЛЮЧЕВОЕ СЛОВО
в защите информации
Получить ГОСТ TLS-сертификат для домена (SSL-сертификат)
Добро пожаловать, Гость! Чтобы использовать все возможности Вход или Регистрация.

Уведомление

Icon
Error

Опции
К последнему сообщению К первому непрочитанному
Offline romochka  
#1 Оставлено : 6 августа 2019 г. 17:11:58(UTC)
romochka

Статус: Новичок

Группы: Участники
Зарегистрирован: 06.08.2019(UTC)
Сообщений: 2
Российская Федерация
Откуда: СПб

Здравствуйте. Столкнулся с проблемой, что подпись сформированная с помощью плагина КриптоПро тут: https://www.cryptopro.ru...des/demopage/simple.html
не может быть успешно обработана.
Ошибка происходит в коде, который приведен в качестве примеров работы с крипто про

CAdESSignature cades = new CAdESSignature(signature, content, null);
cades.verify(trusted);

Не создается объект
new CAdESSignature(signature, content, null)
* конвертация из Base64 призведена

Ошибка приведена ниже в деталях.

crypto pro jcp: 2.0.40132-A
java: jdk-10.0.2

данный для подписи: Hello World
подпись, сформированная тут https://www.cryptopro.ru...des/demopage/simple.html

MIIImwYJKoZIhvcNAQcCoIIIjDCCCIgCAQExDDAKBgYqhQMCAgkFADAlBgkqhkiG9w0BBwGgGAQW
SABlAGwAbABvACAAVwBvAHIAbABkAKCCBfowggJzMIICIqADAgECAhA3QYiC9TmlkkrUTj3gAuo8
MAgGBiqFAwICAzB/MSMwIQYJKoZIhvcNAQkBFhRzdXBwb3J0QGNyeXB0b3Byby5ydTELMAkGA1UE
BhMCUlUxDzANBgNVBAcTBk1vc2NvdzEXMBUGA1UEChMOQ1JZUFRPLVBSTyBMTEMxITAfBgNVBAMT
GENSWVBUTy1QUk8gVGVzdCBDZW50ZXIgMjAeFw0xOTA1MjcwNzI0MjZaFw0yNDA1MjYwNzM0MDVa
MH8xIzAhBgkqhkiG9w0BCQEWFHN1cHBvcnRAY3J5cHRvcHJvLnJ1MQswCQYDVQQGEwJSVTEPMA0G
A1UEBxMGTW9zY293MRcwFQYDVQQKEw5DUllQVE8tUFJPIExMQzEh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Bk+ziIFmJKEKyYwgZwwgYSkgYEwfzEjMCEGCSqGSIb3DQEJ
ARYUc3VwcG9ydEBjcnlwdG9wcm8ucnUxCzAJBgNVBAYTAlJVMQ8wDQYDVQQHEwZNb3Njb3cxFzAV
BgNVBAoTDkNSWVBUTy1QUk8gTExDMSEwHwYDVQQDExhDUllQVE8tUFJPIFRlc3QgQ2VudGVyIDIC
ExIAOYll5Svcft+CwX4AAQA5iWUwCgYGKoUDAgITBQAEQJx7ttHxwZGyg+281rN+WqSaWu0yPUyn
Hh50pMAKXDdfae8VvIux6yh7Luori2ygJBIFCH/XMTFNG8OZe1KfESY=


Ошибка:
Caused by: java.lang.ClassCastException: org.bouncycastle.asn1.DERApplicationSpecific cannot be cast to org.bouncycastle.asn1.ASN1SequenceParser

Unexpected object reading content.; error codes: [-2] 'Application error',
at ru.CryptoPro.CAdES.CAdESSignature.<init>(Unknown Source)
at ru.CryptoPro.CAdES.CAdESSignature.<init>(Unknown Source)
at ru.CryptoPro.CAdES.CAdESSignature.<init>(Unknown Source)
...
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:106)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: org.bouncycastle.cms.CMSException: Unexpected object reading content.
at org.bouncycastle.cms.CMSContentInfoParser.<init>(Unknown Source)
at org.bouncycastle.cms.CMSSignedDataParser.<init>(Unknown Source)
... 52 more
Caused by: java.lang.ClassCastException: org.bouncycastle.asn1.DERApplicationSpecific cannot be cast to org.bouncycastle.asn1.ASN1SequenceParser
... 54 more

Сертификат:
MIIDfzCCAy6gAwIBAgITEgA5iWXlK9x+34LBfgABADmJZTAIBgYqhQMCAgMwfzEj
MCEGCSqGSIb3DQEJARYUc3VwcG9ydEBjcnlwdG9wcm8ucnUxCzAJBgNVBAYTAlJV
MQ8wDQYDVQQHEwZNb3Njb3cxFzAVBgNVBAoTDkNSWVBUTy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 августа 2019 г. 16:03:53(UTC)
Евгений Афанасьев

Статус: Сотрудник

Группы: Участники
Зарегистрирован: 06.12.2008(UTC)
Сообщений: 4,006
Российская Федерация
Откуда: Крипто-Про

Сказал(а) «Спасибо»: 21 раз
Поблагодарили: 715 раз в 675 постах
Здравствуйте.
Проблему воспроизвести не удалось.
Проверьте, что используются только библиотеки
bcpkix-jdk15on-1.60.jar
bcprov-jdk15on-1.60.jar
и нет других их версий, а также то, что их классы загружаются в единственном экземпляре (а не несколькими загрузчиками классов).
Корневой сертификат тестового УЦ добавлен в cacerts.
Пример проверки:
Код:

import ru.CryptoPro.CAdES.CAdESSignature;
import ru.CryptoPro.Crypto.CryptoProvider;
import ru.CryptoPro.JCP.JCP;
import ru.CryptoPro.JCP.tools.Decoder;
import ru.CryptoPro.reprov.RevCheck;
import java.io.ByteArrayInputStream;
import java.security.Security;

public class CAdESCheck {

    public static void main(String[] args) throws Exception {

        Security.addProvider(new JCP());
        Security.addProvider(new CryptoProvider());
        Security.addProvider(new RevCheck());

        String SIG_B64 =
                "MIIImwYJKoZIhvcNAQcCoIIIjDCCCIgCAQExDDAKBgYqhQMCAgkFADAlBgkqhkiG9w0BBwGgGAQW\n" +
                "SABlAGwAbABvACAAVwBvAHIAbABkAKCCBfowggJzMIICIqADAgECAhA3QYiC9TmlkkrUTj3gAuo8\n" +
                "MAgGBiqFAwICAzB/MSMwIQYJKoZIhvcNAQkBFhRzdXBwb3J0QGNyeXB0b3Byby5ydTELMAkGA1UE\n" +
                "BhMCUlUxDzANBgNVBAcTBk1vc2NvdzEXMBUGA1UEChMOQ1JZUFRPLVBSTyBMTEMxITAfBgNVBAMT\n" +
                "GENSWVBUTy1QUk8gVGVzdCBDZW50ZXIgMjAeFw0xOTA1MjcwNzI0MjZaFw0yNDA1MjYwNzM0MDVa\n" +
                "MH8xIzAhBgkqhkiG9w0BCQEWFHN1cHBvcnRAY3J5cHRvcHJvLnJ1MQswCQYDVQQGEwJSVTEPMA0G\n" +
                "A1UEBxMGTW9zY293MRcwFQYDVQQKEw5DUllQVE8tUFJPIExMQzEhMB8GA1UEAxMYQ1JZUFRPLVBS\n" +
                "TyBUZXN0IENlbnRlciAyMGMwHAYGKoUDAgITMBIGByqFAwICIwEGByqFAwICHgEDQwAEQBSfFgSo\n" +
                "q3ZRO59iO5HEvLzJrGAsZ3rDRQXu5qjKLtXre8L0iYEzUrMrx8rgbcoE1iuz1xH+w8PUjbwbG/N7\n" +
                "w5KjeDB2MAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBROgz4Uae/sXXqV\n" +
                "K18R/jcyFklVKzASBgkrBgEEAYI3FQEEBQIDAQABMCMGCSsGAQQBgjcVAgQWBBQEYlUpCw6xzdF5\n" +
                "fZq4yB9pnjaH8zAIBgYqhQMCAgMDQQDExbLVsTt/oSgqg+5zc/Jq0PZojh1fEXVae3URTwOfFuXu\n" +
                "PiVYIVKcPu38TgZD8fVBXikZZwIkuyPd5K5YSlpIMIIDfzCCAy6gAwIBAgITEgA5iWXlK9x+34LB\n" +
                "fgABADmJZTAIBgYqhQMCAgMwfzEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBjcnlwdG9wcm8ucnUx\n" +
                "CzAJBgNVBAYTAlJVMQ8wDQYDVQQHEwZNb3Njb3cxFzAVBgNVBAoTDkNSWVBUTy1QUk8gTExDMSEw\n" +
                "HwYDVQQDExhDUllQVE8tUFJPIFRlc3QgQ2VudGVyIDIwHhcNMTkwODA2MTA0NDQ1WhcNMTkxMTA2\n" +
                "MTA1NDQ1WjCBhjEjMCEGCSqGSIb3DQEJARYUci5hbHQuY3RybEBnbWFpbC5jb20xEzARBgNVBAMM\n" +
                "CtCg0L7QvNCw0L0xDzANBgNVBAsMBtCt0KLQnzEMMAoGA1UECgwDQklBMQ8wDQYDVQQHDAbQodCf\n" +
                "0JExDTALBgNVBAgMBNCb0J4xCzAJBgNVBAYTAlJVMGMwHAYGKoUDAgITMBIGByqFAwICJAAGByqF\n" +
                "AwICHgEDQwAEQEnPhDNaFvrof9B5Mue/GISOlLCWIt/7OWwz1jMtjITovLUNVYQDcgmzwWrulAmB\n" +
                "5RRTPckoKmVeRz8623Hyz2+jggF3MIIBczAPBgNVHQ8BAf8EBQMDB/AAMBMGA1UdJQQMMAoGCCsG\n" +
                "AQUFBwMCMB0GA1UdDgQWBBQdAEKb832VlsBl4TS9/3M0ndnZCzAfBgNVHSMEGDAWgBROgz4Uae/s\n" +
                "XXqVK18R/jcyFklVKzBcBgNVHR8EVTBTMFGgT6BNhktodHRwOi8vdGVzdGNhLmNyeXB0b3Byby5y\n" +
                "dS9DZXJ0RW5yb2xsL0NSWVBUTy1QUk8lMjBUZXN0JTIwQ2VudGVyJTIwMigxKS5jcmwwgawGCCsG\n" +
                "AQUFBwEBBIGfMIGcMGQGCCsGAQUFBzAChlhodHRwOi8vdGVzdGNhLmNyeXB0b3Byby5ydS9DZXJ0\n" +
                "RW5yb2xsL3Rlc3QtY2EtMjAxNF9DUllQVE8tUFJPJTIwVGVzdCUyMENlbnRlciUyMDIoMSkuY3J0\n" +
                "MDQGCCsGAQUFBzABhihodHRwOi8vdGVzdGNhLmNyeXB0b3Byby5ydS9vY3NwL29jc3Auc3JmMAgG\n" +
                "BiqFAwICAwNBAAG/wznJhgavDoc9mMJd9vxhkYKsxzs6bVK28Oczd1+PLJ2mPVUKvVVmP3IBWlq7\n" +
                "3GIkz8fX7HEpC7krWtVNGgkxggJOMIICSgIBATCBljB/MSMwIQYJKoZIhvcNAQkBFhRzdXBwb3J0\n" +
                "QGNyeXB0b3Byby5ydTELMAkGA1UEBhMCUlUxDzANBgNVBAcTBk1vc2NvdzEXMBUGA1UEChMOQ1JZ\n" +
                "UFRPLVBSTyBMTEMxITAfBgNVBAMTGENSWVBUTy1QUk8gVGVzdCBDZW50ZXIgMgITEgA5iWXlK9x+\n" +
                "34LBfgABADmJZTAKBgYqhQMCAgkFAKCCAVAwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq\n" +
                "hkiG9w0BCQUxDxcNMTkwODA2MTIyMDE1WjAvBgkqhkiG9w0BCQQxIgQgm1AIi35HPz6R1QqkOvrk\n" +
                "9KcAHyN/BmpaD94UDLrzlX0wgeQGCyqGSIb3DQEJEAIvMYHUMIHRMIHOMIHLMAgGBiqFAwICCQQg\n" +
                "oIBrt1ievbEVh9+yQrXn3Z2XWgPb0Bk+ziIFmJKEKyYwgZwwgYSkgYEwfzEjMCEGCSqGSIb3DQEJ\n" +
                "ARYUc3VwcG9ydEBjcnlwdG9wcm8ucnUxCzAJBgNVBAYTAlJVMQ8wDQYDVQQHEwZNb3Njb3cxFzAV\n" +
                "BgNVBAoTDkNSWVBUTy1QUk8gTExDMSEwHwYDVQQDExhDUllQVE8tUFJPIFRlc3QgQ2VudGVyIDIC\n" +
                "ExIAOYll5Svcft+CwX4AAQA5iWUwCgYGKoUDAgITBQAEQJx7ttHxwZGyg+281rN+WqSaWu0yPUyn\n" +
                "Hh50pMAKXDdfae8VvIux6yh7Luori2ygJBIFCH/XMTFNG8OZe1KfESY=";

        byte[] DATA = "Hello World".getBytes("UTF-16LE");
        byte[] SIGN = (new Decoder()).decodeBuffer(new ByteArrayInputStream(SIG_B64.getBytes()));

        System.setProperty("com.sun.security.enableCRLDP", "true"); // проверка цепочки с использованием CRLDP сертификата

        CAdESSignature cAdESSignature = new CAdESSignature(SIGN, DATA, null);
        cAdESSignature.verify(null);

    }

}
RSS Лента  Atom Лента
Пользователи, просматривающие эту тему
Guest
Быстрый переход  
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.