Welcome! Log In Create A New Profile

Advanced

Re: 400 Bad Request.No required SSL certificate was sent

August 06, 2014 01:51AM
Maxim Dounin Wrote:
-------------------------------------------------------

> Для начала имеет смысл убедится, что с помощью "openssl s_client"
> всё работает штатно.

***********************************************************************************************************
[root@localhost openssl]# openssl s_client -connect 192.168.100.38:443
CONNECTED(00000003)
depth=1 C = RU, ST = RO, L = Rostov-on-Don, O = IT, OU = admin, CN = rootCA, emailAddress = xxx@xxx.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
0 s:/C=RU/ST=RO/L=Rostov-on-Don/O=IT/OU=admin/CN=serverCert/emailAddress=xxx@xxx.com
i:/C=RU/ST=RO/L=Rostov-on-Don/O=IT/OU=admin/CN=rootCA/emailAddress=xxx@xxx.com
1 s:/C=RU/ST=RO/L=Rostov-on-Don/O=IT/OU=admin/CN=rootCA/emailAddress=xxx@xxx.com
i:/C=RU/ST=RO/L=Rostov-on-Don/O=IT/OU=admin/CN=rootCA/emailAddress=xxx@xxx.com
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICbDCCAdUCAQEwDQYJKoZIhvcNAQEFBQAwfDELMAkGA1UEBhMCUlUxCzAJBgNV
BAgMAlJPMRYwFAYDVQQHDA1Sb3N0b3Ytb24tRG9uMQswCQYDVQQKDAJJVDEOMAwG
A1UECwwFYWRtaW4xDzANBgNVBAMMBnJvb3RDQTEaMBgGCSqGSIb3DQEJARYLeHh4
QHh4eC5jb20wHhcNMTQwODA1MTYxMzIzWhcNMTUwODA1MTYxMzIzWjCBgDELMAkG
A1UEBhMCUlUxCzAJBgNVBAgMAlJPMRYwFAYDVQQHDA1Sb3N0b3Ytb24tRG9uMQsw
CQYDVQQKDAJJVDEOMAwGA1UECwwFYWRtaW4xEzARBgNVBAMMCnNlcnZlckNlcnQx
GjAYBgkqhkiG9w0BCQEWC3h4eEB4eHguY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQCt3OeyuUoyP36FGZ7AJfk6JpIA0H6svWXijUwMMuEfZHwt/fep3tva
d/3mtnAE0Zf+5zPYNHXs96WI5Hk29nFZ+gy4jfLOKlug9wy+QvFTN7TaRLDqnM62
MQRjPPyw1kKyPUXSdsTPqZtl89MWqGpYaKdPHjpxWgpylRFqhHlFGQIDAQABMA0G
CSqGSIb3DQEBBQUAA4GBAJDDNmU/StaQGyJY77VEB8zW9W4xWjhVZjHZ59Sw1ROL
epWB19e9Yo/sYdVtbO3ZFOZKIS93wDwRZ1MZf14YGZf2zVgMXTUKqj7xvFeCTa9F
i2TgR0LpQ+T0J47azLrHfY7Eg8RdPQbmdEPaQJ/SEZTKqOha/bPzfs6iDYgnT4wX
-----END CERTIFICATE-----
subject=/C=RU/ST=RO/L=Rostov-on-Don/O=IT/OU=admin/CN=serverCert/emailAddress=xxx@xxx.com
issuer=/C=RU/ST=RO/L=Rostov-on-Don/O=IT/OU=admin/CN=rootCA/emailAddress=xxx@xxx.com
---
Acceptable client certificate CA names
/C=RU/ST=RO/L=Rostov-on-Don/O=IT/OU=admin/CN=rootCA/emailAddress=xxx@xxx.com
Server Temp Key: ECDH, prime256v1, 256 bits
---
SSL handshake has read 2044 bytes and written 387 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: 1B98F7F29348F36B6A0F75AD717F9B2532B60A6E90CAE13F0BCFC2F1F355E9E1
Session-ID-ctx:
Master-Key: 11D3189B9EDB1ADC12EB7D5B5B4A07A2656EB887D2FBDF4B91CDD9824E277520C207062626F13B546031DBB42342A32E
Key-Arg : None
Krb5 Principal: None
PSK identity: None
PSK identity hint: None
TLS session ticket lifetime hint: 300 (seconds)
TLS session ticket:
0000 - e3 85 da 5b b7 a0 86 1c-88 95 cb 3a 5a d1 53 2f ...[.......:Z.S/
0010 - 9e e6 a9 65 c5 db c4 3a-2b 71 f2 67 12 cd 78 b5 ...e...:+q.g..x.
0020 - f8 e6 8d 9c 98 93 ad 07-80 e1 40 5a 46 bf ba fc ..........@ZF...
0030 - 80 9b fb ad 54 6e 47 9a-db fa d2 49 b5 eb 2a 89 ....TnG....I..*.
0040 - 73 91 9c 79 b8 c7 d8 8b-01 26 cb 6e c0 12 61 e0 s..y.....&.n..a.
0050 - e5 f1 38 2b 10 27 e3 b3-06 10 c2 cc 35 cd 0a cc ..8+.'......5...
0060 - cf dd 9c 31 5f 45 1d a6-61 b7 25 da 62 ea 51 74 ...1_E..a.%.b.Qt
0070 - 27 a5 e6 2e 85 90 2e 2f-c5 7b 18 01 0a cf 57 09 '....../.{....W.
0080 - 0e d2 f0 c8 d4 8c ba 9f-1a 5d dd 7c 36 f8 76 87 .........].|6.v.
0090 - c3 54 e2 f1 ac 32 42 d5-a3 af c5 98 3a 7d d7 f0 .T...2B.....:}..

