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
0 answers

Is there a way to create an encrypted memory block hosting a filesystem for a userland application?

I am dealing with some p12 certificates that I need to parse and pass to the python requests module. As they cannot take a p12 directly, I am using pyopenssl to parse them into certificates and keys. But because requests cert parameter cannot…
Matt Joyce
  • 2,010
  • 2
  • 20
  • 31
0
votes
1 answer

Does PyOpenSSL verify_certificate() do signature verification

I use PyOpenSSL verify_certificate() to verify certificate chains. My code seems to work. But I was wondering if the function also checks the signatures along the certificate chain. Lets assume we have the chain ca_cert -> i_ca_cert -> s_cert. Thus…
Hansi
  • 127
  • 1
  • 8
0
votes
0 answers

Python 3.5 use OpenSSL error([SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645))

I want to visit https://www.ptt.cc/bbs/Gossiping/index.html but I find it should be over than OpenSSL 1.0.1l so I install brew and upgrade openssl to OpenSSL 1.0.2j 26 Sep 2016, but when I use pycharm to print out and it will return version in…
Roy Wu
  • 71
  • 1
  • 9
0
votes
2 answers

Encrypt in PHP and decrypt in Python or openssl command line

A lot of data in a database I took over contains encrypted fields. The method used to encrypt the data is the following PHP code:
rthill
  • 143
  • 3
  • 11
0
votes
1 answer

RSA encryption and decryption in Python using OpenSSL

I have public key, private key and encrypted message ( e, n, d, message). I want to encrypt and decrypt with OpenSSL in Python. I have keys I don't need to generate them. I saw many questions about RSA but all of them creates keys, by generate…
eneski
  • 1,575
  • 17
  • 40
0
votes
1 answer

Python and OpenSSL: unable to decrypt

I have found a small piece of code capable of encrypt (and decrypt) files in AES (128bit) CBC mode. It work flawlessy even in decryption so I belived that OpenSSL would be capable (of course) od decrypting my files but it seems impossibile. I get…
Sergio La Rosa
  • 495
  • 8
  • 18
0
votes
0 answers

python ssl-server-socket - exception at handshake

I need to know the exact data-format form an ssl-stream. I only know there is some json like format in the stream. To get the data I shutdown the server and started my own ssl-server-socket: import socket import ssl HOST, PORT = '0.0.0.0',…
spitzbuaamy
  • 751
  • 2
  • 10
  • 25
0
votes
0 answers

How to create the 'certificate policies' extension in pyOpenSSL?

Creating 'certificate policies' extension in pyOpenSSL can be hardly found in the Internet. I try like this: crypto.X509Extension('certificatePolicies',True,'Policy: 2.16.840.1.114414.1.7.23.3,CPS: ttp://certificates.starfieldtech.com/repository/')…
DOWTIA
  • 105
  • 2
  • 9
0
votes
1 answer

https GET behind proxy succeeds with wget + TLSv1, but fails with requests even if ssl protocol is forced to TLSv1

I'm trying to get a file via https using requests 2.11.1 with Python 2.7.12 and OpenSSL 1.0.2h (all installed from Anaconda) on MacOS 10.11.6 from behind a proxy. According to SSLLabs, the server supports TLS 1.0, 1.1, and 1.2. Moreover, I can…
lebedov
  • 1,371
  • 2
  • 12
  • 27
0
votes
1 answer

Could not find 'ssleay32.dll' error while installing pyopenssl

I keep seeing this error constantly and I tried copying the ssleay32.dll to the systems directory and the error still happens . Could someone please help me how to fix it ? <...> Collecting pyOpenSSL==0.13.1 (from -r requirements.txt) Using…
0
votes
1 answer

Verify ECDSA signature from PyKCS11

I have a python program which uses PyKCS11, a python wrapper for pkcs11 interface. I can sign data with a ECC private key (Mechanism CKM_ECDSA) that is stored on a HSM and that is accessed by PyKCS11. What I now want is to verify with openssl the…
Ovomaltine
  • 191
  • 1
  • 8
0
votes
1 answer

PyOpenSSL get server certificate from SNI host with unknown hostnames

My code sample: import OpenSSL import socket ctx = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD) s = socket.socket(AF_INET, SOCK_STREAM) connection = OpenSSL.SSL.Connection(ctx, s) connection.connect((str(ip), port)) …
0
votes
0 answers

Python IMAPClient openssl error Windows 7

I'm working on a very simple imap client for windows cmd. Its work will be to search for messages with specific form: address and print the body to stdout. OpenSSL is installed from here and and directory exist in PATH Note: This script works well…
specktator
  • 95
  • 1
  • 8
0
votes
1 answer

Can't verify PyOpenSSL signature in C#

I can sign and verify data in PHP using OpenSSL: function generate_signature($privateKey, $data) { $keyData = openssl_get_privatekey($privateKey); openssl_sign($data, $signature, $keyData, OPENSSL_ALGO_SHA256); …
lfalin
  • 4,219
  • 5
  • 31
  • 57
0
votes
1 answer

PyopenSSL and scrapy install fails in Python 27, Win 64 Bit

My package install (using PIP & Easyinstall) fails every time when I install PyopenSSL and Scrapy on Python 2.7. OS: Win 8.1 64 Bit. The error details are below: C:\Users\\AppData\Local\Programs\Common\Microsoft\Visual C++ for…
Suraj_j
  • 151
  • 2
  • 14