Skip to content

Instantly share code, notes, and snippets.

View wallrj's full-sized avatar
🎹

Richard Wall wallrj

🎹
  • Bristol, England
  • 05:33 (UTC +01:00)
View GitHub Profile
@wallrj
wallrj / server.tac.py
Last active December 19, 2015 06:29
A systemd socket activated TLS twisted.web server.
"""
A systemd socket activated TLS twisted.web server.
$ tree /srv/www/
/srv/www/
`-- www.example.com
|-- server.key
|-- server.pem
|-- server.tac.py
`-- static
[richard@zorin trunk]$ twistd --nodaemon mail --maildirdbmdomain=example.com=/tmp/example.com --alias=/tmp/example.com/aliases --user=joe=password --user=bob=password
2013-08-19 14:23:38+0100 [-] Log opened.
2013-08-19 14:23:38+0100 [-] twistd 13.1.0 (/usr/bin/python 2.7.5) starting up.
2013-08-19 14:23:38+0100 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2013-08-19 14:23:38+0100 [-] POP3Factory starting on 8110
2013-08-19 14:23:38+0100 [-] Starting factory <twisted.mail.protocols.POP3Factory instance at 0x15f6050>
2013-08-19 14:23:38+0100 [-] SMTPFactory starting on 8025
2013-08-19 14:23:38+0100 [-] Starting factory <twisted.mail.protocols.SMTPFactory instance at 0x15f64d0>
2013-08-19 14:23:42+0100 [twisted.mail.protocols.SMTPFactory] Connection from IPv4Address(TCP, '127.0.0.1', 35944)
2013-08-19 14:24:19+0100 [SMTP,0,127.0.0.1] Unhandled Error
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Twisted Names</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
class ValueConstant(object):
_container = None
_name = None
def __init__(self, value):
self.value = value
def _realize(self, container, name):
self._container = container
[richard@zorin use-opentls]$ trial OpenSSL.test
/home/richard/projects/opentls/trunk/tls/c/__pycache__/_cffi__x54fd29d7x1106ffac.c: In function ‘_cffi_f_SSLv2_client_method’:
/home/richard/projects/opentls/trunk/tls/c/__pycache__/_cffi__x54fd29d7x1106ffac.c:11090:12: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
{ result = SSLv2_client_method(); }
^
/home/richard/projects/opentls/trunk/tls/c/__pycache__/_cffi__x54fd29d7x1106ffac.c: In function ‘_cffi_f_SSLv2_method’:
/home/richard/projects/opentls/trunk/tls/c/__pycache__/_cffi__x54fd29d7x1106ffac.c:11104:12: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
{ result = SSLv2_method(); }
^
/home/richard/projects/opentls/trunk/tls/c/__pycache__/_cffi__x54fd29d7x1106ffac.c: In function ‘_cffi_f_SSLv2_server_method’:
(cryptography)[richard@zorin docs]$ make doctest
sphinx-build -b doctest -d _build/doctrees . _build/doctest
Running Sphinx v1.2b2
loading pickled environment... done
building [doctest]: targets for 8 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
running tests...
Document: primitives/symmetric-encryption
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
python-gnutls x86_64 1.2.4-1.fc19 fedora 85 k
Installing for dependencies:
python-twisted-core x86_64 12.2.0-2.fc19 fedora 2.5 M
[richard@zorin trunk]$ svn diff | coverage-reporter --patch=stdin --patch-level=0 --annotate .
Traceback (most recent call last):
File "/home/richard/.local/bin/coverage-reporter", line 5, in <module>
__main__.main(sys.argv)
File "/home/richard/.local/lib/python2.7/site-packages/coverage_reporter/__main__.py", line 24, in main
path_list = cfg.parse_options(argv[1:])
File "/home/richard/.local/lib/python2.7/site-packages/coverage_reporter/config.py", line 55, in parse_options
self.plugin_manager.call_method('parse_options', options)
File "/home/richard/.local/lib/python2.7/site-packages/coverage_reporter/plugins.py", line 134, in call_method
method(*args, **kwargs)
[richard@zorin trunk]$ trial -j4 twisted
...
POP3TLSTestCase
test_startTLS ... [SKIPPED]
POP3ClientMiscTestCase
testStatError ... [OK]
Unhandled Error
Traceback (most recent call last):
File "/home/richard/projects/Twisted/trunk/twisted/protocols/amp.py", line 889, in _commandReceived
deferred = self.dispatchCommand(box)
@wallrj
wallrj / ednsplan.org
Last active December 28, 2015 07:58
Source text of the Twisted EDNS(0) plan at: https://twistedmatrix.com/trac/wiki/EDNS0

= EDNS Plan =

PageOutline(1-4)

Twisted includes a comprehensive set of DNS components, collectively known as twisted Names.

  • wiki:TwistedNames

This is a plan for the development of EDNS(0) and DNSSEC support in Twisted Names.