From 663cc9b9f96046db0141fc76aea296baec96512b Mon Sep 17 00:00:00 2001 From: Alexis Balbachan Date: Wed, 4 Oct 2023 19:44:54 -0300 Subject: [PATCH] Fixed spn not being found in getST, fixes #1595 --- impacket/krb5/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/impacket/krb5/types.py b/impacket/krb5/types.py index cf6a48cfd..001e55417 100644 --- a/impacket/krb5/types.py +++ b/impacket/krb5/types.py @@ -40,6 +40,7 @@ import struct from pyasn1.codec.der import decoder +from six import ensure_binary from . import asn1 from . import constants @@ -151,7 +152,7 @@ def components_to_asn1(self, name): strings = name.setComponentByName('name-string' ).getComponentByName('name-string') for i, c in enumerate(self.components): - strings.setComponentByPosition(i, c) + strings.setComponentByPosition(i, ensure_binary(c)) return name