(self, pkt)
| 4115 | |
| 4116 | @ATMT.action(receive_tgs_rep) |
| 4117 | def decrypt_tgs_rep(self, pkt): |
| 4118 | self._process_padatas_and_key(pkt.root.padata) |
| 4119 | |
| 4120 | # Process FAST response |
| 4121 | if self.fast_rep: |
| 4122 | # Verify the ticket-checksum |
| 4123 | self.fast_rep.finished.ticketChecksum.verify( |
| 4124 | self.fast_armorkey, |
| 4125 | bytes(pkt.root.ticket), |
| 4126 | ) |
| 4127 | self.fast_rep = None |
| 4128 | elif self.fast: |
| 4129 | raise ValueError("Answer was not FAST ! Is it supported?") |
| 4130 | |
| 4131 | # Decrypt TGS-REP response |
| 4132 | enc = pkt.root.encPart |
| 4133 | if self.subkey: |
| 4134 | # "In a TGS-REP message, the key |
| 4135 | # usage value is 8 if the TGS session key is used, or 9 if a TGS |
| 4136 | # authenticator subkey is used." |
| 4137 | res = enc.decrypt(self.replykey, key_usage_number=9, cls=EncTGSRepPart) |
| 4138 | else: |
| 4139 | res = enc.decrypt(self.replykey) |
| 4140 | |
| 4141 | # Store result |
| 4142 | self.result = self.RES_TGS_MODE( |
| 4143 | pkt.root, |
| 4144 | res.key.toKey(), |
| 4145 | res, |
| 4146 | self.upn, |
| 4147 | ) |
| 4148 | |
| 4149 | @ATMT.state(final=1) |
| 4150 | def FINAL(self): |
nothing calls this directly
no test coverage detected