Verifying a GPG signature using a specific public key with GPGME in C / C++ -


i have c++ program needs verify signature of file has been signed gpg using specific private key. using gpgme have written program verifies given file has been signed private key corresponding 1 of public keys in gpg keyring.

now program verify file using public key hard coded inside program instead of verifying signature using 1 of public keys available in gpg keyring.

i want program (that installed on else's computer) able verify file comes me. if verify operation using list of public key in gpg keyring of user's computer, seems user resign file own private key , program validate file's signature though didn't sign it.

is there way of achieving gpgme? appreciated.

while not solution problem, solved checking fingerprint of public key has been used verify signed file. can hard code fingerprint of public key in program , can use gpgme import public key gpg if isn't there.

in gpgme fingerprint can gotten gpgme_signature_t gotten gpgme_op_verify_result(...) call (see documentation).

gpg can display fingerprint of public key following command: gpg --fingerprint


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -