Home GnuPG

Support multi-valued signatures in CSRs.

Description

Support multi-valued signatures in CSRs.

* src/certreq.c (ksba_certreq_set_sig_val): Support signatures
made of several values.

The current implementation of ksba_certreq_set_sig_val takes
only the first MPI value in the provided S-expression to build
the CSR signature. This is enough for RSA, but not for ECDSA
since a ECDSA signature is made of two values.

This patch makes sure all values are taken into account. It
also partially replaces some of the ad-hoc parsing code by
the helper functions defined in sexp-parse.h.

  • GnuPG-bug-id: T4092
  • Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>