aboutsummaryrefslogtreecommitdiffstats
path: root/src/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/key.c')
-rw-r--r--src/key.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/src/key.c b/src/key.c
index e341a54c..59ec29dc 100644
--- a/src/key.c
+++ b/src/key.c
@@ -485,101 +485,3 @@ gpgme_key_release (gpgme_key_t key)
{
gpgme_key_unref (key);
}
-
-
-static const char *
-otrust_to_string (int otrust)
-{
- switch (otrust)
- {
- case GPGME_VALIDITY_NEVER:
- return "n";
-
- case GPGME_VALIDITY_MARGINAL:
- return "m";
-
- case GPGME_VALIDITY_FULL:
- return "f";
-
- case GPGME_VALIDITY_ULTIMATE:
- return "u";
-
- default:
- return "?";
- }
-}
-
-
-static const char *
-validity_to_string (int validity)
-{
- switch (validity)
- {
- case GPGME_VALIDITY_UNDEFINED:
- return "q";
-
- case GPGME_VALIDITY_NEVER:
- return "n";
-
- case GPGME_VALIDITY_MARGINAL:
- return "m";
-
- case GPGME_VALIDITY_FULL:
- return "f";
-
- case GPGME_VALIDITY_ULTIMATE:
- return "u";
-
- case GPGME_VALIDITY_UNKNOWN:
- default:
- return "?";
- }
-}
-
-
-static const char *
-capabilities_to_string (gpgme_subkey_t subkey)
-{
- static const char *const strings[8] =
- {
- "",
- "c",
- "s",
- "sc",
- "e",
- "ec",
- "es",
- "esc"
- };
- return strings[(!!subkey->can_encrypt << 2)
- | (!!subkey->can_sign << 1)
- | (!!subkey->can_certify)];
-}
-
-
-static gpgme_key_sig_t
-get_keysig (gpgme_key_t key, int uid_idx, int idx)
-{
- gpgme_user_id_t uid;
- gpgme_key_sig_t sig;
-
- if (!key || uid_idx < 0 || idx < 0)
- return NULL;
-
- uid = key->uids;
- while (uid && uid_idx > 0)
- {
- uid = uid->next;
- uid_idx--;
- }
- if (!uid)
- return NULL;
-
- sig = uid->signatures;
- while (sig && idx > 0)
- {
- sig = sig->next;
- idx--;
- }
- return sig;
-}