Commit Graph

100 Commits

Author SHA1 Message Date
Scott Kitterman 8713e6e9f8 Move dkim/dns.py to dkim/dnsplug.py to stay clear of dnspython dns namespace. 2011-06-16 14:47:45 -05:00
Stuart D. Gathman 1f89083c1a Doc update 2011-06-15 10:30:15 -04:00
Stuart D. Gathman a673d2332a dd testcase for bug 587783 2011-06-15 10:27:13 -04:00
Stuart D. Gathman 2eeec91fc1 Fix except clauses for py3 2011-06-15 06:56:45 -04:00
Stuart D. Gathman 4317168f89 python-2.6.6 has upper case hash.name (2.6.5 has lower case). 2011-06-14 18:18:22 -04:00
Stuart D. Gathman 47fbf5a02b pydns driver did not join split TXT records. Try for Milter.dns which
follows CNAME (is this needed?)
2011-06-14 16:40:16 -04:00
Stuart D. Gathman 70c5b55dbf Put back InvalidTagValue trap 2011-06-14 15:51:19 -04:00
Stuart D. Gathman 6fb16453d9 Strip leading and trailing whitespace before parsing. 2011-06-14 15:47:04 -04:00
Stuart D. Gathman dac0f36522 Provide a class API so that selector, domain can be recovered on verify. 2011-06-14 15:16:33 -04:00
Stuart D. Gathman a07833297e Handle missing record 2011-06-14 15:15:49 -04:00
Stuart D. Gathman d2f6840748 Clients need to test for any DKIM exception. 2011-06-11 18:23:45 -04:00
William Grant e9d01800de Canonicalizationpolicy.from_c_value() now raise InvalidCanonicalizationPolicyErrors instead of logging and returning None. 2011-06-04 15:51:14 +10:00
William Grant 3008ad76a7 Capitalise and unexport dkim.canonicalization.algorithms. 2011-06-04 14:38:29 +10:00
William Grant f8e938c152 Use CanonicalizationPolicy in sign(). 2011-06-04 14:37:18 +10:00
William Grant 6b4b98478b Add CanonicalizationPolicy.to_c_value(). 2011-06-04 14:37:07 +10:00
William Grant 206c860890 Pull c= value parsing out into Canonicalizationpolicy.from_c_value. 2011-06-04 14:30:19 +10:00
William Grant 7b1a3f70dc Add CanonicalizationPolicy, which encapsulates the combined hybrid simple/relaxed schemes. 2011-06-04 14:05:54 +10:00
William Grant 19b554212e Quick fix to make end-to-end tests verify all canonicalization cases. Tests for bug #587783. 2011-06-04 13:46:57 +10:00
William Grant 382d9157c5 Fix get_txt to assume unicode results. 2011-06-03 23:13:45 +10:00
William Grant 472750c0db Signature algorithm names are now defined in dkim.crypto. 2011-06-03 22:34:23 +10:00
William Grant 5f949337d1 Handle Unicode in get_txt. 2011-06-03 22:24:21 +10:00
William Grant a82f3110ea Split out DNS utilities into their own module. 2011-06-03 22:07:42 +10:00
William Grant b78a41d6bf Add an __all__. 2011-06-03 22:04:21 +10:00
William Grant 5da23e5856 rstrip header field names in relaxed, as the spec says. 2011-06-03 22:03:41 +10:00
William Grant 61cd0e1080 Factor out all the canonicalization regexps. 2011-06-03 22:03:14 +10:00
William Grant 28aaa6f2f2 dkim.canonicalization now has an algorithms dict mapping names to algorithms. Use it. 2011-06-03 21:52:33 +10:00
William Grant a1fc55bcaa Rewrite tests to use an assertCanonicalForm helper. 2011-06-03 21:25:20 +10:00
William Grant 589853aee5 Split out dkim.canonicalization, and test it. Note that test_wsp_strips_headers is correctly failing, as trailing whitespace is not stripped from header names. 2011-06-03 21:16:31 +10:00
William Grant f4875a8768 Don't crash when asked to verify a badly encoded domain or selector. 2011-06-02 23:07:01 +10:00
William Grant 30bf1bc171 Fix DeprecationWarnings in tests. 2011-06-02 19:12:49 +10:00
William Grant d9e3b49a8e Make encodings all ascii/utf-8 as appropriate. 2011-03-19 22:44:46 +11:00
William Grant bc78c7d1d0 python2.6 doesn't have assertRaisesRegexp. 2011-03-19 21:25:00 +11:00
William Grant 672c6084e3 python2.6 base64.b64encode doesn't like bytearrays... convert to bytes instead. 2011-03-19 21:24:48 +11:00
William Grant ed9bc94fa2 Fix test_dkim's mock dnstxt to do unicode. 2011-03-19 21:24:22 +11:00
William Grant 44db746563 More bytestring conversions in __init__. pydns seems to like to deal with unicode, so convert on the way in and back. 2011-03-19 21:01:54 +11:00
William Grant 3cf0a5ce9f Merge pydns support from trunk. 2011-03-19 20:58:23 +11:00
William Grant 128288a20c Fall back to pydns if dnspython is unavailable. 2011-03-19 20:56:37 +11:00
William Grant 8cf859db4f bytesify __init__. Tests now parse if dns.resolver is removed. 2011-03-19 20:09:01 +11:00
William Grant e176c8fd4b Bytesify test_dkim. 2011-03-19 20:08:31 +11:00
William Grant df47a7d88e And fix test_crypto to pass. 2011-03-19 19:13:48 +11:00
William Grant 54e553ee8d Fix dkim.asn1. 2011-03-19 19:13:34 +11:00
William Grant 7949bff344 Make dkim.crypto mostly work. 2011-03-19 19:04:11 +11:00
William Grant e220d2da1d asn1_length fixed. 2011-03-19 18:54:31 +11:00
William Grant be1368f374 Make str2int/int2str work with bytes. 2011-03-19 18:52:35 +11:00
William Grant 9af52236fc parse_tag_value now deals with bytes. 2011-03-19 18:47:51 +11:00
William Grant 88915e3a01 Fix some test_crypto literals to be byteses. 2011-03-19 18:45:04 +11:00
William Grant dcf0580406 Open data files as binary for now. 2011-03-19 18:44:49 +11:00
William Grant f5db65966e Use new 2.6/3.x except syntax. 2011-03-19 18:36:19 +11:00
William Grant e0fca7e613 Stop using deprecated map(). 2011-03-19 18:36:00 +11:00
William Grant 46c57176a2 Use normal Python logging everywhere, not printing to debuglog. 2011-03-19 18:27:11 +11:00