Victor Stinner
9aa1331c6f
Issue #22585 : os.urandom() now releases the GIL when the getentropy() is used
(OpenBSD 5.6+).
11 years ago
Victor Stinner
79b74aeb20
Issue #22181 : os.urandom() now releases the GIL when the getrandom()
implementation is used.
11 years ago
Victor Stinner
e134a7fe36
Issue #23752 : _Py_fstat() is now responsible to raise the Python exception
Add _Py_fstat_noraise() function when a Python exception is not welcome.
11 years ago
Victor Stinner
c9382eb7ae
Issue #23707 : On UNIX, os.urandom() now calls the Python signal handler when
read() is interrupted by a signal.
dev_urandom_python() now calls _Py_read() helper instead of calling directly
read().
11 years ago
Victor Stinner
c7cd12da60
Issue #22181 : Fix dev_urandom_noraise(), try calling py_getrandom() before
opening /dev/urandom.
11 years ago
Victor Stinner
9eb57c5fa5
Issue #22181 : The availability of the getrandom() is now checked in configure,
and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define.
Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom().
11 years ago
Victor Stinner
59f7fb29ec
Issue #22181 : On Linux, os.urandom() now uses the new getrandom() syscall if
available, syscall introduced in the Linux kernel 3.17. It is more reliable
and more secure, because it avoids the need of a file descriptor and waits
until the kernel has enough entropy.
11 years ago
Victor Stinner
a555cfcb73
Issue #23694 : Enhance _Py_open(), it now raises exceptions
* _Py_open() now raises exceptions on error. If open() fails, it raises an
OSError with the filename.
* _Py_open() now releases the GIL while calling open()
* Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not
held
11 years ago
Steve Dower
f2f373f593
Issue #23152 : Implement _Py_fstat() to support files larger than 2 GB on Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
11 years ago
Victor Stinner
fe02e39029
Issue #22585 : On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
11 years ago
Victor Stinner
4d6a3d6c01
Issue #22585 : On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
11 years ago
Serhiy Storchaka
56a6d855e2
Removed duplicated words in in comments and docs.
11 years ago
Tim Golden
b8ac3e1a20
Issue21393 Use CryptReleaseContext to release Crypt handle on Windows
12 years ago
Victor Stinner
d50c3f3f3a
Issue #21393 : random.c: on Windows, close the hCryptProv handle at exit
12 years ago
Antoine Pitrou
e472aeafc3
Issue #21207 : Detect when the os.urandom cached fd has been closed or replaced, and open it anew.
12 years ago
Christian Heimes
af01f66817
Issue #16136 : Remove VMS support and VMS-related code
12 years ago
Christian Heimes
985ecdcfc2
ssue #19183 : Implement PEP 456 'secure and interchangeable hash algorithm'.
Python now uses SipHash24 on all major platforms.
12 years ago
Victor Stinner
0c083461a5
Fix compiler warning in win32_urandom(): explicit cast to DWORD in
CryptGenRandom()
12 years ago
Georg Brandl
c6a2c9b466
Closes #15213 : update comment for _PyOS_URandom
12 years ago
Antoine Pitrou
4879a963d4
Issue #18756 : os.urandom() now uses a lazily-opened persistent file descriptor, so as to avoid using many file descriptors when run in parallel from multiple threads.
13 years ago
Victor Stinner
daf455554b
Issue #18571 : Implementation of the PEP 446: file descriptors and file handles
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
13 years ago
Antoine Pitrou
ec34ab5010
Issue #18756 : Improve error reporting in os.urandom() when the failure is due to something else than /dev/urandom not existing.
13 years ago
Martin v. Löwis
3f50bf652b
Drop support for Windows 2000; allow any XP API (but not Vista+).
Drop SDK version configuration for Tk compilation, to not bind it to W2k
anymore. Binding it to XP would conflict with Tk's own binding of tkMenu to W2k.
13 years ago
Antoine Pitrou
e299cae230
Issue #15340 : Fix importing the random module when /dev/urandom cannot be opened.
This was a regression caused by the hash randomization patch.
14 years ago
Antoine Pitrou
7ff1822ec7
Issue #15340 : Fix importing the random module when /dev/urandom cannot be opened.
This was a regression caused by the hash randomization patch.
14 years ago
Antoine Pitrou
380c55cc58
Issue #15340 : Fix importing the random module when /dev/urandom cannot be opened.
This was a regression caused by the hash randomization patch.
14 years ago
Benjamin Peterson
c9f54cf512
enable hash randomization by default
14 years ago
Benjamin Peterson
69e9727657
ensure no one tries to hash things before the random seed is found
14 years ago
Benjamin Peterson
26da920001
ensure no one tries to hash things before the random seed is found
14 years ago
Barry Warsaw
1e13eb084f
- Issue #13703 : oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
environment variable, to provide an opt-in way to protect against denial of
service attacks due to hash collisions within the dict and set types. Patch
by David Malcolm, based on work by Victor Stinner.
14 years ago
Georg Brandl
91e5c08fe8
Fix typo in conditional.
14 years ago
Georg Brandl
12897d7d39
Fix typo in conditional.
14 years ago
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
14 years ago