Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
Добрый день. Мне нужно подключиться к Equifax по tls соединению. Адрес для отправки данных https://bki-b2b-test.equifax.ru/xml.phpЯ получил от клиента сертификат, установил его на машину. Вот его данные: Цитата:$ /opt/cprocsp/bin/amd64/certmgr -list -thumbprint 4b3e68---xxx---3fabaa Certmgr 1.1 (c) "Crypto-Pro", 2007-2018. program for managing certificates, CRLs and stores ============================================================================= 1------- Issuer : C=RU, L=Moscow, O=Equifax Credit Services LLC, CN=Equifax Credit Services CA Subject : C=RU, O="ООО", CN=С Д С, E=e@k.pro Serial : 0x01A8029DEC0142020104 SHA1 Hash : 4b3e68---xxx---3fabaa SubjKeyID : 1c23f6---xxx---fb6536 Signature Algorithm : ГОСТ Р 34.11-2012/34.10-2012 256 бит PublicKey Algorithm : ГОСТ Р 34.10-2012 (512 bits) Not valid before : 26/10/2020 10:22:19 UTC Not valid after : 26/10/2021 10:22:19 UTC PrivateKey Link : Yes Container : HDIMAGE\\\F926 Provider Name : Crypto-Pro GOST R 34.10-2012 KC1 CSP Provider Info : ProvType: 80, KeySpec: 1, Flags: 0x0 CA cert URL : http://www.e-notary.ru/c...dir/ca/equifax_llc_5.cerCDP : http://www.e-notary.ru/crl/crl_equifax_llc_5.crlExtended Key Usage : 1.3.6.1.5.5.7.3.2 1.3.6.1.5.5.7.3.4 ============================================================================= [ErrorCode: 0x00000000] Пытаюсь отправить данные по указанному адресу: Цитата:$ /opt/cprocsp/bin/amd64/curl -X POST -E 4b3e68---xxx---3fabaa -o /tmp/test_response_01.xml -v --header "Content-Type:application/octet-stream; charset=windows-1251" --trace-ascii /tmp/debugdump.tx t --data-binary @/tmp/testdata/test_request_01.xml.sign https://bki-b2b-test.equifax.ru/xml.phpWarning: --trace-ascii overrides an earlier trace/verbose option == Info: About to connect() to bki-b2b-test.equifax.ru port 443 (#0) == Info: Trying 37.16.85.163... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0== Info: connected == Info: Connected to bki-b2b-test.equifax.ru (37.16.85.163) port 443 (#0) == Info: Closing connection #0 == Info: Problem with the local SSL certificate curl: (58) Problem with the local SSL certificate Попробовал брать сертификат из файла: Цитата:$ /opt/cprocsp/bin/amd64/curl -X POST -E /tmp/fe880425.cer -o /tmp/test_response_01.xml -v --header "Content-Type:application/octet-stream; charset=windows-1251" --trace-ascii /tmp/debugdump.txt --data-binary @/tmp/testdata/test_request_01.xml.sign https://bki-b2b-test.equifax.ru/xml.phpWarning: --trace-ascii overrides an earlier trace/verbose option == Info: About to connect() to bki-b2b-test.equifax.ru port 443 (#0) == Info: Trying 37.16.85.163... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0== Info: connected == Info: Connected to bki-b2b-test.equifax.ru (37.16.85.163) port 443 (#0) == Info: Closing connection #0 == Info: Problem with the local SSL certificate curl: (58) Problem with the local SSL certificate Подскажите, как понять, что не так с сертификатом? Отредактировано пользователем 28 декабря 2020 г. 15:11:45(UTC)
| Причина: правка команды
|
|
|
|
Статус: Сотрудник
Группы: Администраторы, Участники Зарегистрирован: 16.04.2008(UTC) Сообщений: 1,499
Сказал(а) «Спасибо»: 42 раз Поблагодарили: 607 раз в 420 постах
|
Здравствуйте. А что выдают Код:rpm -qa|grep cprocsp
dpkg -l|grep cprocsp
/opt/cprocsp/bin/amd64/csptestf -keyset -verifyco -info
/opt/cprocsp/bin/amd64/csptestf -tlsc -v -server bki-b2b-test.equifax.ru -file xml.php -nosave
|
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
Добрый день. Вот как-то так: Цитата:root@cf:/# rpm -qa|grep cprocsp root@cf:/# root@cf:/# root@cf:/# dpkg -l|grep cprocsp ii cprocsp-curl-64 4.0.9963-5 amd64 CryptoPro Curl shared library and binaris. Build 9963. ii cprocsp-rsa-64 4.0.9963-5 amd64 CryptoPro RSA CSP. Build 9963. ii cprocsp-stunnel-64 4.0.9963-5 amd64 Universal SSL/TLS tunnel. ii lsb-cprocsp-base 4.0.9963-5 all CryptoPro CSP directories and scripts. Build 9963. ii lsb-cprocsp-ca-certs 4.0.9963-5 all CA certificates. Build 9963. ii lsb-cprocsp-capilite-64 4.0.9963-5 amd64 CryptoAPI lite. Build 9963. ii lsb-cprocsp-kc1-64 4.0.9963-5 amd64 CryptoPro CSP KC1. Build 9963. ii lsb-cprocsp-rdr-64 4.0.9963-5 amd64 CryptoPro CSP readers. Build 9963. root@cf:/# root@cf:/# root@cf:/# /opt/cprocsp/bin/amd64/csptestf -keyset -verifyco -info CSP (Type:80) v4.0.9019 KC1 Release Ver:4.0.9963 OS:Linux CPU:AMD64 FastCode:READY:AVX. AcquireContext: OK. HCRYPTPROV: 35288659 GetProvParam(PP_NAME): Crypto-Pro GOST R 34.10-2012 KC1 CSP
CSP algorithms info: Type:Encrypt Name:'GOST 28147-89'(14) Long:'GOST 28147-89'(14) DefaultLen:256 MinLen:256 MaxLen:256 Prot:0 Algid:00026142
Type:Hash Name:'GR 34.11-2012 256'(18) Long:'GOST R 34.11-2012 256'(22) DefaultLen:256 MinLen:256 MaxLen:256 Prot:0 Algid:00032801
Type:Signature Name:'GR 34.10-2012 256'(18) Long:'GOST R 34.10-2012 256'(22) DefaultLen:512 MinLen:512 MaxLen:512 Prot:0 Algid:00011849
Type:Exchange Name:'DH 34.10-2012 256'(18) Long:'GOST R 34.10-2012 256 DH'(25) DefaultLen:512 MinLen:512 MaxLen:512 Prot:0 Algid:00043590
Type:Exchange Name:'DH 34.10-2012 256'(18) Long:'GOST R 34.10-2012 256 DH'(25) DefaultLen:512 MinLen:512 MaxLen:512 Prot:0 Algid:00043591
Type:Hash Name:'HMAC GOST 28147-89'(19) Long:'HMAC GOST 28147-89'(19) DefaultLen:32 MinLen:32 MaxLen:32 Prot:0 Algid:00032799
Status: Provider handles used: 1 Provider handles max: 1048576 CPU Usage: 13 % CPU Usage by CSP: 0 % Measurement interval: 101 ms
Virtual memory used: 9340428 KB Virtual memory used by CSP: 60044 KB Free virtual memory: 24023696 KB Total virtual memory: 33364124 KB
Physical memory used: 9340428 KB Physical memory used by CSP: 15188 KB Free physical memory: 16683664 KB Total physical memory: 26024092 KB
Total: SYS: 0.000 sec USR: 0.010 sec UTC: 0.110 sec [ErrorCode: 0x00000000] root@cf:/# root@cf:/# root@cf:/# /opt/cprocsp/bin/amd64/csptestf -tlsc -v -server bki-b2b-test.equifax.ru -file xml.php -nosave 8 algorithms supported: Aglid Class OID [00] 0x661e 0x6000 1.2.643.2.2.21 (ГОСТ 28147-89) [01] 0x801e 0x8000 1.2.643.2.2.3 (ГОСТ Р 34.11/34.10-2001) [02] 0x8021 0x8000 1.2.643.7.1.1.2.2 (ГОСТ Р 34.11-2012 256 бит) [03] 0x801f 0x8000 [04] 0x2e1e 0x2000 1.2.643.2.2.20 (ГОСТ Р 34.10-94) [05] 0x2e23 0x2000 1.2.643.2.2.19 (ГОСТ Р 34.10-2001) [06] 0x2e49 0x2000 1.2.643.7.1.1.1.1 (ГОСТ Р 34.10-2012) [07] 0x2e3d 0x2000 1.2.643.7.1.1.1.2 (ГОСТ Р 34.10-2012) Cipher strengths: 256..256 Supported protocols: 0xa80: Transport Layer Security 1.0 client side Transport Layer Security 1.1 client side Transport Layer Security 1.2 client side dwProtocolMask: 0x800a0aaa Protocol version: 3.3 ClientHello: RecordLayer: TLS, Len: 110 Cipher Suites: (ff 85) (00 81) (00 32) (00 31) 115 bytes of handshake data sent 7 bytes of handshake data received **** Error 0xffffffff80090326 returned by InitializeSecurityContext (2) An error occurred in running the program. /dailybuildsbranches/CSP_4_0/CSPbuild/CSP/samples/csptest/WebClient.c:628:Error performing handshake. Error number 0x80090326 (2148074278). The message received was unexpected or badly formatted. Total: SYS: 0.000 sec USR: 0.060 sec UTC: 0.180 sec [ErrorCode: 0x80090326]
|
|
|
|
Статус: Сотрудник
Группы: Администраторы, Участники Зарегистрирован: 16.04.2008(UTC) Сообщений: 1,499
Сказал(а) «Спасибо»: 42 раз Поблагодарили: 607 раз в 420 постах
|
У вас на стороне сервера RSA TLS, поэтому * CSP 4.0 не годится - нужен CSP 5.0 * вы пишете, что вам дали сертификат и ключ для доступа, но они по ГОСТ и тоже не подойдут Отредактировано пользователем 29 декабря 2020 г. 0:23:22(UTC)
| Причина: Не указана |
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
Спасибо. Если не сложно, подскажите, где в приведенных листингах видно, что "на стороне сервера RSA TLS", а не ГОСТ ? И второй вопрос: Если у нас уже куплена серверная лицензия на 4 версию, нам для 5 версии нужно опять ее покупать? Отредактировано пользователем 29 декабря 2020 г. 10:41:03(UTC)
| Причина: добавлен вопрос
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
На всякий случай вот вариант вывода команд для 5 версии: Цитата:$ dpkg -l|grep cprocsp ii cprocsp-curl-64 5.0.11455-5 amd64 CryptoPro Curl shared library and binaris. Build 11455. ii cprocsp-rsa-64 5.0.11455-5 amd64 CryptoPro RSA CSP. Build 11455. ii cprocsp-stunnel-64 5.0.11455-5 amd64 Universal SSL/TLS tunnel. ii lsb-cprocsp-base 5.0.11455-5 all CryptoPro CSP directories and scripts. Build 11455. ii lsb-cprocsp-ca-certs 5.0.11455-5 all CA certificates. Build 11455. ii lsb-cprocsp-capilite-64 5.0.11455-5 amd64 CryptoAPI lite. Build 11455. ii lsb-cprocsp-kc1-64 5.0.11455-5 amd64 CryptoPro CSP KC1. Build 11455. ii lsb-cprocsp-rdr-64 5.0.11455-5 amd64 CryptoPro CSP readers. Build 11455. $ $ $ /opt/cprocsp/bin/amd64/csptestf -keyset -verifyco -info CSP (Type:80) v5.0.10003 KC1 Release Ver:5.0.11455 OS:Linux CPU:AMD64 FastCode:READY:AVX. AcquireContext: OK. HCRYPTPROV: 17415683 GetProvParam(PP_NAME): Crypto-Pro GOST R 34.10-2012 KC1 CSP
CSP algorithms info: Type:Encrypt Name:'GOST 28147-89'(14) Long:'GOST 28147-89'(14) DefaultLen:256 MinLen:256 MaxLen:256 Prot:0 Algid:00026142
Type:Hash Name:'GR 34.11-2012 256'(18) Long:'GOST R 34.11-2012 256'(22) DefaultLen:256 MinLen:256 MaxLen:256 Prot:0 Algid:00032801
Type:Signature Name:'GR 34.10-2012 256'(18) Long:'GOST R 34.10-2012 256'(22) DefaultLen:512 MinLen:512 MaxLen:512 Prot:0 Algid:00011849
Type:Exchange Name:'DH 34.10-2012 256'(18) Long:'GOST R 34.10-2012 256 DH'(25) DefaultLen:512 MinLen:512 MaxLen:512 Prot:0 Algid:00043590
Type:Exchange Name:'DH 34.10-2012 256'(18) Long:'GOST R 34.10-2012 256 DH'(25) DefaultLen:512 MinLen:512 MaxLen:512 Prot:0 Algid:00043591
Type:Hash Name:'GOST 28147-89 MAC'(18) Long:'GOST 28147-89 MAC'(18) DefaultLen:32 MinLen:8 MaxLen:32 Prot:0 Algid:00032799
Type:Hash Name:'GR34.11-12 256 HMAC'(20) Long:'GOST R 34.11-2012 256 HMAC'(27) DefaultLen:256 MinLen:256 MaxLen:256 Prot:0 Algid:00032820
Status: ControlKeyTimeValidity: 1
Provider handles used: 1 Provider handles max: 1048576 CPU Usage: 25 % CPU Usage by CSP: 0 % Measurement interval: 100 ms
Virtual memory used: 9801544 KB Virtual memory used by CSP: 38892 KB Free virtual memory: 23562580 KB Total virtual memory: 33364124 KB
Physical memory used: 9801544 KB Physical memory used by CSP: 7088 KB Free physical memory: 16222548 KB Total physical memory: 26024092 KB
Total: SYS: 0.000 sec USR: 0.000 sec UTC: 0.100 sec [ErrorCode: 0x00000000] $ $ $ /opt/cprocsp/bin/amd64/csptestf -tlsc -v -server bki-b2b-test.equifax.ru -file xml.php -nosave 11 algorithms supported: Aglid Class OID [00] 0x661e 0x6000 1.2.643.2.2.21 (ГОСТ 28147-89) [01] 0x6631 0x6000 1.2.643.7.1.1.5.2.1 (ГОСТ Р 34.12-2015 Кузнечик CTR-ACPKM) [02] 0x6630 0x6000 1.2.643.7.1.1.5.1.1 (ГОСТ Р 34.12-2015 Магма CTR-ACPKM) [03] 0x801e 0x8000 1.2.643.2.2.3 (ГОСТ Р 34.11/34.10-2001) [04] 0x8021 0x8000 1.2.643.7.1.1.2.2 (ГОСТ Р 34.11-2012 256 бит) [05] 0x801f 0x8000 [06] 0x803d 0x8000 [07] 0x803c 0x8000 [08] 0x2e23 0x2000 1.2.643.2.2.19 (ГОСТ Р 34.10-2001) [09] 0x2e49 0x2000 1.2.643.7.1.1.1.1 (ГОСТ Р 34.10-2012) [10] 0x2e3d 0x2000 1.2.643.7.1.1.1.2 (ГОСТ Р 34.10-2012) Cipher strengths: 256..256 Supported protocols: 0xa80: Transport Layer Security 1.0 client side Transport Layer Security 1.1 client side Transport Layer Security 1.2 client side dwProtocolMask: 0x800e2aaa Protocol version: 3.3 ClientHello: RecordLayer: TLS, Len: 122 SessionId: (empty) Cipher Suites: (ff 85) (00 81) (00 3d) (00 3c) (00 35) (00 2f) (00 0a) 127 bytes of handshake data sent 7 bytes of handshake data received **** Error 0xffffffff80090326 returned by InitializeSecurityContext (2) An error occurred in running the program. /dailybuildsbranches/CSP_5_0r0/CSPbuild/CSP/samples/csptest/WebClient.c:672:Error performing handshake. Error number 0x80090326 (2148074278). The message received was unexpected or badly formatted. Total: SYS: 0.020 sec USR: 0.030 sec UTC: 0.550 sec [ErrorCode: 0x80090326]
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
Цитата:$ /opt/cprocsp/bin/amd64/curl -X POST --cert /tmp/tls_cert_2020/cert.pem -o /tmp/test_response_01.xml -v --header "Content-Type:application/octet-stream; charset=windows-1251" --trace-ascii tmp/debugdump.txt --data-binary @/tmp/testdata/test_request_01.xml.sign https://bki-b2b-test.equifax.ru/xml.phpWarning: --trace-ascii overrides an earlier trace/verbose option % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (58) Problem with the local SSL certificate Вот вроде поставил сертификат для tls , но все равно проблема. Может там где-то нужно и приватный ключик указать?
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
Добавил приватный ключ и пароль к нему: Цитата:/opt/cprocsp/bin/amd64/curl -X POST --cert /tmp/tls_cert_2020/cert.pem --key /tmp/tls_cert_2020/key.pem --pass XxxxxxN -o /tmp/test_response_01.xml -v --header "Content-Type:application/octet-stream; charset=windows-1251" --trace-ascii /tmp/debugdump.txt --data-binary @/tmp/testdata/test_request_01.xml.sign https://bki-b2b-test.equifax.ru/xml.phpWarning: --trace-ascii overrides an earlier trace/verbose option % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (58) Problem with the local SSL certificate
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
Файл сертификата выглядит так: Цитата:-----BEGIN CERTIFICATE----- MIIFQzCCAyugAwIBAgICBAowDQYJKoZIhvcNAQELBQAwWjELMAkGA1UEBhMCUlUx ....................... sJhB1mjeAA== -----END CERTIFICATE----- Файл приватного ключика вот так: Цитата:-----BEGIN ENCRYPTED PRIVATE KEY----- MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIOT7i51vKpzUCAggA ............................. hyxiX6YcGMgXOLC06QioQw== -----END ENCRYPTED PRIVATE KEY-----
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 12.04.2020(UTC) Сообщений: 34  Откуда: Moscow
|
Посмотрел, пароль подходит к приватному ключу: Цитата:$ openssl rsa -in /tmp/tls_cert_2020/key.pem -text -noout Enter pass phrase for /tmp/tls_cert_2020/key.pem: RSA Private-Key: (2048 bit, 2 primes) modulus: 00:d1:............................. ............................... 03:d7 publicExponent: xxxxx (0xaaaaa) privateExponent: 35:3b:............................... ............................... prime1: 00:fc:............................... ............................... prime2: 00:d4:............................... ............................... exponent1: 00:f3:............................... ............................... exponent2: 2f:64:............................... ............................... coefficient: 4a:51:............................... ............................... На всякий случай убрал пароль и пробоал с приватным ключом без пароля - такая же ошибка.
|
|
|
|
Быстрый переход
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.
Important Information:
The Форум КриптоПро uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close