67 |
|
|
68 |
|
|
69 |
void |
void |
70 |
gpgme_sig_set_key_ctx( gpgme_sig_t sig, gpgme_keycache_t cache ) |
gpgme_sig_set_key_ctx (gpgme_sig_t sig, gpgme_keycache_t cache) |
71 |
{ |
{ |
72 |
if( sig && cache ) |
if (sig && cache) |
73 |
gpgme_keycache_find_key( cache, sig->id, 0, &sig->key ); |
gpgme_keycache_find_key (cache, sig->id, 0, &sig->key); |
74 |
} /* gpgme_sig_set_key_ctx */ |
} /* gpgme_sig_set_key_ctx */ |
75 |
|
|
76 |
|
|
101 |
pos++; |
pos++; |
102 |
return pos; |
return pos; |
103 |
case GPGME_ATTR_KEYID: |
case GPGME_ATTR_KEYID: |
104 |
if( strlen( sig->id ) == 40 ) pos = 32; |
if (strlen (sig->id) == 40) |
105 |
else if( strlen( sig->id ) == 16 ) pos = 8; |
pos = 32; |
106 |
return strtoul( sig->id + pos, NULL, 16 ); |
else if (strlen (sig->id) == 16) |
107 |
|
pos = 8; |
108 |
|
/* XXX: else?? */ |
109 |
|
return strtoul (sig->id + pos, NULL, 16); |
110 |
} |
} |
111 |
return 0; |
return 0; |
112 |
} /* gpgme_sig_get_ulong_attr */ |
} /* gpgme_sig_get_ulong_attr */ |
113 |
|
|
114 |
|
|
115 |
const char* |
const char* |
116 |
gpgme_sig_get_string_attr( gpgme_sig_t sig, int what ) |
gpgme_sig_get_string_attr (gpgme_sig_t sig, int what) |
117 |
{ |
{ |
118 |
if( !sig ) |
if( !sig ) |
119 |
return NULL; |
return NULL; |