[issue8737] ssl.RAND_add() should only accept bytes (not str)

2010-05-16 Thread STINNER Victor
STINNER Victor added the comment: > the kind of data is not important, and no matter which encoding > is used, this will not change the quality of the entropy. Ok, you are right :-) -- resolution: -> invalid status: open -> closed ___ Python track

[issue8737] ssl.RAND_add() should only accept bytes (not str)

2010-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think Amaury is right. You could add a test that bytes are also accepted, though. -- ___ Python tracker ___ _

[issue8737] ssl.RAND_add() should only accept bytes (not str)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8737] ssl.RAND_add() should only accept bytes (not str)

2010-05-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This function is here to add entropy to the random numbers generator. the kind of data is not important, and no matter which encoding is used, this will not change the quality of the entropy. -- nosy: +amaury.forgeotdarc

[issue8737] ssl.RAND_add() should only accept bytes (not str)

2010-05-16 Thread STINNER Victor
New submission from STINNER Victor : PySSL_RAND_add() uses PyArg_ParseTuple(args, "s#d:RAND_add", ...) and so converts implicitly str to bytes using UTF-8. I would prefer that this function only accepts bytes: the user will have to encode str to bytes *explicitly*. Attached patch replace s# fo