Earlier quoted context omitted.
on second thought, my comment makes little sense, if they wanted noisy sleep, it should be something like sleep(func(rand()))
That makes no sense either, an attacker can usually average such things out. Besides, there are better (faster) ways to guard against timing attacks.
Incidentally, the primary problem here is not the mere presence of a debug flag that governs a sleep, it's the fact that PySSL_SSLdo_handshake sets that debug flag. Right?
In other words, it's not a bug in OpenSSL itself, but rather the Python wrapper for OpenSSL. That's how I understand it.