Jan Tomasek wrote:
>
> > > Hello,
> > > I've problems with:
> > > int pem_password_cb(char *buf, int size, int rwflag)
> > > none of arguments allow examine for which certificate is need this
> > > password.
> > ..
> > > Is here any way how solving this?
> >
> > You might want to use global variables to guess which private key's
> > password to supply
> Yes, before calling PEM_read_*() I can set global variable to point
> to class which is calling it, but at time when user is entering
> password, can arive new conection ... and my program should need
> to prompt for other password.
>
> What to do in this case? Wait until global variable is NULL?
>
> This solution is posible, of course, but isn't elegant. And should
> cause problems - dead lock.
The user is a resource which requires serialised access. Use a semaphore
or a mutex or some other appropriate mechanism.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]