0

everyone

I've generated a pair of keys associated with my email address and uploaded the public key to the keyserver: keys.openpgp.org. With the help of gpgme examples, I wrote a C++ program using Visual Studio to retrieve my public key both locally,

gpgme_set_keylist_mode(ceofcontext, GPGME_KEYLIST_MODE_LOCAL);

and remotely,

gpgme_set_keylist_mode(ceofcontext, GPGME_KEYLIST_MODE_EXTERN);

The key's fingerprint, email, algorithm, name are all correct. The problem is that the key's fields: can_encrypt, can_sign and can_certify are 0 when it is retrieved from the remote key server. This renders the key retrieved remotely unusable.

Has anyone run into similar issue ?

Thanks, Eric

Eric-CP
  • 1
  • 1
  • Note: If I download the key directly from keys.openpgp.org as an asc file, and import the asc file as a key, using gpgme_data_new_from_file() and gpgme_op_keylist_from_data_start() and gpgme_op_keylist_next(), the key's can_encryt, can_sign and can_certify fields are 1, which is good to use. – Eric-CP Jul 26 '21 at 18:39
  • This question was answered in the gpg-users mail list by Ingo Klocker. In turns out that it is normal to have can_encrypt, can_sign and can_certify fields set as 0x00 in the keylist. To use the key listed, we need to first import it to the keyring. – Eric-CP Jul 28 '21 at 17:35

0 Answers0