Questions tagged [pyopenssl]

Pyopenssl is a Python interface to the OpenSSL library.

Pyopenssl is a Python interface to the OpenSSL library.

480 questions
15
votes
1 answer

Getting PKCS7 signer chain in python

I have PKCS7 message which is signed. It contains a data and a signing certificate (with the whole chain of trust). I have a code which uses m2crypto to get a certificate out of it. bio = BIO.MemoryBuffer(pkcs7message) p7 =…
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184
15
votes
2 answers

Sign CSR from client using CA root certificate in python

I am new to python and still learning it so my question can be little naive. Please bear with it ;) The problem is client will be sending CSR and I want to sign it with my CA root certificate and return the signed certificate back to client. I have…
nishi
  • 1,245
  • 3
  • 13
  • 22
14
votes
1 answer

EXP(ORT) ciphers and M2Crypto/OpenSSL

I am having a hard time running a M2Crypto SSLServer with EXPORT grade ciphers. LOW/MEDIUM/HIGH grade ciphers work without any problems, but EXPORT just won't. Also, when OpenSSL is run in a server mode from a command line it accepts EXPORT grade…
stamparm
  • 178
  • 8
13
votes
2 answers

How to upgrade OpenSSL from 1.0.2g to 1.1.0g in Ubuntu and let python recognize the new OpenSSL

I have Ubuntu 16.04. It has OpenSSL 1.0.2g. I need to use OpenSSL 1.1.0g. Note that OpenSSL 1.1.0g is installed in my other machine Ubuntu 18. But I need to run a python program in Ubuntu 16.04 but I need the specific OpenSSL 1.1.0g. I did: sudo…
user9371654
  • 2,160
  • 16
  • 45
  • 78
12
votes
3 answers

Python SSL error Decryption failed or bad record mac

I am trying to use gspread python module to read the google spreadsheet. But I am getting some error from ssl. I have tried to look into this, but couldn't able to make it work. The gspread module is using python request internally which seems to be…
Nikhil N
  • 4,507
  • 1
  • 35
  • 53
12
votes
2 answers

Installing pyOpenSSL, cryptography on heroku

I'm using the following requirements.txt for…
fpghost
  • 2,834
  • 4
  • 32
  • 61
11
votes
1 answer

RemoveError: 'pyopenssl' is a dependency of conda and cannot be removed from conda's operating environment

I am trying to install and update packages on Ananconda 3.7 on Windows 10. When I ran the code: conda update --all or even conda install pandas I got the following error: RemoveError: 'pyopenssl' is a dependency of conda and cannot be removed…
loveR
  • 489
  • 4
  • 12
11
votes
1 answer

Retrieving address of native base class with ctypes

I want to be able to pass a certificate to Python's ssl library without requiring a temporary file. It seems that the Python ssl module cannot do that. To work around this problem I want to retrieve the underlying SSL_CTX struct stored in the…
josch
  • 6,716
  • 3
  • 41
  • 49
10
votes
1 answer

How to install openssl 1.1.1 for python 2.7?

I installed python 2.7.17 on a windows 10 machine. I then wanted to test its openssl version by running the following inside python: import ssl print ssl.OPENSSL_VERSION_INFO I am getting (1, 0, 2, 20, 15) I wanted to upgrade to version…
Assaf Mendelson
  • 12,701
  • 5
  • 47
  • 56
10
votes
1 answer

Python SSL X509: KEY_VALUES_MISMATCH

"""Python HTTPS server""" from http.server import HTTPServer, SimpleHTTPRequestHandler import ssl # https://stackoverflow.com/a/40822838/2715716 HTTPD = HTTPServer(('localhost', 4443), SimpleHTTPRequestHandler) # Ubuntu on Windows: # - Generate…
Tomáš Hübelbauer
  • 9,179
  • 14
  • 63
  • 125
10
votes
3 answers

'NoneType' object has no attribute '_app_data' in scrapy\twisted\openssl

During the scraping process using scrapy one error appears in my logs from time to time. It doesnt seem to be anywhere in my code, and looks like it something inside twisted\openssl. Any ideas what caused this and how to get rid of it? Stacktrace…
Aldarund
  • 17,312
  • 5
  • 73
  • 104
9
votes
1 answer

Installing pyOpenSSL on Amazon Linux (EC2)

I'm using the first default AMI for amazon Linux on ec2 and can't seem to install pyOpenSSL. I tried: sudo wget http://launchpad.net/pyopenssl/main/0.11/+download/pyOpenSSL-0.11.tar.gz && easy_install pyOpenSSL-0.11.tar.gz. Results were: error:…
Alex Amato
  • 1,591
  • 4
  • 19
  • 32
9
votes
0 answers

ModuleNotFoundError: No module named 'OpenSSL' despite having pyopenssl installed

I am trying to install OpenSSL for Python on windows using command line. I have tried running the below command: pip install OpenSSL I got the following error: Could not find a version that satisfies the requirement openssl (from versions: ) No…
prudhvi
  • 1,141
  • 6
  • 23
  • 46
9
votes
1 answer

How do I create and sign certificates with Python's pyOpenSSL?

I would like to use python to create a CA certificate, and client certificates that I sign with it. I will be using these with OpenVPN. After several days of research, and trial and error, this is what I've come up with: #!/usr/bin/env…
John
  • 2,551
  • 3
  • 30
  • 55
9
votes
1 answer

X.509 certificate serial number to hex conversion

I'm trying to get the serial number for an X.509 certificate using Pythons OpenSSL library. If I load my cert like this: x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_ASN1, cert) Then print the serial number like this: print…
user1513388
  • 7,165
  • 14
  • 69
  • 111
1
2
3
31 32