1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use red_asn1::{SequenceOf, Asn1Object};
use red_asn1_derive::Sequence;
use crate::{Int32, PaData, KdcReqBody, KdcReq};
#[derive(Sequence, Debug, PartialEq, Clone)]
#[seq(application_tag = 12)]
pub struct TgsReq {
#[seq_field(context_tag = 1)]
pub pvno: Int32,
#[seq_field(context_tag = 2)]
pub msg_type: Int32,
#[seq_field(context_tag = 3)]
pub padata: Option<SequenceOf<PaData>>,
#[seq_field(context_tag = 4)]
pub req_body: KdcReqBody,
}
impl Default for TgsReq {
fn default() -> Self {
return Self {
pvno: 5,
msg_type: 12,
padata: Option::default(),
req_body: KdcReqBody::default()
}
}
}
impl From<KdcReq> for TgsReq {
fn from(req: KdcReq) -> Self {
Self {
pvno: req.pvno,
msg_type: 12,
padata: req.padata,
req_body: req.req_body
}
}
}