~ubuntu-branches/ubuntu/raring/python2.7/raring-security

« back to all changes in this revision

Viewing changes to debian/patches/ssl.match_hostname.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-04-08 20:59:52 UTC
  • Revision ID: package-import@ubuntu.com-20130408205952-i2szd0xs59tu16at
Tags: 2.7.4-1ubuntu2
Backport ssl.CertificateError as well. Closes: #626539. LP: #1166344.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: b/Lib/ssl.py
 
2
===================================================================
1
3
--- a/Lib/ssl.py
2
4
+++ b/Lib/ssl.py
3
 
@@ -96,6 +96,59 @@
 
5
@@ -96,6 +96,62 @@
4
6
 # (OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')
5
7
 _DEFAULT_CIPHERS = 'DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2'
6
8
 
 
9
+class CertificateError(ValueError):
 
10
+    pass
 
11
+
7
12
+def _dnsname_to_pat(dn):
8
13
+    pats = []
9
14
+    for frag in dn.split(r'.'):
60
65
 
61
66
 class SSLSocket(socket):
62
67
 
 
68
Index: b/Doc/library/ssl.rst
 
69
===================================================================
63
70
--- a/Doc/library/ssl.rst
64
71
+++ b/Doc/library/ssl.rst
65
72
@@ -499,6 +499,29 @@