Pay attention to the size OpenSSL returns.

This avoids creating an excessively padded signature and potentially
 leaking junk in memory.

This is also untested and I am python/ctypes clueless. Someone should check this before merging it.