Start Time: 1407316567
Timeout : 300 (sec)
Verify return code: 19 (self signed certificate in certificate chain)
---
closed

***********************************************************************************************************

Насколько я понимаю - "verify error:num=19:self signed certificate in certificate chain" не является критичной ошибкой.

Ещё есть такое:
***********************************************************************************************************
[root@localhost db]# openssl verify -CAfile ca.crt ivan.crt
ivan.crt: OK
***********************************************************************************************************

cURL с серверов и других и этого самого.
***********************************************************************************************************
curl -v -s -k --key ./ivan.key --cert ./ivan.crt --pass qwerty https://192.168.100.38
* About to connect() to 192.168.100.38 port 443 (#0)
* Trying 192.168.100.38... connected
* Connected to 192.168.100.38 (192.168.100.38) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* NSS error -5961
* Closing connection #0
* SSL connect error


При этом в еррорлоге

SSL_do_handshake() failed (SSL: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol) while SSL handshaking
***********************************************************************************************************






> А дальше уже начинать разбираться с браузерами - там могут быть
> нюансы. В частности, Chrome, если мне не изменяет память,
> отказывался использовать клиентские сертификаты, если у сервера
> было что-то не так с сертификатом. В приведённом же примере у
> сервера видится как-минимум проблема в виде ip-адреса вместо
> доменного имени.

Не думаю что на данном этапе проблема может быть в этом, но попробую сделать буквенное имя на замену IP
Subject Author Posted

400 Bad Request.No required SSL certificate was sent

esirenko August 05, 2014 02:13AM

Re: 400 Bad Request.No required SSL certificate was sent

esirenko August 05, 2014 02:14AM

Re: 400 Bad Request.No required SSL certificate was sent

Maxim Dounin August 05, 2014 11:40AM

Re: 400 Bad Request.No required SSL certificate was sent

esirenko August 06, 2014 01:51AM

Re: 400 Bad Request.No required SSL certificate was sent

esirenko August 06, 2014 03:48AM

Re: 400 Bad Request.No required SSL certificate was sent

Maxim Dounin August 06, 2014 04:36AM

Re: 400 Bad Request.No required SSL certificate was sent

esirenko August 07, 2014 09:17AM

Re: 400 Bad Request.No required SSL certificate was sent

Maxim Dounin August 08, 2014 06:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready