mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* server.c (option_handler): Allow to use -2 for "send all certs
except the root cert". * sign.c (add_certificate_list): Implement it here. * certpath.c (gpgsm_is_root_cert): New.
This commit is contained in:
parent
2a2d713359
commit
04f49d973b
9 changed files with 69 additions and 6 deletions
|
@ -253,6 +253,24 @@ gpgsm_walk_cert_chain (KsbaCert start, KsbaCert *r_next)
|
|||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* Check whether the CERT is a root certificate. Returns True if this
|
||||
is the case. */
|
||||
int
|
||||
gpgsm_is_root_cert (KsbaCert cert)
|
||||
{
|
||||
char *issuer;
|
||||
char *subject;
|
||||
int yes;
|
||||
|
||||
issuer = ksba_cert_get_issuer (cert, 0);
|
||||
subject = ksba_cert_get_subject (cert, 0);
|
||||
yes = (issuer && subject && !strcmp (issuer, subject));
|
||||
xfree (issuer);
|
||||
xfree (subject);
|
||||
return yes;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
gpgsm_validate_path (KsbaCert cert)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue