> -----Original Message-----
> From: Ben Laurie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 15, 1999 5:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Adding parameters to passphrase callbacks.
>
>
> Bodo Moeller wrote:
> >
> > "Wade L. Scholine" <[EMAIL PROTECTED]>:
> >
> > > An alternative not mentioned is to make the callback type have a
> > > variable number of arguments, like
> > >
> > > typedef int (*password_cb(char *buf, int size, int
> rwflag, ...));
> > >
> > > where the arg list is terminated with a null pointer
> constant or something.
> > >
> > > This would still break existing code, but which would
> allow for more
> > > or less arbitrary parameters to callbacks. [...]
> >
> > Actually this version, while looking reasonably at first sight, does
> > not work at all: The library cannot know with parameter
> list should be
> > used when calling the callback functions. After all, the extra
> > parameters are not for data that the library thinks the callback
> > should know about, but for data about which the library
> knows nothing,
> > but which the application wants to "tunnel" to its callback
> functions.
>
> I presume the intention was that ... would either be a void *, or
> nothing. In which case, passing the extra parameter is strictly
> incorrect (you shouldn't access parameters that weren't
> actually passed)
> but likely to be harmless. However, I prefer the alternative, so I'm
> only saying this for correctness.
Actually, the intention was that ... would be arbitrary stuff,
with a NULL to mark the end. I'm now convinced that it was a
dumb idea.
Thanks.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]