# dk_options()

SYNOPSIS |
    #include <dk.h>
    DK_STAT dk_options(
    	DK *dk,
            int op,
            int opt,
            void *ptr,
    	size_t size
    );
Sets or retrieves options to alter the behaviour of certain aspects of the library's operation.
DESCRIPTION |
Called When | `dk_options()` can be called at any time after acquiring a transaction handle from either `dk_sign()` or `dk_verify()`. However, the impact of certain options may not take effect after specific points in a transaction.
ARGUMENTS |
Argument | Description
--- | ---
dk | Message-specific handle, returned by `dk_sign()` or `dk_verify`.
op | Either `DK_OP_SETOPT` to set the value of the desired library option, or `DK_OP_GETOPT` to retrieve the current library option.
opt | A mnemonic symbol that indicates which library option is to be changed or retrieved. The list of valid options is below.
ptr | A pointer to a variable which contains the desired new value of the option to be changed, or which will receive the current value of the option specified.
size | The size in bytes of the variable referenced by `ptr`.
NOTES | The supported options are: `DK_OPTS_FLAGS` -- `ptr` points to an unsigned integer which is actually a mask of flag bits as defined below `DK_OPTS_QUERYINFO` -- `ptr` points to a buffer no larger than MAXPATHLEN bytes which contains information used by special query methods; see `dk_query_t` for details `DK_OPTS_QUERYMETHOD` -- `ptr` points to a `dk_query_t` containing the query method to be used for all verification operations `DK_OPTS_TMPDIR` -- when used with `DK_LIBFLAGS_TMPFILES`, temporary files will be left on disk for analysis rather than cleaned up upon completion of the transaction The supported flags are: `DK_LIBFLAGS_HDRLIST` -- when signing, group like headers together during canonicalization so that there is no duplication in the header list ("`h=`") portion of the signature `DK_LIBFLAGS_KEEPFILES` -- when used with `DK_LIBFLAGS_TMPFILES`, temporary files will be left on disk for analysis rather than cleaned up upon completion of the transaction `DK_LIBFLAGS_TMPFILES` -- create temporary files on disk for debugging or reporting purposes

Copyright (c) 2004, 2006, 2008 Sendmail, Inc. and its suppliers. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the LICENSE.