UWSGI problems - _DummyThread' object has no attribute '_Thread__block #2

Open
foxx opened this Issue Nov 12, 2012 · 5 comments

Comments

Projects
None yet
2 participants

foxx commented Nov 12, 2012

Full discussion can be found here;
http://lists.unbit.it/pipermail/uwsgi/2012-November/005043.html

Seems that using subprocess.Popen causes some threading problems... Might be worth mentioning on the README that this library uses subprocess

Cal

foxx commented Nov 12, 2012

Replaced this is a pure python implementation, and it seems to work fine now.

http://www.codekoala.com/blog/2009/aes-encryption-python-using-pycrypto/

Might be worth refactoring SimpleAES to use this instead, as it won't rely on subprocess then??

Cal

Owner

nvie commented Nov 13, 2012

My main reason for using the openssl command is have its output remain compatible with CryptoJS and openssl itself. Is the output from that blog you linked to decryptable using the openssl command line?

Owner

nvie commented Nov 13, 2012

FYI: the openssl output when encrypting does not only contain the ciphertext itself, but also a few other pieces of data necessary for the decryption: what padding method is used, what the IV was, what the salt was, what the block size is, etc. This makes it easy to use different encryption parameters, since all metadata is included in the actual encryption result. In other words: this is more than only the raw ciphertext itself.

CryptoJS knows about this format, so it can decode the string easily. Instead of figuring out what the exact format is for the keys, I decided to "just use the openssl commandline". I do share your objections to this solution, but the time investment to implement it all myself was just too much for now.

I'm happy to accept a better solution, though, as long as it remains 100% compatible with the openssl command line.

foxx commented Nov 13, 2012

@nvie Thanks for the feedback, I will put some time aside to take a look at this!

Owner

nvie commented Nov 13, 2012

That would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment