Previous: Creating a Signature, Up: Sign

Using the following functions, you can attach arbitrary notation data to a signature. This information is then available to the user when the signature is verified.

— Function: void **gpgme_sig_notation_clear** (`gpgme_ctx_t ctx`)

The function

`gpgme_sig_notation_clear`

removes the notation data from the contextctx. Subsequent signing operations from this context will not include any notation data.Every context starts with an empty notation data list.

— Function: gpgme_error_t **gpgme_sig_notation_add** (`gpgme_ctx_t ctx, const char *name, const char *value, gpgme_sig_notation_flags_t flags`)

The function

`gpgme_sig_notation_add`

adds the notation data with the namenameand the valuevalueto the contextctx.Subsequent signing operations will include this notation data, as well as any other notation data that was added since the creation of the context or the last

`gpgme_sig_notation_clear`

operation.The arguments

nameandvaluemust be`NUL`

-terminated strings in human-readable form. The flag`GPGME_SIG_NOTATION_HUMAN_READABLE`

is implied (non-human-readable notation data is currently not supported). The strings must be in UTF-8 encoding.If

nameis`NULL`

, thenvalueshould be a policy URL.The function

`gpgme_sig_notation_add`

returns the error code`GPG_ERR_NO_ERROR`

if the notation data could be added successfully,`GPG_ERR_INV_VALUE`

ifctxis not a valid pointer, or ifname,valueandflagsare an invalid combination. The function also passes through any errors that are reported by the crypto engine support routines.

— Function: gpgme_sig_notation_t **gpgme_sig_notation_get** (`const gpgme_ctx_t ctx`)

The function

`gpgme_sig_notation_get`

returns the linked list of notation data structures that are contained in the contextctx.If

ctxis not a valid pointer, or there is no notation data added for this context,`NULL`

is returned.