[back to index]

#include <dkim.h>
int dkim_dns_set_trustanchor(
	DKIM_LIB *libopendkim,
        int (*func)(void *, const char *)

Declares the function to be used by a libopendkim instance when it needs to pass trust anchor information to an active DNS resolver.

The function will be passed the following arguments:

  1. A pointer to a handle that refers to the instantiated resolver service, via a prior call to to the initialization function defined by dkim_dns_set_init().
  2. A pointer to a NULL-terminated string that includes trust anchor information to be used by the referenced resolver. The content of string is passed directly to the underlying resolver's configuration function and is not used by this library.
The function is expected to return one of the following:
  • DKIM_DNS_SUCCESS -- query was successfully canceled
  • DKIM_DNS_ERROR -- an error occurred
Called When dkim_dns_set_trustanchor() can be called at any time, but is presumably most useful prior to doing any DNS operations such as are done during dkim_eoh() when verifying. The function will be called implicitly if no service handle has been stored and a query is ready to be started.
libopendkim The library instantiation handle, returned by dkim_init().
func A pointer to a function that should be used to pass trust anchor information to the current resolver instance.
  • DKIM_DNS_SUCCESS -- successful operation
  • DKIM_DNS_ERROR -- an error occurred
  • None.

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