On Fri, 16 Jul 1999, Holger Reif wrote:

> 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.
 
Done :)

Please find attached a patch against openssl-SNAP-19990718 which
modifies the pem/* stuff to take an extra argument of type void* 
to all the functions which use a password callback. It also 
modifies the apps/* to use the new interface.

I haven't added backwards compatability functions, but I am 
happy to do so if required.

The patch compiles and executes "make test" without incident, 
but I haven't given it all the testing it deserves.

I also modified the ssl_ctx data structure to include a 
default_pem_password_callback_user_data field to supplement the
default_pem_password_callback.

One gotcha I found was that ssl.h defines its own copies of the
PEM_read_bio and PEM_write_bio routines. This had me pulling my
hair out for a while :(

Another thing - is there any makefile directive to return a 
hacked-in openssl directory to its pristine state? "make dclean"
leaves a lot of extra makefiles which complicate the process
of getting a clean diff.

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-user-data-to-pem-callbacks.patch.gz

Reply via email to