1. 16 Eyl, 2007 1 kayıt (commit)
    • Bill Janssen's avatar
      Add support for asyncore server-side SSL support. This requires · 296a59d3
      Bill Janssen yazdı
      adding the 'makefile' method to ssl.SSLSocket, and importing the
      requisite fakefile class from socket.py, and making the appropriate
      changes to it to make it use the SSL connection.
      
      Added sample HTTPS server to test_ssl.py, and test that uses it.
      
      Change SSL tests to use https://svn.python.org/, instead of
      www.sf.net and pop.gmail.com.
      
      Added utility function to ssl module, get_server_certificate,
      to wrap up the several things to be done to pull a certificate
      from a remote server.
      296a59d3
  2. 10 Eyl, 2007 1 kayıt (commit)
    • Bill Janssen's avatar
      More work on SSL support. · 98d19daf
      Bill Janssen yazdı
      * Much expanded test suite:
      
        All protocols tested against all other protocols.
        All protocols tested with all certificate options.
        Tests for bad key and bad cert.
        Test of STARTTLS functionality.
        Test of RAND_* functions.
      
      * Fixes for threading/malloc bug.
      
      * Issue 1065 fixed:
      
        sslsocket class renamed to SSLSocket.
        sslerror class renamed to SSLError.
        Function "wrap_socket" now used to wrap an existing socket.
      
      * Issue 1583946 finally fixed:
      
        Support for subjectAltName added.
        Subject name now returned as proper DN list of RDNs.
      
      * SSLError exported from socket as "sslerror".
      
      * RAND_* functions properly exported from ssl.py.
      
      * Documentation improved:
      
        Example of how to create a self-signed certificate.
        Better indexing.
      98d19daf
  3. 05 Eyl, 2007 1 kayıt (commit)
  4. 27 Agu, 2007 1 kayıt (commit)
    • Guido van Rossum's avatar
      > Some of the code sets the error string in this directly before · 780b80dc
      Guido van Rossum yazdı
      > returning NULL, and other pieces of the code call PySSL_SetError,
      > which creates the error string.  I think some of the places which set
      > the string directly probably shouldn't; instead, they should call
      > PySSL_SetError to cons up the error name directly from the err code.
      > However, PySSL_SetError only works after the construction of an ssl
      > object, which means it can't be used there...  I'll take a longer look
      > at it and see if there's a reasonable fix.
      
      Here's a patch which addresses this.  It also fixes the indentation in
      PySSL_SetError, bringing it into line with PEP 7, fixes a compile warning
      about one of the OpenSSL macros, and makes the namespace a bit more
      consistent.  I've tested it on FC 7 and OS X 10.4.
      
      % ./python ./Lib/test/regrtest.py -R :1: -u all test_ssl
      test_ssl
      beginning 6 repetitions
      123456
      ......
      1 test OK.
      [29244 refs]
      %
      
      [GvR: slightly edited to enforce 79-char line length, even if it required
       violating the style guide.]
      780b80dc
  5. 25 Agu, 2007 3 kayıt (commit)
  6. 21 Tem, 2007 1 kayıt (commit)
  7. 19 Eki, 2006 1 kayıt (commit)
  8. 11 Tem, 2006 1 kayıt (commit)
  9. 11 May, 2006 1 kayıt (commit)
  10. 10 May, 2006 1 kayıt (commit)
    • Neal Norwitz's avatar
      Fix problems found by Coverity. · c6a989ac
      Neal Norwitz yazdı
      longobject.c: also fix an ssize_t problem
        <a> could have been NULL, so hoist the size calc to not use <a>.
      
      _ssl.c: under fail: self is DECREF'd, but it would have been NULL.
      
      _elementtree.c: delete self if there was an error.
      
      _csv.c: I'm not sure if lineterminator could have been anything other than
      a string.  However, other string method calls are checked, so check this
      one too.
      c6a989ac
  11. 17 Nis, 2006 1 kayıt (commit)
  12. 31 Mar, 2006 1 kayıt (commit)
  13. 13 Şub, 2006 1 kayıt (commit)
  14. 11 Şub, 2006 1 kayıt (commit)
  15. 07 Şub, 2006 2 kayıt (commit)
    • Neal Norwitz's avatar
      Bug #876637, prevent stack corruption when socket descriptor · 082b2df3
      Neal Norwitz yazdı
      is larger than FD_SETSIZE.
      
      This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE
      which is typically only available to root.  Since this wouldn't normally
      be run in a test (ie, run as root), it doesn't seem too worthwhile to
      add a normal test.  The bug report has one version of a test.  I've
      written another.  Not sure what the best thing to do is.
      
      Do the check before calling internal_select() because we can't set
      an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.
      This seemed the clearest solution, ie handle before calling internal_select()
      rather than inside.  Plus there is at least one place outside
      of internal_select() that needed to be handled.
      
      Will backport.
      082b2df3
    • Neal Norwitz's avatar
      Fix indentation (whitespace only). · 19cbcad2
      Neal Norwitz yazdı
      19cbcad2
  16. 19 Ock, 2006 1 kayıt (commit)
  17. 04 Agu, 2004 1 kayıt (commit)
  18. 10 Tem, 2004 2 kayıt (commit)
  19. 23 Mar, 2004 1 kayıt (commit)
  20. 27 Eki, 2003 1 kayıt (commit)
  21. 20 Eki, 2003 1 kayıt (commit)
  22. 30 Haz, 2003 1 kayıt (commit)
  23. 28 Haz, 2003 1 kayıt (commit)
  24. 02 Şub, 2003 1 kayıt (commit)
  25. 31 Ock, 2003 1 kayıt (commit)
    • Guido van Rossum's avatar
      SF patch 676472 by Geoff Talvola, reviewed by Ben Laurie. · 4f707ac8
      Guido van Rossum yazdı
      Geoff writes:
        This is yet another patch to _ssl.c that sets the
        underlying BIO to non-blocking if the socket being
        wrapped is non-blocking. It also correctly loops when
        SSL_connect, SSL_write, or SSL_read indicates that it
        needs to read or write more bytes.
      
        This seems to fix bug #673797 which was not fixed by my
        previous patch.
      4f707ac8
  26. 27 Ock, 2003 1 kayıt (commit)
  27. 02 Agu, 2002 1 kayıt (commit)
  28. 28 Tem, 2002 1 kayıt (commit)
  29. 17 Tem, 2002 1 kayıt (commit)
    • Jeremy Hylton's avatar
      staticforward bites the dust. · 938ace69
      Jeremy Hylton yazdı
      The staticforward define was needed to support certain broken C
      compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
      static keyword when it was used with a forward declaration of a static
      initialized structure.  Standard C allows the forward declaration with
      static, and we've decided to stop catering to broken C compilers.  (In
      fact, we expect that the compilers are all fixed eight years later.)
      
      I'm leaving staticforward and statichere defined in object.h as
      static.  This is only for backwards compatibility with C extensions
      that might still use it.
      
      XXX I haven't updated the documentation.
      938ace69
  30. 02 Tem, 2002 1 kayıt (commit)
  31. 13 Haz, 2002 1 kayıt (commit)
  32. 27 Nis, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      Repair widespread misuse of _PyString_Resize. Since it's clear people · 5de9842b
      Tim Peters yazdı
      don't understand how this function works, also beefed up the docs.  The
      most common usage error is of this form (often spread out across gotos):
      
      	if (_PyString_Resize(&s, n) < 0) {
      		Py_DECREF(s);
      		s = NULL;
      		goto outtahere;
      	}
      
      The error is that if _PyString_Resize runs out of memory, it automatically
      decrefs the input string object s (which also deallocates it, since its
      refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
      branch ever triggers, it's an error to call Py_DECREF(s):  s is already
      NULL!  A correct way to write the above is the simpler (and intended)
      
      	if (_PyString_Resize(&s, n) < 0)
      		goto outtahere;
      
      Bugfix candidate.
      5de9842b
  33. 20 Nis, 2002 1 kayıt (commit)
  34. 16 Şub, 2002 1 kayıt (commit)
    • Marc-André Lemburg's avatar
      Break SSL support out of _socket module and place it into a new · a5d2b4cb
      Marc-André Lemburg yazdı
      helper module _ssl.
      
      The support for the RAND_* APIs in _ssl is now only enabled
      for OpenSSL 0.9.5 and up since they were added in that
      release.
      
      Note that socketmodule.* should really be renamed to _socket.* --
      unfortunately, this seems to lose the CVS history of the file.
      
      Please review and test... I was only able to test the header file
      chaos in socketmodule.c/h on Linux. The test run through fine
      and compiles don't give errors or warnings.
      
      WARNING: This patch does *not* include changes to the various
      non-Unix build process files.
      a5d2b4cb