gcry_pk_algo_info usage?

Marco Maggi marco.maggi-ipsu at poste.it
Wed Dec 30 10:41:04 CET 2009


Ciao,

  I think  the documentation of  gcry_pk_algo_info is messed
up  in release  1.4.5; I  may be  confused, but  reading the
source code looks like there is no implementation at all:

gcry_error_t
gcry_pk_algo_info (int algo, int what, void *buffer, size_t *nbytes)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return _gcry_pk_algo_info (algo, what, buffer, nbytes);
}

#define gcry_pk_algo_info           _gcry_pk_algo_info

  Can someone modify the following program so that it prints
something meaningful (anything will do)?

#include <stdio.h>
#include <stdlib.h>
#include <gcrypt.h>

int
main (int argc, const char *const argv[])
{
  /* gcry_control(GCRYCTL_FORCE_FIPS_MODE, 0); */
  gcry_check_version(GCRYPT_VERSION);
  printf("%d\n", gcry_pk_algo_info(GCRY_AC_RSA,
                                   GCRYCTL_TEST_ALGO,
                                   NULL, NULL));
  exit(EXIT_SUCCESS);
}

TIA

P.S.  It  seems there  are no archives  for this list,  so I
cannot  find if  I (or  someone)  already asked  for this  a
couple of ages ago (it may be, though). :-/
-- 
Marco Maggi



More information about the Gcrypt-devel mailing list