#52 Cannot match secret key ID

3.0 branch
closed-fixed
Colin Tuckley
Remailer (20)
5
2006-06-23
2006-02-16
No

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.

Discussion

  • Colin Tuckley
    Colin Tuckley
    2006-02-19

    Logged In: YES
    user_id=618735

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

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

    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