Patrick wrote: > I want to return to my user running my client app, an error string that is > generated in my clientAuthCertificate NSS callback function > (SSL_AuthCertificateHook): > after the first write on the SSL socket, my client app gets the server cert > and performs checks on the server cert with this callback function. > When the callback finds an error, it I use PR_SetErrorText to set the error. > However the application does not see this error message but rather sees one > set by NSS. Is there a way around this?
For each thread, NSPR maintains a thread-specific error code and error message. Obviously NSS also calls PR_SetErrorText after your callback function returns. The only way to avoid inadvertent interaction with other modules using PR_SetErrorText is for you to define a separate error message for your own client app. You would store your error message in a thread-specific location, and define Get and Set routines to retrieve and set the error message. Wan-Teh
