From f0b79e1f39092e6400126f79b9312ac4fe936b63 Mon Sep 17 00:00:00 2001 From: NinjaCheetah <58050615+NinjaCheetah@users.noreply.github.com> Date: Sun, 12 Jan 2025 22:23:32 -0500 Subject: [PATCH] Match Root-CA00000002-XS00000004 as a dev Ticket --- src/libWiiPy/title/nus.py | 5 +++-- src/libWiiPy/title/ticket.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libWiiPy/title/nus.py b/src/libWiiPy/title/nus.py index 258c451..9b9fd73 100644 --- a/src/libWiiPy/title/nus.py +++ b/src/libWiiPy/title/nus.py @@ -205,8 +205,9 @@ def download_cert_chain(wiiu_endpoint: bool = False, endpoint_override: str = No # XS (Ticket certificate) data. cert_chain += cetk[0x2A4:0x2A4 + 768] # Since the cert chain is always the same, check the hash to make sure nothing went wildly wrong. - if hashlib.sha1(cert_chain).hexdigest() != "ace0f15d2a851c383fe4657afc3840d6ffe30ad0": - raise Exception("An unknown error has occurred downloading and creating the certificate.") + # This is currently disabled because of the possibility that one may be downloading non-retail certs (gasp!). + #if hashlib.sha1(cert_chain).hexdigest() != "ace0f15d2a851c383fe4657afc3840d6ffe30ad0": + # raise Exception("An unknown error has occurred downloading and creating the certificate.") return cert_chain diff --git a/src/libWiiPy/title/ticket.py b/src/libWiiPy/title/ticket.py index fb85c6a..e214caf 100644 --- a/src/libWiiPy/title/ticket.py +++ b/src/libWiiPy/title/ticket.py @@ -160,7 +160,8 @@ class Ticket: limit_value = int.from_bytes(ticket_data.read(4)) self.title_limits_list.append(_TitleLimit(limit_type, limit_value)) # Check certs to see if this is a retail or dev ticket. Treats unknown certs as being retail for now. - if self.signature_issuer.find("Root-CA00000002-XS00000006") != -1: + if (self.signature_issuer.find("Root-CA00000002-XS00000006") != -1 or + self.signature_issuer.find("Root-CA00000002-XS00000004") != -1): self.is_dev = True else: self.is_dev = False