mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
sm: Support import and verification of EdDSA certificates.
* sm/certdump.c (gpgsm_get_serial): New. * sm/certcheck.c (gpgsm_check_cert_sig): Support EdDSA signatures. -- Note that this does not work with the self-signed RFC-8410 sample certificate; see the code for comments. The Ed488 case has not been tested due to a lack of support in Libgcrypt. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
f44d395bdf
commit
b1694987bb
3 changed files with 144 additions and 18 deletions
|
@ -48,6 +48,28 @@ struct dn_array_s {
|
|||
};
|
||||
|
||||
|
||||
/* Get the first first element from the s-expression SN and return a
|
||||
* pointer to it. Stores the length at R_LENGTH. Returns NULL for no
|
||||
* value or an invalid expression. */
|
||||
const void *
|
||||
gpgsm_get_serial (ksba_const_sexp_t sn, size_t *r_length)
|
||||
{
|
||||
const char *p = (const char *)sn;
|
||||
unsigned long n;
|
||||
char *endp;
|
||||
|
||||
if (!p || *p != '(')
|
||||
return NULL;
|
||||
p++;
|
||||
n = strtoul (p, &endp, 10);
|
||||
p = endp;
|
||||
if (*p++ != ':')
|
||||
return NULL;
|
||||
*r_length = n;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
/* Print the first element of an S-Expression. */
|
||||
void
|
||||
gpgsm_print_serial (estream_t fp, ksba_const_sexp_t sn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue