On Mon, 26 Jul 1999, Dan Razzell wrote:

> Damien Miller <[EMAIL PROTECTED]> wrote:
> 
> > I want to add the facility to pass user data to password callback
> > functions. e.g.

NB the changes have already been added to the CVS repository.
 
> It's good to see this question raised again!
> 
> I had exactly this case in mind in a discussion a couple of years ago with EAY
> on passing external data to callbacks.  At the time, the focus was primarily
> on what form the external data should take and what structures should carry
> it, rather than specifically how to pass it down to which callback.  The
> result in the end was that the forms for expressing external data are now
> quite rich, but it seems the callback code itself never quite did get changed!
> 
> While waiting for these details to be worked out, I had to get going on my
> application, and the quick hack I did was just what you propose, with the
> minor difference of using type "void *".  It worked well enough to keep me
> going, but on reflection I'm convinced it would lead to a more unified
> solution if an SSL_CTX were passed instead of an anonymous pointer.  Recall
> that this structure is uniquely used to identify the callback function
> itself, and it follows that any external data needed by the callback can be
> bound here also, without loss of generality.  Indeed I have been given to
> understand that the ex_data field of this structure was conceived for just
> this sort of extensibility.

The OpenSSL SSL library (libssl) is seperate to the crypto library 
(libcrypto) in which the PEM routines reside. Currently libssl requires 
libcrypto. What you propose would make libcrypto require libssl as well,
which is not a good thing for us people who do not always need the SSL
functionality.

Another problem - there are other ways to access the PEM routines apart
from the SSL* functions. You don't always have a SSL_CTX to relate to.

Regards,
Damien Miller 

--
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.ilogic.com.au/~dmiller
| Email: [EMAIL PROTECTED] (home) -or- [EMAIL PROTECTED] (work)

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to