Index: kpgp.cpp =================================================================== RCS file: /home/kde/kdenetwork/libkdenetwork/kpgp.cpp,v retrieving revision 1.14 diff -u -3 -p -r1.14 kpgp.cpp --- kpgp.cpp 2001/06/12 12:50:50 1.14 +++ kpgp.cpp 2001/06/12 21:33:59 @@ -93,7 +93,7 @@ Kpgp::readConfig() storePass = config->readBoolEntry("storePass"); showEncryptionResult = config->readBoolEntry("showEncryptionResult", true); pgpType = ( Kpgp::PGPType) config->readNumEntry("pgpType",tAuto); - pgpUser = config->readEntry("user"); + //pgpUser = config->readEntry("user"); flagEncryptToSelf = config->readBoolEntry("encryptToSelf", true); } @@ -103,7 +103,7 @@ Kpgp::writeConfig(bool sync) config->writeEntry("storePass",storePass); config->writeEntry("showEncryptionResult", showEncryptionResult); config->writeEntry("pgpType",(int) pgpType); - config->writeEntry("user",pgpUser); + //config->writeEntry("user",pgpUser); config->writeEntry("encryptToSelf",flagEncryptToSelf); if(sync) @@ -296,13 +298,13 @@ Kpgp::decrypt(void) } bool -Kpgp::sign(void) +Kpgp::sign(QString pgpUserId) { - return encryptFor(0, true); + return encryptFor(0, true, pgpUserId); } bool -Kpgp::encryptFor(const QStrList& aPers, bool sign) +Kpgp::encryptFor(const QStrList& aPers, bool sign, QString pgpUserId) { QStrList persons, noKeyFor; char* pers; @@ -313,6 +315,7 @@ Kpgp::encryptFor(const QStrList& aPers, if (0 == pgp) assignPGPBase(); + setUser(pgpUserId); persons.clear(); noKeyFor.clear(); Index: kpgp.h =================================================================== RCS file: /home/kde/kdenetwork/libkdenetwork/kpgp.h,v retrieving revision 1.5 diff -u -3 -p -r1.5 kpgp.h --- kpgp.h 2001/06/12 12:50:50 1.5 +++ kpgp.h 2001/06/12 21:34:00 @@ -80,14 +80,15 @@ public: returns false otherwise */ bool decrypt(void); /** encrypt the message for a list of persons. */ - bool encryptFor(const QStrList& receivers, bool sign = TRUE); + bool encryptFor(const QStrList& receivers, bool sign = TRUE, + const QString pgpUserId = QString::null); protected: int doEncSign(QStrList persons, bool sign, bool ignoreUntrusted = false); public: /** sign the message. */ - bool sign(void); + bool sign(const QString pgpUserId = QString::null); /** sign a key in the keyring with users signature. */ bool signKey(QString _key); /** get the known public keys. */