Im trying to write a program that uses libgcrypt to verify a file against
a known public gpg key.
Im really strugling to make any progress at all, as a start i would like
to be able load store and verify the public key.
GCRY_SEXP key;
/* Store the key in libgcrypt's struct */
gcry_sexp_build(/* I have no idea what goes in here */)
/* Check the key is in a valid format */
result = gcry_pk_testkey(key);
if (result != 0) {
printf("Key check failed, %s\n", gcry_strerror(result));
}
I dont know how to trasfer the data from the .gpg file to the GCRY_SEXP
structure.
e.g. i have
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
iEYEABECAAYFAjzivCQACgkQqn3re3IvGu0knQCfem0zm2wCWYxNgTrsjmw8f5Se
m7oAoKYonuIKxty8YWcZHTm+qo1A6oTa
=msEe
-----END PGP SIGNATURE-----
How do i format and parse this ?
It probably should be an easy question, ive been looking around the gpg
and libgpcrypt code for for a few hours trying to work it out, but im
lost.
Thanks
Glenn
a known public gpg key.
Im really strugling to make any progress at all, as a start i would like
to be able load store and verify the public key.
GCRY_SEXP key;
/* Store the key in libgcrypt's struct */
gcry_sexp_build(/* I have no idea what goes in here */)
/* Check the key is in a valid format */
result = gcry_pk_testkey(key);
if (result != 0) {
printf("Key check failed, %s\n", gcry_strerror(result));
}
I dont know how to trasfer the data from the .gpg file to the GCRY_SEXP
structure.
e.g. i have
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
iEYEABECAAYFAjzivCQACgkQqn3re3IvGu0knQCfem0zm2wCWYxNgTrsjmw8f5Se
m7oAoKYonuIKxty8YWcZHTm+qo1A6oTa
=msEe
-----END PGP SIGNATURE-----
How do i format and parse this ?
It probably should be an easy question, ive been looking around the gpg
and libgpcrypt code for for a few hours trying to work it out, but im
lost.
Thanks
Glenn