Skip to content

Commit

Permalink
Merge pull request #45 from CravateRouge/patch-2
Browse files Browse the repository at this point in the history
Fix crealm tgt/tgs rep when decoding
  • Loading branch information
skelsec authored Jan 1, 2025
2 parents 69f3b55 + c3bc04d commit 3fe9585
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minikerberos/common/ccache.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def to_tgt(self):
tgt_rep = {}
tgt_rep['pvno'] = krb5_pvno
tgt_rep['msg-type'] = MESSAGE_TYPE.KRB_AS_REP.value
tgt_rep['crealm'] = self.server.realm.to_string()
tgt_rep['crealm'] = self.client.realm.to_string()
tgt_rep['cname'] = self.client.to_asn1()[0]
tgt_rep['ticket'] = Ticket.load(self.ticket.to_asn1()).native
tgt_rep['enc-part'] = enc_part.native
Expand All @@ -138,7 +138,7 @@ def to_tgs(self):
tgt_rep = {}
tgt_rep['pvno'] = krb5_pvno
tgt_rep['msg-type'] = MESSAGE_TYPE.KRB_AS_REP.value
tgt_rep['crealm'] = self.server.realm.to_string()
tgt_rep['crealm'] = self.client.realm.to_string()
tgt_rep['cname'] = self.client.to_asn1()[0]
tgt_rep['ticket'] = Ticket.load(self.ticket.to_asn1()).native
tgt_rep['enc-part'] = enc_part.native
Expand Down Expand Up @@ -844,4 +844,4 @@ def to_b64(self):

@staticmethod
def from_b64(b64data):
return CCACHE.from_bytes(base64.b64decode(b64data))
return CCACHE.from_bytes(base64.b64decode(b64data))

0 comments on commit 3fe9585

Please sign in to comment.