mirror of
https://github.com/samba-team/samba.git
synced 2025-12-19 12:23:49 +03:00
CVE-2020-25719 tests/krb5: Add is_tgt() helper method
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14686 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Jule Anger
parent
43df8d0b2e
commit
4a792ad92d
@@ -3086,8 +3086,7 @@ class RawKerberosTest(TestCaseInTempDir):
|
|||||||
def verify_ticket(self, ticket, krbtgt_key, expect_pac=True,
|
def verify_ticket(self, ticket, krbtgt_key, expect_pac=True,
|
||||||
expect_ticket_checksum=True):
|
expect_ticket_checksum=True):
|
||||||
# Check if the ticket is a TGT.
|
# Check if the ticket is a TGT.
|
||||||
sname = ticket.ticket['sname']
|
is_tgt = self.is_tgt(ticket)
|
||||||
is_tgt = self.is_tgs(sname)
|
|
||||||
|
|
||||||
# Decrypt the ticket.
|
# Decrypt the ticket.
|
||||||
|
|
||||||
@@ -3506,6 +3505,10 @@ class RawKerberosTest(TestCaseInTempDir):
|
|||||||
name = principal['name-string'][0]
|
name = principal['name-string'][0]
|
||||||
return name in ('krbtgt', b'krbtgt')
|
return name in ('krbtgt', b'krbtgt')
|
||||||
|
|
||||||
|
def is_tgt(self, ticket):
|
||||||
|
sname = ticket.ticket['sname']
|
||||||
|
return self.is_tgs(sname)
|
||||||
|
|
||||||
def get_empty_pac(self):
|
def get_empty_pac(self):
|
||||||
return self.AuthorizationData_create(AD_WIN2K_PAC, bytes(1))
|
return self.AuthorizationData_create(AD_WIN2K_PAC, bytes(1))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user