On 2011/05/11 20:48, Davi Arnaut wrote:
Hi Davi,
Thanks for your input!
After reading the docs some more, and running some more tests ...
There is absolutely no reason we shouldn't hand in the proper return
values from the SSL I/O calls, seeing as we do have the information.
This should prevent GIGO. Code fixed to pass in the SSL_*() return
values. New patch also removes duplicate report_errors() in
viosslfactories.c, and renames the function to ssl_report_errors() to
keep the namespace sane.
> Why not simply use ERR_peek_error?
De facto it's always 0 ("not in error state") for the I/O functions, so
we wouldn't get useful error messages for failing I/O. Or well, we do,
but we shouldn't. :) I've split the I/O and other error handling now. In
fact I'm not sure the "other errors" ever come up, but at least that way
we're guaranteed an empty error Q *before* calling I/O: this doesn't
actually seem necessary at this point, but the docs say we should do
this. Call it future-proofing. :) I'm much happier with this
patch.
Best regards,
Tatiana
--
Tatiana Azundris, Bugs Bunny * IRC/Skype: Azundris * azundris@stripped
ORACLE Deutschland B.V. & Co. KG - http://oracle.com
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschaftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
Oracle is committed to developing practices and products that help
protect the environment - http://www.oracle.com/commitment