> -----Original Message-----
> From: Dr Stephen Henson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 08, 1999 4:54 PM
> To: [EMAIL PROTECTED]
> Subject: Adding parameters to passphrase callbacks.
> 
> 
> >From time to time someone needs to pass a parameter to a passphrase
> callback. For example the prompt for the password can be set to a
> meaningful phrase or the passphrase itself could be set by 
> this method.
> 
> Currently this isn't directly possible and the only solutions 
> are messy.
> 
> IMHO it's about time this issue was resolved one way or the other.

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. You could combine this with 
Goetz's idea about #defining the old name to be a call to the new one with
the terminating constant after rwflag.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to