rnixik / docker-openssl-gost

Dockerfile with OpenSSL, GOST-engine and cURL
MIT License
125 stars 48 forks source link

When I try use curl I get error 35 #4

Open Andru1999 opened 5 years ago

Andru1999 commented 5 years ago

I write comand curl https://portal.rosreestr.ru:4433 -k and get error curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure. What I am doing wrong?

rnixik commented 5 years ago

Does this site work with any other software without a client certificate?

Andru1999 commented 5 years ago

No. It shold work only with authorization by certificate. And the user must also send his certificate too. I have not yet learned how to do it with curl, but I thought that I got other type of error.

rnixik commented 5 years ago

Could you try

    curl https://portal.rosreestr.ru:4433 -k -v --key key.pem --cert cert.pem

with your key.pem and cert.pem and show output?

Andru1999 commented 5 years ago

I have only cer file. No private key. How to get it from cer file?

rnixik commented 5 years ago

It depends on format. Do you have -----BEGIN PRIVATE KEY----- in your cer file?

Andru1999 commented 5 years ago

No. I think publick and private key are in it.

rnixik commented 5 years ago

Do you have something like ----- ***** -----?

Andru1999 commented 5 years ago

No. I hava 0‚E0‚ф ч°zД Ъ»з in this file when I open it by notepad++

rnixik commented 5 years ago

It's probably in DER-format. You can try openssl x509 -inform der -in certificate.cer -out certificate.pem to convert it to pem and then look with notepad++.

Andru1999 commented 5 years ago

Yes, it is works. I got -----BEGIN CERTIFICATE-----.

rnixik commented 5 years ago

Do you have -----BEGIN PRIVATE KEY----- somewhere in the file?

Andru1999 commented 5 years ago

No. Mybe to need use special console key for get the private key ?

rnixik commented 5 years ago

Usually, obtaining private key is part of process of generating (obtaining) client certificate. Could you describe how did you get your cer?

Andru1999 commented 5 years ago

Do you hava a telegram account?

rnixik commented 5 years ago

Sorry, I don't do such kind of support.

Andru1999 commented 5 years ago

Ok. In short, I only have this certificate.

rnixik commented 5 years ago

Currently, I don't know the reason of the error.

Andru1999 commented 5 years ago

Maybe this servise use different algoritms? How to change connection algoritm?

rnixik commented 5 years ago

This server does not support TLS 1.1, TLS 1.2, TLS 1.3 but TLS1.0. May be it supports SSLv3, but curl in docker does not support it.