How to set the public key?

Shawn Walker swalker at bynari.net
Sun Aug 12 23:05:16 CEST 2007


I'm trying to get my PGP signed data verified that retrieve the signed 
message.  I'm getting GPG_ERR_NO_PUBKEY for the signature status and the 
bit for the signature summary is GPGME_SIGSUM_KEY_MISSING.

I have the public key, it's a binary data, but I haven't been able to 
find what steps I need to do to set the public key.

code:
gpgme_ctx_t             ctx;
gpgme_error_t           err;
gpgme_data_t            sig;
gpgme_data_t            text;
gpgme_verify_result_t   result;

gpgme_new_ptr(&ctx);
gpgme_data_new_from_mem_ptr(&text, cert, certlen, 0);
gpgme_data_new_from_mem_ptr(&sig, cert, certlen, 0);
result = gpgme_op_verify_ptr(ctx, sig, NULL, text);

output:
summary: 0x00000080
status:  0x07000009, gpg_err_code 0x00000009

Regards,
Shawn



More information about the Gnupg-devel mailing list