Changeset View
Standalone View
src/gpgme.h.in
Context not available. | |||||
unsigned int exportable : 1; | unsigned int exportable : 1; | ||||
/* Internal to GPGME, do not use. */ | /* Internal to GPGME, do not use. */ | ||||
unsigned int _unused : 28; | unsigned int _unused : 12; | ||||
/* The depth of a trust signature, 0 if no trust signature. */ | |||||
unsigned int trust_depth : 8; | |||||
/* The trust value of a trust signature, 0 if no trust signature. */ | |||||
unsigned int trust_value : 8; | |||||
/* The public key algorithm used to create the signature. */ | /* The public key algorithm used to create the signature. */ | ||||
gpgme_pubkey_algo_t pubkey_algo; | gpgme_pubkey_algo_t pubkey_algo; | ||||
Context not available. | |||||
/* The expiration timestamp, 0 if the subkey does not expire. */ | /* The expiration timestamp, 0 if the subkey does not expire. */ | ||||
long int expires; | long int expires; | ||||
/* The scope of a trust signature. Might be NULL. */ | |||||
char *trust_scope; | |||||
werner: I would not call this "regexp" so that ppl do not start to come up with fancy REs which will… | |||||
Done Inline ActionsI took the field names from PKT_signature (g10/packet.h). For now trust_regexp is "read-only", i.e. people working directly with the gpgme API can change it all they want. Changing it has no effect (outside of the running process). And, in case of a trust signature, it contains the following value: <[^>]+[@.]example\.org>$ This is clearly a regular expression and not even remotely a valid domain name. Prefixed with @ it certainly isn't a valid mailbox. But that's okay because it's read-only. Regardless of the above, I'm okay with renaming the field. I suggest trust_scope (RFC 4880: "Used in conjunction with trust Signature packets (of level > 0) to limit the scope of trust [...]"). I'll update the patch. The gpgme++/qgpgme API for creating trust signatures will only allow domain names because it uses the edit interactor interface which asks for a domain name. ikloecker: I took the field names from `PKT_signature` (`g10/packet.h`).
For now `trust_regexp` is "read… | |||||
/* Same as in gpgme_signature_t. */ | /* Same as in gpgme_signature_t. */ | ||||
gpgme_error_t status; | gpgme_error_t status; | ||||
Context not available. |
I would not call this "regexp" so that ppl do not start to come up with fancy REs which will end in an OpenPGP incopatibility nightmare. Maybe a neutral name (eg.g something like domain) or at least check that the given RE confirms to a limited format; e.g. by using _gpgme_is_valid_mailboix maybe bey prefixing with "foo@" if there is no "@', like we do it in dirmngr: