(self, pkt)
| 4046 | |
| 4047 | @ATMT.action(receive_as_rep) |
| 4048 | def decrypt_as_rep(self, pkt): |
| 4049 | # Process PADATAs. This is important for FAST and PKINIT |
| 4050 | self._process_padatas_and_key( |
| 4051 | pkt.root.padata, |
| 4052 | etype=pkt.root.encPart.etype.val, |
| 4053 | ) |
| 4054 | |
| 4055 | if not self.pre_auth: |
| 4056 | log_runtime.warning("Pre-authentication was disabled for this account !") |
| 4057 | |
| 4058 | # Process FAST response |
| 4059 | if self.fast_rep: |
| 4060 | # Verify the ticket-checksum |
| 4061 | self.fast_rep.finished.ticketChecksum.verify( |
| 4062 | self.fast_armorkey, |
| 4063 | bytes(pkt.root.ticket), |
| 4064 | ) |
| 4065 | self.fast_rep = None |
| 4066 | elif self.fast: |
| 4067 | raise ValueError("Answer was not FAST ! Is it supported?") |
| 4068 | |
| 4069 | # Check for PKINIT |
| 4070 | if self.x509 and self.replykey is None: |
| 4071 | raise ValueError("PKINIT was used but no valid PA-PK-AS-REP was found !") |
| 4072 | |
| 4073 | # Decrypt AS-REP response |
| 4074 | enc = pkt.root.encPart |
| 4075 | res = enc.decrypt(self.replykey) |
| 4076 | self.result = self.RES_AS_MODE( |
| 4077 | pkt.root, |
| 4078 | res.key.toKey(), |
| 4079 | res, |
| 4080 | pkt.root.getUPN(), |
| 4081 | ) |
| 4082 | |
| 4083 | @ATMT.receive_condition(SENT_TGS_REQ) |
| 4084 | def receive_krb_error_tgs_req(self, pkt): |
nothing calls this directly
no test coverage detected