Help save net neutrality! Learn more.

#52 Cannot match secret key ID

3.0 branch
Remailer (20)

The remailer will not process any Mix message and write
"Info: Invalid type 2 message from ..." errors in the log.

The first time I encountered this problem, updating the
remailer keys (-K option) solved magically the problem.

A few months later, while playing with the
configuration and after recompiling the program, the
same error returns. After some tracking and debugging,
it leads to a condition in keymgt.c that is never met:

if (keyid && !streq(line, idstr)

Changing this line to :

if (keyid && (strncmp(line, idstr, 32) != 0))

fixed the condition. I did not investigate further, but
it seems to me that the only differences between streq
(that calls strcmp) and strncmp would be white space of
null termination.


  • Colin Tuckley

    Colin Tuckley - 2006-02-19

    Logged In: YES

    I took a bit closer look at this and discovered that there
    were really two

    The string comparison was not limited to 32 chars which
    would be a sensible

    More importantly, we were putting 32 chars and a newline and
    a NULL into an
    array that was only 33 long!

    The code was repeated for the public key too, so I've
    changed both in svn.

  • Colin Tuckley

    Colin Tuckley - 2006-06-23
    • assigned_to: nobody --> colintu
    • status: open --> closed-fixed

Log in to post a comment.