title: Gen public key from xml data file using M2Crypto for signature verification
body: <p>I have pub key in xml format:</p>
  
  <pre><code>&lt;RSAKeyValue&gt;&lt;Modulus&gt;xF9y25EXh8n99sXtU/JAsYTwML6PB7gSCE8tWw8Www2KBfDqohQBL8FMs8jzsDQa7WwoEmiVJ1resEC9YXJGbwQyWgb9qgooC9oSnCB/TkRdBybwby0DKuZOzq+609OBGkwWpgnS4QVCBc6eW+10l3qE3/2hKdcSV+08iRYp7zs=&lt;/Modulus&gt;&lt;Exponent&gt;AQAB&lt;/Exponent&gt;&lt;/RSAKeyValue&gt;
  </code></pre>
  
  <p>So i try thms like this:</p>
  
  <pre><code>from M2Crypto import RSA
  from xml.dom.minidom import parseString
  import base64
  
  dom = parseString(pubKey)
  e = base64.b64decode(dom.getElementsByTagName('Exponent')[0].childNodes[0].data)
  n = base64.b64decode(dom.getElementsByTagName('Modulus')[0].childNodes[0].data)
  rsa = RSA.new_pub_key((e, n))
  </code></pre>
  
  <p>Got error:</p>
  
  <pre><code>    ...
      rsa = RSA.new_pub_key((e, n))
    File "/usr/lib/pymodules/python2.6/M2Crypto/RSA.py", line 390, in new_pub_key
      m2.rsa_set_e(rsa, e)
  M2Crypto.RSA.RSAError: invalid length
  </code></pre>
  
  <p>Any ideas?</p>