# dkim_add_querymethod()

[back to index]

SYNOPSIS

    #include <dkim.h>
    DKIM_STAT dkim_add_querymethod(
    	DKIM *dkim,
            const char *method,
            const char *options);
    );

Requests that a signature be generated such that it requests verifiers use the specified query method and options (if any) to retrieve the verifying key. This adds the `q=` tag showing the specified method(s) and option(s) when the signature is generated by `dkim_getsighdr()`. Multiple query methods can be listed by making multiple calls to this function.

DESCRIPTION

Called When | `dkim_add_querymethod()` can be called at any time prior to calling `dkim_eom()`.

ARGUMENTS

Argument | Description
--- | ---
dkim | Message-specific signing handle, returned by `dkim_sign()`.
method | A pointer to a null-terminated string that specifies the key retrieval method to be used by verifiers. This value will appear in the `q=` value of the generated signature.
options | A pointer to a null-terminated string that specifies the query options to be used by the verifier, or NULL if no options should be shown in the signature.

RETURN VALUES

- DKIM_STAT_OK -- success
- DKIM_STAT_INVALID -- `dkim` referred to a verifying header rather than a signing header, or one of the provided values contained a syntax error, or a request was made to add a method or method-option pair that was already requested for the same signature
- DKIM_STAT_NORESOURCE -- out of memory

NOTES

- To support experimental extensions, methods not listed in RFC6376 are permitted.

Copyright (c) 2007 Sendmail, Inc. and its suppliers. All rights reserved.
Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the respective licenses.