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

Уведомление

Icon
Error

Опции
К последнему сообщению К первому непрочитанному
Offline gkarpov  
#1 Оставлено : 28 февраля 2025 г. 15:37:03(UTC)
gkarpov

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

Группы: Участники
Зарегистрирован: 27.02.2025(UTC)
Сообщений: 7

Не могу подключить stunnel к ГИИС ДМДК (195.209.130.9) на Server 2012 R2.
лог stunnel
Цитата:
2025.02.28 15:16:44 LOG7[14028:6760]: client start
2025.02.28 15:16:44 LOG7[14028:6760]: https started
2025.02.28 15:16:44 LOG7[14028:6760]: FD 1092 in non-blocking mode
2025.02.28 15:16:44 LOG7[14028:6760]: TCP_NODELAY option set on local socket
2025.02.28 15:16:44 LOG5[14028:6760]: https connected from 127.0.0.1:25282
2025.02.28 15:16:44 LOG7[14028:6760]: FD 1108 in non-blocking mode
2025.02.28 15:16:44 LOG7[14028:6760]: https connecting
2025.02.28 15:16:44 LOG7[14028:6760]: connect_wait: waiting 10 seconds
2025.02.28 15:16:44 LOG7[14028:6760]: connect_wait: connected
2025.02.28 15:16:44 LOG7[14028:6760]: Remote FD=1108 initialized
2025.02.28 15:16:44 LOG7[14028:6760]: TCP_NODELAY option set on remote socket
2025.02.28 15:16:44 LOG7[14028:6760]: start SSPI connect
2025.02.28 15:16:44 LOG5[14028:6760]: try to read the client certificate
2025.02.28 15:16:44 LOG7[14028:6760]: open file C:\stunnel\clicer.cer with certificate
2025.02.28 15:16:44 LOG3[14028:6760]: Credentials complete
2025.02.28 15:16:44 LOG7[14028:6760]: 101 bytes of handshake data sent
2025.02.28 15:16:44 LOG5[14028:6760]: 5507 bytes of handshake(in handshake loop) data received.
2025.02.28 15:16:44 LOG5[14028:6760]: 2902 bytes of handshake data sent
2025.02.28 15:16:44 LOG3[14028:6760]: **** Error 10054 reading data from server
2025.02.28 15:16:44 LOG3[14028:6760]: Error performing handshake
2025.02.28 15:16:44 LOG5[14028:6760]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2025.02.28 15:16:44 LOG7[14028:6760]: free Buffers
2025.02.28 15:16:44 LOG7[14028:6760]: delete c->hContext
2025.02.28 15:16:44 LOG7[14028:6760]: delete c->hClientCreds
2025.02.28 15:16:44 LOG5[14028:6760]: incomp_mess = 0, extra_data = 0
2025.02.28 15:16:44 LOG7[14028:6760]: https finished (0 left)
2025.02.28 15:16:44 LOG7[14028:440]: https accepted FD=1120 from 127.0.0.1:25284
2025.02.28 15:16:44 LOG7[14028:440]: Creating a new thread
2025.02.28 15:16:44 LOG7[14028:440]: New thread created
2025.02.28 15:16:44 LOG7[14028:23156]: client start
2025.02.28 15:16:44 LOG7[14028:23156]: https started
2025.02.28 15:16:44 LOG7[14028:23156]: FD 1120 in non-blocking mode
2025.02.28 15:16:44 LOG7[14028:23156]: TCP_NODELAY option set on local socket
2025.02.28 15:16:44 LOG5[14028:23156]: https connected from 127.0.0.1:25284
2025.02.28 15:16:44 LOG7[14028:23156]: FD 1028 in non-blocking mode
2025.02.28 15:16:44 LOG7[14028:23156]: https connecting
2025.02.28 15:16:44 LOG7[14028:23156]: connect_wait: waiting 10 seconds
2025.02.28 15:16:44 LOG7[14028:23156]: connect_wait: connected
2025.02.28 15:16:44 LOG7[14028:23156]: Remote FD=1028 initialized
2025.02.28 15:16:44 LOG7[14028:23156]: TCP_NODELAY option set on remote socket
2025.02.28 15:16:44 LOG7[14028:23156]: start SSPI connect
2025.02.28 15:16:44 LOG5[14028:23156]: try to read the client certificate
2025.02.28 15:16:44 LOG7[14028:23156]: open file C:\stunnel\clicer.cer with certificate
2025.02.28 15:16:44 LOG3[14028:23156]: Credentials complete
2025.02.28 15:16:44 LOG7[14028:23156]: 101 bytes of handshake data sent
2025.02.28 15:16:44 LOG5[14028:23156]: 5507 bytes of handshake(in handshake loop) data received.
2025.02.28 15:16:44 LOG5[14028:23156]: 2902 bytes of handshake data sent
2025.02.28 15:16:44 LOG5[14028:23156]: 7 bytes of handshake(in handshake loop) data received.
2025.02.28 15:16:44 LOG3[14028:23156]: **** Error 0x80090325 returned by InitializeSecurityContext (2)
2025.02.28 15:16:44 LOG3[14028:23156]: Error performing handshake
2025.02.28 15:16:44 LOG5[14028:23156]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket
2025.02.28 15:16:44 LOG7[14028:23156]: free Buffers
2025.02.28 15:16:44 LOG7[14028:23156]: delete c->hContext
2025.02.28 15:16:44 LOG7[14028:23156]: delete c->hClientCreds
2025.02.28 15:16:44 LOG5[14028:23156]: incomp_mess = 0, extra_data = 0
2025.02.28 15:16:44 LOG7[14028:23156]: https finished (0 left)

Вывод csptest
Цитата:
8 algorithms supported:
Aglid Class OID
[00] 0x661e 0x6000 1.2.643.2.2.21 (GOST 28147-89)
[01] 0x801e 0x8000 1.2.643.2.2.3 (GOST R 34.11/34.10-2001)
[02] 0x8021 0x8000 1.2.643.7.1.1.2.2 (GOST R 34.11-2012 256 bit)
[03] 0x801f 0x8000
[04] 0x2e1e 0x2000
[05] 0x2e23 0x2000 1.2.643.2.2.19 (GOST R 34.10-2001)
[06] 0x2e49 0x2000 1.2.643.7.1.1.1.1 (GOST R 34.10-2012 256 bit)
[07] 0x2e3d 0x2000 1.2.643.7.1.1.1.2 (GOST R 34.10-2012 512 bit)
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: 92
Cipher Suites: (ff 85) (00 81)
97 bytes of handshake data sent
1460 bytes of handshake data received
Handshake extra buffer: 1370 bytes
4047 bytes of handshake data received
4937 bytes of handshake data sent
31 bytes of handshake data received
Handshake was successful
SECPKG_ATTR_CIPHER_INFO: Protocol: 800, Suite: FF85 (TLS_GOSTR341112_256_WITH_28147_CNT_IMIT)
SECPKG_ATTR_CIPHER_INFO: Cipher: (GOST 28147-89), Len: 256, BlockLen: 1
SECPKG_ATTR_CIPHER_INFO: Hash: (GR 34.11-2012 256), Len: 256
SECPKG_ATTR_CIPHER_INFO: Exchange: (GOST DH 34.10-2012 256), MinLen: 512, MaxLen: 512
SECPKG_ATTR_CIPHER_INFO: Certificate: (GR 34.10-2012 256), KeyType: 0
SECPKG_ATTR_NAMES: E=mtg_oib@goznak.ru, O="АО ""Гознак""", L=Санкт-Петербург, S=78 г. Санкт-Петербург, C=RU, CN="АО ""Гознак"""
SECPKG_ATTR_PACKAGE_INFO# fCapabilities: 0x107B3
SECPKG_ATTR_PACKAGE_INFO# wVersion: 1
SECPKG_ATTR_PACKAGE_INFO# wRPCID: 65535
SECPKG_ATTR_PACKAGE_INFO# cbMaxToken: 16379
SECPKG_ATTR_PACKAGE_INFO# Name: CryptoPro SSP
SECPKG_ATTR_PACKAGE_INFO# Comment: CryptoPro Security Package

Server certificate:
Subject: E=mtg_oib@goznak.ru, O="АО ""Гознак""", L=Санкт-Петербург, S=78 г. Санкт-Петербург, C=RU, CN="АО ""Гознак"""
Valid : 22.11.2024 11:30:54 - 22.11.2025 11:40:54 (UTC)
Issuer : OID.1.2.643.100.4=7717107991, OGRN=1037700085444, C=RU, S=Moscow, L=Moscow, O="LLC ""Crypto-Pro""", CN=CryptoPro TLS CA

