mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
sm: Remove unused function.
* sm/keydb.c (keydb_insert_cert): Remove. * kbx/keybox-update.c (keybox_update_cert): Remove stub.
This commit is contained in:
parent
0441ed6e1c
commit
c99f3599d8
@ -483,17 +483,6 @@ keybox_insert_cert (KEYBOX_HANDLE hd, ksba_cert_t cert,
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
keybox_update_cert (KEYBOX_HANDLE hd, ksba_cert_t cert,
|
||||
unsigned char *sha1_digest)
|
||||
{
|
||||
(void)hd;
|
||||
(void)cert;
|
||||
(void)sha1_digest;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
#endif /*KEYBOX_WITH_X509*/
|
||||
|
||||
/* Note: We assume that the keybox has been locked before the current
|
||||
|
@ -109,8 +109,6 @@ gpg_error_t keybox_update_keyblock (KEYBOX_HANDLE hd,
|
||||
#ifdef KEYBOX_WITH_X509
|
||||
int keybox_insert_cert (KEYBOX_HANDLE hd, ksba_cert_t cert,
|
||||
unsigned char *sha1_digest);
|
||||
int keybox_update_cert (KEYBOX_HANDLE hd, ksba_cert_t cert,
|
||||
unsigned char *sha1_digest);
|
||||
#endif /*KEYBOX_WITH_X509*/
|
||||
int keybox_set_flags (KEYBOX_HANDLE hd, int what, int idx, unsigned int value);
|
||||
|
||||
|
38
sm/keydb.c
38
sm/keydb.c
@ -778,44 +778,6 @@ keydb_insert_cert (KEYDB_HANDLE hd, ksba_cert_t cert)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Update the current keyblock with KB. */
|
||||
int
|
||||
keydb_update_cert (KEYDB_HANDLE hd, ksba_cert_t cert)
|
||||
{
|
||||
int rc = 0;
|
||||
unsigned char digest[20];
|
||||
|
||||
if (!hd)
|
||||
return gpg_error (GPG_ERR_INV_VALUE);
|
||||
|
||||
if ( hd->found < 0 || hd->found >= hd->used)
|
||||
return -1; /* nothing found */
|
||||
|
||||
if (opt.dry_run)
|
||||
return 0;
|
||||
|
||||
rc = lock_all (hd);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
gpgsm_get_fingerprint (cert, GCRY_MD_SHA1, digest, NULL); /* kludge*/
|
||||
|
||||
switch (hd->active[hd->found].type)
|
||||
{
|
||||
case KEYDB_RESOURCE_TYPE_NONE:
|
||||
rc = gpg_error (GPG_ERR_GENERAL); /* oops */
|
||||
break;
|
||||
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
||||
rc = keybox_update_cert (hd->active[hd->found].u.kr, cert, digest);
|
||||
break;
|
||||
}
|
||||
|
||||
unlock_all (hd);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The current keyblock or cert will be deleted.
|
||||
*/
|
||||
|
@ -47,7 +47,6 @@ void keydb_push_found_state (KEYDB_HANDLE hd);
|
||||
void keydb_pop_found_state (KEYDB_HANDLE hd);
|
||||
int keydb_get_cert (KEYDB_HANDLE hd, ksba_cert_t *r_cert);
|
||||
int keydb_insert_cert (KEYDB_HANDLE hd, ksba_cert_t cert);
|
||||
int keydb_update_cert (KEYDB_HANDLE hd, ksba_cert_t cert);
|
||||
|
||||
int keydb_delete (KEYDB_HANDLE hd, int unlock);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user