# dkim_set_signature_handle()

[back to index]

SYNOPSIS

    #include <dkim.h>
    DKIM_STAT dkim_set_signature_handle(
    	DKIM_LIB *libopendkim,
            void * (*func)(void *closure));
    );

Defines a callback function to be used for allocating local data storage to be associated with signatures.

From within `dkim_eoh()`, each discovered signature is assigned a `DKIM_SIGINFO` handle. If this callback function is defined, it will be called once for each such handle to allocate any caller-side storage that might be desired by the caller; the return value is assumed to be a pointer to such storage, and can be retrieved later by the caller during signature processing.

DESCRIPTION

Called When | `dkim_set_signature_handle()` must be called before `dkim_eoh()` has been called.

ARGUMENTS

Argument | Description
--- | ---
libopendkim | Library-specific handle, returned by `dkim_init()`.
func | A pointer to a function which takes a single void pointer that is the same as the `memclosure` passed to `dkim_verify()`. If NULL, no callback will be used.

RETURN VALUES

- DKIM_STAT_OK -- success

NOTES

- None.

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