Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.27.4 (May 14th, 2026)

BUG FIXES:
* Fix compatibility with Twisted 26 and TLS certificate validation.

## 0.27.3 (February 17th, 2026)

ENHANCEMENTS:
Expand Down
2 changes: 1 addition & 1 deletion ns1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
from .config import Config

version = "0.27.3"
version = "0.27.4"


class NS1:
Expand Down
14 changes: 1 addition & 13 deletions ns1/rest/transport/twisted.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from twisted.web.http_headers import Headers
from twisted.internet.defer import succeed
from twisted.internet.ssl import CertificateOptions
from twisted.internet._sslverify import ClientTLSOptions
from twisted.web.iweb import IPolicyForHTTPS
from zope.interface import implementer

Expand Down Expand Up @@ -83,21 +82,10 @@ def stopProducing(self):


if have_twisted:

class IgnoreHostnameClientTLSOptions(ClientTLSOptions):
def _identityVerifyingInfoCallback(self, connection, where, ret):
# override hostname validation

return

@implementer(IPolicyForHTTPS)
class NoValidationPolicy(object):
def creatorForNetloc(self, hostname, port):
options = CertificateOptions(trustRoot=None)
ascii_hostname = hostname.decode("ascii")
context = options.getContext()

return IgnoreHostnameClientTLSOptions(ascii_hostname, context)
return CertificateOptions(trustRoot=None)


class TwistedTransport(TransportBase):
Expand Down
Loading