# dkim_sig_process()

[back to index]

SYNOPSIS |
    #include <dkim.h>

    DKIM_STAT dkim_sig_process(
    	DKIM *dkim,
    	DKIM_SIGINFO *sig
    );
Runs verification on a signature, returning a result. The function will retrieve the key needed to verify the signature if that hasn't already been done, and if called from the final callback, compare the computed body hash to the one found in the signature. Upon completion of processing of the signature, the caller may use `dkim_sig_getflags()` and `dkim_sig_getbh()` to retrieve the results of the processing.
DESCRIPTION |
Called When | `dkim_sig_process()` can be called from within the user prescreen or final callbacks, if defined.
ARGUMENTS |
Argument | Description
--- | ---
dkim | DKIM handle, returned by a prior call to `dkim_verify()`.
sig | Signature-specific handle generated by the library.
RETURN VALUES |
Return Value | Description
--- | ---
DKIM_STAT_OK | Signature processing was completed.
DKIM_STAT_NORESOURCE | The library was unable to create one or more data structures required to complete the processing.
DKIM_STAT_CBERROR DKIM_STAT_CBINVALID DKIM_STAT_CBREJECT DKIM_STAT_CBTRYAGAIN | A registered lookup callback returned a non-completion result. See `DKIM_STAT` for further details.
NOTES | A positive result from `dkim_sig_getflags()` after calling this function during the prescreen callback is not sufficient to conclude that the signature is good, since at that time a final result from `dkim_sig_getbh()` is not available. The latter must be tested in the final callback to ensure that the signature was good and the signature's body hash matched the one computed by the library.

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