1 |
/* wptKeyEdit.cpp - GPG key edit abstraction |
/* wptKeyEdit.cpp - GPG key edit abstraction |
2 |
* Copyright (C) 2005 Timo Schulz |
* Copyright (C) 2005, 2006 Timo Schulz |
3 |
* Copyright (C) 2005 g10 Code GmbH |
* Copyright (C) 2005 g10 Code GmbH |
4 |
* |
* |
5 |
* This file is part of WinPT. |
* This file is part of WinPT. |
22 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
23 |
#include <config.h> |
#include <config.h> |
24 |
#endif |
#endif |
|
|
|
|
#include <windows.h> |
|
25 |
#include <time.h> |
#include <time.h> |
26 |
|
#include <windows.h> |
27 |
|
|
28 |
#include "gpgme.h" |
#include "gpgme.h" |
29 |
#include "wptCommonCtl.h" |
#include "wptCommonCtl.h" |
33 |
#include "wptW32API.h" |
#include "wptW32API.h" |
34 |
#include "wptGPG.h" |
#include "wptGPG.h" |
35 |
#include "wptErrors.h" |
#include "wptErrors.h" |
36 |
|
#include "wptUTF8.h" |
37 |
|
|
38 |
|
|
39 |
/* Parse the colon status information of @line and store |
/* Parse the colon status information of @line and store |
92 |
{ |
{ |
93 |
gpg_uid_info_t i, t; |
gpg_uid_info_t i, t; |
94 |
char *p, *pend; |
char *p, *pend; |
95 |
|
char *name; |
96 |
int field = 0, len = 0; |
int field = 0, len = 0; |
97 |
|
|
98 |
if (!line || strlen (line) < 3 || strncmp (line, "uid", 3)) |
if (!line || strlen (line) < 3 || strncmp (line, "uid", 3)) |
123 |
break; |
break; |
124 |
|
|
125 |
case 10: /* user ID */ |
case 10: /* user ID */ |
126 |
i->name = (char *)calloc (1, strlen (pend)+1); |
name = (char *)calloc (1, strlen (pend)+1); |
127 |
if (!i->name) |
if (!name) |
128 |
return gpg_error (GPG_ERR_ENOMEM);; |
return gpg_error (GPG_ERR_ENOMEM);; |
129 |
gpg_decode_c_string (pend, &i->name, strlen (pend)+ 1); |
gpg_decode_c_string (pend, &name, strlen (pend)+ 1); |
130 |
|
i->name = utf8_to_native (name); |
131 |
|
safe_free (name); |
132 |
if (strchr (pend, '<') != NULL && strchr (pend, '>') != NULL) { |
if (strchr (pend, '<') != NULL && strchr (pend, '>') != NULL) { |
133 |
int pos = strchr (i->name, '<')- i->name + 1; |
int pos = strchr (i->name, '<')- i->name + 1; |
134 |
int end = strchr (i->name, '>') - i->name; |
int end = strchr (i->name, '>') - i->name; |
227 |
return 0; |
return 0; |
228 |
} |
} |
229 |
|
|
230 |
|
|
231 |
/* Dummy handler to get the colon data and then quit. */ |
/* Dummy handler to get the colon data and then quit. */ |
232 |
static gpgme_error_t |
static gpgme_error_t |
233 |
list_handler (void *opaque, gpgme_status_code_t code, const char *key, int fd) |
list_handler (void *opaque, gpgme_status_code_t code, const char *key, int fd) |
257 |
gpgme_error_t |
gpgme_error_t |
258 |
GpgKeyEdit::getDesignatedRevoker (gpg_desig_rev_t *r_rev) |
GpgKeyEdit::getDesignatedRevoker (gpg_desig_rev_t *r_rev) |
259 |
{ |
{ |
260 |
gpgme_data_t out=NULL; |
gpgme_data_t out = NULL; |
261 |
gpg_desig_rev_t rev = NULL; |
gpg_desig_rev_t rev = NULL; |
262 |
gpgme_error_t err; |
gpgme_error_t err; |
263 |
char buf[256]; |
char buf[256]; |
288 |
return err; |
return err; |
289 |
} |
} |
290 |
|
|
291 |
|
|
292 |
/* Retrieve all user ID information of the key set via setKey |
/* Retrieve all user ID information of the key set via setKey |
293 |
in @r_inf. The result also contains the user ID number which |
in @r_inf. The result also contains the user ID number which |
294 |
is needed to securely delete the user-ID. */ |
is needed to securely delete the user-ID. */ |
328 |
} |
} |
329 |
|
|
330 |
|
|
331 |
/* Construct an object with the given key in @key. */ |
/* Clear object. */ |
332 |
GpgKeyEdit::GpgKeyEdit (gpgme_key_t _key) |
void |
333 |
|
GpgKeyEdit::clear (void) |
334 |
{ |
{ |
335 |
this->key = _key; |
pass = NULL; |
|
pass = NULL; |
|
|
type = 0; |
|
336 |
name = NULL; |
name = NULL; |
337 |
cmt = NULL; |
cmt = NULL; |
338 |
email = NULL; |
email = NULL; |
339 |
|
type = 0; |
340 |
cnt = 0; |
cnt = 0; |
341 |
cmd_sent = 0; |
cmd_sent = 0; |
342 |
resval = 0; |
resval = 0; |
343 |
|
uid_index = sig_index = key_index = -1; |
344 |
|
key_has_passwd = true; |
345 |
|
} |
346 |
|
|
347 |
|
|
348 |
|
/* Construct an object with the given key in @key. */ |
349 |
|
GpgKeyEdit::GpgKeyEdit (gpgme_key_t _key) |
350 |
|
{ |
351 |
|
clear (); |
352 |
|
this->key = _key; |
353 |
gpgme_new (&ctx); /* FIXME */ |
gpgme_new (&ctx); /* FIXME */ |
354 |
} |
} |
355 |
|
|
356 |
/* Construct an object and fetch the key with the keyid @keyid. */ |
/* Construct an object and fetch the key with the keyid @keyid. */ |
357 |
GpgKeyEdit::GpgKeyEdit (const char *_keyid) |
GpgKeyEdit::GpgKeyEdit (const char *_keyid) |
358 |
{ |
{ |
359 |
|
clear (); |
360 |
get_pubkey (_keyid, &this->key); |
get_pubkey (_keyid, &this->key); |
361 |
pass = NULL; |
gpgme_new (&ctx); /* FIXME */ |
|
type = 0; |
|
|
name = NULL; |
|
|
cmt = NULL; |
|
|
email = NULL; |
|
|
cmd_sent = 0; |
|
|
resval = 0; |
|
|
gpgme_new (&ctx); /* FIXME */ |
|
362 |
} |
} |
363 |
|
|
364 |
/* Delete the given object. */ |
/* Delete the given object. */ |
376 |
GpgKeyEdit::reset (void) |
GpgKeyEdit::reset (void) |
377 |
{ |
{ |
378 |
cmd_sent = 0; |
cmd_sent = 0; |
379 |
|
cnt = 0; |
380 |
|
//resval = 0; |
381 |
} |
} |
382 |
|
|
383 |
|
|
405 |
gpgme_set_progress_cb (ctx, cb, cb_value); |
gpgme_set_progress_cb (ctx, cb, cb_value); |
406 |
} |
} |
407 |
|
|
408 |
|
|
409 |
|
/* Clear the stored passphrase. */ |
410 |
|
void |
411 |
|
GpgKeyEdit::clearPassphrase (void) |
412 |
|
{ |
413 |
|
if (pass) |
414 |
|
pass = NULL; |
415 |
|
} |
416 |
|
|
417 |
|
|
418 |
|
|
419 |
|
/* Inidicate that a key is protected by a passphrase or not. */ |
420 |
|
void |
421 |
|
GpgKeyEdit::setNoPassphrase (bool val) |
422 |
|
{ |
423 |
|
key_has_passwd = !val; |
424 |
|
} |
425 |
|
|
426 |
/* Set the passphrase to @pass. */ |
/* Set the passphrase to @pass. */ |
427 |
void |
void |
428 |
GpgKeyEdit::setPassphrase (const char *_pass) |
GpgKeyEdit::setPassphrase (const char *_pass) |
470 |
} |
} |
471 |
|
|
472 |
|
|
473 |
|
/* Return the amount of days the key is valid. */ |
474 |
|
int |
475 |
|
GpgKeyEdit::getValidDays (void) |
476 |
|
{ |
477 |
|
return valid; |
478 |
|
} |
479 |
|
|
480 |
|
|
481 |
int |
int |
482 |
GpgKeyEdit::getType (void) |
GpgKeyEdit::getType (void) |
484 |
return type; |
return type; |
485 |
} |
} |
486 |
|
|
487 |
|
|
488 |
|
/* Add the notation data from @notation to the user ID |
489 |
|
with the index @_uid_idx. |
490 |
|
Return value: 0 on success. */ |
491 |
|
gpgme_error_t |
492 |
|
GpgKeyEdit::addNotation (int _uid_idx, const char *_notation) |
493 |
|
{ |
494 |
|
if (!key) |
495 |
|
return gpg_error (GPG_ERR_INV_OBJ); |
496 |
|
if (key_has_passwd && !this->pass) |
497 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
498 |
|
|
499 |
|
type = GPG_EDITKEY_NOTATION; |
500 |
|
this->uid_index = _uid_idx; |
501 |
|
this->notation = (char*)_notation; |
502 |
|
return gpg_editkey (this->ctx, this->key, this); |
503 |
|
} |
504 |
|
|
505 |
|
|
506 |
/* Sign the key stored in the object with the |
/* Sign the key stored in the object with the |
507 |
signing mode @mode and the signature class @sig_class. |
signing mode @mode and the signature class @sig_class. |
508 |
Return value: 0 on success. */ |
Return value: 0 on success. */ |
509 |
gpgme_error_t |
gpgme_error_t |
510 |
GpgKeyEdit::signKey (int mode, int _sig_class, const char *_exp_date) |
GpgKeyEdit::signKey (int mode, int _sig_class, const char *_exp_date) |
511 |
{ |
{ |
512 |
if (!this->key || !this->pass) |
if (!this->key) |
513 |
|
return gpg_error (GPG_ERR_INV_OBJ); |
514 |
|
if (key_has_passwd && !this->pass) |
515 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
516 |
|
|
517 |
|
type = mode; |
518 |
|
this->exp_date = _exp_date; |
519 |
|
this->sig_class = _sig_class; |
520 |
|
return gpg_editkey (this->ctx, this->key, this); |
521 |
|
} |
522 |
|
|
523 |
|
|
524 |
|
/* Sign a single user-id with the index @_uid_index. |
525 |
|
All other parameters are equal to signKey(). |
526 |
|
Return value: 0 on success. */ |
527 |
|
gpgme_error_t |
528 |
|
GpgKeyEdit::signUserid (int _uid_idx, int mode, int _sig_class, |
529 |
|
const char *_exp_date) |
530 |
|
{ |
531 |
|
if (!this->key) |
532 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
533 |
|
if (key_has_passwd && !this->pass) |
534 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
535 |
|
|
536 |
|
this->uid_index = _uid_idx; |
537 |
type = mode; |
type = mode; |
538 |
this->exp_date = _exp_date; |
this->exp_date = _exp_date; |
539 |
this->sig_class = _sig_class; |
this->sig_class = _sig_class; |
561 |
gpgme_error_t |
gpgme_error_t |
562 |
GpgKeyEdit::addUserid (const char *_name, const char *_cmt, const char *_email) |
GpgKeyEdit::addUserid (const char *_name, const char *_cmt, const char *_email) |
563 |
{ |
{ |
564 |
if (!this->key || !this->pass) |
if (!this->key) |
565 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
566 |
|
if (key_has_passwd && !this->pass) |
567 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
568 |
|
|
569 |
type = GPG_EDITKEY_ADDUID; |
type = GPG_EDITKEY_ADDUID; |
570 |
free_if_alloc (this->name); |
free_if_alloc (this->name); |
571 |
this->name = m_strdup (_name); |
this->name = m_strdup (_name); |
572 |
free_if_alloc (this->cmt); |
free_if_alloc (this->cmt); |
573 |
this->cmt = NULL; |
this->cmt = NULL; |
574 |
if (cmt != NULL) |
if (_cmt != NULL) |
575 |
this->cmt = m_strdup (_cmt); |
this->cmt = m_strdup (_cmt); |
576 |
free_if_alloc (this->email); |
free_if_alloc (this->email); |
577 |
this->email = m_strdup (_email); |
this->email = m_strdup (_email); |
615 |
GpgKeyEdit::addSubkey (gpgme_pubkey_algo_t _pubkey_algo, |
GpgKeyEdit::addSubkey (gpgme_pubkey_algo_t _pubkey_algo, |
616 |
unsigned int _pubkey_size, long _valid) |
unsigned int _pubkey_size, long _valid) |
617 |
{ |
{ |
618 |
if (!this->key || !this->pass) |
if (!this->key) |
619 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
620 |
|
if (key_has_passwd && !this->pass) |
621 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
622 |
|
|
623 |
type = GPG_EDITKEY_ADDKEY; |
type = GPG_EDITKEY_ADDKEY; |
624 |
this->pubkey_algo = _pubkey_algo; |
this->pubkey_algo = _pubkey_algo; |
633 |
gpgme_error_t |
gpgme_error_t |
634 |
GpgKeyEdit::changePassphrase (const char *_new_pass, int allow_empty) |
GpgKeyEdit::changePassphrase (const char *_new_pass, int allow_empty) |
635 |
{ |
{ |
636 |
if (!this->key || !this->pass) |
if (!this->key) |
637 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
638 |
|
if (key_has_passwd && !this->pass) |
639 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
640 |
|
|
641 |
type = GPG_EDITKEY_PASSWD; |
type = GPG_EDITKEY_PASSWD; |
642 |
this->new_pass = _new_pass; |
this->new_pass = _new_pass; |
650 |
gpgme_error_t |
gpgme_error_t |
651 |
GpgKeyEdit::setPrimaryUserid (int _uid_index) |
GpgKeyEdit::setPrimaryUserid (int _uid_index) |
652 |
{ |
{ |
653 |
if (!this->key || !this->pass) |
if (!this->key) |
654 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
655 |
|
if (key_has_passwd && !this->pass) |
656 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
657 |
|
|
658 |
type = GPG_EDITKEY_PRIMARY; |
type = GPG_EDITKEY_PRIMARY; |
659 |
this->uid_index = _uid_index; |
this->uid_index = _uid_index; |
665 |
if @exp_days is true, exp_timestamp is already converted to days. |
if @exp_days is true, exp_timestamp is already converted to days. |
666 |
Return value: 0 on success. */ |
Return value: 0 on success. */ |
667 |
gpgme_error_t |
gpgme_error_t |
668 |
GpgKeyEdit::setKeyExpireDate (int _key_index, |
GpgKeyEdit::setKeyExpireDate (int _key_index, long exp_timestamp, |
669 |
long exp_timestamp, bool exp_days) |
bool exp_days) |
670 |
{ |
{ |
671 |
if (!this->key || !this->pass) |
if (!this->key) |
672 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
673 |
|
if (key_has_passwd && !this->pass) |
674 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
675 |
if (!exp_days && exp_timestamp > 0 && exp_timestamp < time (NULL)) |
if (!exp_days && exp_timestamp > 0 && exp_timestamp < time (NULL)) |
676 |
return gpg_error (GPG_ERR_INV_ARG); |
return gpg_error (GPG_ERR_INV_ARG); |
677 |
|
|
691 |
gpgme_error_t |
gpgme_error_t |
692 |
GpgKeyEdit::revokeUserid (int _uid_index) |
GpgKeyEdit::revokeUserid (int _uid_index) |
693 |
{ |
{ |
694 |
if (!this->key || !this->pass) |
if (!this->key) |
695 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
696 |
|
if (key_has_passwd && !this->pass) |
697 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
698 |
|
|
699 |
type = GPG_EDITKEY_REVUID; |
type = GPG_EDITKEY_REVUID; |
700 |
this->uid_index = _uid_index; |
this->uid_index = _uid_index; |
708 |
gpgme_error_t |
gpgme_error_t |
709 |
GpgKeyEdit::revokeSignature (int _uid_index, int _sig_index) |
GpgKeyEdit::revokeSignature (int _uid_index, int _sig_index) |
710 |
{ |
{ |
711 |
if (!this->key || !this->pass) |
if (!this->key) |
712 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
713 |
|
if (key_has_passwd && !this->pass) |
714 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
715 |
|
|
716 |
type = GPG_EDITKEY_REVSIG; |
type = GPG_EDITKEY_REVSIG; |
717 |
this->uid_index = _uid_index; |
this->uid_index = _uid_index; |
727 |
gpgme_error_t |
gpgme_error_t |
728 |
GpgKeyEdit::revokeSubkey (int _key_index, int _reason, const char *_cmt) |
GpgKeyEdit::revokeSubkey (int _key_index, int _reason, const char *_cmt) |
729 |
{ |
{ |
730 |
if (!this->key || !this->pass) |
if (!this->key) |
731 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
732 |
|
if (key_has_passwd && !this->pass) |
733 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
734 |
|
|
735 |
type = GPG_EDITKEY_REVKEY; |
type = GPG_EDITKEY_REVKEY; |
736 |
this->key_index = _key_index; |
this->key_index = _key_index; |
750 |
gpgme_error_t |
gpgme_error_t |
751 |
GpgKeyEdit::addDesignatedRevoker (const char *uid) |
GpgKeyEdit::addDesignatedRevoker (const char *uid) |
752 |
{ |
{ |
753 |
if (!this->key || !this->pass) |
if (!this->key) |
754 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
755 |
|
if (key_has_passwd && !this->pass) |
756 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
757 |
|
|
758 |
type = GPG_EDITKEY_ADDREV; |
type = GPG_EDITKEY_ADDREV; |
759 |
free_if_alloc (this->name); |
free_if_alloc (this->name); |
767 |
gpgme_error_t |
gpgme_error_t |
768 |
GpgKeyEdit::addPhotoid (const char *jpg_file) |
GpgKeyEdit::addPhotoid (const char *jpg_file) |
769 |
{ |
{ |
770 |
if (!this->key || !this->pass) |
if (!this->key) |
771 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
772 |
|
if (key_has_passwd && !this->pass) |
773 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
774 |
|
|
775 |
type = GPG_EDITKEY_ADDPHOTO; |
type = GPG_EDITKEY_ADDPHOTO; |
776 |
this->url = jpg_file; |
this->url = jpg_file; |
798 |
} |
} |
799 |
|
|
800 |
|
|
801 |
|
/* Remove unusable parts and all signatures from a key. */ |
802 |
|
gpgme_error_t |
803 |
|
GpgKeyEdit::minimizeKey (void) |
804 |
|
{ |
805 |
|
if (!this->key) |
806 |
|
return gpg_error (GPG_ERR_INV_OBJ); |
807 |
|
type = GPG_EDITKEY_MINIMIZE; |
808 |
|
return gpg_editkey (this->ctx, this->key, this); |
809 |
|
} |
810 |
|
|
811 |
|
|
812 |
|
/* Remove unusable parts from a key. */ |
813 |
|
gpgme_error_t |
814 |
|
GpgKeyEdit::cleanKey (void) |
815 |
|
{ |
816 |
|
if (!this->key) |
817 |
|
return gpg_error (GPG_ERR_INV_OBJ); |
818 |
|
type = GPG_EDITKEY_CLEAN; |
819 |
|
return gpg_editkey (this->ctx, this->key, this); |
820 |
|
} |
821 |
|
|
822 |
|
|
823 |
/* Update the user-ID preferences of the user-ID with the |
/* Update the user-ID preferences of the user-ID with the |
824 |
index @uid_index to the prefs given in @new_prefs. |
index @uid_index to the prefs given in @new_prefs. |
825 |
Return value: 0 on success. */ |
Return value: 0 on success. */ |
826 |
gpgme_error_t |
gpgme_error_t |
827 |
GpgKeyEdit::setUseridPreferences (int _uid_index, const char *new_prefs) |
GpgKeyEdit::setUseridPreferences (int _uid_index, const char *new_prefs) |
828 |
{ |
{ |
829 |
if (!this->key || !this->pass) |
if (!this->key) |
830 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
831 |
|
if (key_has_passwd && !this->pass) |
832 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
833 |
return 0; |
return 0; |
834 |
} |
} |
835 |
|
|
849 |
} |
} |
850 |
|
|
851 |
/* Set the preferred keyserver for the given key to @url. |
/* Set the preferred keyserver for the given key to @url. |
852 |
|
If @_uid_index is -1, set the keyserver for all user-ids. |
853 |
Return value: 0 on success. */ |
Return value: 0 on success. */ |
854 |
gpgme_error_t |
gpgme_error_t |
855 |
GpgKeyEdit::setPreferredKeyserver (int _uid_index, const char *_url) |
GpgKeyEdit::setPreferredKeyserver (int _uid_index, const char *_url) |
856 |
{ |
{ |
857 |
if (!this->key || !this->pass) |
if (!this->key) |
858 |
return gpg_error (GPG_ERR_INV_OBJ); |
return gpg_error (GPG_ERR_INV_OBJ); |
859 |
if (!url) |
if (key_has_passwd && !this->pass) |
860 |
|
return gpg_error (GPG_ERR_INV_PASSPHRASE); |
861 |
|
if (!_url) |
862 |
return gpg_error (GPG_ERR_INV_ARG); |
return gpg_error (GPG_ERR_INV_ARG); |
863 |
|
|
864 |
type = GPG_EDITKEY_KEYSERV; |
type = GPG_EDITKEY_KEYSERV; |
865 |
this->url = _url; |
this->url = _url; |
866 |
this->uid_index = _uid_index; |
this->uid_index = _uid_index; |
867 |
return gpg_editkey (this->ctx, this->key, this); |
return gpg_editkey (this->ctx, this->key, this); |
868 |
} |
} |
869 |
|
|
870 |
|
|
871 |
|
/* Return the saved user-id index. */ |
872 |
|
int |
873 |
|
GpgKeyEdit::getUseridIndex (void) |
874 |
|
{ |
875 |
|
return uid_index; |
876 |
|
} |
877 |
|
|
878 |
|
|
879 |
|
/* Return the saved key index. */ |
880 |
|
int |
881 |
|
GpgKeyEdit::getKeyIndex (void) |
882 |
|
{ |
883 |
|
return key_index; |
884 |
|
} |
885 |
|
|
886 |
|
|
887 |
|
/* Return the saved sig index. */ |
888 |
|
int |
889 |
|
GpgKeyEdit::getSigIndex (void) |
890 |
|
{ |
891 |
|
return sig_index; |
892 |
|
} |