Previous: Creating a Signature, Up: Sign [Contents][Index]

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`) SINCE: 1.1.0

The function

`gpgme_sig_notation_clear`

removes the notation data from the context`ctx`. 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`) SINCE: 1.1.0

The function

`gpgme_sig_notation_add`

adds the notation data with the name`name`and the value`value`to the context`ctx`.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

`name`and`value`must 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

`name`is`NULL`

, then`value`should 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`

if`ctx`is not a valid pointer, or if`name`,`value`and`flags`are 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`) SINCE: 1.1.0

The function

`gpgme_sig_notation_get`

returns the linked list of notation data structures that are contained in the context`ctx`.If

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

is returned.

Previous: Creating a Signature, Up: Sign [Contents][Index]