This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Based on the code from Scrapy | |
BSD-3-Clause | |
""" | |
from __future__ import absolute_import, unicode_literals | |
import re | |
from urlparse import urlparse | |
from twisted.internet import defer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) Jean-Paul Calderone | |
# See LICENSE for details. | |
from sys import argv, stdout | |
from socket import socket | |
from OpenSSL.SSL import TLSv1_METHOD, Context, Connection | |
def test_ssl_client_sni(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
An ldaptor LDAP server which can authenticate based on UPN, as AD does. | |
The LDAP entry needs to have the `userPrincipalName` attribute set. | |
""" | |
from __future__ import absolute_import | |
from ldaptor import interfaces | |
from ldaptor.protocols import pureldap | |
from ldaptor.protocols.ldap import distinguishedname, ldaperrors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x3d0ceF43945Ff0aB47403db22bf53d118d2d0990 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on the prompt from | |
# http://www.gilesorr.com/bashprompt/prompts/twtty.html | |
function prompt_command { | |
TERMWIDTH=${COLUMNS} | |
# Calculate the width of the prompt: | |
hostnam=$(echo -n $HOSTNAME | sed -e "s/[\.].*//") | |
# "whoami" and "pwd" include a trailing newline | |
#usernam=$(whoami) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CRLValidator(object): | |
""" | |
Helper for validating certificates against CRL. | |
For now it only support a single CRL signed by a single CA. | |
It provides the `CRLValidator.validate(certificate)` method which can be | |
used as a callback for `SSLContext.set_verify`. | |
""" | |
_random = random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.7.12 (default, Jul 1 2016, 15:12:24) | |
>>> import cryptography | |
>>> import OpenSSL | |
>>> cryptography.__version__ | |
'1.7.2' | |
>>> OpenSSL.__version__ | |
'16.2.0' | |
>>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2014 Adi Roiban. | |
# See LICENSE for details. | |
""" | |
Code for handling data submitted via HTTP form. | |
We should try to keep this code independent of Chevah project as we plan | |
to send it upstream in Twisted. | |
""" | |
from StringIO import StringIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Script to demonstrate the Client.transport.connected state | |
# | |
from twisted.internet.protocol import Protocol | |
from twisted.internet.protocol import Factory | |
from twisted.internet.endpoints import SSL4ServerEndpoint, TCP4ServerEndpoint | |
from twisted.internet.endpoints import ( | |
SSL4ClientEndpoint, TCP4ClientEndpoint, connectProtocol) | |
from twisted.internet import reactor | |
from twisted.internet.ssl import PrivateCertificate, ClientContextFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git twisted/python/_pydoctor.py twisted/python/_pydoctor.py | |
index 76a5458..4d064b4 100644 | |
--- twisted/python/_pydoctor.py | |
+++ twisted/python/_pydoctor.py | |
@@ -60,6 +60,13 @@ class TwistedSphinxInventory(SphinxInventory): | |
# as an exceptional case. | |
# We get the base URL from IInterface which is assume that is | |
# always and already well defined in the Sphinx index. | |
+ link = self._links.get('zope.interface.interfaces.IInterface') | |
+ |