# dkim_ohdrs()

SYNOPSIS |
    #include <dkim.h>
    DKIM_STAT dkim_ohdrs(
    	DKIM *dkim,
    	DKIM_SIGINFO *sig,
            char **ptrs, int *pcnt)
    );
Retrieve the original header set from the "z=" tag in a received signature if present.
DESCRIPTION |
Called When | `dkim_ohdrs()` is called in `dkim_eom()` to get the original header set included in a signature on a message, if present, for diagnostic purposes. The original headers can be compared to the received headers to detect modifications in transit which prevented successful verification of the message.
ARGUMENTS |
Argument | Description
--- | ---
dkim | Message-specific handle, returned by `dkim_verify`.
sig | Signature handle from which the original headers should be extracted.
ptrs | A pointer to a an array of `(char *)` pointers which will be updated to point to the original headers.
pcnt | On input, this is used as the count of available pointers in the `ptrs` array. When returned, this value indicates the number of headers available. If it is higher on return than it was when called, then there were more headers than there were pointers provided.
RETURN VALUES |
Value | Description
--- | ---
`DKIM_STAT_INVALID` | The function was called before `dkim_eom`, or with a handle that was not opened for verification.
`DKIM_STAT_INVALID` | The value contained in the "z=" tag contained corruption.
`DKIM_STAT_NORESOURCE` | A memory allocation operation failed.
`DKIM_STAT_OK` | Successful completion.
NOTES | None.

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