mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
* sign.c (get_default_signer): Use keydb_classify_name here.
This commit is contained in:
parent
601e41285f
commit
b020999687
@ -1,3 +1,7 @@
|
||||
2001-12-14 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* sign.c (get_default_signer): Use keydb_classify_name here.
|
||||
|
||||
2001-12-14 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* call-agent.c (LINELENGTH): Removed.
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "../assuan/assuan.h"
|
||||
|
||||
#define set_error(e,t) assuan_set_error (ctx, ASSUAN_ ## e, (t))
|
||||
#define digitp(a) ((a) >= '0' && (a) <= '9')
|
||||
|
||||
|
||||
/* The filepointer for status message used in non-server mode */
|
||||
|
10
sm/sign.c
10
sm/sign.c
@ -68,15 +68,23 @@ get_default_signer (void)
|
||||
const char key[] =
|
||||
"/CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=Düsseldorf,C=DE";
|
||||
|
||||
KEYDB_SEARCH_DESC desc;
|
||||
KsbaCert cert = NULL;
|
||||
KEYDB_HANDLE kh = NULL;
|
||||
int rc;
|
||||
|
||||
rc = keydb_classify_name (key, &desc);
|
||||
if (rc)
|
||||
{
|
||||
log_error ("failed to find default signer: %s\n", gnupg_strerror (rc));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kh = keydb_new (0);
|
||||
if (!kh)
|
||||
return NULL;
|
||||
|
||||
rc = keydb_search_subject (kh, key);
|
||||
rc = keydb_search (kh, &desc, 1);
|
||||
if (rc)
|
||||
{
|
||||
log_debug ("failed to find default certificate: rc=%d\n", rc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user