473 questions
0
votes
0
answers
91
views
Self-signed ssl certs verification
I've generated a private key and a self-signed certificate 3 different ways: using command-line openssl, pyopenssl and pyca/cryptography. Then I've used them to create ssl context for a simple flask ...
0
votes
2
answers
325
views
Conflicting versions when installing from requirements.txt
I tried to create a virtual environment for the project and installed the dependencies using requirements.txt. But I received the below conflicting message:
The conflict is caused by:
The user ...
2
votes
0
answers
441
views
ssl verification throws error with python 3.12 whereas in python 3.9 it succeeded
With python 3.12 I got the error:
SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1000)')
But with python 3.9 its working ...
0
votes
1
answer
391
views
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' - Python Flask Error
I am running a Python Flask application which connects to mongodb using "pymongo" python module.
I am getting the below error and not sure what else to do to overcome it.
Application details,...
0
votes
1
answer
190
views
JWT header gives error "OpenSSL.crypto.Error: [('asn1 encoding routines', '', 'illegal zero content')]" on version 23.3.0 but works on earlier version
I recently updated my python/conda to 3.11. Included is a new version of OpenSSL. The below code has worked for some time on version 1.1.1, but now with version 3.0.1, the kid line is giving an ...
0
votes
0
answers
36
views
Does order matter when verifying an X.509 store in OpenSSL (Python)?
I noticed that changing the order of the two intermediate CAs (when one is irrelevant) results in a different verification result:
root_1, chain_1, leaf_1 = generate_chain() # root, intermediate, ...
3
votes
1
answer
4k
views
How to force Python 3.9 to compile using OpenSSL 1.1.1 correctly in Centos 7
Running Centos 7 and have both Python 3.6 and 3.9 installed as altinstalls.
I've installed openssl 1.1.1 and can verify that by using "openssl version" but every time I try to install a new ...
1
vote
1
answer
1k
views
How to get full SSL certificates chain for specified site using Python SSL and OpenSSL [duplicate]
I am doing research on the requirements for using untrusted root certificates on the Internet and I am having some problems with SSL chain detection.
Now I detect specified certificates with this ...
0
votes
1
answer
686
views
how to do "openssl s_client -connect ip_addr:port -servername url" in python
Currently I am using this code to get the SSL certificate:
import socket
from OpenSSL import SSL
import requests
context = SSL.Context(method=SSL.SSLv23_METHOD)
for bundle in [requests.certs....
1
vote
0
answers
346
views
Generating a certificate with multiple OU fields using pyopenssl
I've been using pyopenssl for a while now to generate certificates, specifically the subject line like so:
from OpenSSL import crypto
cert = crypto.X509()
cert.get_subject().C = certificate_params....
4
votes
2
answers
1k
views
Build the project in Git Actions using SAM, I am getting new error: AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
I am using Python 3.9 and I am trying to build the code in Git Actions.
I am seeing this new error today.Till 30th Dec, I didnt face any issue while building the same code. I am not explicitly using ...
0
votes
1
answer
5k
views
Odoo16 installation Error (OpenSSL/cryptography): module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
I have installed odoo16 on Ubuntu 20.04 using Yenthe install-script at https://github.com/Yenthe666/InstallScript
The result of the launch command : ./odoo-bin -c /etc/odoo-server.conf
is:
2022-11-...
0
votes
1
answer
3k
views
I cannot run pip anymore [duplicate]
So when I am trying to execute "$ python3 -m pip" on my linux I have this error:
python3 -m pip
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, ...
10
votes
9
answers
37k
views
pip throws "TypeError: deprecated() " error
I am trying to install few packages and started getting an error. Then used multiple commands in ubuntu to update few things but errors are similar
pip install -U pip setuptools
or
python3 -m pip ...
0
votes
1
answer
732
views
How to add a challenge password attribute during csr generation using python openssl?
I have a python code for Csr and key generation using pyopenssl. I am trying to add an additional attribute, "challenge password" while generating the CSR. Could someone please help on ...
0
votes
1
answer
661
views
Python3 - Issue with module pyOpenSSL
I have trouble with the module OpenSSL in python version 3.8.13.
Here is my code
from datetime import datetime
import OpenSSL
import ssl
arraySite=["osb.vn.prod","api-gateway.pdcvn1.vn....
1
vote
1
answer
1k
views
How to extract the signature from a p7s file?
I need the Python code to extract from the p7s file the signature resulting from digitally signing a document, in both situations where the payload is inside of, and external to, the p7s file. I have ...
1
vote
1
answer
2k
views
pyOpenSSL RSA private keys encrypted with AES 256
In pyOpenSSL i haven't been able to find a way to encrypt a RSA private key with AES 256 just yet, been looking all over the place for this but cant seem to find a way.
Before i used OpenSSL to get ...
3
votes
0
answers
501
views
CryptographyDeprecationWarning with snowflake.connector.connect
When I run snowflake.connector.connect(**credentials['MY_DATABASE']), I get the following warning:
~/opt/anaconda3/lib/python3.8/site-packages/cryptography/hazmat/backends/openssl/x509.py:14: ...
1
vote
1
answer
758
views
pyOpenSSL : verify certificates chain : works with 2 but not with more
I build my own certificates chain and try to verify it.
When I have only 2 certificates (the root CA and the to-be-verified): it works fine.
When I have 3 (the root CA, an intermediate, and the to-be-...
2
votes
0
answers
255
views
Python - extract an elliptic curve private key from pem file
How do I extract an elliptic curve private key from a pem file to use for signing data in python?
I have been using pyOpenSSL to load the private key, but don't understand the process of extracting ...
0
votes
1
answer
3k
views
AttributeError: module 'lib' has no attribute 'EVP_MD_CTX_new'
I'm attempting to use the Python package googleapiclient to download analytics, but it's giving me an OpenSSL related traceback:
File "/project/.env/lib/python3.7/site-packages/googleanalytics/...
0
votes
0
answers
860
views
pyOpenSSL and ssh-keygen public key ssh-rsa 4096 not corresponding
I created a key pair in Linux Ubuntu 20.04 through:
ssh-keygen -t rsa -m PEM -b 4096 -C "[email protected]" -f /tmp/id_rsa
and I get the following public key:
cat /tmp/id_rsa
ssh-rsa ...
1
vote
0
answers
879
views
Convert .pem file to .crt using Python3 OpenSLL
I am new to SSL and trying to find some method or code which can convert .pem file to .crt using Python3 and OpenSSL.
Have searced through openSSL docs there is resource for shell script but wasn't ...
1
vote
0
answers
195
views
Implementing a Certificate Chain Validator using Pythin
I am trying to implement a Certificate chain validator using python's Openssl. I create a list of certificates and try to loop over them using:
for chain in chains:
# print(type(chain))
...