01-nopycrypto.patch revision 2521
2521N/A--- glance-2013.1.4/glance.egg-info/requires.txt.orig Thu Jan 16 22:08:47 2014
2521N/A+++ glance-2013.1.4/glance.egg-info/requires.txt Thu Jan 16 22:23:01 2014
2521N/A oslo.config>=1.1.0
2521N/A--- glance-2013.1.4/glance/common/crypt.py.orig Thu Oct 17 11:22:18 2013
2521N/A+++ glance-2013.1.4/glance/common/crypt.py Thu Jan 16 22:42:41 2014
2521N/A-from Crypto.Cipher import AES
2521N/A-from Crypto.Random import random
2521N/A+from M2Crypto.EVP import Cipher
2521N/A+from glance.common import exception
2521N/A+ raise exception.Invalid(msg)
2521N/A- sr = random.StrongRandom()
2521N/A- pad = ''.join(chr(sr.randint(1, 0xFF)) for i in range(pad_length - 1))
2521N/A- init_vector = Random.get_random_bytes(16)
2521N/A- padded = cypher.encrypt(pad(str(plaintext)))
2521N/A+ init_vector = os.urandom(16)
2521N/A+ padded = cipher.update(str(plaintext))
2521N/A+ padded = padded + cipher.final()
2521N/A return base64.urlsafe_b64encode(init_vector + padded)
2521N/A ciphertext = base64.urlsafe_b64decode(str(ciphertext))
2521N/A- padded = cypher.decrypt(ciphertext[16:])
2521N/A- return padded[:padded.rfind(chr(0))]
2521N/A+ padded = cipher.update(ciphertext[16:])
2521N/A+ padded = padded + cipher.final()
2521N/A--- glance-2013.1.4/tools/pip-requires.orig Thu Oct 17 11:22:19 2013
2521N/A+++ glance-2013.1.4/tools/pip-requires Thu Jan 16 22:22:56 2014
2521N/A oslo.config>=1.1.0