Protocol: TLS 1.2
Cipher: 0x661e
Cipher strength: 256
Hash: 0x8021
Hash strength: 256
Key exchange: 0xaa47
Key exchange strength: 512

Header: 5, Trailer: 4, MaxMessage: 16384

HTTP request: GET /ws/v3/exchange3.wsdl HTTP/1.1
User-Agent: Webclient
Accept:*/*
Host: 195.209.130.9
Connection: close


Sending plaintext: 113 bytes
131 bytes of application data sent
1460 bytes of (encrypted) application data received
14942 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 52 bytes
Extra data: 16341 bytes
61 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16385 bytes
17 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16393 bytes of (encrypted) application data received
Decrypted data: 16384 bytes
Extra data: 9 bytes
16112 bytes of (encrypted) application data received
Decrypted data: 8 bytes
Extra data: 16104 bytes
Decrypted data: 16070 bytes
Extra data: 25 bytes
Decrypted data: 5 bytes
Extra data: 11 bytes
Context expired: OK if file is completely downloaded
Reply status: HTTP/1.1 200 OK
Sending Close Notify
11 bytes of handshake data sent
1 connections, 802743 bytes in 0.545 seconds;
Total: SYS: 0,141 sec USR: 0,063 sec UTC: 0,847 sec
[ErrorCode: 0x00000000]

В csptest иногда (редко) получаю
Цитата:
Reply status: HTTP/1.1 200 OK
Sending Close Notify
11 bytes of handshake data sent
An error occurred in running the program.
WebClient.c:2876:Socket shutdown()
Error number 0x2746 (10054).
An existing connection was forcibly closed by the remote host.

An error occurred in running the program.
WebClient.c:799:Error disconnecting from server.
Error number 0x0 (0).
The operation completed successfully.

1 connections, 802758 bytes in 0.543 seconds;
Total: SYS: 0,094 sec USR: 0,063 sec UTC: 0,776 sec
[ErrorCode: 0x00000000]

В stunnel ошибки в 100% попыток.
Offline Русев Андрей  
#2 Оставлено : 1 марта 2025 г. 13:43:14(UTC)
Русев Андрей

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

Группы: Администраторы, Участники
Зарегистрирован: 16.04.2008(UTC)
Сообщений: 1,471

Сказал(а) «Спасибо»: 40 раз
Поблагодарили: 591 раз в 411 постах
0x80090325 = SEC_E_UNTRUSTED_ROOT в журнале stunnel. Лучше приводить вывод csptest вместе с командой запуска и вместе с конфигом stunnel.
Официальная техподдержка. Официальная база знаний.
Offline gkarpov  
#3 Оставлено : 4 марта 2025 г. 14:17:13(UTC)
gkarpov

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

Группы: Участники
Зарегистрирован: 27.02.2025(UTC)
Сообщений: 7

Команда
Цитата:
"c:\Program Files\Crypto Pro\CSP\csptest" -tlsc -server 195.209.130.9 -user xxx...xxx -file /ws/v3/exchange3.wsdl -verbose -nosave -nocheck

Конфиг
Цитата:
output=c:\stunnel\stunnel.log
socket=l:TCP_NODELAY=1
socket=r:TCP_NODELAY=1
debug=7
[https]
client=yes
accept=127.0.0.1:1500
connect=195.209.130.9:443
cert=C:\stunnel\clicer.cer
verify=0

Клиентский сертификат в обоих случаях один и тот же.
0x80090325 возникает в 2-3 раза реже чем 10054 и не помню ни разу такой код в csptest. Я предполагаю, что это побочная ошибка при 10054 которая предположительно связана с ошибкой шифрования приводящей к потере данных.
На Windows 11 c CSP 5.0 R3 используется
Цитата:
Protocol: 303
CipherSuite: c100, TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC
Cipher: GR 34.12-15 K, Len: 256, BlockLen: 1

А на Server 2012 R2 с CSP 4.0
Цитата:
Protocol: 800, Suite: FF85 (TLS_GOSTR341112_256_WITH_28147_CNT_IMIT)
Cipher: (GOST 28147-89), Len: 256, BlockLen: 1

Отредактировано пользователем 4 марта 2025 г. 14:22:24(UTC)  | Причина: Не указана

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