Files
cproof/src
Quaylyn Rimer 606eaac31d Fix GPGME >= 2.0.0 compatibility issue #2048
Replace deprecated gpgme_key_get_string_attr with modern API

This commit fixes the build failure against GPGME >= 2.0.0 where
gpgme_key_get_string_attr and GPGME_ATTR_EMAIL were removed.

Changes made:
- Replaced direct call to gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0)
- Added new helper function _gpgme_key_get_email() with backwards compatibility
- Function uses conditional compilation to support both old and new GPGME versions

Backwards Compatibility:
- GPGME < 2.0.0: Uses gpgme_key_get_string_attr() if GPGME_ATTR_EMAIL is available
- GPGME >= 2.0.0: Uses modern key->uids->email API

Forward Compatibility:
- Code compiles successfully with GPGME 2.0.0+ where deprecated functions are removed
- Uses modern GPGME API that iterates through key user IDs to find email addresses

Testing:
- Tested with GPGME 1.18.0 (backwards compatibility confirmed)
- Tested compilation compatibility for both old and new GPGME versions
- Verified the exact error from issue #2048 is resolved
- Confirmed no regression in functionality

Fixes: #2048
Resolves compilation error: 'gpgme_key_get_string_attr' undeclared
Resolves compilation error: 'GPGME_ATTR_EMAIL' undeclared
2025-07-22 20:27:43 -06:00
..
2025-04-28 16:40:05 +02:00
2025-04-02 13:07:35 +02:00
2025-03-27 20:06:38 +01:00
2025-03-27 20:06:38 +01:00
2025-03-12 10:09:41 +01:00
2025-04-23 11:19:04 +02:00
2025-06-23 12:43:04 +02:00
2025-04-28 16:42:27 +02:00
2025-03-27 20:06:38 +01:00
2025-03-27 20:06:38 +01:00
2025-03-27 20:06:38 +01:00
2025-03-27 20:06:38 +01:00
2025-03-27 20:06:38 +01:00
2025-03-12 10:15:39 +01:00
2025-03-27 20:06:38 +01:00
2025-03-27 20:06:38 +01:00
2025-03-27 20:06:38 +01:00