| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| |
|
|
|
|
|
| |
In SSL_dealloc(), free/dealloc them only if they're non-NULL.
Fixes some obvious core dumps, but not sure yet if there are more
semantics to the SSL calls that would affect the dealloc.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
XXX [1] These changes aren't tested very thoroughly, because regrtest
doesn't do any SSL tests. I've done some trivial tests on my own, but
don't really know how to use the key and cert files. In one case, an
SSL-level error causes Python to dump core. I'll get the fixed in the
next round of changes.
XXX [2] The checkin removes the x_attr member of the SSLObject struct.
I'm not sure if this is kosher for backwards compatibility at the
binary level. Perhaps its safer to keep the member but keep it
assigned to NULL.
And the leaks?
newSSLObject() called PyDict_New(), stored the result in x_attr
without checking it, and later stored NULL in x_attr without doing
anything to the dict. So the dict always leaks. There is no further
reference to x_attr, so I just removed it completely.
The error cases in newSSLObject() passed the return value of
PyString_FromString() directly to PyErr_SetObject().
PyErr_SetObject() expects a borrowed reference, so the string leaked.
|
| |
|
|
|
|
|
|
|
|
|
| |
pyport.h: typedef a new Py_intptr_t type.
DELICATE ASSUMPTION: That HAVE_UINTPTR_T implies intptr_t is
available as well as uintptr_t. If that turns out not to be
true, things must get uglier (C99 wants both, so I think it's
an assumption we're *likely* to get away with).
thread_nt.h, PyThread_start_new_thread: MS _beginthread is documented
as returning unsigned long; no idea why uintptr_t was being used.
Others: Always use Py_[u]intptr_t, never [u]intptr_t directly.
|
| |
|
|
|
| |
changes the order of the free calls to be the reverse of the alloc
calls. Closes that bug.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Depend AF_PACKET on HAVE_NETPACKET_PACKET_H. Fixes #449157
|
| | |
|
| |
|
|
| |
exception classes in the module dictionary.
|
| |
|
|
| |
Since getnameinfo is not implemented, remove __APPLE__ check here.
|
| |
|
|
| |
add another use case to the socketmodule.
|
| |
|
|
| |
code on Darwin, since the C library version of that seems to be broken.
|
| |
|
|
| |
snprintf.
|
| |
|
|
|
| |
Remove declaration of h_errno, since it is supposedly declared in netdb.h.
Changes proposed by itojun.
|
| |
|
|
| |
whether h_errno is a macro.
|
| |
|
|
| |
sa_family.
|
| |
|
|
|
|
|
|
| |
New functions getnameinfo, getaddrinfo. New exceptions socket.gaierror,
socket.herror. Various new constants, in particular AF_INET6 and error
codes and parameters for getaddrinfo.
AF_INET6 support in setipaddr, makesockaddr, getsockaddr, getsockaddrlen,
gethost_common, PySocket_gethostbyaddr.
|
| |
|
|
| |
inet_pton/ntop, convert htons argument to u_short.
|
| |
|
|
| |
This is part of SF patch #434992.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
because I need to make progress and don't have time now to think about
whatever it is the new code is trying to accomplish.
|
| |
|
|
|
| |
Contributed by Jun-ichiro "itojun" Hagino. get{addr,name}info emulation
code taken from WIDE.
|
| |
|
|
|
|
| |
When getting a string buffer for a string we just created, use
PyString_AS_STRING() instead of PyString_AsString() to avoid the
call overhead and extra type check.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
this could cause invalid paths to be returned for AF_UNIX sockets on some
platforms (including FreeBSD 4.2-RELEASE), appearantly because there is
no assurance that the address will be nul-terminated when filled in by the
kernel.
PySocketSock_recvfrom(): Use PyString_AS_STRING() to get the data pointer
of a string we create ourselves; there is no need for the extra type
check from PyString_AsString().
This closes SF bug #416573.
|
| |
|
|
|
|
|
|
|
|
| |
OpenSSL versions beore 0.9.5. This just is too experimental to be
worth it, especially since the user would have to do some severe
hacking of the Modules/Setup file to even enable the EGD code, and
without the EGD code it would always spit out a warning on some
systems -- even when socket.ssl() is not used. Fixing that properly
is not my job; the EGD patch is clearly not so important that it
should hold up the 2.1 release.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
problem reported by Neil Schemenauer on python-dev on 4/12/01, wth
subject "Problem with SSL and socketmodule on Debian Potato?".
It's tentative because Moshe objected, but Martin rebutted, and Moshe
seems unavailable for comments.
(Note that with OpenSSL 0.9.6a, I get a lot of compilation warnings
for socketmodule.c -- I'm assuming I can safely ignore these until 2.1
is released.)
|
| | |
|
| | |
|
| |
|
|
| |
the entire string passed to it
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Adds support for raw packets (AF_PACKET) under Linux. I haven't
tested this code thoroughly; it compiles and the basic calls all work
without crashing. Not sure what to actually do with raw sockets though.
Not sure what other platforms this might be useful for.
|
| |
|
|
|
|
| |
socket -- as suggested by Clarence Gardner.
Fix httplib to comply with the new ssl-socket interface.
|
| | |
|
| | |
|
| |
|
|
| |
#125981: closing sockets was not thread-safe.
|
| |
|
|
| |
getsockaddrarg when the address is not a tuple.
|
| |
|
|
|
|
| |
tcp.h is not available on CygWin, so do not try to include it there.
This closes SourceForge patch #101802.
|
| |
|
|
| |
of the init_socket() function. This module is now *always* _socket.
|
| |
|
|
|
|
| |
This doesn't change the copyright status for these files -- just the
markings! Doing it on the main branch for these three files for which
the HEAD revision was pushed back into 1.6.
|
| | |
|
| |
|
|
| |
marked my*.h as obsolete
|