Answer the question
In order to leave comments, you need to log in
How to authenticate on a site with connection type “TLS 1.0, GOST_28147 with 256-bit encryption (High); GOST_DH with 512 bit exchange"?
I warn you - I'm new. I'm trying to write a python 2.7 script to collect information from a secure crm and then save it in 1s.
When trying to connect, it throws ssl.SSLError: [Errno 1] _ssl.c:504: error 0D09B0A3:asn1 encoding routines:d2i_PublicKey:unknown public key type
It is also known that crm opens only in ie with CryptoProCSP installed on the PC.
PS I'm not going to hack anything, there is a password and login, there is a need to automate some routine processes.
Answer the question
In order to leave comments, you need to log in
Not being a Python programmer, I will still assume that you need to explicitly tell the SSL module which crypto provider (namely, CryptoProCSP) should be used when trying to establish a connection.
A quick look at Google yields the following patterns:
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) then
context.set_ciphers
(specify GOST) or less likely context.load_cert_chain(specify your private key)
and then
h = client.HTTPSConnection('aaa .ru', 443, context=context)
from OpenSSL import SSL
import ssl, socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = 'crm.garantexpress.ru'
port = 443
s.connect((host, port))
context = SSL.Context( SSL.TLSv1_METHOD)
context.set_cipher_list('ALL')
conn = SSL.Connection(context, s)
After reading the documentation for a long time, I got what is written above. in the terminal I get OpenSSL.SSL.Connection object at (cell address).
How can we now build an https request to this object, or is it too early?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question