[Bug 884] DSA keys (id_dsa.pub) with 8192 bits or more aren't correctly recognized

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Jun 24 15:27:41 EST 2004


dtucker at zip.com.au changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED

------- Additional Comments From dtucker at zip.com.au  2004-06-24 15:27 -------
> every attempt to raise the keysize over 8192 bits limit won't work

Maybe a limit in OpenSSL's DSA functions?

Your read_whole_line() function seems a lot more complicated than it needs to
be.  xrealloc will leave the file content intact, so instead of ftell/fseek/goto
you can just initialise everthing to zero/NULL then just repeatedly read chunks
until you get a newline, eg,

while (1) {
        buf = xrealloc(buf, size + CHUNKSZ);
        size += CHUNKSZ;
        nextpart = buf + len;
        if (fgets(nextpart, CHUNKSZ, f) == NULL)
        len += strlen(nextpart);
        if (buf[len - 1] == '\n')

(For bonus points, add some better handling of fgets() == NULL.  Or use
buffer_append instead of xrealloc.)

Anyway, an 8kbit key is just over 4KBytes encoded and I don't think it's worth
the extra complexity of making it dynamic just to save a couple of KB of stack

Either way key_try_load_public shouldn't pass incomplete lines to key_read, though.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the openssh-bugs mailing list