Преглед изворни кода

HUE-902 [core] Add pyOpenSSL 0.11 to build

- pyOpenSSL 0.11 is compatible with openssl lib 0.9.8e and below
- pyOpenSSL 0.11 is the 'main' branch
abec пре 13 година
родитељ
комит
012fa17
100 измењених фајлова са 755 додато и 1554 уклоњено
  1. 515 0
      desktop/core/ext-py/pyOpenSSL-0.11/COPYING
  2. 0 81
      desktop/core/ext-py/pyOpenSSL-0.11/ChangeLog
  3. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/INSTALL
  4. 1 1
      desktop/core/ext-py/pyOpenSSL-0.11/MANIFEST.in
  5. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/RATIONALE
  6. 7 3
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/__init__.py
  7. 7 10
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crl.c
  8. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crl.h
  9. 10 21
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crypto.c
  10. 3 16
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crypto.h
  11. 1 8
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/netscape_spki.c
  12. 1 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/netscape_spki.h
  13. 10 27
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs12.c
  14. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs12.h
  15. 1 5
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs7.c
  16. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs7.h
  17. 2 41
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkey.c
  18. 3 3
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkey.h
  19. 0 3
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/revoked.c
  20. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/revoked.h
  21. 3 86
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509.c
  22. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509.h
  23. 2 29
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509ext.c
  24. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509ext.h
  25. 5 28
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509name.c
  26. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509name.h
  27. 2 9
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509req.c
  28. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509req.h
  29. 1 5
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509store.c
  30. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509store.h
  31. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/py3k.h
  32. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/pymemcompat.h
  33. 2 5
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/rand/rand.c
  34. 6 171
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/connection.c
  35. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/connection.h
  36. 3 100
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/context.c
  37. 2 3
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/context.h
  38. 8 72
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/ssl.c
  39. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/ssl.h
  40. 5 0
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/__init__.py
  41. 9 251
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/test_crypto.py
  42. 1 2
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/test_rand.py
  43. 72 437
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/test_ssl.py
  44. 7 21
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/util.py
  45. 1 1
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/tsafe.py
  46. 2 3
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/util.c
  47. 2 6
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/util.h
  48. 8 0
      desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/version.py
  49. 2 2
      desktop/core/ext-py/pyOpenSSL-0.11/PKG-INFO
  50. 30 0
      desktop/core/ext-py/pyOpenSSL-0.11/README
  51. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/TODO
  52. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/Makefile
  53. 3 84
      desktop/core/ext-py/pyOpenSSL-0.11/doc/pyOpenSSL.tex
  54. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/anno-api.py
  55. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/buildindex.py
  56. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/checkargs.pm
  57. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/cklatex
  58. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/custlib.py
  59. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/cvsinfo.py
  60. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/findacks
  61. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/findmodrefs
  62. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/fix_hack
  63. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/fix_libaux.sed
  64. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/fixinfo.el
  65. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/getpagecounts
  66. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/about.dat
  67. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/about.html
  68. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/blank.gif
  69. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/blank.png
  70. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/contents.gif
  71. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/contents.png
  72. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/index.gif
  73. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/index.png
  74. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/modules.gif
  75. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/modules.png
  76. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/next.gif
  77. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/next.png
  78. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/previous.gif
  79. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/previous.png
  80. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/up.gif
  81. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/up.png
  82. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/index.html.in
  83. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/stdabout.dat
  84. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/style.css
  85. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html2texi.pl
  86. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/indfix.py
  87. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/info/Makefile
  88. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/info/README
  89. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/info/python.dir
  90. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/keywords.py
  91. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/listmodules
  92. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkackshtml
  93. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkhowto
  94. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkinfo
  95. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkmodindex
  96. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mksourcepkg
  97. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/node2label.pl
  98. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/paper-a4/pypaper.sty
  99. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/perl/SynopsisTable.pm
  100. 0 0
      desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/perl/distutils.perl

+ 515 - 0
desktop/core/ext-py/pyOpenSSL-0.11/COPYING

@@ -0,0 +1,515 @@
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+^L
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+^L
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+    <one line to give the library's name and a brief idea of what it
+does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James
+Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+

+ 0 - 81
desktop/core/ext-py/pyOpenSSL-0.13/ChangeLog → desktop/core/ext-py/pyOpenSSL-0.11/ChangeLog

@@ -1,84 +1,3 @@
-2011-09-02  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* Release 0.13
-
-2011-06-12  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/crypto/pkey.c: Add the PKey.check method, mostly
-	  implemented by Rick Dean, to verify the internal consistency of a
-	  PKey instance.
-
-2011-06-12  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/crypto/crypto.c: Fix the sign and verify functions so
-	  they handle data with embedded NULs.  Fix by David Brodsky
-	  <lp:~lihalla>.
-
-2011-05-20  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/ssl/connection.c, OpenSSL/test/test_ssl.py: Add a new
-          method to the Connection type, get_peer_cert_chain, for retrieving
-          the peer's certificate chain.
-
-2011-05-19  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/crypto/x509.c, OpenSSL/test/test_crypto.py: Add a new
-          method to the X509 type, get_signature_algorithm, for inspecting
-          the signature algorithm field of the certificate.  Based on a
-          patch from <lp:~okuda>.
-
-2011-05-10  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/crypto/crypto.h: Work around a Windows/OpenSSL 1.0 issue
-	  explicitly including a Windows header before any OpenSSL headers.
-
-	* OpenSSL/crypto/pkcs12.c: Work around an OpenSSL 1.0 issue by
-	  explicitly flushing errors known to be uninteresting after calling
-	  PKCS12_parse.
-
-	* OpenSSL/ssl/context.c: Remove SSLv2 support if the underlying
-	  OpenSSL library does not provide it.
-
-	* OpenSSL/test/test_crypto.py: Support an OpenSSL 1.0 change from
-	  MD5 to SHA1 by allowing either hash algorithm's result as the
-	  return value of X509.subject_name_hash.
-
-	* OpenSSL/test/test_ssl.py: Support an OpenSSL 1.0 change from MD5
-	  to SHA1 by constructing certificate files named using both hash
-	  algorithms' results when testing Context.load_verify_locations.
-
-	* Support OpenSSL 1.0.0a.
-
-2011-04-15  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/ssl/ssl.c: Add OPENSSL_VERSION_NUMBER, SSLeay_version
-	  and related constants for retrieving version information about the
-	  underlying OpenSSL library.
-
-2011-04-07  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* Release 0.12
-
-2011-04-06  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/crypto/x509.c: Add get_extension_count and get_extension
-	  to the X509 type, allowing read access to certificate extensions.
-
-	* OpenSSL/crypto/x509ext.c: Add get_short_name and get_data to the
-	  X509Extension type, allowing read access to the contents of an
-	  extension.
-
-2011-03-21  Olivier Hervieu <lp:~ohe>
-
-	* OpenSSL/ssl/ssl.c: Expose a number of symbolic constants for
-	  values passed to the connection "info" callback.
-
-2011-01-22  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
-
-	* OpenSSL/ssl/connection.py: Add support for new-style
-	  buffers (primarily memoryviews) to Connection.send and
-	  Connection.sendall.
-
 2010-11-01  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
 2010-11-01  Jean-Paul Calderone  <exarkun@twistedmatrix.com>
 
 
 	* Release 0.11
 	* Release 0.11

+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/INSTALL → desktop/core/ext-py/pyOpenSSL-0.11/INSTALL


+ 1 - 1
desktop/core/ext-py/pyOpenSSL-0.13/MANIFEST.in → desktop/core/ext-py/pyOpenSSL-0.11/MANIFEST.in

@@ -1,5 +1,5 @@
 recursive-include       OpenSSL     *.h
 recursive-include       OpenSSL     *.h
-include     LICENSE ChangeLog INSTALL README TODO MANIFEST.in OpenSSL/RATIONALE
+include     COPYING ChangeLog INSTALL README TODO MANIFEST.in OpenSSL/RATIONALE
 include     doc/pyOpenSSL.tex doc/Makefile
 include     doc/pyOpenSSL.tex doc/Makefile
 recursive-include   doc/tools   *
 recursive-include   doc/tools   *
 recursive-include   examples    *
 recursive-include   examples    *

+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/RATIONALE → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/RATIONALE


+ 7 - 3
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/__init__.py → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/__init__.py

@@ -1,6 +1,10 @@
-# Copyright (C) AB Strakt
-# See LICENSE for details.
-
+#
+# __init__.py
+#
+# Copyright (C) AB Strakt 2001, All rights reserved
+#
+# $Id: __init__.py,v 1.4 2004/07/22 12:01:25 martin Exp $
+#
 """
 """
 pyOpenSSL - A simple wrapper around the OpenSSL library
 pyOpenSSL - A simple wrapper around the OpenSSL library
 """
 """

+ 7 - 10
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/crl.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crl.c

@@ -276,15 +276,12 @@ PyTypeObject crypto_CRL_Type = {
 };
 };
 
 
 int init_crypto_crl(PyObject *module) {
 int init_crypto_crl(PyObject *module) {
-    if (PyType_Ready(&crypto_CRL_Type) < 0) {
-        return 0;
-    }
+       if (PyType_Ready(&crypto_CRL_Type) < 0) {
+                  return 0;
+       }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_CRL_Type);
-    if (PyModule_AddObject(module, "CRL", (PyObject *)&crypto_CRL_Type) != 0) {
-        return 0;
-    }
-    return 1;
+       if (PyModule_AddObject(module, "CRL", (PyObject *)&crypto_CRL_Type) != 0) {
+                  return 0;
+       }
+       return 1;
 }
 }

+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/crl.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crl.h


+ 10 - 21
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/crypto.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crypto.c

@@ -1,10 +1,9 @@
 /*
 /*
  * crypto.c
  * crypto.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Keyphrene
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Keyphrene 2004, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008-2009, All rights reserved
  *
  *
  * Main file of crypto sub module.
  * Main file of crypto sub module.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -618,7 +617,6 @@ crypto_sign(PyObject *spam, PyObject *args) {
     PyObject *buffer;
     PyObject *buffer;
     crypto_PKeyObj *pkey;
     crypto_PKeyObj *pkey;
     char *data = NULL;
     char *data = NULL;
-    int data_len;
     char *digest_name;
     char *digest_name;
     int err;
     int err;
     unsigned int sig_len;
     unsigned int sig_len;
@@ -627,8 +625,8 @@ crypto_sign(PyObject *spam, PyObject *args) {
     unsigned char sig_buf[512];
     unsigned char sig_buf[512];
 
 
     if (!PyArg_ParseTuple(
     if (!PyArg_ParseTuple(
-            args, "O!" BYTESTRING_FMT "#s:sign", &crypto_PKey_Type,
-            &pkey, &data, &data_len, &digest_name)) {
+            args, "O!" BYTESTRING_FMT "s:sign", &crypto_PKey_Type,
+            &pkey, &data, &digest_name)) {
         return NULL;
         return NULL;
     }
     }
 
 
@@ -638,7 +636,7 @@ crypto_sign(PyObject *spam, PyObject *args) {
     }
     }
 
 
     EVP_SignInit(&md_ctx, digest);
     EVP_SignInit(&md_ctx, digest);
-    EVP_SignUpdate(&md_ctx, data, data_len);
+    EVP_SignUpdate(&md_ctx, data, strlen(data));
     sig_len = sizeof(sig_buf);
     sig_len = sizeof(sig_buf);
     err = EVP_SignFinal(&md_ctx, sig_buf, &sig_len, pkey->pkey);
     err = EVP_SignFinal(&md_ctx, sig_buf, &sig_len, pkey->pkey);
 
 
@@ -667,16 +665,15 @@ crypto_verify(PyObject *spam, PyObject *args) {
     unsigned char *signature;
     unsigned char *signature;
     int sig_len;
     int sig_len;
     char *data, *digest_name;
     char *data, *digest_name;
-    int data_len;
     int err;
     int err;
     const EVP_MD *digest;
     const EVP_MD *digest;
     EVP_MD_CTX md_ctx;
     EVP_MD_CTX md_ctx;
     EVP_PKEY *pkey;
     EVP_PKEY *pkey;
 
 
 #ifdef PY3
 #ifdef PY3
-    if (!PyArg_ParseTuple(args, "O!" BYTESTRING_FMT "#" BYTESTRING_FMT "#s:verify", &crypto_X509_Type, &cert, &signature, &sig_len, &data, &data_len, &digest_name)) {
+    if (!PyArg_ParseTuple(args, "O!" BYTESTRING_FMT "#" BYTESTRING_FMT "s:verify", &crypto_X509_Type, &cert, &signature, &sig_len, &data, &digest_name)) {
 #else
 #else
-    if (!PyArg_ParseTuple(args, "O!t#s#s:verify", &crypto_X509_Type, &cert, &signature, &sig_len, &data, &data_len, &digest_name)) {
+    if (!PyArg_ParseTuple(args, "O!t#ss:verify", &crypto_X509_Type, &cert, &signature, &sig_len, &data, &digest_name)) {
 #endif
 #endif
         return NULL;
         return NULL;
     }
     }
@@ -693,7 +690,7 @@ crypto_verify(PyObject *spam, PyObject *args) {
     }
     }
 
 
     EVP_VerifyInit(&md_ctx, digest);
     EVP_VerifyInit(&md_ctx, digest);
-    EVP_VerifyUpdate(&md_ctx, data, data_len);
+    EVP_VerifyUpdate(&md_ctx, data, strlen((char*)data));
     err = EVP_VerifyFinal(&md_ctx, signature, sig_len, pkey);
     err = EVP_VerifyFinal(&md_ctx, signature, sig_len, pkey);
     EVP_PKEY_free(pkey);
     EVP_PKEY_free(pkey);
 
 
@@ -838,21 +835,13 @@ PyOpenSSL_MODINIT(crypto) {
     crypto_API[crypto_PKCS7_New_NUM]     = (void *)crypto_PKCS7_New;
     crypto_API[crypto_PKCS7_New_NUM]     = (void *)crypto_PKCS7_New;
     crypto_API[crypto_NetscapeSPKI_New_NUM]     = (void *)crypto_NetscapeSPKI_New;
     crypto_API[crypto_NetscapeSPKI_New_NUM]     = (void *)crypto_NetscapeSPKI_New;
     c_api_object = PyCObject_FromVoidPtr((void *)crypto_API, NULL);
     c_api_object = PyCObject_FromVoidPtr((void *)crypto_API, NULL);
-    if (c_api_object != NULL) {
-        /* PyModule_AddObject steals a reference.
-         */
-        Py_INCREF(c_api_object);
+    if (c_api_object != NULL)
         PyModule_AddObject(module, "_C_API", c_api_object);
         PyModule_AddObject(module, "_C_API", c_api_object);
-    }
 #endif
 #endif
 
 
     crypto_Error = PyErr_NewException("OpenSSL.crypto.Error", NULL, NULL);
     crypto_Error = PyErr_NewException("OpenSSL.crypto.Error", NULL, NULL);
     if (crypto_Error == NULL)
     if (crypto_Error == NULL)
         goto error;
         goto error;
-
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF(crypto_Error);
     if (PyModule_AddObject(module, "Error", crypto_Error) != 0)
     if (PyModule_AddObject(module, "Error", crypto_Error) != 0)
         goto error;
         goto error;
 
 

+ 3 - 16
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/crypto.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/crypto.h

@@ -1,32 +1,19 @@
 /*
 /*
  * crypto.h
  * crypto.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Exports from crypto.c.
  * Exports from crypto.c.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
  * Reviewed 2001-07-23
  * Reviewed 2001-07-23
  *
  *
+ * @(#) $Id: crypto.h,v 1.14 2004/08/09 13:41:25 martin Exp $
  */
  */
 #ifndef PyOpenSSL_CRYPTO_H_
 #ifndef PyOpenSSL_CRYPTO_H_
 #define PyOpenSSL_CRYPTO_H_
 #define PyOpenSSL_CRYPTO_H_
 
 
 #include <Python.h>
 #include <Python.h>
-/* Work around a bug in OpenSSL 1.0.0 which is caused by winsock.h being
-   included (from dtls1.h) too late by the OpenSSL header files, overriding
-   the fixes (in ossl_typ.h) for symbol clashes caused by this OS header
-   file.
-   
-   In order to have those fixes still take effect, we include winsock.h
-   here, prior to including any OpenSSL header files.
-   
- */
-#ifdef _WIN32
-# include "winsock.h"
-#endif
-
 #include "x509.h"
 #include "x509.h"
 #include "x509name.h"
 #include "x509name.h"
 #include "netscape_spki.h"
 #include "netscape_spki.h"
@@ -123,7 +110,7 @@ extern void **crypto_API;
     PyObject *crypto_dict, *crypto_api_object; \
     PyObject *crypto_dict, *crypto_api_object; \
     crypto_dict = PyModule_GetDict(crypto_module); \
     crypto_dict = PyModule_GetDict(crypto_module); \
     crypto_api_object = PyDict_GetItemString(crypto_dict, "_C_API"); \
     crypto_api_object = PyDict_GetItemString(crypto_dict, "_C_API"); \
-    if (crypto_api_object && PyCObject_Check(crypto_api_object)) { \
+    if (PyCObject_Check(crypto_api_object)) { \
       crypto_API = (void **)PyCObject_AsVoidPtr(crypto_api_object); \
       crypto_API = (void **)PyCObject_AsVoidPtr(crypto_api_object); \
     } \
     } \
   } \
   } \

+ 1 - 8
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/netscape_spki.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/netscape_spki.c

@@ -1,8 +1,7 @@
 /*
 /*
  * netscape_spki.c
  * netscape_spki.c
  *
  *
- * Copyright (C) Tollef Fog Heen
- * See LICENSE for details.
+ * Copyright (C) Tollef Fog Heen 2003
  *
  *
  * Netscape SPKI handling, thin wrapper
  * Netscape SPKI handling, thin wrapper
  */
  */
@@ -298,16 +297,10 @@ init_crypto_netscape_spki(PyObject *module) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference
-     */
-    Py_INCREF((PyObject *)&crypto_NetscapeSPKI_Type);
     if (PyModule_AddObject(module, "NetscapeSPKI", (PyObject *)&crypto_NetscapeSPKI_Type) != 0) {
     if (PyModule_AddObject(module, "NetscapeSPKI", (PyObject *)&crypto_NetscapeSPKI_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference
-     */
-    Py_INCREF((PyObject *)&crypto_NetscapeSPKI_Type);
     if (PyModule_AddObject(module, "NetscapeSPKIType", (PyObject *)&crypto_NetscapeSPKI_Type) != 0) {
     if (PyModule_AddObject(module, "NetscapeSPKIType", (PyObject *)&crypto_NetscapeSPKI_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 1 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/netscape_spki.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/netscape_spki.h

@@ -1,8 +1,7 @@
 /*
 /*
  * netscape_spki.h
  * netscape_spki.h
  *
  *
- * Copyright (C) Tollef Fog Heen
- * See LICENSE for details.
+ * Copyright (C) Tollef Fog Heen 2003, All rights reserved
  *
  *
  * Handle Netscape SPKI (challenge response) certificate requests.
  * Handle Netscape SPKI (challenge response) certificate requests.
  *
  *

+ 10 - 27
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/pkcs12.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs12.c

@@ -1,8 +1,7 @@
 /*
 /*
  * pkcs12.c
  * pkcs12.c
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Certificate transport (PKCS12) handling code,
  * Certificate transport (PKCS12) handling code,
  * mostly thin wrappers around OpenSSL.
  * mostly thin wrappers around OpenSSL.
@@ -337,25 +336,15 @@ crypto_PKCS12_New(PKCS12 *p12, char *passphrase) {
     }
     }
 
 
     /* parse the PKCS12 lump */
     /* parse the PKCS12 lump */
-    if (p12) {
-        if (!PKCS12_parse(p12, passphrase, &pkey, &cert, &cacerts)) {
-	    /*
-             * If PKCS12_parse fails, and it allocated cacerts, it seems to
-             * free cacerts, but not re-NULL the pointer.  Zounds!  Make sure
-             * it is re-set to NULL here, else we'll have a double-free below.
-             */
-            cacerts = NULL;
-            exception_from_error_queue(crypto_Error);
-            goto error;
-        } else {
-	  /*
-	   * OpenSSL 1.0.0 sometimes leaves an X509_check_private_key error in
-	   * the queue for no particular reason.  This error isn't interesting
-	   * to anyone outside this function.  It's not even interesting to
-	   * us.  Get rid of it.
-	   */
-	  flush_error_queue();
-	}
+    if (p12 && !PKCS12_parse(p12, passphrase, &pkey, &cert, &cacerts)) {
+        /*
+         * If PKCS12_parse fails, and it allocated cacerts, it seems to free
+         * cacerts, but not re-NULL the pointer.  Zounds!  Make sure it is
+         * re-set to NULL here, else we'll have a double-free below.
+         */
+        cacerts = NULL;
+        exception_from_error_queue(crypto_Error);
+        goto error;
     }
     }
 
 
     if (!(self = PyObject_GC_New(crypto_PKCS12Obj, &crypto_PKCS12_Type))) {
     if (!(self = PyObject_GC_New(crypto_PKCS12Obj, &crypto_PKCS12_Type))) {
@@ -562,16 +551,10 @@ init_crypto_pkcs12(PyObject *module) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_PKCS12_Type);
     if (PyModule_AddObject(module, "PKCS12", (PyObject *)&crypto_PKCS12_Type) != 0) {
     if (PyModule_AddObject(module, "PKCS12", (PyObject *)&crypto_PKCS12_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_PKCS12_Type);
     if (PyModule_AddObject(module, "PKCS12Type", (PyObject *)&crypto_PKCS12_Type) != 0) {
     if (PyModule_AddObject(module, "PKCS12Type", (PyObject *)&crypto_PKCS12_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/pkcs12.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs12.h

@@ -1,11 +1,11 @@
 /*
 /*
  * pkcs12.h
  * pkcs12.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export PKCS12 functions and data structure.
  * Export PKCS12 functions and data structure.
  *
  *
+ * @(#) $$
  */
  */
 #ifndef PyOpenSSL_crypto_PKCS12_H_
 #ifndef PyOpenSSL_crypto_PKCS12_H_
 #define PyOpenSSL_crypto_PKCS12_H_
 #define PyOpenSSL_crypto_PKCS12_H_

+ 1 - 5
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/pkcs7.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs7.c

@@ -1,8 +1,7 @@
 /*
 /*
  * pkcs7.c
  * pkcs7.c
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2002, All rights reserved
  *
  *
  * PKCS7 handling code, mostly thin wrappers around OpenSSL.
  * PKCS7 handling code, mostly thin wrappers around OpenSSL.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -204,9 +203,6 @@ init_crypto_pkcs7(PyObject *module) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_PKCS7_Type);
     if (PyModule_AddObject(module, "PKCS7Type", (PyObject *)&crypto_PKCS7_Type) != 0) {
     if (PyModule_AddObject(module, "PKCS7Type", (PyObject *)&crypto_PKCS7_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/pkcs7.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkcs7.h

@@ -1,12 +1,12 @@
 /*
 /*
  * pkcs7.h
  * pkcs7.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2002, All rights reserved
  *
  *
  * Export pkcs7 functions and data structure.
  * Export pkcs7 functions and data structure.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
+ * @(#) $Id: pkcs7.h,v 1.2 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_crypto_PKCS7_H_
 #ifndef PyOpenSSL_crypto_PKCS7_H_
 #define PyOpenSSL_crypto_PKCS7_H_
 #define PyOpenSSL_crypto_PKCS7_H_

+ 2 - 41
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/pkey.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkey.c

@@ -1,9 +1,8 @@
 /*
 /*
  * pkey.c
  * pkey.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * Public/rivate key handling code, mostly thin wrappers around OpenSSL.
  * Public/rivate key handling code, mostly thin wrappers around OpenSSL.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -107,37 +106,6 @@ crypto_PKey_type(crypto_PKeyObj *self, PyObject *args)
     return PyLong_FromLong(self->pkey->type);
     return PyLong_FromLong(self->pkey->type);
 }
 }
 
 
-static char crypto_PKey_check_doc[] = "\n\
-Check the consistency of an RSA private key.\n\
-\n\
-@return: True if key is consistent.\n\
-@raise Error: if the key is inconsistent.\n\
-@raise TypeError: if the key is of a type which cannot be checked.\n\
-    Only RSA keys can currently be checked.\n\
-";
-
-static PyObject *
-crypto_PKey_check(crypto_PKeyObj *self, PyObject *args) {
-    int r;
-
-    if (!PyArg_ParseTuple(args, ":check")) {
-        return NULL;
-    }
-
-    if (self->pkey->type == EVP_PKEY_RSA) {
-        RSA *rsa;
-        rsa = EVP_PKEY_get1_RSA(self->pkey);
-        r = RSA_check_key(rsa);
-        if (r == 1) {
-            return PyBool_FromLong(1L);
-        } else {
-            FAIL();
-        }
-    } else {
-        PyErr_SetString(PyExc_TypeError, "key type unsupported");
-        return NULL;
-    }
-}
 
 
 /*
 /*
  * ADD_METHOD(name) expands to a correct PyMethodDef declaration
  * ADD_METHOD(name) expands to a correct PyMethodDef declaration
@@ -151,7 +119,6 @@ static PyMethodDef crypto_PKey_methods[] =
     ADD_METHOD(generate_key),
     ADD_METHOD(generate_key),
     ADD_METHOD(bits),
     ADD_METHOD(bits),
     ADD_METHOD(type),
     ADD_METHOD(type),
-    ADD_METHOD(check),
     { NULL, NULL }
     { NULL, NULL }
 };
 };
 #undef ADD_METHOD
 #undef ADD_METHOD
@@ -284,16 +251,10 @@ init_crypto_pkey(PyObject *module)
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_PKey_Type);
     if (PyModule_AddObject(module, "PKey", (PyObject *)&crypto_PKey_Type) != 0) {
     if (PyModule_AddObject(module, "PKey", (PyObject *)&crypto_PKey_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_PKey_Type);
     if (PyModule_AddObject(module, "PKeyType", (PyObject *)&crypto_PKey_Type) != 0) {
     if (PyModule_AddObject(module, "PKeyType", (PyObject *)&crypto_PKey_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 3 - 3
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/pkey.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/pkey.h

@@ -1,13 +1,13 @@
 /*
 /*
  * pkey.h
  * pkey.h
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * Export pkey functions and data structure.
  * Export pkey functions and data structure.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
+ * @(#) $Id: pkey.h,v 1.5 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_crypto_PKEY_H_
 #ifndef PyOpenSSL_crypto_PKEY_H_
 #define PyOpenSSL_crypto_PKEY_H_
 #define PyOpenSSL_crypto_PKEY_H_

+ 0 - 3
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/revoked.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/revoked.c

@@ -434,9 +434,6 @@ int init_crypto_revoked(PyObject *module) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_Revoked_Type);
     if (PyModule_AddObject(module, "Revoked", (PyObject *)&crypto_Revoked_Type) != 0) {
     if (PyModule_AddObject(module, "Revoked", (PyObject *)&crypto_Revoked_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/revoked.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/revoked.h


+ 3 - 86
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509.c

@@ -1,9 +1,8 @@
 /*
 /*
  * x509.c
  * x509.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * Certificate (X.509) handling code, mostly thin wrappers around OpenSSL.
  * Certificate (X.509) handling code, mostly thin wrappers around OpenSSL.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -13,7 +12,6 @@
 #include <Python.h>
 #include <Python.h>
 #define crypto_MODULE
 #define crypto_MODULE
 #include "crypto.h"
 #include "crypto.h"
-#include "x509ext.h"
 
 
 /*
 /*
  * X.509 is a standard for digital certificates.  See e.g. the OpenSSL homepage
  * X.509 is a standard for digital certificates.  See e.g. the OpenSSL homepage
@@ -301,7 +299,7 @@ crypto_X509_get_pubkey(crypto_X509Obj *self, PyObject *args)
 
 
     py_pkey = crypto_PKey_New(pkey, 1);
     py_pkey = crypto_PKey_New(pkey, 1);
     if (py_pkey != NULL) {
     if (py_pkey != NULL) {
-        py_pkey->only_public = 1;
+	py_pkey->only_public = 1;
     }
     }
     return (PyObject *)py_pkey;
     return (PyObject *)py_pkey;
 }
 }
@@ -519,34 +517,6 @@ crypto_X509_gmtime_adj_notAfter(crypto_X509Obj *self, PyObject *args)
     return Py_None;
     return Py_None;
 }
 }
 
 
-
-static char crypto_X509_get_signature_algorithm_doc[] = "\n\
-Retrieve the signature algorithm used in the certificate\n\
-\n\
-@return: A byte string giving the name of the signature algorithm used in\n\
-         the certificate.\n\
-@raise ValueError: If the signature algorithm is undefined.\n\
-";
-
-static PyObject *
-crypto_X509_get_signature_algorithm(crypto_X509Obj *self, PyObject *args) {
-    ASN1_OBJECT *alg;
-    int nid;
-
-    if (!PyArg_ParseTuple(args, ":get_signature_algorithm")) {
-        return NULL;
-    }
-
-    alg = self->x509->cert_info->signature->algorithm;
-    nid = OBJ_obj2nid(alg);
-    if (nid == NID_undef) {
-        PyErr_SetString(PyExc_ValueError, "Undefined signature algorithm");
-        return NULL;
-    }
-    return PyBytes_FromString(OBJ_nid2ln(nid));
-}
-
-
 static char crypto_X509_sign_doc[] = "\n\
 static char crypto_X509_sign_doc[] = "\n\
 Sign the certificate using the supplied key and digest\n\
 Sign the certificate using the supplied key and digest\n\
 \n\
 \n\
@@ -714,52 +684,6 @@ crypto_X509_add_extensions(crypto_X509Obj *self, PyObject *args)
     return Py_None;
     return Py_None;
 }
 }
 
 
-static char crypto_X509_get_extension_count_doc[] = "\n\
-Get the number of extensions on the certificate.\n\
-\n\
-@return: Number of extensions as a Python integer\n\
-";
-
-static PyObject *
-crypto_X509_get_extension_count(crypto_X509Obj *self, PyObject *args) {
-    if (!PyArg_ParseTuple(args, ":get_extension_count")) {
-        return NULL;
-    }
-
-    return PyLong_FromLong((long)X509_get_ext_count(self->x509));
-}
-
-static char crypto_X509_get_extension_doc[] = "\n\
-Get a specific extension of the certificate by index.\n\
-\n\
-@param index: The index of the extension to retrieve.\n\
-@return: The X509Extension object at the specified index.\n\
-";
-
-static PyObject *
-crypto_X509_get_extension(crypto_X509Obj *self, PyObject *args) {
-    crypto_X509ExtensionObj *extobj;
-    int loc;
-    X509_EXTENSION *ext;
-
-    if (!PyArg_ParseTuple(args, "i:get_extension", &loc)) {
-        return NULL;
-    }
-
-    /* will return NULL if loc is outside the range of extensions,
-       not registered as an error*/
-    ext = X509_get_ext(self->x509, loc);
-    if (!ext) {
-        PyErr_SetString(PyExc_IndexError, "extension index out of bounds");
-        return NULL; /* Should be reported as an IndexError ? */
-    }
-
-    extobj = PyObject_New(crypto_X509ExtensionObj, &crypto_X509Extension_Type);
-    extobj->x509_extension = X509_EXTENSION_dup(ext);
-
-    return (PyObject*)extobj;
-}
-
 /*
 /*
  * ADD_METHOD(name) expands to a correct PyMethodDef declaration
  * ADD_METHOD(name) expands to a correct PyMethodDef declaration
  *   {  'name', (PyCFunction)crypto_X509_name, METH_VARARGS }
  *   {  'name', (PyCFunction)crypto_X509_name, METH_VARARGS }
@@ -785,14 +709,11 @@ static PyMethodDef crypto_X509_methods[] =
     ADD_METHOD(set_notAfter),
     ADD_METHOD(set_notAfter),
     ADD_METHOD(gmtime_adj_notBefore),
     ADD_METHOD(gmtime_adj_notBefore),
     ADD_METHOD(gmtime_adj_notAfter),
     ADD_METHOD(gmtime_adj_notAfter),
-    ADD_METHOD(get_signature_algorithm),
     ADD_METHOD(sign),
     ADD_METHOD(sign),
     ADD_METHOD(has_expired),
     ADD_METHOD(has_expired),
     ADD_METHOD(subject_name_hash),
     ADD_METHOD(subject_name_hash),
     ADD_METHOD(digest),
     ADD_METHOD(digest),
     ADD_METHOD(add_extensions),
     ADD_METHOD(add_extensions),
-    ADD_METHOD(get_extension),
-    ADD_METHOD(get_extension_count),
     { NULL, NULL }
     { NULL, NULL }
 };
 };
 #undef ADD_METHOD
 #undef ADD_METHOD
@@ -912,14 +833,10 @@ init_crypto_x509(PyObject *module)
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509_Type);
     if (PyModule_AddObject(module, "X509", (PyObject *)&crypto_X509_Type) != 0) {
     if (PyModule_AddObject(module, "X509", (PyObject *)&crypto_X509_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    Py_INCREF((PyObject *)&crypto_X509_Type);
     if (PyModule_AddObject(module, "X509Type", (PyObject *)&crypto_X509_Type) != 0) {
     if (PyModule_AddObject(module, "X509Type", (PyObject *)&crypto_X509_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509.h

@@ -1,14 +1,14 @@
 /*
 /*
  * x509.h
  * x509.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export x509 functions and data structure.
  * Export x509 functions and data structure.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
  * Reviewed 2001-07-23
  * Reviewed 2001-07-23
  *
  *
+ * @(#) $Id: x509.h,v 1.9 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_crypto_X509_H_
 #ifndef PyOpenSSL_crypto_X509_H_
 #define PyOpenSSL_crypto_X509_H_
 #define PyOpenSSL_crypto_X509_H_

+ 2 - 29
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509ext.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509ext.c

@@ -1,12 +1,12 @@
 /*
 /*
  * x509ext.c
  * x509ext.c
  *
  *
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * Export X.509 extension functions and data structures.
  * Export X.509 extension functions and data structures.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
+ * @(#) $Id: x509ext.c,v 1.1 2002/07/09 13:34:46 martin Exp $
  */
  */
 
 
 #include <Python.h>
 #include <Python.h>
@@ -51,26 +51,6 @@ crypto_X509Extension_get_short_name(crypto_X509ExtensionObj *self, PyObject *arg
 }
 }
 
 
 
 
-static char crypto_X509Extension_get_data_doc[] = "\n\
-Returns the data of the X509Extension\n\
-\n\
-@return: A C{str} giving the X509Extension's ASN.1 encoded data.\n\
-";
-
-static PyObject *
-crypto_X509Extension_get_data(crypto_X509ExtensionObj *self, PyObject *args) {
-    ASN1_OCTET_STRING *data;
-    PyObject *result;
-
-    if (!PyArg_ParseTuple(args, ":get_data")) {
-        return NULL;
-    }
-
-    data = X509_EXTENSION_get_data(self->x509_extension);
-    result = PyBytes_FromStringAndSize((const char*)data->data, data->length);
-    return result;
-}
-
 /*
 /*
  * ADD_METHOD(name) expands to a correct PyMethodDef declaration
  * ADD_METHOD(name) expands to a correct PyMethodDef declaration
  *   {  'name', (PyCFunction)crypto_X509Extension_name, METH_VARARGS }
  *   {  'name', (PyCFunction)crypto_X509Extension_name, METH_VARARGS }
@@ -82,7 +62,6 @@ static PyMethodDef crypto_X509Extension_methods[] =
 {
 {
     ADD_METHOD(get_critical),
     ADD_METHOD(get_critical),
     ADD_METHOD(get_short_name),
     ADD_METHOD(get_short_name),
-    ADD_METHOD(get_data),
     { NULL, NULL }
     { NULL, NULL }
 };
 };
 #undef ADD_METHOD
 #undef ADD_METHOD
@@ -316,17 +295,11 @@ init_crypto_x509extension(PyObject *module)
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509Extension_Type);
     if (PyModule_AddObject(module, "X509Extension",
     if (PyModule_AddObject(module, "X509Extension",
                            (PyObject *)&crypto_X509Extension_Type) != 0) {
                            (PyObject *)&crypto_X509Extension_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509Extension_Type);
     if (PyModule_AddObject(module, "X509ExtensionType",
     if (PyModule_AddObject(module, "X509ExtensionType",
                            (PyObject *)&crypto_X509Extension_Type) != 0) {
                            (PyObject *)&crypto_X509Extension_Type) != 0) {
         return 0;
         return 0;

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509ext.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509ext.h

@@ -1,12 +1,12 @@
 /*
 /*
  * x509ext.h
  * x509ext.h
  *
  *
- * Copyright (C) Awanim
- * See LICENSE for details.
+ * Copyright (C) Awanim 2002, All rights reserved
  *
  *
  * Export X.509 extension functions and data structures.
  * Export X.509 extension functions and data structures.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
+ * @(#) $Id: x509ext.h,v 1.2 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_crypto_X509EXTENSION_H_
 #ifndef PyOpenSSL_crypto_X509EXTENSION_H_
 #define PyOpenSSL_crypto_X509EXTENSION_H_
 #define PyOpenSSL_crypto_X509EXTENSION_H_

+ 5 - 28
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509name.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509name.c

@@ -1,9 +1,8 @@
 /*
 /*
  * x509name.c
  * x509name.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008-2009, All rights reserved
  *
  *
  * X.509 Name handling, mostly thin wrapping.
  * X.509 Name handling, mostly thin wrapping.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -195,30 +194,14 @@ crypto_X509Name_getattro(crypto_X509NameObj *self, PyObject *nameobj)
  *            value - The value to set
  *            value - The value to set
  */
  */
 static int
 static int
-crypto_X509Name_setattro(crypto_X509NameObj *self, PyObject *nameobj, PyObject *value)
+crypto_X509Name_setattr(crypto_X509NameObj *self, char *name, PyObject *value)
 {
 {
     int nid;
     int nid;
     int result;
     int result;
     char *buffer;
     char *buffer;
-    char *name;
-
-    if (!PyBytes_CheckExact(nameobj) && !PyUnicode_CheckExact(nameobj)) {
-        PyErr_Format(PyExc_TypeError,
-                     "attribute name must be string, not '%.200s'",
-                     Py_TYPE(nameobj)->tp_name);
-        return -1;
-    }
-
-#ifdef PY3
-    name = PyBytes_AsString(PyUnicode_AsASCIIString(nameobj));
-#else
-    name = PyBytes_AsString(nameobj);
-#endif
 
 
     if ((nid = OBJ_txt2nid(name)) == NID_undef)
     if ((nid = OBJ_txt2nid(name)) == NID_undef)
     {
     {
-        /* Just like the case in the getattr function */
-        flush_error_queue();
         PyErr_SetString(PyExc_AttributeError, "No such attribute");
         PyErr_SetString(PyExc_AttributeError, "No such attribute");
         return -1;
         return -1;
     }
     }
@@ -491,7 +474,7 @@ PyTypeObject crypto_X509Name_Type = {
     (destructor)crypto_X509Name_dealloc,
     (destructor)crypto_X509Name_dealloc,
     NULL, /* print */
     NULL, /* print */
     NULL, /* getattr */
     NULL, /* getattr */
-    NULL, /* setattr */
+    (setattrfunc)crypto_X509Name_setattr,
     NULL, /* reserved */
     NULL, /* reserved */
     (reprfunc)crypto_X509Name_repr,
     (reprfunc)crypto_X509Name_repr,
     NULL, /* as_number */
     NULL, /* as_number */
@@ -501,7 +484,7 @@ PyTypeObject crypto_X509Name_Type = {
     NULL, /* call */
     NULL, /* call */
     NULL, /* str */
     NULL, /* str */
     (getattrofunc)crypto_X509Name_getattro, /* getattro */
     (getattrofunc)crypto_X509Name_getattro, /* getattro */
-    (setattrofunc)crypto_X509Name_setattro, /* setattro */
+    NULL, /* setattro */
     NULL, /* as_buffer */
     NULL, /* as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
     crypto_X509Name_doc, /* tp_doc */
     crypto_X509Name_doc, /* tp_doc */
@@ -537,16 +520,10 @@ init_crypto_x509name(PyObject *module)
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509Name_Type);
     if (PyModule_AddObject(module, "X509Name", (PyObject *)&crypto_X509Name_Type) != 0) {
     if (PyModule_AddObject(module, "X509Name", (PyObject *)&crypto_X509Name_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509Name_Type);
     if (PyModule_AddObject(module, "X509NameType", (PyObject *)&crypto_X509Name_Type) != 0) {
     if (PyModule_AddObject(module, "X509NameType", (PyObject *)&crypto_X509Name_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509name.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509name.h

@@ -1,14 +1,14 @@
 /*
 /*
  * x509name.h
  * x509name.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export X.509 name functions and data structures.
  * Export X.509 name functions and data structures.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
  * Reviewed 2001-07-23
  * Reviewed 2001-07-23
  *
  *
+ * @(#) $Id: x509name.h,v 1.8 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_crypto_X509NAME_H_
 #ifndef PyOpenSSL_crypto_X509NAME_H_
 #define PyOpenSSL_crypto_X509NAME_H_
 #define PyOpenSSL_crypto_X509NAME_H_

+ 2 - 9
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509req.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509req.c

@@ -1,9 +1,8 @@
 /*
 /*
  * x509req.c
  * x509req.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * X.509 Request handling, mostly thin wrapping.
  * X.509 Request handling, mostly thin wrapping.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -413,16 +412,10 @@ init_crypto_x509req(PyObject *module)
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509Req_Type);
     if (PyModule_AddObject(module, "X509Req", (PyObject *)&crypto_X509Req_Type) != 0) {
     if (PyModule_AddObject(module, "X509Req", (PyObject *)&crypto_X509Req_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509Req_Type);
     if (PyModule_AddObject(module, "X509ReqType", (PyObject *)&crypto_X509Req_Type) != 0) {
     if (PyModule_AddObject(module, "X509ReqType", (PyObject *)&crypto_X509Req_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509req.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509req.h

@@ -1,12 +1,12 @@
 /*
 /*
  * x509req.h
  * x509req.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export X509 request functions and data structures.
  * Export X509 request functions and data structures.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
+ * @(#) $Id: x509req.h,v 1.6 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_SSL_X509REQ_H_
 #ifndef PyOpenSSL_SSL_X509REQ_H_
 #define PyOpenSSL_SSL_X509REQ_H_
 #define PyOpenSSL_SSL_X509REQ_H_

+ 1 - 5
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509store.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509store.c

@@ -1,8 +1,7 @@
 /*
 /*
  * x509store.c
  * x509store.c
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * X.509 Store handling, mostly thin wrapping.
  * X.509 Store handling, mostly thin wrapping.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -138,9 +137,6 @@ init_crypto_x509store(PyObject *module)
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&crypto_X509Store_Type);
     if (PyModule_AddObject(module, "X509StoreType", (PyObject *)&crypto_X509Store_Type) != 0) {
     if (PyModule_AddObject(module, "X509StoreType", (PyObject *)&crypto_X509Store_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/crypto/x509store.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/crypto/x509store.h

@@ -1,12 +1,12 @@
 /*
 /*
  * x509store.h
  * x509store.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export X509 store functions and data structures.
  * Export X509 store functions and data structures.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
+ * @(#) $Id: x509store.h,v 1.4 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_SSL_X509STORE_H_
 #ifndef PyOpenSSL_SSL_X509STORE_H_
 #define PyOpenSSL_SSL_X509STORE_H_
 #define PyOpenSSL_SSL_X509STORE_H_

+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/py3k.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/py3k.h


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/pymemcompat.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/pymemcompat.h


+ 2 - 5
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/rand/rand.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/rand/rand.c

@@ -1,12 +1,12 @@
 /*
 /*
  * rand.c
  * rand.c
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE file for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * PRNG management routines, thin wrappers.
  * PRNG management routines, thin wrappers.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
+ * Reviewed 2001-07-23
  */
  */
 #include <Python.h>
 #include <Python.h>
 
 
@@ -288,9 +288,6 @@ PyOpenSSL_MODINIT(rand) {
         goto error;
         goto error;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF(rand_Error);
     if (PyModule_AddObject(module, "Error", rand_Error) != 0) {
     if (PyModule_AddObject(module, "Error", rand_Error) != 0) {
         goto error;
         goto error;
     }
     }

+ 6 - 171
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/ssl/connection.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/connection.c

@@ -1,9 +1,8 @@
 /*
 /*
  * connection.c
  * connection.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * SSL Connection objects and methods.
  * SSL Connection objects and methods.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -263,94 +262,6 @@ ssl_Connection_get_context(ssl_ConnectionObj *self, PyObject *args) {
     return (PyObject *)self->context;
     return (PyObject *)self->context;
 }
 }
 
 
-static char ssl_Connection_set_context_doc[] = "\n\
-Switch this connection to a new session context\n\
-\n\
-@param context: A L{Context} instance giving the new session context to use.\n\
-\n\
-";
-static PyObject *
-ssl_Connection_set_context(ssl_ConnectionObj *self, PyObject *args) {
-    ssl_ContextObj *ctx;
-    ssl_ContextObj *old;
-
-    if (!PyArg_ParseTuple(args, "O!:set_context", &ssl_Context_Type, &ctx)) {
-        return NULL;
-    }
-
-    /* This Connection will hold on to this context now.  Make sure it stays
-     * alive.
-     */
-    Py_INCREF(ctx);
-
-    /* XXX The unit tests don't actually verify that this call is made.
-     * They're satisfied if self->context gets updated.
-     */
-    SSL_set_SSL_CTX(self->ssl, ctx->ctx);
-
-    /* Swap the old out and the new in.
-     */
-    old = self->context;
-    self->context = ctx;
-
-    /* XXX The unit tests don't verify that this reference is dropped.
-     */
-    Py_DECREF(old);
-
-    Py_INCREF(Py_None);
-    return Py_None;
-}
-
-static char ssl_Connection_get_servername_doc[] = "\n\
-Retrieve the servername extension value if provided in the client hello\n\
-message, or None if there wasn't one.\n\
-\n\
-@return: A byte string giving the server name or C{None}.\n\
-\n\
-";
-static PyObject *
-ssl_Connection_get_servername(ssl_ConnectionObj *self, PyObject *args) {
-    int type = TLSEXT_NAMETYPE_host_name;
-    const char *name;
-
-    if (!PyArg_ParseTuple(args, ":get_servername")) {
-        return NULL;
-    }
-
-    name = SSL_get_servername(self->ssl, type);
-
-    if (name == NULL) {
-        Py_INCREF(Py_None);
-        return Py_None;
-    } else {
-        return PyBytes_FromString(name);
-    }
-}
-
-
-static char ssl_Connection_set_tlsext_host_name_doc[] = "\n\
-Set the value of the servername extension to send in the client hello.\n\
-\n\
-@param name: A byte string giving the name.\n\
-\n\
-";
-static PyObject *
-ssl_Connection_set_tlsext_host_name(ssl_ConnectionObj *self, PyObject *args) {
-    char *buf;
-
-    if (!PyArg_ParseTuple(args, BYTESTRING_FMT ":set_tlsext_host_name", &buf)) {
-        return NULL;
-    }
-
-    /* XXX I guess this can fail sometimes? */
-    SSL_set_tlsext_host_name(self->ssl, buf);
-
-    Py_INCREF(Py_None);
-    return Py_None;
-}
-
-
-
 static char ssl_Connection_pending_doc[] = "\n\
 static char ssl_Connection_pending_doc[] = "\n\
 Get the number of bytes that can be safely read from the connection\n\
 Get the number of bytes that can be safely read from the connection\n\
 \n\
 \n\
@@ -420,32 +331,18 @@ method again with the SAME buffer.\n\
 @return: The number of bytes written\n\
 @return: The number of bytes written\n\
 ";
 ";
 static PyObject *
 static PyObject *
-ssl_Connection_send(ssl_ConnectionObj *self, PyObject *args) {
-    int len, ret, err, flags;
+ssl_Connection_send(ssl_ConnectionObj *self, PyObject *args)
+{
     char *buf;
     char *buf;
-
-#if PY_VERSION_HEX >= 0x02060000
-    Py_buffer pbuf;
-
-    if (!PyArg_ParseTuple(args, "s*|i:send", &pbuf, &flags))
-        return NULL;
-
-    buf = pbuf.buf;
-    len = pbuf.len;
-#else
+    int len, ret, err, flags;
 
 
     if (!PyArg_ParseTuple(args, "s#|i:send", &buf, &len, &flags))
     if (!PyArg_ParseTuple(args, "s#|i:send", &buf, &len, &flags))
         return NULL;
         return NULL;
-#endif
 
 
     MY_BEGIN_ALLOW_THREADS(self->tstate)
     MY_BEGIN_ALLOW_THREADS(self->tstate)
     ret = SSL_write(self->ssl, buf, len);
     ret = SSL_write(self->ssl, buf, len);
     MY_END_ALLOW_THREADS(self->tstate)
     MY_END_ALLOW_THREADS(self->tstate)
 
 
-#if PY_VERSION_HEX >= 0x02060000
-    PyBuffer_Release(&pbuf);
-#endif
-
     if (PyErr_Occurred())
     if (PyErr_Occurred())
     {
     {
         flush_error_queue();
         flush_error_queue();
@@ -481,18 +378,8 @@ ssl_Connection_sendall(ssl_ConnectionObj *self, PyObject *args)
     int len, ret, err, flags;
     int len, ret, err, flags;
     PyObject *pyret = Py_None;
     PyObject *pyret = Py_None;
 
 
-#if PY_VERSION_HEX >= 0x02060000
-    Py_buffer pbuf;
-
-    if (!PyArg_ParseTuple(args, "s*|i:sendall", &pbuf, &flags))
-        return NULL;
-
-    buf = pbuf.buf;
-    len = pbuf.len;
-#else
     if (!PyArg_ParseTuple(args, "s#|i:sendall", &buf, &len, &flags))
     if (!PyArg_ParseTuple(args, "s#|i:sendall", &buf, &len, &flags))
         return NULL;
         return NULL;
-#endif
 
 
     do {
     do {
         MY_BEGIN_ALLOW_THREADS(self->tstate)
         MY_BEGIN_ALLOW_THREADS(self->tstate)
@@ -516,13 +403,9 @@ ssl_Connection_sendall(ssl_ConnectionObj *self, PyObject *args)
             handle_ssl_errors(self->ssl, err, ret);
             handle_ssl_errors(self->ssl, err, ret);
             pyret = NULL;
             pyret = NULL;
             break;
             break;
-        }
+        }    
     } while (len > 0);
     } while (len > 0);
 
 
-#if PY_VERSION_HEX >= 0x02060000
-    PyBuffer_Release(&pbuf);
-#endif
-
     Py_XINCREF(pyret);
     Py_XINCREF(pyret);
     return pyret;
     return pyret;
 }
 }
@@ -1186,44 +1069,6 @@ ssl_Connection_get_peer_certificate(ssl_ConnectionObj *self, PyObject *args)
     }
     }
 }
 }
 
 
-static char ssl_Connection_get_peer_cert_chain_doc[] = "\n\
-Retrieve the other side's certificate (if any)\n\
-\n\
-@return: A list of X509 instances giving the peer's certificate chain,\n\
-         or None if it does not have one.\n\
-";
-static PyObject *
-ssl_Connection_get_peer_cert_chain(ssl_ConnectionObj *self, PyObject *args) {
-    STACK_OF(X509) *sk;
-    PyObject *chain;
-    crypto_X509Obj *cert;
-    Py_ssize_t i;
-
-    if (!PyArg_ParseTuple(args, ":get_peer_cert_chain")) {
-        return NULL;
-    }
-
-    sk = SSL_get_peer_cert_chain(self->ssl);
-    if (sk != NULL) {
-        chain = PyList_New(sk_X509_num(sk));
-        for (i = 0; i < sk_X509_num(sk); i++) {
-            cert = new_x509(sk_X509_value(sk, i), 1);
-            if (!cert) {
-                /* XXX Untested */
-                Py_DECREF(chain);
-                return NULL;
-            }
-            CRYPTO_add(&cert->x509->references, 1, CRYPTO_LOCK_X509);
-            PyList_SET_ITEM(chain, i, (PyObject *)cert);
-        }
-        return chain;
-    } else {
-        Py_INCREF(Py_None);
-        return Py_None;
-    }
-
-}
-
 static char ssl_Connection_want_read_doc[] = "\n\
 static char ssl_Connection_want_read_doc[] = "\n\
 Checks if more data has to be read from the transport layer to complete an\n\
 Checks if more data has to be read from the transport layer to complete an\n\
 operation.\n\
 operation.\n\
@@ -1269,9 +1114,6 @@ ssl_Connection_want_write(ssl_ConnectionObj *self, PyObject *args)
 static PyMethodDef ssl_Connection_methods[] =
 static PyMethodDef ssl_Connection_methods[] =
 {
 {
     ADD_METHOD(get_context),
     ADD_METHOD(get_context),
-    ADD_METHOD(set_context),
-    ADD_METHOD(get_servername),
-    ADD_METHOD(set_tlsext_host_name),
     ADD_METHOD(pending),
     ADD_METHOD(pending),
     ADD_METHOD(send),
     ADD_METHOD(send),
     ADD_ALIAS (write, send),
     ADD_ALIAS (write, send),
@@ -1304,7 +1146,6 @@ static PyMethodDef ssl_Connection_methods[] =
     ADD_METHOD(master_key),
     ADD_METHOD(master_key),
     ADD_METHOD(sock_shutdown),
     ADD_METHOD(sock_shutdown),
     ADD_METHOD(get_peer_certificate),
     ADD_METHOD(get_peer_certificate),
-    ADD_METHOD(get_peer_cert_chain),
     ADD_METHOD(want_read),
     ADD_METHOD(want_read),
     ADD_METHOD(want_write),
     ADD_METHOD(want_write),
     ADD_METHOD(set_accept_state),
     ADD_METHOD(set_accept_state),
@@ -1562,16 +1403,10 @@ init_ssl_connection(PyObject *module) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&ssl_Connection_Type);
     if (PyModule_AddObject(module, "Connection", (PyObject *)&ssl_Connection_Type) != 0) {
     if (PyModule_AddObject(module, "Connection", (PyObject *)&ssl_Connection_Type) != 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&ssl_Connection_Type);
     if (PyModule_AddObject(module, "ConnectionType", (PyObject *)&ssl_Connection_Type) != 0) {
     if (PyModule_AddObject(module, "ConnectionType", (PyObject *)&ssl_Connection_Type) != 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/ssl/connection.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/connection.h

@@ -1,14 +1,14 @@
 /*
 /*
  * connection.h
  * connection.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export SSL Connection data structures and functions.
  * Export SSL Connection data structures and functions.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
  * Reviewed 2001-07-23
  * Reviewed 2001-07-23
  *
  *
+ * @(#) $Id: connection.h,v 1.11 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_SSL_CONNECTION_H_
 #ifndef PyOpenSSL_SSL_CONNECTION_H_
 #define PyOpenSSL_SSL_CONNECTION_H_
 #define PyOpenSSL_SSL_CONNECTION_H_

+ 3 - 100
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/ssl/context.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/context.c

@@ -1,9 +1,8 @@
 /*
 /*
  * context.c
  * context.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * SSL Context objects and their methods.
  * SSL Context objects and their methods.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -237,54 +236,6 @@ global_info_callback(const SSL *ssl, int where, int _ret)
     return;
     return;
 }
 }
 
 
-/*
- * Globally defined TLS extension server name callback.  This is called from
- * OpenSSL internally.  The GIL will not be held when this function is invoked.
- * It must not be held when the function returns.
- *
- * ssl represents the connection this callback is for
- *
- * alert is a pointer to the alert value which maybe will be emitted to the
- * client if there is an error handling the client hello (which contains the
- * server name).  This is an out parameter, maybe.
- *
- * arg is an arbitrary pointer specified by SSL_CTX_set_tlsext_servername_arg.
- * It will be NULL for all pyOpenSSL uses.
- */
-static int
-global_tlsext_servername_callback(const SSL *ssl, int *alert, void *arg) {
-    int result = 0;
-    PyObject *argv, *ret;
-    ssl_ConnectionObj *conn = (ssl_ConnectionObj *)SSL_get_app_data(ssl);
-
-    /*
-     * GIL isn't held yet.  First things first - acquire it, or any Python API
-     * we invoke might segfault or blow up the sun.  The reverse will be done
-     * before returning.
-     */
-    MY_END_ALLOW_THREADS(conn->tstate);
-
-    argv = Py_BuildValue("(O)", (PyObject *)conn);
-    ret = PyEval_CallObject(conn->context->tlsext_servername_callback, argv);
-    Py_DECREF(argv);
-    Py_DECREF(ret);
-
-    /*
-     * This function is returning into OpenSSL.  Release the GIL again.
-     */
-    MY_BEGIN_ALLOW_THREADS(conn->tstate);
-    return result;
-}
-
-/*
- * More recent builds of OpenSSL may have SSLv2 completely disabled.
- */
-#ifdef OPENSSL_NO_SSL2
-#define SSLv2_METHOD_TEXT ""
-#else
-#define SSLv2_METHOD_TEXT "SSLv2_METHOD, "
-#endif
-
 
 
 static char ssl_Context_doc[] = "\n\
 static char ssl_Context_doc[] = "\n\
 Context(method) -> Context instance\n\
 Context(method) -> Context instance\n\
@@ -292,12 +243,10 @@ Context(method) -> Context instance\n\
 OpenSSL.SSL.Context instances define the parameters for setting up new SSL\n\
 OpenSSL.SSL.Context instances define the parameters for setting up new SSL\n\
 connections.\n\
 connections.\n\
 \n\
 \n\
-@param method: One of " SSLv2_METHOD_TEXT "SSLv3_METHOD, SSLv23_METHOD, or\n\
+@param method: One of SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, or\n\
                TLSv1_METHOD.\n\
                TLSv1_METHOD.\n\
 ";
 ";
 
 
-#undef SSLv2_METHOD_TEXT
-
 static char ssl_Context_load_verify_locations_doc[] = "\n\
 static char ssl_Context_load_verify_locations_doc[] = "\n\
 Let SSL know where we can find trusted certificates for the certificate\n\
 Let SSL know where we can find trusted certificates for the certificate\n\
 chain\n\
 chain\n\
@@ -1108,34 +1057,6 @@ ssl_Context_set_options(ssl_ContextObj *self, PyObject *args)
     return PyLong_FromLong(SSL_CTX_set_options(self->ctx, options));
     return PyLong_FromLong(SSL_CTX_set_options(self->ctx, options));
 }
 }
 
 
-static char ssl_Context_set_tlsext_servername_callback_doc[] = "\n\
-Specify a callback function to be called when clients specify a server name.\n\
-\n\
-@param callback: The callback function.  It will be invoked with one\n\
-    argument, the Connection instance.\n\
-\n\
-";
-static PyObject *
-ssl_Context_set_tlsext_servername_callback(ssl_ContextObj *self, PyObject *args) {
-    PyObject *callback;
-    PyObject *old;
-
-    if (!PyArg_ParseTuple(args, "O:set_tlsext_servername_callback", &callback)) {
-        return NULL;
-    }
-
-    Py_INCREF(callback);
-    old = self->tlsext_servername_callback;
-    self->tlsext_servername_callback = callback;
-    Py_DECREF(old);
-
-    SSL_CTX_set_tlsext_servername_callback(self->ctx, global_tlsext_servername_callback);
-    SSL_CTX_set_tlsext_servername_arg(self->ctx, NULL);
-
-    Py_INCREF(Py_None);
-    return Py_None;
-}
-
 
 
 /*
 /*
  * Member methods in the Context object
  * Member methods in the Context object
@@ -1174,7 +1095,6 @@ static PyMethodDef ssl_Context_methods[] = {
     ADD_METHOD(set_app_data),
     ADD_METHOD(set_app_data),
     ADD_METHOD(get_cert_store),
     ADD_METHOD(get_cert_store),
     ADD_METHOD(set_options),
     ADD_METHOD(set_options),
-    ADD_METHOD(set_tlsext_servername_callback),
     { NULL, NULL }
     { NULL, NULL }
 };
 };
 #undef ADD_METHOD
 #undef ADD_METHOD
@@ -1186,19 +1106,11 @@ static PyMethodDef ssl_Context_methods[] = {
  */
  */
 static ssl_ContextObj*
 static ssl_ContextObj*
 ssl_Context_init(ssl_ContextObj *self, int i_method) {
 ssl_Context_init(ssl_ContextObj *self, int i_method) {
-#if (OPENSSL_VERSION_NUMBER >> 28) == 0x01
-    const
-#endif
     SSL_METHOD *method;
     SSL_METHOD *method;
 
 
     switch (i_method) {
     switch (i_method) {
         case ssl_SSLv2_METHOD:
         case ssl_SSLv2_METHOD:
-#ifdef OPENSSL_NO_SSL2
-            PyErr_SetString(PyExc_ValueError, "SSLv2_METHOD not supported by this version of OpenSSL");
-            return NULL;
-#else      
             method = SSLv2_method();
             method = SSLv2_method();
-#endif
             break;
             break;
         case ssl_SSLv23_METHOD:
         case ssl_SSLv23_METHOD:
             method = SSLv23_method();
             method = SSLv23_method();
@@ -1222,9 +1134,6 @@ ssl_Context_init(ssl_ContextObj *self, int i_method) {
     Py_INCREF(Py_None);
     Py_INCREF(Py_None);
     self->info_callback = Py_None;
     self->info_callback = Py_None;
 
 
-    Py_INCREF(Py_None);
-    self->tlsext_servername_callback = Py_None;
-
     Py_INCREF(Py_None);
     Py_INCREF(Py_None);
     self->passphrase_userdata = Py_None;
     self->passphrase_userdata = Py_None;
 
 
@@ -1400,16 +1309,10 @@ init_ssl_context(PyObject *module) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&ssl_Context_Type);
     if (PyModule_AddObject(module, "Context", (PyObject *)&ssl_Context_Type) < 0) {
     if (PyModule_AddObject(module, "Context", (PyObject *)&ssl_Context_Type) < 0) {
         return 0;
         return 0;
     }
     }
 
 
-    /* PyModule_AddObject steals a reference.
-     */
-    Py_INCREF((PyObject *)&ssl_Context_Type);
     if (PyModule_AddObject(module, "ContextType", (PyObject *)&ssl_Context_Type) < 0) {
     if (PyModule_AddObject(module, "ContextType", (PyObject *)&ssl_Context_Type) < 0) {
         return 0;
         return 0;
     }
     }

+ 2 - 3
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/ssl/context.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/context.h

@@ -1,14 +1,14 @@
 /*
 /*
  * context.h
  * context.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export SSL Context object data structures and functions.
  * Export SSL Context object data structures and functions.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
  * Reviewed 2001-07-23
  * Reviewed 2001-07-23
  *
  *
+ * @(#) $Id: context.h,v 1.6 2002/09/04 22:24:59 iko Exp $
  */
  */
 #ifndef PyOpenSSL_SSL_CONTEXT_H_
 #ifndef PyOpenSSL_SSL_CONTEXT_H_
 #define PyOpenSSL_SSL_CONTEXT_H_
 #define PyOpenSSL_SSL_CONTEXT_H_
@@ -29,7 +29,6 @@ typedef struct {
                         *passphrase_userdata,
                         *passphrase_userdata,
                         *verify_callback,
                         *verify_callback,
                         *info_callback,
                         *info_callback,
-                        *tlsext_servername_callback,
                         *app_data;
                         *app_data;
     PyThreadState       *tstate;
     PyThreadState       *tstate;
 } ssl_ContextObj;
 } ssl_ContextObj;

+ 8 - 72
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/ssl/ssl.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/ssl.c

@@ -1,9 +1,8 @@
 /*
 /*
  * ssl.c
  * ssl.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
  *
  *
  * Main file of the SSL sub module.
  * Main file of the SSL sub module.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
@@ -50,30 +49,9 @@ PyObject *ssl_Error,                   /* Base class              */
          *ssl_WantX509LookupError,     /* ...                     */
          *ssl_WantX509LookupError,     /* ...                     */
          *ssl_SysCallError;            /* Uses (errno,errstr)     */
          *ssl_SysCallError;            /* Uses (errno,errstr)     */
 
 
-static char ssl_SSLeay_version_doc[] = "\n\
-Return a string describing the version of OpenSSL in use.\n\
-\n\
-@param type: One of the SSLEAY_ constants defined in this module.\n\
-";
-
-static PyObject *
-ssl_SSLeay_version(PyObject *spam, PyObject *args) {
-    int t;
-    const char *version;
-
-    if (!PyArg_ParseTuple(args, "i:SSLeay_version", &t)) {
-        return NULL;
-    }
-
-    version = SSLeay_version(t);
-    return PyBytes_FromStringAndSize(version, strlen(version));
-}
-
-
 
 
 /* Methods in the OpenSSL.SSL module */
 /* Methods in the OpenSSL.SSL module */
 static PyMethodDef ssl_methods[] = {
 static PyMethodDef ssl_methods[] = {
-    { "SSLeay_version", ssl_SSLeay_version, METH_VARARGS, ssl_SSLeay_version_doc },
     { NULL, NULL }
     { NULL, NULL }
 };
 };
 
 
@@ -139,12 +117,8 @@ PyOpenSSL_MODINIT(SSL) {
     ssl_API[ssl_Context_New_NUM]    = (void *)ssl_Context_New;
     ssl_API[ssl_Context_New_NUM]    = (void *)ssl_Context_New;
     ssl_API[ssl_Connection_New_NUM] = (void *)ssl_Connection_New;
     ssl_API[ssl_Connection_New_NUM] = (void *)ssl_Connection_New;
     ssl_api_object = PyCObject_FromVoidPtr((void *)ssl_API, NULL);
     ssl_api_object = PyCObject_FromVoidPtr((void *)ssl_API, NULL);
-    if (ssl_api_object != NULL) {
-        /* PyModule_AddObject steals a reference.
-         */
-        Py_INCREF(ssl_api_object);
+    if (ssl_api_object != NULL)
         PyModule_AddObject(module, "_C_API", ssl_api_object);
         PyModule_AddObject(module, "_C_API", ssl_api_object);
-    }
 #endif
 #endif
 
 
     /* Exceptions */
     /* Exceptions */
@@ -152,24 +126,18 @@ PyOpenSSL_MODINIT(SSL) {
  * ADD_EXCEPTION(dict,name,base) expands to a correct Exception declaration,
  * ADD_EXCEPTION(dict,name,base) expands to a correct Exception declaration,
  * inserting OpenSSL.SSL.name into dict, derviving the exception from base.
  * inserting OpenSSL.SSL.name into dict, derviving the exception from base.
  */
  */
-#define ADD_EXCEPTION(_name, _base)                                     \
-do {                                                                    \
+#define ADD_EXCEPTION(_name, _base)                                    \
+do {                                                                          \
     ssl_##_name = PyErr_NewException("OpenSSL.SSL."#_name, _base, NULL);\
     ssl_##_name = PyErr_NewException("OpenSSL.SSL."#_name, _base, NULL);\
     if (ssl_##_name == NULL)                                            \
     if (ssl_##_name == NULL)                                            \
-        goto error;                                                     \
-    /* PyModule_AddObject steals a reference. */                        \
-    Py_INCREF(ssl_##_name);                                             \
+        goto error;                                                           \
     if (PyModule_AddObject(module, #_name, ssl_##_name) != 0)           \
     if (PyModule_AddObject(module, #_name, ssl_##_name) != 0)           \
-        goto error;                                                     \
+        goto error;                                                           \
 } while (0)
 } while (0)
 
 
     ssl_Error = PyErr_NewException("OpenSSL.SSL.Error", NULL, NULL);
     ssl_Error = PyErr_NewException("OpenSSL.SSL.Error", NULL, NULL);
-    if (ssl_Error == NULL) {
+    if (ssl_Error == NULL)
         goto error;
         goto error;
-    }
-
-    /* PyModule_AddObject steals a reference. */
-    Py_INCREF(ssl_Error);
     if (PyModule_AddObject(module, "Error", ssl_Error) != 0)
     if (PyModule_AddObject(module, "Error", ssl_Error) != 0)
         goto error;
         goto error;
 
 
@@ -241,38 +209,6 @@ do {                                                                    \
     PyModule_AddIntConstant(module, "SENT_SHUTDOWN", SSL_SENT_SHUTDOWN);
     PyModule_AddIntConstant(module, "SENT_SHUTDOWN", SSL_SENT_SHUTDOWN);
     PyModule_AddIntConstant(module, "RECEIVED_SHUTDOWN", SSL_RECEIVED_SHUTDOWN);
     PyModule_AddIntConstant(module, "RECEIVED_SHUTDOWN", SSL_RECEIVED_SHUTDOWN);
 
 
-    /* For set_info_callback */
-    PyModule_AddIntConstant(module, "SSL_ST_CONNECT", SSL_ST_CONNECT);
-    PyModule_AddIntConstant(module, "SSL_ST_ACCEPT", SSL_ST_ACCEPT);
-    PyModule_AddIntConstant(module, "SSL_ST_MASK", SSL_ST_MASK);
-    PyModule_AddIntConstant(module, "SSL_ST_INIT", SSL_ST_INIT);
-    PyModule_AddIntConstant(module, "SSL_ST_BEFORE", SSL_ST_BEFORE);
-    PyModule_AddIntConstant(module, "SSL_ST_OK", SSL_ST_OK);
-    PyModule_AddIntConstant(module, "SSL_ST_RENEGOTIATE", SSL_ST_RENEGOTIATE);
-    PyModule_AddIntConstant(module, "SSL_CB_LOOP", SSL_CB_LOOP);
-    PyModule_AddIntConstant(module, "SSL_CB_EXIT", SSL_CB_EXIT);
-    PyModule_AddIntConstant(module, "SSL_CB_READ", SSL_CB_READ);
-    PyModule_AddIntConstant(module, "SSL_CB_WRITE", SSL_CB_WRITE);
-    PyModule_AddIntConstant(module, "SSL_CB_ALERT", SSL_CB_ALERT);
-    PyModule_AddIntConstant(module, "SSL_CB_READ_ALERT", SSL_CB_READ_ALERT);
-    PyModule_AddIntConstant(module, "SSL_CB_WRITE_ALERT", SSL_CB_WRITE_ALERT);
-    PyModule_AddIntConstant(module, "SSL_CB_ACCEPT_LOOP", SSL_CB_ACCEPT_LOOP);
-    PyModule_AddIntConstant(module, "SSL_CB_ACCEPT_EXIT", SSL_CB_ACCEPT_EXIT);
-    PyModule_AddIntConstant(module, "SSL_CB_CONNECT_LOOP", SSL_CB_CONNECT_LOOP);
-    PyModule_AddIntConstant(module, "SSL_CB_CONNECT_EXIT", SSL_CB_CONNECT_EXIT);
-    PyModule_AddIntConstant(module, "SSL_CB_HANDSHAKE_START", SSL_CB_HANDSHAKE_START);
-    PyModule_AddIntConstant(module, "SSL_CB_HANDSHAKE_DONE", SSL_CB_HANDSHAKE_DONE);
-
-    /* Version information indicators, used with SSLeay_version */
-    PyModule_AddIntConstant(module, "SSLEAY_VERSION", SSLEAY_VERSION);
-    PyModule_AddIntConstant(module, "SSLEAY_CFLAGS", SSLEAY_CFLAGS);
-    PyModule_AddIntConstant(module, "SSLEAY_BUILT_ON", SSLEAY_BUILT_ON);
-    PyModule_AddIntConstant(module, "SSLEAY_PLATFORM", SSLEAY_PLATFORM);
-    PyModule_AddIntConstant(module, "SSLEAY_DIR", SSLEAY_DIR);
-
-    /* Straight up version number */
-    PyModule_AddIntConstant(module, "OPENSSL_VERSION_NUMBER", OPENSSL_VERSION_NUMBER);
-
     if (!init_ssl_context(module))
     if (!init_ssl_context(module))
         goto error;
         goto error;
     if (!init_ssl_connection(module))
     if (!init_ssl_connection(module))

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/ssl/ssl.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/ssl/ssl.h

@@ -1,14 +1,14 @@
 /*
 /*
  * ssl.h
  * ssl.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export functions and exceptions from the SSL sub module.
  * Export functions and exceptions from the SSL sub module.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
  * Reviewed 2001-07-23
  * Reviewed 2001-07-23
  *
  *
+ * @(#) $Id: ssl.h,v 1.6 2002/04/08 19:25:43 martin Exp $
  */
  */
 #ifndef PyOpenSSL_SSL_H_
 #ifndef PyOpenSSL_SSL_H_
 #define PyOpenSSL_SSL_H_
 #define PyOpenSSL_SSL_H_

+ 5 - 0
desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/__init__.py

@@ -0,0 +1,5 @@
+# Copyright (C) Jean-Paul Calderone 2008, All rights reserved
+
+"""
+Package containing unit tests for L{OpenSSL}.
+"""

+ 9 - 251
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/test/test_crypto.py → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/test_crypto.py

@@ -1,5 +1,4 @@
-# Copyright (c) Jean-Paul Calderone
-# See LICENSE file for details.
+# Copyright (C) Jean-Paul Calderone 2008, All rights reserved
 
 
 """
 """
 Unit tests for L{OpenSSL.crypto}.
 Unit tests for L{OpenSSL.crypto}.
@@ -26,13 +25,6 @@ from OpenSSL.crypto import NetscapeSPKI, NetscapeSPKIType
 from OpenSSL.crypto import sign, verify
 from OpenSSL.crypto import sign, verify
 from OpenSSL.test.util import TestCase, bytes, b
 from OpenSSL.test.util import TestCase, bytes, b
 
 
-def normalize_certificate_pem(pem):
-    return dump_certificate(FILETYPE_PEM, load_certificate(FILETYPE_PEM, pem))
-
-
-def normalize_privatekey_pem(pem):
-    return dump_privatekey(FILETYPE_PEM, load_privatekey(FILETYPE_PEM, pem))
-
 
 
 root_cert_pem = b("""-----BEGIN CERTIFICATE-----
 root_cert_pem = b("""-----BEGIN CERTIFICATE-----
 MIIC7TCCAlagAwIBAgIIPQzE4MbeufQwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UE
 MIIC7TCCAlagAwIBAgIIPQzE4MbeufQwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UE
@@ -87,7 +79,7 @@ uzujnS8YXWvM7DM1Ilozk4MzPug8jzFp5uhKCQ==
 -----END CERTIFICATE-----
 -----END CERTIFICATE-----
 """)
 """)
 
 
-server_key_pem = normalize_privatekey_pem(b("""-----BEGIN RSA PRIVATE KEY-----
+server_key_pem = b("""-----BEGIN RSA PRIVATE KEY-----
 MIICWwIBAAKBgQC+pvhuud1dLaQQvzipdtlcTotgr5SuE2LvSx0gz/bg1U3u1eQ+
 MIICWwIBAAKBgQC+pvhuud1dLaQQvzipdtlcTotgr5SuE2LvSx0gz/bg1U3u1eQ+
 U5eqsxaEUceaX5p5Kk+QflvW8qdjVNxQuYS5uc0gK2+OZnlIYxCf4n5GYGzVIx3Q
 U5eqsxaEUceaX5p5Kk+QflvW8qdjVNxQuYS5uc0gK2+OZnlIYxCf4n5GYGzVIx3Q
 SBj/TAEFB2WuVinZBiCbxgL7PFM1Kpa+EwVkCAduPpSflJJPwkYGrK2MHQIDAQAB
 SBj/TAEFB2WuVinZBiCbxgL7PFM1Kpa+EwVkCAduPpSflJJPwkYGrK2MHQIDAQAB
@@ -102,7 +94,7 @@ FwwOhpahld+vqhYk+pfuWWUpQciE+Bu7ZQJASjfT4sQv4qbbKK/scePicnDdx9th
 NaeNCFfH3aeTrX0LyQJAMBWjWmeKM2G2sCExheeQK0ROnaBC8itCECD4Jsve4nqf
 NaeNCFfH3aeTrX0LyQJAMBWjWmeKM2G2sCExheeQK0ROnaBC8itCECD4Jsve4nqf
 r50+LF74iLXFwqysVCebPKMOpDWp/qQ1BbJQIPs7/A==
 r50+LF74iLXFwqysVCebPKMOpDWp/qQ1BbJQIPs7/A==
 -----END RSA PRIVATE KEY-----
 -----END RSA PRIVATE KEY-----
-"""))
+""")
 
 
 client_cert_pem = b("""-----BEGIN CERTIFICATE-----
 client_cert_pem = b("""-----BEGIN CERTIFICATE-----
 MIICJjCCAY+gAwIBAgIJAKxpFI5lODkjMA0GCSqGSIb3DQEBBQUAMFgxCzAJBgNV
 MIICJjCCAY+gAwIBAgIJAKxpFI5lODkjMA0GCSqGSIb3DQEBBQUAMFgxCzAJBgNV
@@ -120,7 +112,7 @@ PSTJCjJOn3xo2NTKRgV1gaoTf2EhL+RG8TQ=
 -----END CERTIFICATE-----
 -----END CERTIFICATE-----
 """)
 """)
 
 
-client_key_pem = normalize_privatekey_pem(b("""-----BEGIN RSA PRIVATE KEY-----
+client_key_pem = b("""-----BEGIN RSA PRIVATE KEY-----
 MIICXgIBAAKBgQDAZh/SRtNm5ntMT4qb6YzEpTroMlq2rn+GrRHRiZ+xkCw/CGNh
 MIICXgIBAAKBgQDAZh/SRtNm5ntMT4qb6YzEpTroMlq2rn+GrRHRiZ+xkCw/CGNh
 btPir7/QxaUj26BSmQrHw1bGKEbPsWiW7bdXSespl+xKiku4G/KvnnmWdeJHqsiX
 btPir7/QxaUj26BSmQrHw1bGKEbPsWiW7bdXSespl+xKiku4G/KvnnmWdeJHqsiX
 eUZtqurMELcPQAw9xPHEuhqqUJvvEoMTsnCEqGM+7DtboCRajYyHfluARQIDAQAB
 eUZtqurMELcPQAw9xPHEuhqqUJvvEoMTsnCEqGM+7DtboCRajYyHfluARQIDAQAB
@@ -135,7 +127,7 @@ si6xwT7GzMDkk/ko684AV3KPc/h6G0yGtFIrMg7J3uExpR/VdH2KgwMkZXisSMvw
 JJEQjOMCVsEJlRk54WWjAkEAzoZNH6UhDdBK5F38rVt/y4SEHgbSfJHIAmPS32Kq
 JJEQjOMCVsEJlRk54WWjAkEAzoZNH6UhDdBK5F38rVt/y4SEHgbSfJHIAmPS32Kq
 f6GGcfNpip0Uk7q7udTKuX7Q/buZi/C4YW7u3VKAquv9NA==
 f6GGcfNpip0Uk7q7udTKuX7Q/buZi/C4YW7u3VKAquv9NA==
 -----END RSA PRIVATE KEY-----
 -----END RSA PRIVATE KEY-----
-"""))
+""")
 
 
 cleartextCertificatePEM = b("""-----BEGIN CERTIFICATE-----
 cleartextCertificatePEM = b("""-----BEGIN CERTIFICATE-----
 MIIC7TCCAlagAwIBAgIIPQzE4MbeufQwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UE
 MIIC7TCCAlagAwIBAgIIPQzE4MbeufQwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UE
@@ -157,8 +149,7 @@ w/njVbKMXrvc83qmTdGl3TAM0fxQIpqgcglFLveEBgzn
 -----END CERTIFICATE-----
 -----END CERTIFICATE-----
 """)
 """)
 
 
-cleartextPrivateKeyPEM = normalize_privatekey_pem(b("""\
------BEGIN RSA PRIVATE KEY-----
+cleartextPrivateKeyPEM = b("""-----BEGIN RSA PRIVATE KEY-----
 MIICXQIBAAKBgQD5mkLpi7q6ROdu7khB3S9aanA0Zls7vvfGOmB80/yeylhGpsjA
 MIICXQIBAAKBgQD5mkLpi7q6ROdu7khB3S9aanA0Zls7vvfGOmB80/yeylhGpsjA
 jWen0VtSQke/NlEPGtO38tsV7CsuFnSmschvAnGrcJl76b0UOOHUgDTIoRxC6QDU
 jWen0VtSQke/NlEPGtO38tsV7CsuFnSmschvAnGrcJl76b0UOOHUgDTIoRxC6QDU
 3claegwsrBA+sJEBbqx5RdXbIRGicPG/8qQ4Zm1SKOgotcbwiaor2yxZ2wIDAQAB
 3claegwsrBA+sJEBbqx5RdXbIRGicPG/8qQ4Zm1SKOgotcbwiaor2yxZ2wIDAQAB
@@ -173,7 +164,7 @@ ttXigLnCqR486JDPTi9ZscoZkZ+w7y6e/hH8t6d5Vjt48JVyfjPIaJY+km58LcN3
 6AWSeGAdtRFHVzR7oHjVAkB4hutvxiOeiIVQNBhM6RSI9aBPMI21DoX2JRoxvNW2
 6AWSeGAdtRFHVzR7oHjVAkB4hutvxiOeiIVQNBhM6RSI9aBPMI21DoX2JRoxvNW2
 cbvAhow217X9V0dVerEOKxnNYspXRrh36h7k4mQA+sDq
 cbvAhow217X9V0dVerEOKxnNYspXRrh36h7k4mQA+sDq
 -----END RSA PRIVATE KEY-----
 -----END RSA PRIVATE KEY-----
-"""))
+""")
 
 
 cleartextCertificateRequestPEM = b("""-----BEGIN CERTIFICATE REQUEST-----
 cleartextCertificateRequestPEM = b("""-----BEGIN CERTIFICATE REQUEST-----
 MIIBnjCCAQcCAQAwXjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAklMMRAwDgYDVQQH
 MIIBnjCCAQcCAQAwXjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAklMMRAwDgYDVQQH
@@ -207,7 +198,6 @@ MbzjS007Oe4qqBnCWaFPSnJX6uLApeTbqAxAeyCql56ULW5x6vDMNC3dwjvS/CEh
 11n8RkgFIQA0AhuKSIg3CbuartRsJnWOLwgLTzsrKYL4yRog1RJrtw==
 11n8RkgFIQA0AhuKSIg3CbuartRsJnWOLwgLTzsrKYL4yRog1RJrtw==
 -----END RSA PRIVATE KEY-----
 -----END RSA PRIVATE KEY-----
 """)
 """)
-
 encryptedPrivateKeyPEMPassphrase = b("foobar")
 encryptedPrivateKeyPEMPassphrase = b("foobar")
 
 
 # Some PKCS#7 stuff.  Generated with the openssl command line:
 # Some PKCS#7 stuff.  Generated with the openssl command line:
@@ -251,21 +241,6 @@ vrzEeLDRiiPl92dyyWmu
 -----END X509 CRL-----
 -----END X509 CRL-----
 """)
 """)
 
 
-
-# A broken RSA private key which can be used to test the error path through
-# PKey.check.
-inconsistentPrivateKeyPEM = b("""-----BEGIN RSA PRIVATE KEY-----
-MIIBPAIBAAJBAKy+e3dulvXzV7zoTZWc5TzgApr8DmeQHTYC8ydfzH7EECe4R1Xh
-5kwIzOuuFfn178FBiS84gngaNcrFi0Z5fAkCAwEaAQJBAIqm/bz4NA1H++Vx5Ewx
-OcKp3w19QSaZAwlGRtsUxrP7436QjnREM3Bm8ygU11BjkPVmtrKm6AayQfCHqJoT
-zIECIQDW0BoMoL0HOYM/mrTLhaykYAVqgIeJsPjvkEhTFXWBuQIhAM3deFAvWNu4
-nklUQ37XsCT2c9tmNt1LAT+slG2JOTTRAiAuXDtC/m3NYVwyHfFm+zKHRzHkClk2
-HjubeEgjpj32AQIhAJqMGTaZVOwevTXvvHwNeH+vRWsAYU/gbx+OQB+7VOcBAiEA
-oolb6NMg/R3enNPvS1O4UU1H8wpaF77L4yiSWlE0p4w=
------END RSA PRIVATE KEY-----
-""")
-
-
 class X509ExtTests(TestCase):
 class X509ExtTests(TestCase):
     """
     """
     Tests for L{OpenSSL.crypto.X509Extension}.
     Tests for L{OpenSSL.crypto.X509Extension}.
@@ -377,26 +352,6 @@ class X509ExtTests(TestCase):
         self.assertEqual(ext.get_short_name(), b('nsComment'))
         self.assertEqual(ext.get_short_name(), b('nsComment'))
 
 
 
 
-    def test_get_data(self):
-        """
-        L{X509Extension.get_data} returns a string giving the data of the
-        extension.
-        """
-        ext = X509Extension(b('basicConstraints'), True, b('CA:true'))
-        # Expect to get back the DER encoded form of CA:true.
-        self.assertEqual(ext.get_data(), b('0\x03\x01\x01\xff'))
-
-
-    def test_get_data_wrong_args(self):
-        """
-        L{X509Extension.get_data} raises L{TypeError} if passed any arguments.
-        """
-        ext = X509Extension(b('basicConstraints'), True, b('CA:true'))
-        self.assertRaises(TypeError, ext.get_data, None)
-        self.assertRaises(TypeError, ext.get_data, "foo")
-        self.assertRaises(TypeError, ext.get_data, 7)
-
-
     def test_unused_subject(self):
     def test_unused_subject(self):
         """
         """
         The C{subject} parameter to L{X509Extension} may be provided for an
         The C{subject} parameter to L{X509Extension} may be provided for an
@@ -528,13 +483,11 @@ class PKeyTests(TestCase):
     def test_pregeneration(self):
     def test_pregeneration(self):
         """
         """
         L{PKeyType.bits} and L{PKeyType.type} return C{0} before the key is
         L{PKeyType.bits} and L{PKeyType.type} return C{0} before the key is
-        generated.  L{PKeyType.check} raises L{TypeError} before the key is
         generated.
         generated.
         """
         """
         key = PKey()
         key = PKey()
         self.assertEqual(key.type(), 0)
         self.assertEqual(key.type(), 0)
         self.assertEqual(key.bits(), 0)
         self.assertEqual(key.bits(), 0)
-        self.assertRaises(TypeError, key.check)
 
 
 
 
     def test_failedGeneration(self):
     def test_failedGeneration(self):
@@ -582,7 +535,6 @@ class PKeyTests(TestCase):
         key.generate_key(TYPE_RSA, bits)
         key.generate_key(TYPE_RSA, bits)
         self.assertEqual(key.type(), TYPE_RSA)
         self.assertEqual(key.type(), TYPE_RSA)
         self.assertEqual(key.bits(), bits)
         self.assertEqual(key.bits(), bits)
-        self.assertTrue(key.check())
 
 
 
 
     def test_dsaGeneration(self):
     def test_dsaGeneration(self):
@@ -598,7 +550,6 @@ class PKeyTests(TestCase):
         key.generate_key(TYPE_DSA, bits)
         key.generate_key(TYPE_DSA, bits)
         self.assertEqual(key.type(), TYPE_DSA)
         self.assertEqual(key.type(), TYPE_DSA)
         self.assertEqual(key.bits(), bits)
         self.assertEqual(key.bits(), bits)
-        self.assertRaises(TypeError, key.check)
 
 
 
 
     def test_regeneration(self):
     def test_regeneration(self):
@@ -613,23 +564,6 @@ class PKeyTests(TestCase):
              self.assertEqual(key.bits(), bits)
              self.assertEqual(key.bits(), bits)
 
 
 
 
-    def test_inconsistentKey(self):
-        """
-        L{PKeyType.check} returns C{False} if the key is not consistent.
-        """
-        key = load_privatekey(FILETYPE_PEM, inconsistentPrivateKeyPEM)
-        self.assertRaises(Error, key.check)
-
-
-    def test_check_wrong_args(self):
-        """
-        L{PKeyType.check} raises L{TypeError} if called with any arguments.
-        """
-        self.assertRaises(TypeError, PKey().check, None)
-        self.assertRaises(TypeError, PKey().check, object())
-        self.assertRaises(TypeError, PKey().check, 1)
-
-
 
 
 class X509NameTests(TestCase):
 class X509NameTests(TestCase):
     """
     """
@@ -663,33 +597,6 @@ class X509NameTests(TestCase):
                 name, type(name), X509NameType))
                 name, type(name), X509NameType))
 
 
 
 
-    def test_onlyStringAttributes(self):
-        """
-        Attempting to set a non-L{str} attribute name on an L{X509NameType}
-        instance causes L{TypeError} to be raised.
-        """
-        name = self._x509name()
-        # Beyond these cases, you may also think that unicode should be
-        # rejected.  Sorry, you're wrong.  unicode is automatically converted to
-        # str outside of the control of X509Name, so there's no way to reject
-        # it.
-        self.assertRaises(TypeError, setattr, name, None, "hello")
-        self.assertRaises(TypeError, setattr, name, 30, "hello")
-        class evil(str):
-            pass
-        self.assertRaises(TypeError, setattr, name, evil(), "hello")
-
-
-    def test_setInvalidAttribute(self):
-        """
-        Attempting to set any attribute name on an L{X509NameType} instance for
-        which no corresponding NID is defined causes L{AttributeError} to be
-        raised.
-        """
-        name = self._x509name()
-        self.assertRaises(AttributeError, setattr, name, "no such thing", None)
-
-
     def test_attributes(self):
     def test_attributes(self):
         """
         """
         L{X509NameType} instances have attributes for each standard (?)
         L{X509NameType} instances have attributes for each standard (?)
@@ -1039,26 +946,6 @@ class X509Tests(TestCase, _PKeyInteractionTestsMixin):
     """
     """
     pemData = cleartextCertificatePEM + cleartextPrivateKeyPEM
     pemData = cleartextCertificatePEM + cleartextPrivateKeyPEM
 
 
-    extpem = """
------BEGIN CERTIFICATE-----
-MIIC3jCCAkegAwIBAgIJAJHFjlcCgnQzMA0GCSqGSIb3DQEBBQUAMEcxCzAJBgNV
-BAYTAlNFMRUwEwYDVQQIEwxXZXN0ZXJib3R0b20xEjAQBgNVBAoTCUNhdGFsb2dp
-eDENMAsGA1UEAxMEUm9vdDAeFw0wODA0MjIxNDQ1MzhaFw0wOTA0MjIxNDQ1Mzha
-MFQxCzAJBgNVBAYTAlNFMQswCQYDVQQIEwJXQjEUMBIGA1UEChMLT3Blbk1ldGFk
-aXIxIjAgBgNVBAMTGW5vZGUxLm9tMi5vcGVubWV0YWRpci5vcmcwgZ8wDQYJKoZI
-hvcNAQEBBQADgY0AMIGJAoGBAPIcQMrwbk2nESF/0JKibj9i1x95XYAOwP+LarwT
-Op4EQbdlI9SY+uqYqlERhF19w7CS+S6oyqx0DRZSk4Y9dZ9j9/xgm2u/f136YS1u
-zgYFPvfUs6PqYLPSM8Bw+SjJ+7+2+TN+Tkiof9WP1cMjodQwOmdsiRbR0/J7+b1B
-hec1AgMBAAGjgcQwgcEwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNT
-TCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFIdHsBcMVVMbAO7j6NCj
-03HgLnHaMB8GA1UdIwQYMBaAFL2h9Bf9Mre4vTdOiHTGAt7BRY/8MEYGA1UdEQQ/
-MD2CDSouZXhhbXBsZS5vcmeCESoub20yLmV4bWFwbGUuY29thwSC7wgKgRNvbTJA
-b3Blbm1ldGFkaXIub3JnMA0GCSqGSIb3DQEBBQUAA4GBALd7WdXkp2KvZ7/PuWZA
-MPlIxyjS+Ly11+BNE0xGQRp9Wz+2lABtpgNqssvU156+HkKd02rGheb2tj7MX9hG
-uZzbwDAZzJPjzDQDD7d3cWsrVcfIdqVU7epHqIadnOF+X0ghJ39pAm6VVadnSXCt
-WpOdIpB8KksUTCzV591Nr1wd
------END CERTIFICATE-----
-    """
     def signable(self):
     def signable(self):
         """
         """
         Create and return a new L{X509}.
         Create and return a new L{X509}.
@@ -1311,77 +1198,6 @@ WpOdIpB8KksUTCzV591Nr1wd
             b("A8:EB:07:F8:53:25:0A:F2:56:05:C5:A5:C4:C4:C7:15"))
             b("A8:EB:07:F8:53:25:0A:F2:56:05:C5:A5:C4:C4:C7:15"))
 
 
 
 
-    def _extcert(self, pkey, extensions):
-        cert = X509()
-        cert.set_pubkey(pkey)
-        cert.get_subject().commonName = "Unit Tests"
-        cert.get_issuer().commonName = "Unit Tests"
-        when = b(datetime.now().strftime("%Y%m%d%H%M%SZ"))
-        cert.set_notBefore(when)
-        cert.set_notAfter(when)
-
-        cert.add_extensions(extensions)
-        return load_certificate(
-            FILETYPE_PEM, dump_certificate(FILETYPE_PEM, cert))
-
-
-    def test_extension_count(self):
-        """
-        L{X509.get_extension_count} returns the number of extensions that are
-        present in the certificate.
-        """
-        pkey = load_privatekey(FILETYPE_PEM, client_key_pem)
-        ca = X509Extension(b('basicConstraints'), True, b('CA:FALSE'))
-        key = X509Extension(b('keyUsage'), True, b('digitalSignature'))
-        subjectAltName = X509Extension(
-            b('subjectAltName'), True, b('DNS:example.com'))
-
-        # Try a certificate with no extensions at all.
-        c = self._extcert(pkey, [])
-        self.assertEqual(c.get_extension_count(), 0)
-
-        # And a certificate with one
-        c = self._extcert(pkey, [ca])
-        self.assertEqual(c.get_extension_count(), 1)
-
-        # And a certificate with several
-        c = self._extcert(pkey, [ca, key, subjectAltName])
-        self.assertEqual(c.get_extension_count(), 3)
-
-
-    def test_get_extension(self):
-        """
-        L{X509.get_extension} takes an integer and returns an L{X509Extension}
-        corresponding to the extension at that index.
-        """
-        pkey = load_privatekey(FILETYPE_PEM, client_key_pem)
-        ca = X509Extension(b('basicConstraints'), True, b('CA:FALSE'))
-        key = X509Extension(b('keyUsage'), True, b('digitalSignature'))
-        subjectAltName = X509Extension(
-            b('subjectAltName'), False, b('DNS:example.com'))
-
-        cert = self._extcert(pkey, [ca, key, subjectAltName])
-
-        ext = cert.get_extension(0)
-        self.assertTrue(isinstance(ext, X509Extension))
-        self.assertTrue(ext.get_critical())
-        self.assertEqual(ext.get_short_name(), b('basicConstraints'))
-
-        ext = cert.get_extension(1)
-        self.assertTrue(isinstance(ext, X509Extension))
-        self.assertTrue(ext.get_critical())
-        self.assertEqual(ext.get_short_name(), b('keyUsage'))
-
-        ext = cert.get_extension(2)
-        self.assertTrue(isinstance(ext, X509Extension))
-        self.assertFalse(ext.get_critical())
-        self.assertEqual(ext.get_short_name(), b('subjectAltName'))
-
-        self.assertRaises(IndexError, cert.get_extension, -1)
-        self.assertRaises(IndexError, cert.get_extension, 4)
-        self.assertRaises(TypeError, cert.get_extension, "hello")
-
-
     def test_invalid_digest_algorithm(self):
     def test_invalid_digest_algorithm(self):
         """
         """
         L{X509.digest} raises L{ValueError} if called with an unrecognized hash
         L{X509.digest} raises L{ValueError} if called with an unrecognized hash
@@ -1510,53 +1326,7 @@ WpOdIpB8KksUTCzV591Nr1wd
         name.
         name.
         """
         """
         cert = load_certificate(FILETYPE_PEM, self.pemData)
         cert = load_certificate(FILETYPE_PEM, self.pemData)
-        self.assertIn(
-            cert.subject_name_hash(),
-            [3350047874, # OpenSSL 0.9.8, MD5
-             3278919224, # OpenSSL 1.0.0, SHA1
-             ])
-
-
-    def test_get_signature_algorithm(self):
-        """
-        L{X509Type.get_signature_algorithm} returns a string which means
-        the algorithm used to sign the certificate.
-        """
-        cert = load_certificate(FILETYPE_PEM, self.pemData)
-        self.assertEqual(
-            b("sha1WithRSAEncryption"), cert.get_signature_algorithm())
-
-
-    def test_get_undefined_signature_algorithm(self):
-        """
-        L{X509Type.get_signature_algorithm} raises L{ValueError} if the
-        signature algorithm is undefined or unknown.
-        """
-        # This certificate has been modified to indicate a bogus OID in the
-        # signature algorithm field so that OpenSSL does not recognize it.
-        certPEM = """\
------BEGIN CERTIFICATE-----
-MIIC/zCCAmigAwIBAgIBATAGBgJ8BQUAMHsxCzAJBgNVBAYTAlNHMREwDwYDVQQK
-EwhNMkNyeXB0bzEUMBIGA1UECxMLTTJDcnlwdG8gQ0ExJDAiBgNVBAMTG00yQ3J5
-cHRvIENlcnRpZmljYXRlIE1hc3RlcjEdMBsGCSqGSIb3DQEJARYObmdwc0Bwb3N0
-MS5jb20wHhcNMDAwOTEwMDk1MTMwWhcNMDIwOTEwMDk1MTMwWjBTMQswCQYDVQQG
-EwJTRzERMA8GA1UEChMITTJDcnlwdG8xEjAQBgNVBAMTCWxvY2FsaG9zdDEdMBsG
-CSqGSIb3DQEJARYObmdwc0Bwb3N0MS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBI
-AkEArL57d26W9fNXvOhNlZzlPOACmvwOZ5AdNgLzJ1/MfsQQJ7hHVeHmTAjM664V
-+fXvwUGJLziCeBo1ysWLRnl8CQIDAQABo4IBBDCCAQAwCQYDVR0TBAIwADAsBglg
-hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O
-BBYEFM+EgpK+eyZiwFU1aOPSbczbPSpVMIGlBgNVHSMEgZ0wgZqAFPuHI2nrnDqT
-FeXFvylRT/7tKDgBoX+kfTB7MQswCQYDVQQGEwJTRzERMA8GA1UEChMITTJDcnlw
-dG8xFDASBgNVBAsTC00yQ3J5cHRvIENBMSQwIgYDVQQDExtNMkNyeXB0byBDZXJ0
-aWZpY2F0ZSBNYXN0ZXIxHTAbBgkqhkiG9w0BCQEWDm5ncHNAcG9zdDEuY29tggEA
-MA0GCSqGSIb3DQEBBAUAA4GBADv8KpPo+gfJxN2ERK1Y1l17sz/ZhzoGgm5XCdbx
-jEY7xKfpQngV599k1xhl11IMqizDwu0855agrckg2MCTmOI9DZzDD77tAYb+Dk0O
-PEVk0Mk/V0aIsDE9bolfCi/i/QWZ3N8s5nTWMNyBBBmoSliWCm4jkkRZRD0ejgTN
-tgI5
------END CERTIFICATE-----
-"""
-        cert = load_certificate(FILETYPE_PEM, certPEM)
-        self.assertRaises(ValueError, cert.get_signature_algorithm)
+        self.assertEquals(cert.subject_name_hash(), 3350047874)
 
 
 
 
 
 
@@ -1777,7 +1547,7 @@ class PKCS12Tests(TestCase):
             dumped_p12 = p12.export(passphrase=passwd, iter=2, maciter=3)
             dumped_p12 = p12.export(passphrase=passwd, iter=2, maciter=3)
             reloaded_p12 = load_pkcs12(dumped_p12, passwd)
             reloaded_p12 = load_pkcs12(dumped_p12, passwd)
             self.assertEqual(
             self.assertEqual(
-                p12.get_friendlyname(), reloaded_p12.get_friendlyname())
+                p12.get_friendlyname(),reloaded_p12.get_friendlyname())
             # We would use the openssl program to confirm the friendly
             # We would use the openssl program to confirm the friendly
             # name, but it is not possible.  The pkcs12 command
             # name, but it is not possible.  The pkcs12 command
             # does not store the friendly name in the cert's
             # does not store the friendly name in the cert's
@@ -2114,7 +1884,6 @@ class FunctionTests(TestCase):
         L{dump_privatekey} writes a PEM, DER, and text.
         L{dump_privatekey} writes a PEM, DER, and text.
         """
         """
         key = load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM)
         key = load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM)
-        self.assertTrue(key.check())
         dumped_pem = dump_privatekey(FILETYPE_PEM, key)
         dumped_pem = dump_privatekey(FILETYPE_PEM, key)
         self.assertEqual(dumped_pem, cleartextPrivateKeyPEM)
         self.assertEqual(dumped_pem, cleartextPrivateKeyPEM)
         dumped_der = dump_privatekey(FILETYPE_ASN1, key)
         dumped_der = dump_privatekey(FILETYPE_ASN1, key)
@@ -2695,16 +2464,5 @@ class SignVerifyTests(TestCase):
             ValueError, verify, good_cert, sig, content, "strange-digest")
             ValueError, verify, good_cert, sig, content, "strange-digest")
 
 
 
 
-    def test_sign_nulls(self):
-        """
-        L{sign} produces a signature for a string with embedded nulls.
-        """
-        content = b("Watch out!  \0  Did you see it?")
-        priv_key = load_privatekey(FILETYPE_PEM, root_key_pem)
-        good_cert = load_certificate(FILETYPE_PEM, root_cert_pem)
-        sig = sign(priv_key, content, "sha1")
-        verify(good_cert, sig, content, "sha1")
-
-
 if __name__ == '__main__':
 if __name__ == '__main__':
     main()
     main()

+ 1 - 2
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/test/test_rand.py → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/test_rand.py

@@ -1,5 +1,4 @@
-# Copyright (c) Frederick Dean
-# See LICENSE for details.
+# Copyright (C) Frederick Dean 2009, All rights reserved
 
 
 """
 """
 Unit tests for L{OpenSSL.rand}.
 Unit tests for L{OpenSSL.rand}.

+ 72 - 437
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/test/test_ssl.py → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/test_ssl.py

@@ -1,41 +1,32 @@
-# Copyright (C) Jean-Paul Calderone
-# See LICENSE for details.
+# Copyright (C) Jean-Paul Calderone 2008-2010, All rights reserved
 
 
 """
 """
 Unit tests for L{OpenSSL.SSL}.
 Unit tests for L{OpenSSL.SSL}.
 """
 """
 
 
-from gc import collect
 from errno import ECONNREFUSED, EINPROGRESS, EWOULDBLOCK
 from errno import ECONNREFUSED, EINPROGRESS, EWOULDBLOCK
-from sys import platform, version_info
+from sys import platform
 from socket import error, socket
 from socket import error, socket
 from os import makedirs
 from os import makedirs
 from os.path import join
 from os.path import join
 from unittest import main
 from unittest import main
-from weakref import ref
 
 
-from OpenSSL.crypto import TYPE_RSA, FILETYPE_PEM
+from OpenSSL.crypto import TYPE_RSA, FILETYPE_PEM, FILETYPE_ASN1
 from OpenSSL.crypto import PKey, X509, X509Extension
 from OpenSSL.crypto import PKey, X509, X509Extension
 from OpenSSL.crypto import dump_privatekey, load_privatekey
 from OpenSSL.crypto import dump_privatekey, load_privatekey
 from OpenSSL.crypto import dump_certificate, load_certificate
 from OpenSSL.crypto import dump_certificate, load_certificate
 
 
-from OpenSSL.SSL import OPENSSL_VERSION_NUMBER, SSLEAY_VERSION, SSLEAY_CFLAGS
-from OpenSSL.SSL import SSLEAY_PLATFORM, SSLEAY_DIR, SSLEAY_BUILT_ON
 from OpenSSL.SSL import SENT_SHUTDOWN, RECEIVED_SHUTDOWN
 from OpenSSL.SSL import SENT_SHUTDOWN, RECEIVED_SHUTDOWN
 from OpenSSL.SSL import SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD
 from OpenSSL.SSL import SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD
 from OpenSSL.SSL import OP_NO_SSLv2, OP_NO_SSLv3, OP_SINGLE_DH_USE
 from OpenSSL.SSL import OP_NO_SSLv2, OP_NO_SSLv3, OP_SINGLE_DH_USE
-from OpenSSL.SSL import (
-    VERIFY_PEER, VERIFY_FAIL_IF_NO_PEER_CERT, VERIFY_CLIENT_ONCE, VERIFY_NONE)
-from OpenSSL.SSL import (
-    Error, SysCallError, WantReadError, ZeroReturnError, SSLeay_version)
+from OpenSSL.SSL import VERIFY_PEER, VERIFY_FAIL_IF_NO_PEER_CERT, VERIFY_CLIENT_ONCE
+from OpenSSL.SSL import Error, SysCallError, WantReadError, ZeroReturnError
 from OpenSSL.SSL import Context, ContextType, Connection, ConnectionType
 from OpenSSL.SSL import Context, ContextType, Connection, ConnectionType
 
 
 from OpenSSL.test.util import TestCase, bytes, b
 from OpenSSL.test.util import TestCase, bytes, b
-from OpenSSL.test.test_crypto import (
-    cleartextCertificatePEM, cleartextPrivateKeyPEM)
-from OpenSSL.test.test_crypto import (
-    client_cert_pem, client_key_pem, server_cert_pem, server_key_pem,
-    root_cert_pem)
+from OpenSSL.test.test_crypto import cleartextCertificatePEM, cleartextPrivateKeyPEM
+from OpenSSL.test.test_crypto import client_cert_pem, client_key_pem
+from OpenSSL.test.test_crypto import server_cert_pem, server_key_pem, root_cert_pem
 
 
 try:
 try:
     from OpenSSL.SSL import OP_NO_QUERY_MTU
     from OpenSSL.SSL import OP_NO_QUERY_MTU
@@ -50,13 +41,6 @@ try:
 except ImportError:
 except ImportError:
     OP_NO_TICKET = None
     OP_NO_TICKET = None
 
 
-from OpenSSL.SSL import (
-    SSL_ST_CONNECT, SSL_ST_ACCEPT, SSL_ST_MASK, SSL_ST_INIT, SSL_ST_BEFORE,
-    SSL_ST_OK, SSL_ST_RENEGOTIATE,
-    SSL_CB_LOOP, SSL_CB_EXIT, SSL_CB_READ, SSL_CB_WRITE, SSL_CB_ALERT,
-    SSL_CB_READ_ALERT, SSL_CB_WRITE_ALERT, SSL_CB_ACCEPT_LOOP,
-    SSL_CB_ACCEPT_EXIT, SSL_CB_CONNECT_LOOP, SSL_CB_CONNECT_EXIT,
-    SSL_CB_HANDSHAKE_START, SSL_CB_HANDSHAKE_DONE)
 
 
 # openssl dhparam 128 -out dh-128.pem (note that 128 is a small number of bits
 # openssl dhparam 128 -out dh-128.pem (note that 128 is a small number of bits
 # to use)
 # to use)
@@ -70,7 +54,6 @@ MBYCEQCobsg29c9WZP/54oAPcwiDAgEC
 def verify_cb(conn, cert, errnum, depth, ok):
 def verify_cb(conn, cert, errnum, depth, ok):
     return ok
     return ok
 
 
-
 def socket_pair():
 def socket_pair():
     """
     """
     Establish and return a pair of network sockets connected to each other.
     Establish and return a pair of network sockets connected to each other.
@@ -113,60 +96,6 @@ def handshake(client, server):
                 conns.remove(conn)
                 conns.remove(conn)
 
 
 
 
-def _create_certificate_chain():
-    """
-    Construct and return a chain of certificates.
-
-        1. A new self-signed certificate authority certificate (cacert)
-        2. A new intermediate certificate signed by cacert (icert)
-        3. A new server certificate signed by icert (scert)
-    """
-    caext = X509Extension(b('basicConstraints'), False, b('CA:true'))
-
-    # Step 1
-    cakey = PKey()
-    cakey.generate_key(TYPE_RSA, 512)
-    cacert = X509()
-    cacert.get_subject().commonName = "Authority Certificate"
-    cacert.set_issuer(cacert.get_subject())
-    cacert.set_pubkey(cakey)
-    cacert.set_notBefore(b("20000101000000Z"))
-    cacert.set_notAfter(b("20200101000000Z"))
-    cacert.add_extensions([caext])
-    cacert.set_serial_number(0)
-    cacert.sign(cakey, "sha1")
-
-    # Step 2
-    ikey = PKey()
-    ikey.generate_key(TYPE_RSA, 512)
-    icert = X509()
-    icert.get_subject().commonName = "Intermediate Certificate"
-    icert.set_issuer(cacert.get_subject())
-    icert.set_pubkey(ikey)
-    icert.set_notBefore(b("20000101000000Z"))
-    icert.set_notAfter(b("20200101000000Z"))
-    icert.add_extensions([caext])
-    icert.set_serial_number(0)
-    icert.sign(cakey, "sha1")
-
-    # Step 3
-    skey = PKey()
-    skey.generate_key(TYPE_RSA, 512)
-    scert = X509()
-    scert.get_subject().commonName = "Server Certificate"
-    scert.set_issuer(icert.get_subject())
-    scert.set_pubkey(skey)
-    scert.set_notBefore(b("20000101000000Z"))
-    scert.set_notAfter(b("20200101000000Z"))
-    scert.add_extensions([
-            X509Extension(b('basicConstraints'), True, b('CA:false'))])
-    scert.set_serial_number(0)
-    scert.sign(ikey, "sha1")
-
-    return [(cakey, cacert), (ikey, icert), (skey, scert)]
-
-
-
 class _LoopbackMixin:
 class _LoopbackMixin:
     """
     """
     Helper mixin which defines methods for creating a connected socket pair and
     Helper mixin which defines methods for creating a connected socket pair and
@@ -212,7 +141,7 @@ class _LoopbackMixin:
                 # Give the side a chance to generate some more bytes, or
                 # Give the side a chance to generate some more bytes, or
                 # succeed.
                 # succeed.
                 try:
                 try:
-                    data = read.recv(2 ** 16)
+                    bytes = read.recv(2 ** 16)
                 except WantReadError:
                 except WantReadError:
                     # It didn't succeed, so we'll hope it generated some
                     # It didn't succeed, so we'll hope it generated some
                     # output.
                     # output.
@@ -220,7 +149,7 @@ class _LoopbackMixin:
                 else:
                 else:
                     # It did succeed, so we'll stop now and let the caller deal
                     # It did succeed, so we'll stop now and let the caller deal
                     # with it.
                     # with it.
-                    return (read, data)
+                    return (read, bytes)
 
 
                 while True:
                 while True:
                     # Keep copying as long as there's more stuff there.
                     # Keep copying as long as there's more stuff there.
@@ -238,36 +167,6 @@ class _LoopbackMixin:
 
 
 
 
 
 
-class VersionTests(TestCase):
-    """
-    Tests for version information exposed by
-    L{OpenSSL.SSL.SSLeay_version} and
-    L{OpenSSL.SSL.OPENSSL_VERSION_NUMBER}.
-    """
-    def test_OPENSSL_VERSION_NUMBER(self):
-        """
-        L{OPENSSL_VERSION_NUMBER} is an integer with status in the low
-        byte and the patch, fix, minor, and major versions in the
-        nibbles above that.
-        """
-        self.assertTrue(isinstance(OPENSSL_VERSION_NUMBER, int))
-
-
-    def test_SSLeay_version(self):
-        """
-        L{SSLeay_version} takes a version type indicator and returns
-        one of a number of version strings based on that indicator.
-        """
-        versions = {}
-        for t in [SSLEAY_VERSION, SSLEAY_CFLAGS, SSLEAY_BUILT_ON,
-                  SSLEAY_PLATFORM, SSLEAY_DIR]:
-            version = SSLeay_version(t)
-            versions[version] = t
-            self.assertTrue(isinstance(version, bytes))
-        self.assertEqual(len(versions), 5)
-
-
-
 class ContextTests(TestCase, _LoopbackMixin):
 class ContextTests(TestCase, _LoopbackMixin):
     """
     """
     Unit tests for L{OpenSSL.SSL.Context}.
     Unit tests for L{OpenSSL.SSL.Context}.
@@ -277,16 +176,8 @@ class ContextTests(TestCase, _LoopbackMixin):
         L{Context} can be instantiated with one of L{SSLv2_METHOD},
         L{Context} can be instantiated with one of L{SSLv2_METHOD},
         L{SSLv3_METHOD}, L{SSLv23_METHOD}, or L{TLSv1_METHOD}.
         L{SSLv3_METHOD}, L{SSLv23_METHOD}, or L{TLSv1_METHOD}.
         """
         """
-        for meth in [SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD]:
+        for meth in [SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD]:
             Context(meth)
             Context(meth)
-
-        try:
-            Context(SSLv2_METHOD)
-        except ValueError:
-            # Some versions of OpenSSL have SSLv2, some don't.
-            # Difficult to say in advance.
-            pass
-
         self.assertRaises(TypeError, Context, "")
         self.assertRaises(TypeError, Context, "")
         self.assertRaises(ValueError, Context, 10)
         self.assertRaises(ValueError, Context, 10)
 
 
@@ -621,14 +512,12 @@ class ContextTests(TestCase, _LoopbackMixin):
         """
         """
         capath = self.mktemp()
         capath = self.mktemp()
         makedirs(capath)
         makedirs(capath)
-        # Hash values computed manually with c_rehash to avoid depending on
-        # c_rehash in the test suite.  One is from OpenSSL 0.9.8, the other
-        # from OpenSSL 1.0.0.
-        for name in ['c7adac82.0', 'c3705638.0']:
-            cafile = join(capath, name)
-            fObj = open(cafile, 'w')
-            fObj.write(cleartextCertificatePEM.decode('ascii'))
-            fObj.close()
+        # Hash value computed manually with c_rehash to avoid depending on
+        # c_rehash in the test suite.
+        cafile = join(capath, 'c7adac82.0')
+        fObj = open(cafile, 'w')
+        fObj.write(cleartextCertificatePEM.decode('ascii'))
+        fObj.close()
 
 
         self._load_verify_locations_test(None, capath)
         self._load_verify_locations_test(None, capath)
 
 
@@ -701,6 +590,59 @@ class ContextTests(TestCase, _LoopbackMixin):
         self.assertRaises(TypeError, context.add_extra_chain_cert, object(), object())
         self.assertRaises(TypeError, context.add_extra_chain_cert, object(), object())
 
 
 
 
+    def _create_certificate_chain(self):
+        """
+        Construct and return a chain of certificates.
+
+            1. A new self-signed certificate authority certificate (cacert)
+            2. A new intermediate certificate signed by cacert (icert)
+            3. A new server certificate signed by icert (scert)
+        """
+        caext = X509Extension(b('basicConstraints'), False, b('CA:true'))
+
+        # Step 1
+        cakey = PKey()
+        cakey.generate_key(TYPE_RSA, 512)
+        cacert = X509()
+        cacert.get_subject().commonName = "Authority Certificate"
+        cacert.set_issuer(cacert.get_subject())
+        cacert.set_pubkey(cakey)
+        cacert.set_notBefore(b("20000101000000Z"))
+        cacert.set_notAfter(b("20200101000000Z"))
+        cacert.add_extensions([caext])
+        cacert.set_serial_number(0)
+        cacert.sign(cakey, "sha1")
+
+        # Step 2
+        ikey = PKey()
+        ikey.generate_key(TYPE_RSA, 512)
+        icert = X509()
+        icert.get_subject().commonName = "Intermediate Certificate"
+        icert.set_issuer(cacert.get_subject())
+        icert.set_pubkey(ikey)
+        icert.set_notBefore(b("20000101000000Z"))
+        icert.set_notAfter(b("20200101000000Z"))
+        icert.add_extensions([caext])
+        icert.set_serial_number(0)
+        icert.sign(cakey, "sha1")
+
+        # Step 3
+        skey = PKey()
+        skey.generate_key(TYPE_RSA, 512)
+        scert = X509()
+        scert.get_subject().commonName = "Server Certificate"
+        scert.set_issuer(icert.get_subject())
+        scert.set_pubkey(skey)
+        scert.set_notBefore(b("20000101000000Z"))
+        scert.set_notAfter(b("20200101000000Z"))
+        scert.add_extensions([
+                X509Extension(b('basicConstraints'), True, b('CA:false'))])
+        scert.set_serial_number(0)
+        scert.sign(ikey, "sha1")
+
+        return [(cakey, cacert), (ikey, icert), (skey, scert)]
+
+
     def _handshake_test(self, serverContext, clientContext):
     def _handshake_test(self, serverContext, clientContext):
         """
         """
         Verify that a client and server created with the given contexts can
         Verify that a client and server created with the given contexts can
@@ -736,7 +678,7 @@ class ContextTests(TestCase, _LoopbackMixin):
         to it with a client which trusts cacert and requires verification to
         to it with a client which trusts cacert and requires verification to
         succeed.
         succeed.
         """
         """
-        chain = _create_certificate_chain()
+        chain = self._create_certificate_chain()
         [(cakey, cacert), (ikey, icert), (skey, scert)] = chain
         [(cakey, cacert), (ikey, icert), (skey, scert)] = chain
 
 
         # Dump the CA certificate to a file because that's the only way to load
         # Dump the CA certificate to a file because that's the only way to load
@@ -777,7 +719,7 @@ class ContextTests(TestCase, _LoopbackMixin):
         to it with a client which trusts cacert and requires verification to
         to it with a client which trusts cacert and requires verification to
         succeed.
         succeed.
         """
         """
-        chain = _create_certificate_chain()
+        chain = self._create_certificate_chain()
         [(cakey, cacert), (ikey, icert), (skey, scert)] = chain
         [(cakey, cacert), (ikey, icert), (skey, scert)] = chain
 
 
         # Write out the chain file.
         # Write out the chain file.
@@ -875,106 +817,6 @@ class ContextTests(TestCase, _LoopbackMixin):
 
 
 
 
 
 
-class ServerNameCallbackTests(TestCase, _LoopbackMixin):
-    """
-    Tests for L{Context.set_tlsext_servername_callback} and its interaction with
-    L{Connection}.
-    """
-    def test_wrong_args(self):
-        """
-        L{Context.set_tlsext_servername_callback} raises L{TypeError} if called
-        with other than one argument.
-        """
-        context = Context(TLSv1_METHOD)
-        self.assertRaises(TypeError, context.set_tlsext_servername_callback)
-        self.assertRaises(
-            TypeError, context.set_tlsext_servername_callback, 1, 2)
-
-    def test_old_callback_forgotten(self):
-        """
-        If L{Context.set_tlsext_servername_callback} is used to specify a new
-        callback, the one it replaces is dereferenced.
-        """
-        def callback(connection):
-            pass
-
-        def replacement(connection):
-            pass
-
-        context = Context(TLSv1_METHOD)
-        context.set_tlsext_servername_callback(callback)
-
-        tracker = ref(callback)
-        del callback
-
-        context.set_tlsext_servername_callback(replacement)
-        collect()
-        self.assertIdentical(None, tracker())
-
-
-    def test_no_servername(self):
-        """
-        When a client specifies no server name, the callback passed to
-        L{Context.set_tlsext_servername_callback} is invoked and the result of
-        L{Connection.get_servername} is C{None}.
-        """
-        args = []
-        def servername(conn):
-            args.append((conn, conn.get_servername()))
-        context = Context(TLSv1_METHOD)
-        context.set_tlsext_servername_callback(servername)
-
-        # Lose our reference to it.  The Context is responsible for keeping it
-        # alive now.
-        del servername
-        collect()
-
-        # Necessary to actually accept the connection
-        context.use_privatekey(load_privatekey(FILETYPE_PEM, server_key_pem))
-        context.use_certificate(load_certificate(FILETYPE_PEM, server_cert_pem))
-
-        # Do a little connection to trigger the logic
-        server = Connection(context, None)
-        server.set_accept_state()
-
-        client = Connection(Context(TLSv1_METHOD), None)
-        client.set_connect_state()
-
-        self._interactInMemory(server, client)
-
-        self.assertEqual([(server, None)], args)
-
-
-    def test_servername(self):
-        """
-        When a client specifies a server name in its hello message, the callback
-        passed to L{Contexts.set_tlsext_servername_callback} is invoked and the
-        result of L{Connection.get_servername} is that server name.
-        """
-        args = []
-        def servername(conn):
-            args.append((conn, conn.get_servername()))
-        context = Context(TLSv1_METHOD)
-        context.set_tlsext_servername_callback(servername)
-
-        # Necessary to actually accept the connection
-        context.use_privatekey(load_privatekey(FILETYPE_PEM, server_key_pem))
-        context.use_certificate(load_certificate(FILETYPE_PEM, server_cert_pem))
-
-        # Do a little connection to trigger the logic
-        server = Connection(context, None)
-        server.set_accept_state()
-
-        client = Connection(Context(TLSv1_METHOD), None)
-        client.set_connect_state()
-        client.set_tlsext_host_name(b("foo1.example.com"))
-
-        self._interactInMemory(server, client)
-
-        self.assertEqual([(server, b("foo1.example.com"))], args)
-
-
-
 class ConnectionTests(TestCase, _LoopbackMixin):
 class ConnectionTests(TestCase, _LoopbackMixin):
     """
     """
     Unit tests for L{OpenSSL.SSL.Connection}.
     Unit tests for L{OpenSSL.SSL.Connection}.
@@ -1026,71 +868,6 @@ class ConnectionTests(TestCase, _LoopbackMixin):
         self.assertRaises(TypeError, connection.get_context, None)
         self.assertRaises(TypeError, connection.get_context, None)
 
 
 
 
-    def test_set_context_wrong_args(self):
-        """
-        L{Connection.set_context} raises L{TypeError} if called with a
-        non-L{Context} instance argument or with any number of arguments other
-        than 1.
-        """
-        ctx = Context(TLSv1_METHOD)
-        connection = Connection(ctx, None)
-        self.assertRaises(TypeError, connection.set_context)
-        self.assertRaises(TypeError, connection.set_context, object())
-        self.assertRaises(TypeError, connection.set_context, "hello")
-        self.assertRaises(TypeError, connection.set_context, 1)
-        self.assertRaises(TypeError, connection.set_context, 1, 2)
-        self.assertRaises(
-            TypeError, connection.set_context, Context(TLSv1_METHOD), 2)
-        self.assertIdentical(ctx, connection.get_context())
-
-
-    def test_set_context(self):
-        """
-        L{Connection.set_context} specifies a new L{Context} instance to be used
-        for the connection.
-        """
-        original = Context(SSLv23_METHOD)
-        replacement = Context(TLSv1_METHOD)
-        connection = Connection(original, None)
-        connection.set_context(replacement)
-        self.assertIdentical(replacement, connection.get_context())
-        # Lose our references to the contexts, just in case the Connection isn't
-        # properly managing its own contributions to their reference counts.
-        del original, replacement
-        collect()
-
-
-    def test_set_tlsext_host_name_wrong_args(self):
-        """
-        If L{Connection.set_tlsext_host_name} is called with a non-byte string
-        argument or a byte string with an embedded NUL or other than one
-        argument, L{TypeError} is raised.
-        """
-        conn = Connection(Context(TLSv1_METHOD), None)
-        self.assertRaises(TypeError, conn.set_tlsext_host_name)
-        self.assertRaises(TypeError, conn.set_tlsext_host_name, object())
-        self.assertRaises(TypeError, conn.set_tlsext_host_name, 123, 456)
-        self.assertRaises(
-            TypeError, conn.set_tlsext_host_name, b("with\0null"))
-
-        if version_info >= (3,):
-            # On Python 3.x, don't accidentally implicitly convert from text.
-            self.assertRaises(
-                TypeError,
-                conn.set_tlsext_host_name, b("example.com").decode("ascii"))
-
-
-    def test_get_servername_wrong_args(self):
-        """
-        L{Connection.get_servername} raises L{TypeError} if called with any
-        arguments.
-        """
-        connection = Connection(Context(TLSv1_METHOD), None)
-        self.assertRaises(TypeError, connection.get_servername, object())
-        self.assertRaises(TypeError, connection.get_servername, 1)
-        self.assertRaises(TypeError, connection.get_servername, "hello")
-
-
     def test_pending(self):
     def test_pending(self):
         """
         """
         L{Connection.pending} returns the number of bytes available for
         L{Connection.pending} returns the number of bytes available for
@@ -1270,68 +1047,6 @@ class ConnectionTests(TestCase, _LoopbackMixin):
         self.assertRaises(NotImplementedError, conn.makefile)
         self.assertRaises(NotImplementedError, conn.makefile)
 
 
 
 
-    def test_get_peer_cert_chain_wrong_args(self):
-        """
-        L{Connection.get_peer_cert_chain} raises L{TypeError} if called with any
-        arguments.
-        """
-        conn = Connection(Context(TLSv1_METHOD), None)
-        self.assertRaises(TypeError, conn.get_peer_cert_chain, 1)
-        self.assertRaises(TypeError, conn.get_peer_cert_chain, "foo")
-        self.assertRaises(TypeError, conn.get_peer_cert_chain, object())
-        self.assertRaises(TypeError, conn.get_peer_cert_chain, [])
-
-
-    def test_get_peer_cert_chain(self):
-        """
-        L{Connection.get_peer_cert_chain} returns a list of certificates which
-        the connected server returned for the certification verification.
-        """
-        chain = _create_certificate_chain()
-        [(cakey, cacert), (ikey, icert), (skey, scert)] = chain
-
-        serverContext = Context(TLSv1_METHOD)
-        serverContext.use_privatekey(skey)
-        serverContext.use_certificate(scert)
-        serverContext.add_extra_chain_cert(icert)
-        serverContext.add_extra_chain_cert(cacert)
-        server = Connection(serverContext, None)
-        server.set_accept_state()
-
-        # Create the client
-        clientContext = Context(TLSv1_METHOD)
-        clientContext.set_verify(VERIFY_NONE, verify_cb)
-        client = Connection(clientContext, None)
-        client.set_connect_state()
-
-        self._interactInMemory(client, server)
-
-        chain = client.get_peer_cert_chain()
-        self.assertEqual(len(chain), 3)
-        self.assertEqual(
-            "Server Certificate", chain[0].get_subject().CN)
-        self.assertEqual(
-            "Intermediate Certificate", chain[1].get_subject().CN)
-        self.assertEqual(
-            "Authority Certificate", chain[2].get_subject().CN)
-
-
-    def test_get_peer_cert_chain_none(self):
-        """
-        L{Connection.get_peer_cert_chain} returns C{None} if the peer sends no
-        certificate chain.
-        """
-        ctx = Context(TLSv1_METHOD)
-        ctx.use_privatekey(load_privatekey(FILETYPE_PEM, server_key_pem))
-        ctx.use_certificate(load_certificate(FILETYPE_PEM, server_cert_pem))
-        server = Connection(ctx, None)
-        server.set_accept_state()
-        client = Connection(Context(TLSv1_METHOD), None)
-        client.set_connect_state()
-        self._interactInMemory(client, server)
-        self.assertIdentical(None, server.get_peer_cert_chain())
-
-
 
 
 class ConnectionGetCipherListTests(TestCase):
 class ConnectionGetCipherListTests(TestCase):
     """
     """
@@ -1359,49 +1074,6 @@ class ConnectionGetCipherListTests(TestCase):
 
 
 
 
 
 
-class ConnectionSendTests(TestCase, _LoopbackMixin):
-    """
-    Tests for L{Connection.send}
-    """
-    def test_wrong_args(self):
-        """
-        When called with arguments other than a single string,
-        L{Connection.send} raises L{TypeError}.
-        """
-        connection = Connection(Context(TLSv1_METHOD), None)
-        self.assertRaises(TypeError, connection.send)
-        self.assertRaises(TypeError, connection.send, object())
-        self.assertRaises(TypeError, connection.send, "foo", "bar")
-
-
-    def test_short_bytes(self):
-        """
-        When passed a short byte string, L{Connection.send} transmits all of it
-        and returns the number of bytes sent.
-        """
-        server, client = self._loopback()
-        count = server.send(b('xy'))
-        self.assertEquals(count, 2)
-        self.assertEquals(client.recv(2), b('xy'))
-
-    try:
-        memoryview
-    except NameError:
-        "cannot test sending memoryview without memoryview"
-    else:
-        def test_short_memoryview(self):
-            """
-            When passed a memoryview onto a small number of bytes,
-            L{Connection.send} transmits all of them and returns the number of
-            bytes sent.
-            """
-            server, client = self._loopback()
-            count = server.send(memoryview(b('xy')))
-            self.assertEquals(count, 2)
-            self.assertEquals(client.recv(2), b('xy'))
-
-
-
 class ConnectionSendallTests(TestCase, _LoopbackMixin):
 class ConnectionSendallTests(TestCase, _LoopbackMixin):
     """
     """
     Tests for L{Connection.sendall}.
     Tests for L{Connection.sendall}.
@@ -1427,21 +1099,6 @@ class ConnectionSendallTests(TestCase, _LoopbackMixin):
         self.assertEquals(client.recv(1), b('x'))
         self.assertEquals(client.recv(1), b('x'))
 
 
 
 
-    try:
-        memoryview
-    except NameError:
-        "cannot test sending memoryview without memoryview"
-    else:
-        def test_short_memoryview(self):
-            """
-            When passed a memoryview onto a small number of bytes,
-            L{Connection.sendall} transmits all of them.
-            """
-            server, client = self._loopback()
-            server.sendall(memoryview(b('x')))
-            self.assertEquals(client.recv(1), b('x'))
-
-
     def test_long(self):
     def test_long(self):
         """
         """
         L{Connection.sendall} transmits all of the bytes in the string passed to
         L{Connection.sendall} transmits all of the bytes in the string passed to
@@ -1960,28 +1617,6 @@ class MemoryBIOTests(TestCase, _LoopbackMixin):
         self._check_client_ca_list(set_replaces_add_ca)
         self._check_client_ca_list(set_replaces_add_ca)
 
 
 
 
-class InfoConstantTests(TestCase):
-    """
-    Tests for assorted constants exposed for use in info callbacks.
-    """
-    def test_integers(self):
-        """
-        All of the info constants are integers.
-
-        This is a very weak test.  It would be nice to have one that actually
-        verifies that as certain info events happen, the value passed to the
-        info callback matches up with the constant exposed by OpenSSL.SSL.
-        """
-        for const in [
-            SSL_ST_CONNECT, SSL_ST_ACCEPT, SSL_ST_MASK, SSL_ST_INIT,
-            SSL_ST_BEFORE, SSL_ST_OK, SSL_ST_RENEGOTIATE,
-            SSL_CB_LOOP, SSL_CB_EXIT, SSL_CB_READ, SSL_CB_WRITE, SSL_CB_ALERT,
-            SSL_CB_READ_ALERT, SSL_CB_WRITE_ALERT, SSL_CB_ACCEPT_LOOP,
-            SSL_CB_ACCEPT_EXIT, SSL_CB_CONNECT_LOOP, SSL_CB_CONNECT_EXIT,
-            SSL_CB_HANDSHAKE_START, SSL_CB_HANDSHAKE_DONE]:
-
-            self.assertTrue(isinstance(const, int))
-
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':
     main()
     main()

+ 7 - 21
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/test/util.py → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/test/util.py

@@ -1,5 +1,5 @@
-# Copyright (C) Jean-Paul Calderone
-# Copyright (C) Twisted Matrix Laboratories.
+# Copyright (C) Jean-Paul Calderone 2009, All rights reserved
+# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
 # See LICENSE for details.
 # See LICENSE for details.
 
 
 """
 """
@@ -15,14 +15,16 @@ import sys
 
 
 from OpenSSL.crypto import Error, _exception_from_error_queue
 from OpenSSL.crypto import Error, _exception_from_error_queue
 
 
-if sys.version_info < (3, 0):
+
+try:
+    bytes = bytes
+except NameError:
     def b(s):
     def b(s):
         return s
         return s
     bytes = str
     bytes = str
 else:
 else:
     def b(s):
     def b(s):
-        return s.encode("charmap")
-    bytes = bytes
+        return s.encode("ascii")
 
 
 
 
 class TestCase(TestCase):
 class TestCase(TestCase):
@@ -50,22 +52,6 @@ class TestCase(TestCase):
                 self.fail("Left over errors in OpenSSL error queue: " + repr(e))
                 self.fail("Left over errors in OpenSSL error queue: " + repr(e))
 
 
 
 
-    def failUnlessIn(self, containee, container, msg=None):
-        """
-        Fail the test if C{containee} is not found in C{container}.
-
-        @param containee: the value that should be in C{container}
-        @param container: a sequence type, or in the case of a mapping type,
-                          will follow semantics of 'if key in dict.keys()'
-        @param msg: if msg is None, then the failure message will be
-                    '%r not in %r' % (first, second)
-        """
-        if containee not in container:
-            raise self.failureException(msg or "%r not in %r"
-                                        % (containee, container))
-        return containee
-    assertIn = failUnlessIn
-
     def failUnlessIdentical(self, first, second, msg=None):
     def failUnlessIdentical(self, first, second, msg=None):
         """
         """
         Fail the test if C{first} is not C{second}.  This is an
         Fail the test if C{first} is not C{second}.  This is an

+ 1 - 1
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/tsafe.py → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/tsafe.py

@@ -16,7 +16,7 @@ class Connection:
               'setblocking', 'fileno', 'shutdown', 'close', 'get_cipher_list',
               'setblocking', 'fileno', 'shutdown', 'close', 'get_cipher_list',
               'getpeername', 'getsockname', 'getsockopt', 'setsockopt',
               'getpeername', 'getsockname', 'getsockopt', 'setsockopt',
               'makefile', 'get_app_data', 'set_app_data', 'state_string',
               'makefile', 'get_app_data', 'set_app_data', 'state_string',
-              'sock_shutdown', 'get_peer_certificate', 'get_peer_cert_chain', 'want_read',
+              'sock_shutdown', 'get_peer_certificate', 'want_read',
               'want_write', 'set_connect_state', 'set_accept_state',
               'want_write', 'set_connect_state', 'set_accept_state',
               'connect_ex', 'sendall'):
               'connect_ex', 'sendall'):
         exec("""def %s(self, *args):
         exec("""def %s(self, *args):

+ 2 - 3
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/util.c → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/util.c

@@ -1,9 +1,8 @@
 /*
 /*
  * util.c
  * util.c
  *
  *
- * Copyright (C) AB Strakt
- * Copyright (C) Jean-Paul Calderone
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2009, All rights reserved
  *
  *
  * Utility functions.
  * Utility functions.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.

+ 2 - 6
desktop/core/ext-py/pyOpenSSL-0.13/OpenSSL/util.h → desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/util.h

@@ -1,14 +1,14 @@
 /*
 /*
  * util.h
  * util.h
  *
  *
- * Copyright (C) AB Strakt
- * See LICENSE for details.
+ * Copyright (C) AB Strakt 2001, All rights reserved
  *
  *
  * Export utility functions and macros.
  * Export utility functions and macros.
  * See the file RATIONALE for a short explanation of why this module was written.
  * See the file RATIONALE for a short explanation of why this module was written.
  *
  *
  * Reviewed 2001-07-23
  * Reviewed 2001-07-23
  *
  *
+ * @(#) $Id: util.h,v 1.8 2002/08/16 10:08:09 martin Exp $
  */
  */
 #ifndef PyOpenSSL_UTIL_H_
 #ifndef PyOpenSSL_UTIL_H_
 #define PyOpenSSL_UTIL_H_
 #define PyOpenSSL_UTIL_H_
@@ -137,8 +137,4 @@ extern PyObject* PyOpenSSL_LongToHex(PyObject *o);
 #define PyOpenSSL_LongToHex(o) PyNumber_ToBase(o, 16)
 #define PyOpenSSL_LongToHex(o) PyNumber_ToBase(o, 16)
 #endif
 #endif
 
 
-#ifndef Py_TYPE
-#define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
-#endif
-
 #endif
 #endif

+ 8 - 0
desktop/core/ext-py/pyOpenSSL-0.11/OpenSSL/version.py

@@ -0,0 +1,8 @@
+# Copyright (C) AB Strakt 2001-2004, All rights reserved
+# Copyright (C) Jean-Paul Calderone 2008-2010, All rights reserved
+
+"""
+pyOpenSSL - A simple wrapper around the OpenSSL library
+"""
+
+__version__ = '0.11'

+ 2 - 2
desktop/core/ext-py/pyOpenSSL-0.13/PKG-INFO → desktop/core/ext-py/pyOpenSSL-0.11/PKG-INFO

@@ -1,11 +1,11 @@
 Metadata-Version: 1.0
 Metadata-Version: 1.0
 Name: pyOpenSSL
 Name: pyOpenSSL
-Version: 0.13
+Version: 0.11
 Summary: Python wrapper module around the OpenSSL library
 Summary: Python wrapper module around the OpenSSL library
 Home-page: http://pyopenssl.sourceforge.net/
 Home-page: http://pyopenssl.sourceforge.net/
 Author: Jean-Paul Calderone
 Author: Jean-Paul Calderone
 Author-email: exarkun@twistedmatrix.com
 Author-email: exarkun@twistedmatrix.com
-License: APL2
+License: LGPL
 Description: High-level wrapper around a subset of the OpenSSL library, includes
 Description: High-level wrapper around a subset of the OpenSSL library, includes
         * SSL.Connection objects, wrapping the methods of Python's portable
         * SSL.Connection objects, wrapping the methods of Python's portable
         sockets
         sockets

+ 30 - 0
desktop/core/ext-py/pyOpenSSL-0.11/README

@@ -0,0 +1,30 @@
+
+pyOpenSSL - A Python wrapper around the OpenSSL library
+------------------------------------------------------------------------------
+
+Copyright (C) AB Strakt 2001, All rights reserved
+
+I wrote this module working for AB Strakt (http://www.strakt.com/) and they
+paid me to do it, and it is with their consent this module is released to the
+general public.
+
+See the file INSTALL for installation instructions.
+
+I appreciate bug reports and patches, just mail me!
+
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+A copy of the GNU Lesser General Public License (version 2.1) is included in
+the file COPYING.
+
+
+@(#) $Id: README,v 1.2 2001/07/25 10:42:57 martin Exp $

+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/TODO → desktop/core/ext-py/pyOpenSSL-0.11/TODO


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/Makefile → desktop/core/ext-py/pyOpenSSL-0.11/doc/Makefile


+ 3 - 84
desktop/core/ext-py/pyOpenSSL-0.13/doc/pyOpenSSL.tex → desktop/core/ext-py/pyOpenSSL-0.11/doc/pyOpenSSL.tex

@@ -2,7 +2,7 @@
 
 
 \title{Python OpenSSL Manual}
 \title{Python OpenSSL Manual}
 
 
-\release{0.13}
+\release{0.11}
 
 
 \author{Jean-Paul Calderone}
 \author{Jean-Paul Calderone}
 \authoraddress{\email{exarkun@twistedmatrix.com}}
 \authoraddress{\email{exarkun@twistedmatrix.com}}
@@ -269,7 +269,7 @@ pass phrase.
 
 
 \begin{funcdesc}{load_crl}{type, buffer}
 \begin{funcdesc}{load_crl}{type, buffer}
 Load Certificate Revocation List (CRL) data from a string \var{buffer}.
 Load Certificate Revocation List (CRL) data from a string \var{buffer}.
-\var{buffer} encoded with the type \var{type}.  The type \var{type}
+\var{buffer} encoded with the type \var{type}.  The type \var{type} 
 must either \constant{FILETYPE_PEM} or \constant{FILETYPE_ASN1}).
 must either \constant{FILETYPE_PEM} or \constant{FILETYPE_ASN1}).
 \end{funcdesc}
 \end{funcdesc}
 
 
@@ -321,11 +321,6 @@ Return a PKey object representing the public key of the certificate.
 Return the certificate serial number.
 Return the certificate serial number.
 \end{methoddesc}
 \end{methoddesc}
 
 
-\begin{methoddesc}[X509]{get_signature_algorithm}{}
-Return the signature algorithm used in the certificate.  If the algorithm is
-undefined, raise \code{ValueError}.
-\end{methoddesc}
-
 \begin{methoddesc}[X509]{get_subject}{}
 \begin{methoddesc}[X509]{get_subject}{}
 Return an X509Name object representing the subject of the certificate.
 Return an X509Name object representing the subject of the certificate.
 \end{methoddesc}
 \end{methoddesc}
@@ -429,20 +424,6 @@ by OpenSSL (by EVP_get_digestbyname, specifically).  For example,
 Add the extensions in the sequence \var{extensions} to the certificate.
 Add the extensions in the sequence \var{extensions} to the certificate.
 \end{methoddesc}
 \end{methoddesc}
 
 
-\begin{methoddesc}[X509]{get_extension_count}{}
-Return the number of extensions on this certificate.
-\versionadded{0.12}
-\end{methoddesc}
-
-\begin{methoddesc}[X509]{get_extension}{index}
-Retrieve the extension on this certificate at the given index.
-
-Extensions on a certificate are kept in order.  The index parameter selects
-which extension will be returned.  The returned object will be an X509Extension
-instance.
-\versionadded{0.12}
-\end{methoddesc}
-
 \subsubsection{X509Name objects \label{openssl-x509name}}
 \subsubsection{X509Name objects \label{openssl-x509name}}
 
 
 X509Name objects have the following methods:
 X509Name objects have the following methods:
@@ -555,12 +536,6 @@ Generate a public/private key pair of the type \var{type} (one of
 Return the type of the key.
 Return the type of the key.
 \end{methoddesc}
 \end{methoddesc}
 
 
-\begin{methoddesc}[PKey]{check}{}
-Check the consistency of this key, returning True if it is consistent and
-raising an exception otherwise.  This is only valid for RSA keys.  See the
-OpenSSL RSA_check_key man page for further limitations.
-\end{methoddesc}
-
 \subsubsection{PKCS7 objects \label{openssl-pkcs7}}
 \subsubsection{PKCS7 objects \label{openssl-pkcs7}}
 
 
 PKCS7 objects have the following methods:
 PKCS7 objects have the following methods:
@@ -641,17 +616,7 @@ Return the critical field of the extension object.
 \end{methoddesc}
 \end{methoddesc}
 
 
 \begin{methoddesc}[X509Extension]{get_short_name}{}
 \begin{methoddesc}[X509Extension]{get_short_name}{}
-Retrieve the short descriptive name for this extension.
-
-The result is a byte string like \code{``basicConstraints''}.
-\versionadded{0.12}
-\end{methoddesc}
-
-\begin{methoddesc}[X509Extension]{get_data}{}
-Retrieve the data for this extension.
-
-The result is the ASN.1 encoded form of the extension data as a byte string.
-\versionadded{0.12}
+Return the short type name of the extension object.
 \end{methoddesc}
 \end{methoddesc}
 
 
 \subsubsection{NetscapeSPKI objects \label{openssl-netscape-spki}}
 \subsubsection{NetscapeSPKI objects \label{openssl-netscape-spki}}
@@ -852,28 +817,6 @@ interesting if you're using e.g. \constant{SSLv23_METHOD} to get an SSLv2-compat
 handshake, but don't want to use SSLv2.
 handshake, but don't want to use SSLv2.
 \end{datadesc}
 \end{datadesc}
 
 
-\begin{datadesc}{SSLEAY_VERSION}
-\dataline{SSLEAY_CFLAGS}
-\dataline{SSLEAY_BUILT_ON}
-\dataline{SSLEAY_PLATFORM}
-\dataline{SSLEAY_DIR}
-Constants used with \method{SSLeay_version} to specify what OpenSSL version
-information to retrieve.  See the man page for the \function{SSLeay_version} C
-API for details.
-\end{datadesc}
-
-\begin{datadesc}{OPENSSL_VERSION_NUMBER}
-An integer giving the version number of the OpenSSL library used to build this
-version of pyOpenSSL.  See the man page for the \function{SSLeay_version} C API
-for details.
-\end{datadesc}
-
-\begin{funcdesc}{SSLeay_version}{type}
-Retrieve a string describing some aspect of the underlying OpenSSL version.  The
-type passed in should be one of the \constant{SSLEAY_*} constants defined in
-this module.
-\end{funcdesc}
-
 \begin{datadesc}{ContextType}
 \begin{datadesc}{ContextType}
 See \class{Context}.
 See \class{Context}.
 \end{datadesc}
 \end{datadesc}
@@ -1128,12 +1071,6 @@ format specified by \var{format}, which is either \constant{FILETYPE_PEM} or
 \constant{FILETYPE_ASN1}. The default is \constant{FILETYPE_PEM}.
 \constant{FILETYPE_ASN1}. The default is \constant{FILETYPE_PEM}.
 \end{methoddesc}
 \end{methoddesc}
 
 
-\begin{methoddesc}[Context]{set_tlsext_servername_callback}{callback}
-Specify a one-argument callable to use as the TLS extension server name
-callback.  When a connection using the server name extension is made using this
-context, the callback will be invoked with the \code{Connection} instance.
-\versionadded{0.13}
-\end{methoddesc}
 
 
 \subsubsection{Connection objects \label{openssl-connection}}
 \subsubsection{Connection objects \label{openssl-connection}}
 
 
@@ -1211,18 +1148,10 @@ by this \class{Connection}'s \class{Context}.
 Retrieve the Context object associated with this Connection.
 Retrieve the Context object associated with this Connection.
 \end{methoddesc}
 \end{methoddesc}
 
 
-\begin{methoddesc}[Connection]{set_context}{context}
-Specify a replacement Context object for this Connection.
-\end{methoddesc}
-
 \begin{methoddesc}[Connection]{get_peer_certificate}{}
 \begin{methoddesc}[Connection]{get_peer_certificate}{}
 Retrieve the other side's certificate (if any)
 Retrieve the other side's certificate (if any)
 \end{methoddesc}
 \end{methoddesc}
 
 
-\begin{methoddesc}[Connection]{get_peer_cert_chain}{}
-Retrieve the tuple of the other side's certificate chain (if any)
-\end{methoddesc}
-
 \begin{methoddesc}[Connection]{getpeername}{}
 \begin{methoddesc}[Connection]{getpeername}{}
 Call the \method{getpeername} method of the underlying socket.
 Call the \method{getpeername} method of the underlying socket.
 \end{methoddesc}
 \end{methoddesc}
@@ -1350,16 +1279,6 @@ Checks if there is data to write to the transport layer to complete an
 operation.
 operation.
 \end{methoddesc}
 \end{methoddesc}
 
 
-\begin{methoddesc}[Connection]{set_tlsext_host_name}{name}
-Specify the byte string to send as the server name in the client hello message.
-\versionadded{0.13}
-\end{methoddesc}
-
-\begin{methoddesc}[Connection]{get_servername}{}
-Get the value of the server name received in the client hello message.
-\versionadded{0.13}
-\end{methoddesc}
-
 
 
 
 
 \section{Internals \label{internals}}
 \section{Internals \label{internals}}

+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/anno-api.py → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/anno-api.py


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/buildindex.py → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/buildindex.py


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/checkargs.pm → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/checkargs.pm


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/cklatex → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/cklatex


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/custlib.py → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/custlib.py


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/cvsinfo.py → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/cvsinfo.py


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/findacks → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/findacks


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/findmodrefs → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/findmodrefs


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/fix_hack → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/fix_hack


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/fix_libaux.sed → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/fix_libaux.sed


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/fixinfo.el → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/fixinfo.el


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/getpagecounts → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/getpagecounts


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/about.dat → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/about.dat


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/about.html → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/about.html


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/blank.gif → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/blank.gif


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/blank.png → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/blank.png


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/contents.gif → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/contents.gif


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/contents.png → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/contents.png


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/index.gif → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/index.gif


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/index.png → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/index.png


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/modules.gif → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/modules.gif


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/modules.png → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/modules.png


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/next.gif → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/next.gif


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/next.png → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/next.png


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/previous.gif → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/previous.gif


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/previous.png → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/previous.png


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/up.gif → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/up.gif


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/icons/up.png → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/icons/up.png


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/index.html.in → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/index.html.in


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/stdabout.dat → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/stdabout.dat


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html/style.css → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html/style.css


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/html2texi.pl → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/html2texi.pl


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/indfix.py → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/indfix.py


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/info/Makefile → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/info/Makefile


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/info/README → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/info/README


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/info/python.dir → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/info/python.dir


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/keywords.py → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/keywords.py


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/listmodules → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/listmodules


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/mkackshtml → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkackshtml


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/mkhowto → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkhowto


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/mkinfo → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkinfo


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/mkmodindex → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mkmodindex


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/mksourcepkg → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/mksourcepkg


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/node2label.pl → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/node2label.pl


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/paper-a4/pypaper.sty → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/paper-a4/pypaper.sty


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/perl/SynopsisTable.pm → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/perl/SynopsisTable.pm


+ 0 - 0
desktop/core/ext-py/pyOpenSSL-0.13/doc/tools/perl/distutils.perl → desktop/core/ext-py/pyOpenSSL-0.11/doc/tools/perl/distutils.perl


Неке датотеке нису приказане због велике количине промена