Dear core developpers,

In ssl/ssl_lib.c there is a lot of functionality of get/set implemented
through a SSL_ctrl or SSL_CTX_ctrl, but some are implemented
directly as functions.

There may be some logic behind that but I am not sure which one.
One thing seems to be that the get function which need a pointer
are implemented directly whilst some functions that return integers
are in a ctrl.

There is for example the GET/SET READ_AHEAD in a ctrl returning
an int, but all all set/get_verify_mode etc are all as independant
functions, and, well, there is an void SSL_set_read_ahead
which duplicates the functionality.

It seems that there had been an effort to move accessors to
the SSL_ctrl and SSL_CTX_ctrl, since in older versions the
SSL_ctrl was basically empty and  just an interface to the
method dependant code. There is also the GET_SESSION_REUSED
which is common to the v2 and v3, thus could be moved to
ssl_lib.c

It may be that some stuff is left there to maintain compatibility,
i.e., the explicit functions like SSL_set_read_ahead

It would be nice to have a kind roadmap somewhere (which may
already exist) to indicate whether the xxx_ctrl are 'the future'
or not, and if yes, how to provide the 'get' functions for structures
like (SSL_get_ctx).

The reason why I ask this is that in some provided patches (like
ours for tls extensions and SRP) or the PSK from Nokia), there are
some more or less strange ways to add new functionality.

Thanks in advance for any illuminating remark.
Peter

--
To verify the signature, see http://edelpki.edelweb.fr/ Cela vous permet de charger le certificat de l'autorité; die Liste mit zurückgerufenen Zertifikaten finden Sie da auch.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to