-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

it seems that there is a small error in the printing routines of rsa
keys; a leading zero byte is printed before the modulus, making the
output appear longer than it should;

For instance:
<skip rest>
            RSA Public Key: (512 bit)
                Modulus (512 bit):
                    00:e9:c7:92:ab:d6:bd:01:4e:a0:fb:30:70:68:bf:
                    f2:56:65:b5:ff:d1:04:f2:ce:72:a2:ed:66:82:31:
                    e7:8f:4c:00:20:bb:a8:07:72:fa:ae:6e:a3:98:54:
                    72:ed:06:53:1b:8d:c8:85:56:5d:0e:e6:b8:7b:ee:
                    7f:9f:56:6c:97


Which is 65 bytes instead of the 64 actually contained there.

Unless there is a convention that i am not aware of this is not supposed
to happen, i think it should be:

                Public-Key: (512 bit)
                Modulus:
                    e9:c7:92:ab:d6:bd:01:4e:a0:fb:30:70:68:bf:f2:
                    56:65:b5:ff:d1:04:f2:ce:72:a2:ed:66:82:31:e7:
                    8f:4c:00:20:bb:a8:07:72:fa:ae:6e:a3:98:54:72:
                    ed:06:53:1b:8d:c8:85:56:5d:0e:e6:b8:7b:ee:7f:
                    9f:56:6c:97


The attached patch should fix this, and remove the leading zero.

I'm not sure whether the first byte meddling (which is removed by this
patch) had any use, fixing the if statement would maybe have been
enough, but I could not make out any use for it from the code.

Jelte Jansen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjSSIkACgkQ4nZCKsdOncWaXACgy8aBe/7GXB+rd1XuP/6uJFCj
G6MAoIdezIAdhwsTql4+y8isOR27qvbK
=NQS+
-----END PGP SIGNATURE-----

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to