Wrapper for PGP/SMIME calls to GPGME. More...
Go to the source code of this file.
Data Structures | |
struct | CryptKeyInfo |
A stored PGP key. More... | |
Enumerations | |
enum | KeyInfo { KIP_NAME = 0 , KIP_AKA , KIP_VALID_FROM , KIP_VALID_TO , KIP_KEY_TYPE , KIP_KEY_USAGE , KIP_FINGERPRINT , KIP_SERIAL_NO , KIP_ISSUED_BY , KIP_SUBKEY , KIP_MAX } |
PGP Key info. More... | |
enum | KeyCap { KEY_CAP_CAN_ENCRYPT , KEY_CAP_CAN_SIGN , KEY_CAP_CAN_CERTIFY } |
PGP/SMIME Key Capabilities. More... | |
Wrapper for PGP/SMIME calls to GPGME.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file crypt_gpgme.h.
enum KeyInfo |
PGP Key info.
Definition at line 56 of file crypt_gpgme.h.
enum KeyCap |
PGP/SMIME Key Capabilities.
Enumerator | |
---|---|
KEY_CAP_CAN_ENCRYPT | Key can be used for encryption. |
KEY_CAP_CAN_SIGN | Key can be used for signing. |
KEY_CAP_CAN_CERTIFY | Key can be used to certify. |
Definition at line 74 of file crypt_gpgme.h.
gpgme_ctx_t create_gpgme_context | ( | bool | for_smime | ) |
Create a new GPGME context.
for_smime | If true, protocol of the context is set to CMS |
ptr | New GPGME context |
Definition at line 360 of file crypt_gpgme.c.
struct CryptKeyInfo * crypt_copy_key | ( | struct CryptKeyInfo * | key | ) |
Return a copy of KEY.
key | Key to copy |
ptr | Copy of key |
Definition at line 232 of file crypt_gpgme.c.
const char * crypt_fpr_or_lkeyid | ( | struct CryptKeyInfo * | k | ) |
Find the fingerprint of a key.
k | Key to examine |
ptr | Fingerprint if available, otherwise the long keyid |
Definition at line 212 of file crypt_gpgme.c.
bool crypt_id_is_strong | ( | struct CryptKeyInfo * | key | ) |
Is the key strong.
key | Key to test |
true | Validity of key is sufficient |
Definition at line 273 of file crypt_gpgme.c.
int crypt_id_is_valid | ( | struct CryptKeyInfo * | key | ) |
Is key ID valid.
key | Key to test |
true | Key is valid |
When the key is not marked as unusable
Definition at line 308 of file crypt_gpgme.c.
const char * crypt_keyid | ( | struct CryptKeyInfo * | k | ) |
Find the ID for the key.
k | Key to use |
ptr | ID string for the key |
Return the keyID for the key K. Note that this string is valid as long as K is valid
Definition at line 136 of file crypt_gpgme.c.
int digit | ( | const char * | s | ) |
unsigned int key_check_cap | ( | gpgme_key_t | key, |
enum KeyCap | cap | ||
) |
Check the capabilities of a key.
key | GPGME key |
cap | Flags, e.g. KEY_CAP_CAN_ENCRYPT |
>0 | Key has the capabilities |
Definition at line 2852 of file crypt_gpgme.c.