How to debug encode_krb5_error?

Weijun Wang at
Wed Jun 12 20:40:41 EDT 2013

On 6/12/13 11:43 PM, Benjamin Kaduk wrote:
> On Wed, 12 Jun 2013, Weijun Wang wrote:
>> Hi All
>> I am trying to get a KRB-ERROR output on the acceptor side when the
>> AP-REQ is a replay. This is inside lib/gssapi/krb5/accept_sec_context.c.
>> When a replay is received, the kg_accept_krb5() function calls
>> krb5_mk_error(), which then calls encode_krb5_error() inside
>> lib/krb5/krb/mk_error.c. The last function returns 1859794433 (or
>> 6eda3601). What does it mean? It is automatically generated by some
>> ASN.1 parser and I cannot debug into it.
> 1859794433 is ASN1_MISSING_FIELD (see lib/krb5/error_tables/asn1_err.h
> in a build tree).
> The file src/lib/krb5/asn.1/README.asn1 has some tips for debugging
> encoder/decoder issues at the end, though it seems more focused on
> crashes than failure returns.  Stepping through encode_krb5_error in the
> debugger might still be helpful, though.  I am not sure whether your
> "cannot debug into it" is for source inspection or a live debugger such
> as gdb.

It was source inspection.

I understand the problem now. Greg answered in another mail that a 
non-OPTIONAL field is missing in that KRB-ERROR.


> -Ben Kaduk

More information about the krbdev mailing list