mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
sm: Flag Brainpool curves as compliant.
* sm/keylist.c (print_compliance_flags): Add arg curve. (list_cert_colon): Pass curve to the compliance check. -- GnuPG-bug-id: 6253
This commit is contained in:
parent
08f0b9ea2e
commit
afacacec12
@ -375,14 +375,14 @@ email_kludge (const char *name)
|
|||||||
* number. NBITS is the length of the key in bits. */
|
* number. NBITS is the length of the key in bits. */
|
||||||
static void
|
static void
|
||||||
print_compliance_flags (ksba_cert_t cert, int algo, unsigned int nbits,
|
print_compliance_flags (ksba_cert_t cert, int algo, unsigned int nbits,
|
||||||
estream_t fp)
|
const char *curvename, estream_t fp)
|
||||||
{
|
{
|
||||||
int hashalgo;
|
int hashalgo;
|
||||||
|
|
||||||
/* Note that we do not need to test for PK_ALGO_FLAG_RSAPSS because
|
/* Note that we do not need to test for PK_ALGO_FLAG_RSAPSS because
|
||||||
* that is not a property of the key but one of the created
|
* that is not a property of the key but one of the created
|
||||||
* signature. */
|
* signature. */
|
||||||
if (gnupg_pk_is_compliant (CO_DE_VS, algo, 0, NULL, nbits, NULL))
|
if (gnupg_pk_is_compliant (CO_DE_VS, algo, 0, NULL, nbits, curvename))
|
||||||
{
|
{
|
||||||
hashalgo = gcry_md_map_name (ksba_cert_get_digest_algo (cert));
|
hashalgo = gcry_md_map_name (ksba_cert_get_digest_algo (cert));
|
||||||
if (gnupg_digest_is_compliant (CO_DE_VS, hashalgo))
|
if (gnupg_digest_is_compliant (CO_DE_VS, hashalgo))
|
||||||
@ -569,7 +569,7 @@ list_cert_colon (ctrl_t ctrl, ksba_cert_t cert, unsigned int validity,
|
|||||||
if (curve)
|
if (curve)
|
||||||
es_fputs (curve, fp);
|
es_fputs (curve, fp);
|
||||||
es_putc (':', fp); /* End of field 17. */
|
es_putc (':', fp); /* End of field 17. */
|
||||||
print_compliance_flags (cert, algo, nbits, fp);
|
print_compliance_flags (cert, algo, nbits, curve, fp);
|
||||||
es_putc (':', fp); /* End of field 18. */
|
es_putc (':', fp); /* End of field 18. */
|
||||||
es_putc ('\n', fp);
|
es_putc ('\n', fp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user