• 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
_ssl.c 27.3 KB