Skip to content

Thread 1: "TrustKit was initialized with an invalid domain 5X.X3X.1X4.XXX" #341

Closed

Description

@featlast

Greetings community, would it be possible to add any additional properties or settings to be able to add an IP address as a domain in TrustKit? It would be very helpful.

let trustKitConfig: [String: Any] = [
kTSKSwizzleNetworkDelegates: true,
kTSKPinnedDomains: [
"5X.X3X.1X4.XXX": [
kTSKIncludeSubdomains: true,
kTSKEnforcePinning: true,
kTSKDisableDefaultReportUri: true,
kTSKPublicKeyHashes: [
"sha256/cXXXXXXX8d1cba4028XXXXXXXXXXXXXXXX"
]
]
]
]

   TrustKit.initSharedInstance(withConfiguration:trustKitConfig)

Activity

  1. alexanderdibenedetto commented on Apr 27, 2026

    @alexanderdibenedetto
    Contributor

    There's no reason TrustKit can't support IP Address for this. We currently have logic performs input validation on this pinned domain - that is where this is being stopped. We do some host name verification logic also.

    I'd support reviewing a Pull Request that enhances TrustKit to allow this - if you or anyone else wants to take the first stab at it.

  2. alexanderdibenedetto commented on Oct 15, 2026

    @alexanderdibenedetto
    Contributor

    Still waiting for community assistance in this matter, otherwise I'll try to get to it later this year!

  3. added this to the 4.0.0 milestone on Oct 22, 2026
  4. alexanderdibenedetto commented on Oct 22, 2026

    @alexanderdibenedetto
    Contributor

    Fixed in #371

  5. added a commit that references this issue on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions