[Bug 509562] Re: euca-bundle-image returns Odd-length string error
smoser at canonical.com
Mon Sep 20 14:45:43 BST 2010
comment 12 contained a bad analysis.
The code that is now committed to maverick gets 31.5 hex chars of randomness rather than 32.
I'm not going to bother changing in maverick.
That said, the right code for upstream is probably something like:
# get 17 bytes of randomness with top bit a '1'.
# convert to a hex string like '0x<hex 34 digits>L'
# then take the last 32 of the hex digits, giving 32 random hex chars
iv = (hex(BN.rand(17 * 8,top=0)))[4:36]
I'm attaching a better patch for upstream.
** Patch added: "patch against upstream euca2ools (revno 309)"
** Also affects: euca2ools (Ubuntu Maverick)
Status: Fix Released
** Also affects: eucalyptus (Ubuntu Maverick)
euca-bundle-image returns Odd-length string error
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to eucalyptus in ubuntu.
More information about the Ubuntu-server-bugs