Questions tagged [pyopenssl]

Pyopenssl is a Python interface to the OpenSSL library.

Pyopenssl is a Python interface to the OpenSSL library.

480 questions
0
votes
1 answer

How to fix OpenSSL.SSL.WantReadError?

I have a trouble about pyopenssl. The error message is 'OpenSSL.SSL.WantReadError'. I'm debugging below. https://github.com/opencv/open_model_zoo First error happened. asn1crypto._ffi.LibraryNotFoundError: The library libcrypto could not be found I…
0
votes
3 answers

Error while creating a self signed certificate using pyopenssl

from OpenSSL import crypto, SSL from socket import gethostname from pprint import pprint from time import gmtime, mktime CERT_FILE = "selfsigned.crt" KEY_FILE = "private.key" def create_self_signed_cert(): # create a key pair k =…
0
votes
2 answers

Why do I get different signatures when using OpenSSL API from C and from Python?

I'm trying to use the OpenSSL API through pyopenssl• in Python to compute an RSA signature with what I believe is PKCS#1 1.5 padding and SHA1 digest. It gives wrong result. Here's the minimized sample. #!/usr/bin/env python3 from binascii import…
ulidtko
  • 14,740
  • 10
  • 56
  • 88
0
votes
1 answer

Is there any function for inserting user input automatically in python after running a cmd command?

I'm trying to run an openssl command in python. The problem is that everytime i run the command it asks for the password. Is there any function to put i,j,k,l variables in when asked for the password? The password should be between 0000-9999. This…
0
votes
1 answer

I cant find my certificate when i am running ' python manage.py runserver_plus --cert /etc/ssl/cert '

i am getting filenotfound error when i am trying to access my ssl certificate because i want my local host run on https python manage.py runserver_plus --cert /etc/ssl/cert Traceback (most recent call last): File "manage.py", line 15, in…
0
votes
1 answer

Unable to load PEM-encoded private key from Pyjks into PKey object

I'm loading a Pyjks PrivateKeyEntry object into PEM and then trying to load the pem-encoded string into a Pkey object. As you might have guessed, I'm trying to export PrivateKeyEntry along with it's cert chain into a file. We have an UI that is able…
Xvs
  • 79
  • 2
  • 9
0
votes
1 answer

Scrapy unable to connect to HTTPS site that only supports older TLSv1. Connection Lost

Using scrapy 1.6.0 (twisted 18.9.0, pyopenssl 19.0.0, openssl 1.0.2r, osx 10.14.3). I've ruled out user agent and robots.txt. Seems to be a certificate negotiation issue. There is no web proxy involved. Destination is https://www.labor.ny.gov/ To…
debugme
  • 1,041
  • 1
  • 10
  • 22
0
votes
1 answer

Why can't I decrypt this xmlsec encrypted WSSE enhanced soap message?

I have used py-wsse from PIP but it seems broken. I've refactored/fixed it up to Add X509 standards : Signature block with signing, and public/private key usage via a certificate I was able to encrypt/decrypt this using plain old XMLSEC, after…
Kent Wong
  • 566
  • 1
  • 6
  • 20
0
votes
1 answer

How do I access the components of a private RSA key in Python's cryptography module?

I'm not finding an API, but because it seems to delegate to OpenSSL, perhaps I'm not understanding how this works. What I'm looking for is the equivalent of the first answer to this [1] but from within Python, using an RSA keypair that has just been…
Johannes Ernst
  • 3,072
  • 3
  • 42
  • 56
0
votes
1 answer

How to generate pem key and certificate with password using pyopenssl?

My task is to generate a pem key and certificate with password using pyopenssl or analogs. The main implementation requirement must be on python. With openssl, I do the following: openssl req -new -days 365 -newkey rsa:1024 -x509 -keyout…
miol
  • 3
  • 1
  • 2
0
votes
0 answers

Got ImportError: No module named _util while running scrapy crawl

I am running a scrapy spider in the following virtual environment: Python 2.7.10 Package Version ----------------------- ----------- : : pyOpenSSL 18.0.0 : : It seems to have the latest version of…
V. Foy
  • 215
  • 1
  • 2
  • 8
0
votes
0 answers

How to import OpenSSL in Python to fetch the serial number of the certificate

I have a certificate and i used the regular expression to strip the beginning and ending from certificate. How can i decode the serial number of the certificate using OpenSSL. I have the cli command to decode: openssl x509 -serial -noout how can…
Ebin Davis
  • 5,421
  • 3
  • 15
  • 20
0
votes
1 answer

python automatic openssl check

With my script I want to check multiple SSL certificates from different web services. The url of each service should be read from a file. If I use adr in the get_server_certificate funtion it will work, but if want to use list_adr it will produce…
t0m
  • 17
  • 1
  • 8
0
votes
0 answers

python requests SSLError with Heroku set up

I running on Heroku and am getting this error SSLError with requests when sending a request out to an API any Ideas? I beielve this is a issue with my cert or the way I make a connection with requests Here is my code and error, obviously code is…
0
votes
3 answers

SSL: SSLV3_ALERT_HANDSHAKE_FAILURE sslv3 alert handshake failure (_ssl.c:833)

I have a simple TLS client in python running in Ubuntu 18.04 and openssl version 1.1.0g. The client supports a single ciphersuite. I get an error when trying to connect to a TLS 1.0 server. The cipher suite is not supported by the server. I know…
user9371654
  • 2,160
  • 16
  • 45
  • 78