26 #include <tdelocale.h>
27 #include "ksslpemcallback.h"
29 int KSSLPemCallback(
char *buf,
int size,
int rwflag,
void *userdata) {
36 int rc = KPasswordDialog::getPassword(pass2, i18n(
"Certificate password"));
37 if (rc != KPasswordDialog::Accepted)
return -1;
39 TQCString pass = pass2.utf8();
40 const uint passlen = pass.length();
41 if (passlen > (
unsigned int)size-1)
42 pass.truncate((
unsigned int)size-1);
44 tqstrncpy(buf, pass, size-1);