Questions tagged [pyopenssl]

Pyopenssl is a Python interface to the OpenSSL library.

Pyopenssl is a Python interface to the OpenSSL library.

480 questions
9
votes
1 answer

Creating self-signed certificate using pyopenssl

I am trying to generate ac self signed X509v3 CA certificate using pyopenssl. I would want to add the extension authority key identifier (AKID) with keyid containing subject key identifier (SKID). But my following code block does not copy the SKID…
Britto
  • 501
  • 1
  • 9
  • 22
8
votes
2 answers

OpenSSL identify reason for "bad certificate"

I'm using pyOpenSSL which is a wrapper for OpenSSL. I had a client program trying to connect to my server and repeatedly was getting sslv3 alert bad certificate on the server. It wasn't until I realized it was due to the client's clock being…
Tim Tisdall
  • 9,914
  • 3
  • 52
  • 82
8
votes
1 answer

PyOpenSSL reading certificate/pkey file

That's how i create certificate from OpenSSL import crypto cert = crypto.X509() cert.get_subject().C = countryName cert.get_subject().ST = stateOrProvinceName ... Here what generation looks like. Now, how do I…
user2013697
  • 157
  • 1
  • 2
  • 8
7
votes
6 answers

Python 3.6.9 . ImportError: No module named setuptools_rust and a Command "python setup.py egg_info" failed with error code 1

I am trying to install pyOpenSSl and it shows the following error Requirement already satisfied: six>=1.5.2 in /home/tony/hx-preinstaller-venv/lib/python3.6/site-packages (from pyOpenSSL) Collecting cryptography>=3.3 (from pyOpenSSL) Using cached…
Tony Frank
  • 248
  • 1
  • 2
  • 8
7
votes
1 answer

How to generate the PEM serialization for the public RSA/DSA key

Using PyCrypto I was able to generate the public and private PEM serialization for a RSA key, but in PyCrypto the DSA class has no exportKey() method. Trying PyOpenSSL I was able to generate the private PEM serialization for RSA and DSA keys, bu…
Adi Roiban
  • 1,293
  • 2
  • 13
  • 28
7
votes
3 answers

./python: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

I need to try python 3.7 with openssl-1.1.1 in Ubuntu 16.04. Both python and openssl versions are pre-release. Following instructions on how to statistically link openssl to python in a previous post, I downloaded the source for opnssl-1.1.1. Then…
user9371654
  • 2,160
  • 16
  • 45
  • 78
7
votes
4 answers

PyOpenSSL - how can I get SAN(Subject Alternative Names) list

I'm trying to find a way to get the list of SAN from a given certificate, however, I couldn't find anything in the pyOpenSSL documentation. Any Ideas on how can I pull this data from the certificate?
Elon Salfati
  • 1,537
  • 6
  • 23
  • 46
7
votes
1 answer

How to verify certificate signature in pyOpenSSL?

I have two certificates, a root.crt that was used to sign client.crt. I want to verify that the client.crt was indeed signed by root.key. Using openssl on terminal, it works like this: $ openssl verify -CAfile root.crt client.crt > client.crt: OK …
joaoricardo000
  • 4,764
  • 4
  • 25
  • 36
7
votes
3 answers

Http request from Chrome hangs python webserver

I have a very basic python (2.7.12) web server (I've stripped it down as much as possible), code given below import time import ssl from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler class…
rbaber
  • 71
  • 1
  • 2
7
votes
3 answers

undefined symbol: OPENSSL_sk_num

I'm trying to renew Let's Encrypt certificate with Certbot. It stopped working and i don't know why. Here is the error: ImportError: /root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/ hazmat/bindings/_openssl.so:…
7
votes
1 answer

How to select specific the cipher while sending request via python request module

Usecase: I want to find out how many ciphers are supported by the hostname with python request module. I am not able to find a way to provide the cipher name to request module hook. Can anyone suggest the way to provide the way to specify…
user87005
  • 964
  • 3
  • 10
  • 27
7
votes
2 answers

read certificate(.crt) and key(.key) file in python

So i'm using the JIRA-Python module to connect to my company's instance on JIRA and it requires me to pass the certificate and key for this. However using the OpenSSL module,i'm unable to read my local certificate and key to pass it along the…
Ashish Padakannaya
  • 463
  • 2
  • 7
  • 17
7
votes
0 answers

RSA Padding check failed in openssl verify

I am writing a test fixture in python2 and pyOpensSSL that is essentially an SSL factory. This text fixture creates its own CA cert and key, and then creates certs signed by this CA. Currently, I am unable to verify the certs using openssl verify. …
reveller
  • 71
  • 1
  • 5
7
votes
4 answers

Installing package dependencies for Scrapy

So among the many packages users need to install for Scrapy, I think I'm having trouble with pyOpenSSL. When I try to get a tutorial Scrapy project created, I get this following output: Traceback (most recent call last): File…
simplycoding
  • 2,770
  • 9
  • 46
  • 91
6
votes
1 answer

PyOpenSSL convert certificate object to .pem file

I want to send a certificate from a "certificate authority" to a node through sockets. I have a certificate created using this example https://skippylovesmalorie.wordpress.com/2010/02/12/how-to-generate-a-self-signed-certificate-using-pyopenssl/ How…
DustBunny
  • 860
  • 2
  • 11
  • 25
1 2
3
31 32