Questions tagged [m2crypto]

M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCookies for web session management; FTP/TLS client and server; S/MIME; ZServerSSL.

M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCookies for web session management; FTP/TLS client and server; S/MIME; ZServerSSL.

271 questions
0
votes
1 answer

M2Crypto import fails on Mac OS X 10.10

I have tried all possible methods to install M2Crypto on Mac OS X Yosemite. The following link was referred to build openssl first and then swig followed by M2Crypto: http://jonatkinson.co.uk/2008/10/09/installing-m2crypto-osx/ The following link…
azee
  • 181
  • 1
  • 3
  • 8
0
votes
1 answer

Python, Django with PyCharm. Message error: "No module named M2Crypto" How resolve?

I received this message: "No module named M2Crypto" I have already install M2Crypto with the command "pip install M2Crypto" and when I re-run it, I got the message: "Requirement already satisfied" What's the problem with M2Crypto? Thanks ps: I use…
0
votes
1 answer

How to generate CA signed x509 certificate by M2Crypto

I have a CSR file and CA keys Thanks
estin
  • 3,051
  • 1
  • 24
  • 31
0
votes
1 answer

Is it possible to fetch data from a key?

Is it possible to get any user readable data from key like below uchar DELTA_PUB_KEY[] = { 0x7c, 0x5b, 0x31, 0x88, 0x25, 0x64, 0x43, 0xaa, 0x34, 0x97, 0x6b, 0x7d, 0x22, 0x9a, 0x56, 0xdd, 0x5e, 0xab, 0x2f, 0xd6, 0x10, 0x34, 0x12, 0x6b, 0x12, 0xfa,…
Rajesh Kumar
  • 1,270
  • 4
  • 15
  • 31
0
votes
2 answers

Proper way to cleanup dynamic engines and can they be loaded twice?

I am having problems loading Engine PKCS #11 as a dynamic engine using python and M2Crypto. I am trying to access an Aladdin USB eToken. Here are the important steps from my python code: dynamic = Engine.load_dynamic_engine("pkcs11",…
Becky
  • 11
  • 3
0
votes
1 answer

socket.setdefaulttimeout interacting with M2Crypto connection

I'm making a secure SSL connection to a server using python and M2Crypto. See code below. from M2Crypto import SSL, m2,x509 from M2Crypto.m2xmlrpclib import Server, SSL_Tranport ctx =…
Becky
  • 11
  • 3
0
votes
1 answer

M2Crypto SSL and compression method

How to set compression method for SSL/TLS connection created with M2Crypto and TwistedProtocolWrapper
estin
  • 3,051
  • 1
  • 24
  • 31
0
votes
1 answer

How to create a degenerate PKCS7 file using OpenSSL C library?

How can I create a degenerate PKCS#7 file given a single X509 certificate using OpenSSL C libraries? Details: I extended the _pkcs7.i SWIG interface file in M2Crypto by adding a new function called pkcs7_create_deg. I get a segmentation fault when…
HanSooloo
  • 713
  • 2
  • 7
  • 20
0
votes
1 answer

Trouble pip installing M2Crypto on Centos

When I run pip install M2Crypto, I get: /usr/include/openssl/opensslconf.h:31: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing. error: command 'swig' failed…
mowwwalker
  • 16,634
  • 25
  • 104
  • 157
0
votes
0 answers

M2Crypto encrypt / decrypt

I am using M2Crypto in python with the following code: import M2Crypto; def encrypt_file(key, in_filename, out_filename,iv): cipher=M2Crypto.EVP.Cipher('aes_256_cfb',key,iv, op=1) with open(in_filename, 'rb') as infile: with…
AlexandruC
  • 3,527
  • 6
  • 51
  • 80
0
votes
2 answers

M2Crypto: AttributeError for load_dynamic_engine()

I am using M2Crypto-0.20.2. I want to use engine_pkcs11 from the OpenSC project and the Aladdin PKI client for token based authentication making xmlrpc calls over ssl. I am trying to load the PKCS#11 engine as well as the Aladdin module (see code…
Becky
  • 75
  • 1
  • 4
0
votes
2 answers

Reference M2Crypto from within Jython

I'm building a cross-platform Java project that has to reference some python2.7 scripts. Jython seems perfect for this, but there are a couple problems: the python script uses M2Crypto. Is there any way to include M2Crypto into Jython in a way…
Taconut
  • 951
  • 4
  • 10
  • 29
0
votes
1 answer

M2Crypto doesn't work like openssl for AES-128 CBC

I have a simple python script import binascii import M2Crypto data = 'my super secret text to encrypt' print 'secret data: ', data key = '\0' * 16 iv = key key_iv_as_hex = binascii.b2a_hex(key) print 'hex representation of key/iv: ',…
Zelid
  • 6,905
  • 11
  • 52
  • 76
0
votes
1 answer

How to make M2Crypto work with aes128-cbc-pkcs7?

In Python script I need to decrypt data encrypted by aes128-cbc-pkcs7 I checked example in Problem with M2Crypto's AES answer, but it describes aes128-cbc and I have no idea how to adopt it for aes128-cbc-pkcs7 All I have is a key: key =…
Zelid
  • 6,905
  • 11
  • 52
  • 76
0
votes
2 answers

Python FTP-SSL / FTP-TLS: Verifying Public Certificate?

I'm using Python 2.7.5 (not 3.X) and I need to verify a FTPS (FTP-TLS) public certificate. That is, I want to verify it against the standard certificate authority, not a custom key. (Similar to HTTPS.) I see some options but I cannot get them to…
SilentSteel
  • 2,344
  • 1
  • 28
  • 28