dkim_get_sigsubstring()

[back to index]

SYNOPSIS
#include <dkim.h>
DKIM_STAT dkim_get_sigsubstring(
	DKIM *dkim,
	DKIM_SIGINFO *sig,
        char *buf,
        size_t *buflen
);
Retrieve a minimal substring of the actual signature (i.e. the "b=" tag value) from a specified signature, of sufficient length to identify this signature uniquely from others.
DESCRIPTION
Called When dkim_getsig() is called after dkim_eom() when dkim is a verifying handle, i.e. one returned by an earlier call to dkim_verify().
ARGUMENTS
ArgumentDescription
dkim Message-specific handle, returned by dkim_sign().
sig Signature-specific handle, retrieved by a prior call to dkim_getsiglist().
buf Pointer to a buffer that should receive a minimal unique substring of the digital signature portion of sig.
buflen The address of an integer that should contain the number of bytes available at buf and will be updated to contain the number of bytes needed to produce a minimal substring.
NOTES
  • No fewer than eight bytes will be requested. If two or more signatures have the same initial byte sequences in "b=" tags, larger lengths will be required, theoretically requiring as much as the entire signature.
  • If the size of buf is too small to contain the minimal substring of sig, DKIM_STAT_NORESOURCE is returned, buflen will be updated to indicate the minimal number of bytes required, and buf will be unchanged.
  • The string written to buf will be NULL-terminated unless the provided buffer is exactly the right size to contain the output.

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