There has been a discussion on this recently. The conclusion was
it should be changed. I think it was even aggred on how to do
this. But I think nobody took the task of actually implementing
it. (Please correct me if I'm wrong!)
AFAIR it was the idea to do it the same you you did, only the
additional parameter would be void* instead of char*.
YOu can do the change and submit a patch to this dev list for
inclusion into further versions. Please keep in mind that
some apps (like rsa, x509) are using this callback and need
changes as well.
Damien Miller schrieb:
>
> I want to add the facility to pass user data to password callback
> functions. e.g.
>
> RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x, pem_password_cb *cb)
>
> becomes
>
> RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x, pem_password_cb *cb, char
>*user_data)
>
> and
>
> typedef int pem_password_cb(char *buf, int size, int rwflag);
>
> becomes
>
> typedef int pem_password_cb(char *buf, int size, int rwflag, char *user_data);
>
> IMO this feature is essential. Currently if password callbacks need to
> access external data (GUI elements for example) they must refer to
> global variables. This (again IMO) is ugly and can be dangerous in a
> threaded enviornment.
>
> I don't want to break all the apps which depend on the current API. Can
> one of the developers suggest a nice way this feature can be presented?
>
> 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]
--
Holger Reif Tel.: +49 361 74707-0
SmartRing GmbH Fax.: +49 361 7470720
Europaplatz 5 [EMAIL PROTECTED]
D-99091 Erfurt WWW.SmartRing.de
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]