dkim_sign()

SYNOPSIS
#include <dkim.h>
DKIM *dkim_sign(
	DKIM_LIB *libhandle,
	const char *id,
	void *memclosure,
	const void *secretkey,
	const char *selector,
	const char *domain,
	dkim_canon_t hdrcanon_alg,
	dkim_canon_t bodycanon_alg,
	dkim_alg_t sign_alg,
	DK_STAT *statp
);
Create a new handle for signing a message.
DESCRIPTION
Called When dkim_sign() is called when preparing to process a new message that will be signed later by a private key.
ARGUMENTS
ArgumentDescription
libhandle DKIM library instance handle, returned by an earlier call to dkim_init().
id An opaque, printable string for identifying this message, suitable for use in logging or debug output.
memclosure Opaque memory closure, passed directly to the caller-provided malloc() and/or free() replacement functions.
secretkey The private key to be used when signing this message.
selector The name of the selector to be reported in the signature on this message.
domain The domain doing the signing; this will be the domain whose DNS will be queried by the verifier for key and policy data.
hdrcanon_alg The canonicalization algorithm to use when preparing the headers of this message for signing.
bodycanon_alg The canonicalization algorithm to use when preparing the body of this message for signing.
sign_alg The signing algorithm to use when generating the signature to be attached to this message.
statp Pointer to a DKIM_STAT object which receives the completion status of this operation.
NOTES
  • To use DKIM_CANON_NOWSP for signing, the library instance passed as libhandle must be explicitly configured to use the older specification which uses it, namely DKIM_VERSION_ALLMAN_BASE_00, using the dkim_options() function before making this call. Failing to do so will cause this function to fail.
  • If using DKIM_VERSION_ALLMAN_BASE_00, the hdrcanon_alg and bodycanon_alg parameters must be the same.

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