# dkim_eom()

[back to index]

SYNOPSIS |
    #include <dkim.h>
    DKIM_STAT dkim_eom(
    	DKIM *dkim,
    	bool *testkey
    );
Denote end-of-message for a message. When verifying, process signatures in order; when signing, compute all signatures.
DESCRIPTION |
Called When | `dkim_eom()` is called after the entire body of the message has been passed to the API via zero or more calls to `dkim_body()`.
ARGUMENTS |
Argument | Description
--- | ---
dkim | Message-specific handle, returned by `dkim_sign()` or `dkim_verify()`
testkey | Optional pointer to a boolean value which is updated to indicate whether the key found (if any) is marked as being a test key.
RETURN VALUES | `DKIM_STAT_INVALID` may indicate the `dkim` handle was rendered unusable by a previous call, likely to `dkim_eoh()`, or simply that `dkim_eoh()` has not yet been called for this handle. `DKIM_STAT_INVALID` may also indicate the `dkim` handle was passed to `dkim_chunk()` for message chunk processing but the end of message was never signaled via that interface. `DKIM_STAT_INVALID` returned when signing may indicate that the key provided for signing did not meet the minimum key size requirement (see `dkim_options()`). `DKIM_STAT_CANTVRFY` is returned when passed a signing handle bound via `dkim_resign()` to a verifying handle if the latter yielded no valid signatures. Other possible return values include all the `DKIM_STAT` values.
NOTES | By default, when verifying, this function processes all signatures, in order. If the `DKIM_LIBFLAGS_VERIFYONE` flag is set on the library, then processing will stop after one good signature is found. There may be other signatures before or after that one in the message whose evaluation might be meaningful to the calling application. In that case, the calling application should use the final handling callback (see `dkim_set_final()` to get an opportunity to process all of the signatures and possibly reorder them as per the application's preference. With the above flag set, this function will use the signatures as reordered by that function (or in arrival order if no reordering is done) and act on the first valid one, or the first one if none are valid.

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