/[winpt]/trunk/Src/wptKeyEdit.cpp
ViewVC logotype

Diff of /trunk/Src/wptKeyEdit.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 259 by twoaday, Tue Jun 27 10:16:41 2006 UTC revision 260 by twoaday, Wed Aug 16 10:01:30 2006 UTC
# Line 437  GpgKeyEdit::setPassphrase (const char *_ Line 437  GpgKeyEdit::setPassphrase (const char *_
437      this->pass = _pass;      this->pass = _pass;
438  }  }
439    
440    
441    /* Kludge to allow to handle admin and user PINs. */
442    void
443    GpgKeyEdit::setPassphrase2 (const char *_pass2)
444    {
445        this->new_pass = _pass2;
446    }
447    
448  /* Set the current key to @key. */  /* Set the current key to @key. */
449  void  void
450  GpgKeyEdit::setKey (gpgme_key_t _key)  GpgKeyEdit::setKey (gpgme_key_t _key)
# Line 613  GpgKeyEdit::delKey (int _key_index) Line 621  GpgKeyEdit::delKey (int _key_index)
621      return gpg_editkey (this->ctx, this->key, this);      return gpg_editkey (this->ctx, this->key, this);
622  }  }
623    
624    
625    /* Add a new key on a smart card.
626       The type is given in @type. */
627    gpgme_error_t
628    GpgKeyEdit::addCardKey (int _type)
629    {
630        if (!this->key)
631            return gpg_error (GPG_ERR_INV_OBJ);
632        if (!this->pass)
633            return gpg_error (GPG_ERR_INV_PASSPHRASE);
634        if (_type < 1 || _type > 3)
635            return gpg_error (GPG_ERR_INV_VALUE);
636    
637        type = GPG_EDITKEY_ADDCARDKEY;
638        this->key_index = _type;
639        return gpg_editkey (this->ctx, this->key, this);
640    }
641    
642    
643  /* Add a new subkey to the given key.  /* Add a new subkey to the given key.
644     The new key will have @pubkey_algo as the algorithm     The new key will have @pubkey_algo as the algorithm
645     and a size of @pubkey_size bits. If valid > 0, the     and a size of @pubkey_size bits. If valid > 0, the

Legend:
Removed from v.259  
changed lines
  Added in v.260

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26