SYNOPSIS |
#include <dkim.h>
DKIM_STAT dkim_options(
DKIM_LIB *lib,
int op,
int opt,
void *data,
size_t len
);
Sets or retrieves options to alter the behaviour of certain aspects
of the library's operation.
|
ARGUMENTS |
Argument | Description |
dkim |
Library instance handle, returned by
dkim_init.
|
op |
Either DKIM_OP_SETOPT to set a current library
option, or DKIM_OP_GETOPT to retrieve a current library
option.
|
opt |
One of the following macros, to indicate which library
option should be retrieved or changed. Possible values:
Option Name | Description |
DKIM_OPTS_FIXEDTIME |
data refers to a time_t
which contains a fixed time specification
to use during signature generation. |
DKIM_OPTS_FLAGS |
data refers to an unsigned integer
which contains a bitwise-OR of desired
flags. See below for the list of known
flags. |
DKIM_OPTS_QUERYINFO |
data refers to a string
in which query information is stored. See
dkim_query_t
for more information. |
DKIM_OPTS_QUERYMETHOD |
data refers to a
dkim_query_t
containing a value which should override
any q= value in signatures during
verifications. |
DKIM_OPTS_SENDERHDRS |
data refers to an ordered,
NULL-terminated array of header names which
should be searched when trying to determine
the ultimate sender of the message. The
default is to check Resent-Sender,
Resent-From, Sender and
From. The caller's list completely
replaces this list. If data
refers to a NULL pointer, the default is
restored. |
DKIM_OPTS_SIGNHDRS |
data refers to an unordered,
NULL-terminated array of header names which
are the ones that should be included when
signing a message.
Wildcarding using the asterisk ("*")
character, meaning "match zero or more
characters", is permitted.
The From header is mandatory and
thus implicitly added to any list provided
by the caller.
The constant default_signhdrs may be
specified as the data, whicn contains
Sender, Reply-To,
Subject, Date,
Message-ID, To, Cc,
MIME-Version, Content-*,
Resent-*, In-Reply-To,
References and List-*.
The default is to sign all headers.
If data refers to a NULL pointer,
the default is restored.
Attempting DKIM_OP_GETOPT on this
option returns an error as it is converted
to regular expressions and not currently
stored in a useable form. |
DKIM_OPTS_SKIPHDRS |
data refers to an unordered,
NULL-terminated array of header names which
are the ones that should be skipped when
processing a message for signing or
verifying. The default is to skip no headers.
Wildcarding using the asterisk ("*")
character, meaning "match zero or more
characters", is permitted.
If data refers to a NULL pointer,
the default is restored.
Attempting DKIM_OP_GETOPT on this
option returns an error as it is converted
to regular expressions and not currently
stored in a useable form. |
DKIM_OPTS_TMPDIR |
data refers to a string which is
the directory libdkim should use for
creating temporary files. |
DKIM_OPTS_TIMEOUT |
data refers to an unsigned integer
indicating the timeout, in seconds, to be
used when doing DNS queries to retrieve key
and policy records. |
DKIM_OPTS_VERSION |
data refers to an unsigned integer
indicating the version of the specification
that should be used for signing messages.
See below for the list of versions. |
|
data |
If the operation is DKIM_OP_GETOPT, this specifies
the address to which to write the retrieved value. If the
operation is DKIM_OP_SETOPT, this specifies the address
from which to copy the new option value.
|
len |
Number of bytes available for reading/writing at data.
|
|