fn krb5_log_response(jsb: &mut JsonBuilder, tx: &mut KRB5Transaction) -> Result<(), JsonError>
{
+ jsb.open_object("krb5")?;
match tx.error_code {
Some(c) => {
jsb.set_string("msg_type", &format!("{:?}", tx.msg_type))?;
jsb.set_string("ticket_encryption", &refs)?;
jsb.set_bool("ticket_weak_encryption", test_weak_encryption(x))?;
}
+ jsb.close()?;
return Ok(());
}
#[no_mangle]
-pub extern "C" fn rs_krb5_log_json_response(jsb: &mut JsonBuilder, tx: &mut KRB5Transaction) -> bool
+pub extern "C" fn rs_krb5_log_json_response(tx: &mut KRB5Transaction, jsb: &mut JsonBuilder) -> bool
{
krb5_log_response(jsb, tx).is_ok()
}
return TM_ECODE_FAILED;
}
- jb_open_object(jb, "krb5");
- if (!rs_krb5_log_json_response(jb, krb5tx)) {
+ if (!rs_krb5_log_json_response(krb5tx, jb)) {
goto error;
}
- jb_close(jb);
OutputJsonBuilderBuffer(jb, thread);
{ ALPROTO_NTP, NULL }, // no logging
{ ALPROTO_FTPDATA, EveFTPDataAddMetadata },
{ ALPROTO_TFTP, (EveJsonSimpleTxLogFunc)rs_tftp_log_json_request },
- { ALPROTO_IKE, NULL }, // special: uses state
- { ALPROTO_KRB5, NULL }, // TODO missing
+ { ALPROTO_IKE, NULL }, // special: uses state
+ { ALPROTO_KRB5, (EveJsonSimpleTxLogFunc)rs_krb5_log_json_response },
{ ALPROTO_QUIC, rs_quic_to_json },
{ ALPROTO_DHCP, NULL }, // TODO missing
{ ALPROTO_SNMP, (EveJsonSimpleTxLogFunc)rs_snmp_log_json_response },