Beispiel #1
0
void Key::addSubkey(const KeyID& keyID, const bool secret)
{
  if (!keyID.isEmpty()) {
    Subkey *key = new Subkey(keyID, secret);
    mSubkeys.append(key);
  }
}
Beispiel #2
0
Key::Key(const KeyID& keyid, const QString& uid, const bool secret) :
  mSubkeys(), mUserIDs()
{
  mSecret = secret;
  if (!keyid.isEmpty())
    addSubkey(keyid, secret);
  if (!uid.isEmpty())
    addUserID(uid);

  mRevoked = false;
  mExpired = false;
  mDisabled = false;
  mInvalid = false;
  mCanEncrypt = false;
  mCanSign = false;
  mCanCertify = false;

  mEncryptPref = UnknownEncryptPref;
}
Beispiel #3
0
QCString
BaseG::getAsciiPublicKey(const KeyID &keyID)
{
    int exitStatus = 0;

    if(keyID.isEmpty())
        return QCString();

    status = 0;
    exitStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true);

    if(exitStatus != 0)
    {
        status = ERROR;
        return QCString();
    }

    return output;
}