kerberos_asn1/
krb_safe.rs

1use crate::{Int32, KrbSafeBody, Checksum};
2use red_asn1::Asn1Object;
3use red_asn1_derive::Sequence;
4
5
6/// (*KRB-SAFE*) Used to send a tamper-proof message to a peer.
7/// Defined in RFC4120, section 5.6.1.
8/// ```asn1
9/// KRB-SAFE        ::= [APPLICATION 20] SEQUENCE {
10///           pvno            [0] INTEGER (5),
11///           msg-type        [1] INTEGER (20),
12///           safe-body       [2] KRB-SAFE-BODY,
13///           cksum           [3] Checksum
14/// }
15/// ```
16#[derive(Sequence, Default, Debug, Clone, PartialEq)]
17#[seq(application_tag = 20)]
18pub struct KrbSafe {
19    #[seq_field(context_tag = 0)]
20    pub pvno: Int32,
21    #[seq_field(context_tag = 1)]
22    pub msg_type: Int32,
23    #[seq_field(context_tag = 2)]
24    pub safe_body: KrbSafeBody,
25    #[seq_field(context_tag = 3)]
26    pub cksum: Checksum
27
28}