Rutoken lite + stunnel
Здравствуйте!
Нужна помощь, всю голову сломал, уперся в стенку, не пойму в чем дело.
Клиент Windows 10 stunnel 5.69
debug = 7
output = stunnel.log
engine = pkcs11
engineCtrl = MODULE_PATH:rtPKCS11.dll
engineCtrl = PIN:12345678
[test]
engineId = pkcs11
client = yes
accept = 1333
connect = 172.19.103.17:13395
verifyChain = yes
checkHost = my.contoso.com
cert = pkcs11:id=ce0c71cf-130d-48c6-91c7-4d5c1e60256c_E
CAfile = ca-certs.pem
Сервер Centos 8 stunnel 5.69
debug = 7
output = /stunnel.log
include = /etc/stunnel/conf.d/
curves = prime256v1
sslVersionMin = TLSv1.2
options = NO_SSLv2
options = NO_SSLv3
client = no
из conf.d
[rdp]
accept = 13391
connect = 172.19.103.20:443
renegotiation = no
verifyPeer = yes
ciphers = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA
cert = /etc/stunnel/certs/my.contoso.com.crt
key = /etc/stunnel/certs/my.contoso.com.key
CAfile = /etc/stunnel/certs/clients.pem
requireCert = yes
При попытке подключения к клиент выдает
2023.06.07 16:29:11 LOG7[0]: TLS state (connect): SSLv3/TLS read server certificate
2023.06.07 16:29:11 LOG7[0]: TLS state (connect): TLSv1.3 read server certificate verify
2023.06.07 16:29:11 LOG7[0]: TLS state (connect): SSLv3/TLS read finished
2023.06.07 16:29:11 LOG7[0]: TLS state (connect): SSLv3/TLS write change cipher spec
2023.06.07 16:29:11 LOG7[0]: TLS state (connect): SSLv3/TLS write client certificate
2023.06.07 16:29:11 LOG7[0]: TLS alert (write): fatal: internal error
2023.06.07 16:29:11 LOG3[0]: error queue: ssl/statem/statem_lib.c:361: error:0A080006:SSL routines::EVP lib
2023.06.07 16:29:11 LOG3[0]: SSL_connect: p11_rsa.c:119: error:42000070:PKCS#11 module::Mechanism invalid
2023.06.07 16:29:11 LOG5[0]: Connection closed/reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket
2023.06.07 16:29:11 LOG7[0]: Deallocating application specific data for session connect address
2023.06.07 16:29:11 LOG7[0]: Remote descriptor (FD=1304) closed
2023.06.07 16:29:11 LOG7[0]: local_rfd/local_wfd reset (FD=1288)
2023.06.07 16:29:11 LOG7[0]: Local descriptor (FD=1288) closed
2023.06.07 16:29:11 LOG7[0]: Service [test] finished (0 left)
----------------------------
Сервер
2023.06.07 16:29:11 LOG7[main]: Found 1 ready file descriptor(s)
2023.06.07 16:29:11 LOG7[main]: FD=4 events=0x2001 revents=0x0
2023.06.07 16:29:11 LOG7[main]: FD=9 events=0x2001 revents=0x0
2023.06.07 16:29:11 LOG7[main]: FD=10 events=0x2001 revents=0x1
2023.06.07 16:29:11 LOG7[main]: FD=11 events=0x2001 revents=0x0
2023.06.07 16:29:11 LOG7[main]: Service [lagos] accepted (FD=3) from 172.19.19.101:58054
2023.06.07 16:29:11 LOG7[3]: Service [lagos] started
2023.06.07 16:29:11 LOG7[3]: Setting local socket options (FD=3)
2023.06.07 16:29:11 LOG7[3]: Option TCP_NODELAY set on local socket
2023.06.07 16:29:11 LOG5[3]: Service [lagos] accepted connection from 172.19.19.101:58054
2023.06.07 16:29:11 LOG6[3]: Peer certificate required
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): before SSL initialization
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): before SSL initialization
2023.06.07 16:29:11 LOG7[3]: Initializing application specific data for session authenticated
2023.06.07 16:29:11 LOG7[3]: SNI: no virtual services defined
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): SSLv3/TLS read client hello
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): SSLv3/TLS write server hello
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): SSLv3/TLS write change cipher spec
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): TLSv1.3 write encrypted extensions
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): SSLv3/TLS write certificate request
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): SSLv3/TLS write certificate
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): TLSv1.3 write server certificate verify
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): SSLv3/TLS write finished
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): TLSv1.3 early data
2023.06.07 16:29:11 LOG7[3]: TLS state (accept): TLSv1.3 early data
2023.06.07 16:29:11 LOG7[3]: Verification started at depth=1: CN=my.contoso.com
2023.06.07 16:29:11 LOG6[3]: CERT: Pre-verification error ignored: self signed certificate in certificate chain
2023.06.07 16:29:11 LOG6[3]: Certificate accepted at depth=1: CN=my.contoso.com
2023.06.07 16:29:11 LOG7[3]: Verification started at depth=1: CN=my.contoso.com
2023.06.07 16:29:11 LOG7[3]: CERT: Pre-verification succeeded
2023.06.07 16:29:11 LOG6[3]: Certificate accepted at depth=1: CN=my.contoso.com
2023.06.07 16:29:11 LOG7[3]: Verification started at depth=0: CN=KAV
2023.06.07 16:29:11 LOG7[3]: CERT: Pre-verification succeeded
2023.06.07 16:29:11 LOG6[3]: CERT: No subject checks configured
2023.06.07 16:29:11 LOG6[3]: CERT: Locally installed certificate matched
2023.06.07 16:29:11 LOG5[3]: Certificate accepted at depth=0: CN=KAV
2023.06.07 16:29:11 LOG7[3]: TLS alert (read): fatal: internal error
2023.06.07 16:29:11 LOG3[3]: SSL_accept: ssl/record/rec_layer_s3.c:1544: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
2023.06.07 16:29:11 LOG5[3]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket
2023.06.07 16:29:11 LOG7[3]: Deallocating application specific data for session connect address
2023.06.07 16:29:11 LOG7[3]: Local descriptor (FD=3) closed
2023.06.07 16:29:11 LOG7[3]: Service [lagos] finished (0 left)