845 |
} /* gpgme_key_get_cability */ |
} /* gpgme_key_get_cability */ |
846 |
|
|
847 |
int |
int |
848 |
gpgme_key_count_items( gpgme_key_t key, int what ) |
gpgme_key_count_items (gpgme_key_t key, int what) |
849 |
{ |
{ |
850 |
union { |
union { |
851 |
struct user_id_s *u; |
struct user_id_s *u; |
898 |
|
|
899 |
|
|
900 |
int |
int |
901 |
gpgme_key_cability_from_algo( gpgme_pk_cipher_t algo ) |
gpgme_key_cability_from_algo (gpgme_pk_cipher_t algo) |
902 |
{ |
{ |
903 |
switch( algo ) { |
switch( algo ) { |
904 |
case GPGME_PK_DSA: |
case GPGME_PK_DSA: |
916 |
|
|
917 |
return 0; |
return 0; |
918 |
} /* gpgme_key_cability_from_algo */ |
} /* gpgme_key_cability_from_algo */ |
919 |
|
|
920 |
|
|
921 |
|
int |
922 |
|
gpgme_key_append (gpgme_key_t dst, gpgme_key_t src, int idx) |
923 |
|
{ |
924 |
|
struct subkey_s *s, *key; |
925 |
|
|
926 |
|
for (s = &src->keys; idx; idx--, s = s->next) |
927 |
|
; |
928 |
|
|
929 |
|
key = _gpgme_key_add_subkey (dst); |
930 |
|
key->expires = s->expires; |
931 |
|
key->flags = s->flags; |
932 |
|
key->key_algo = s->key_algo; |
933 |
|
key->key_len = s->key_len; |
934 |
|
key->timestamp = s->timestamp; |
935 |
|
key->fingerprint = strdup (s->fingerprint); |
936 |
|
strcpy (key->keyid, s->keyid); |
937 |
|
|
938 |
|
return 0; |
939 |
|
} |