Overview

[back to index]

To sign a message under DomainKeys Identified Mail ("DKIM"), make the following calls:
  1. lib = dkim_init(...);
  2. dkim = dkim_sign(lib, ...);
  3. stat = dkim_header(dkim, ...);
  4. stat = dkim_eoh(dkim);
  5. stat = dkim_body(dkim, ...);
  6. stat = dkim_eom(dkim);
  7. stat = dkim_getsighdr(dkim, ...);
  8. stat = dkim_free(dkim);
  9. dkim_close(lib);

To verify a message under DKIM, make the following calls:
  1. lib = dkim_init(...);
  2. dkim = dkim_verify(lib, ...);
  3. stat = dkim_header(dkim, ...);
  4. stat = dkim_eoh(dkim);
  5. stat = dkim_body(dkim, ...);
  6. stat = dkim_eom(dkim);
  7. stat = dkim_free(dkim);
  8. dkim_close(lib);

One application, having called dkim_init() once, can call dkim_sign() or dkim_verify() more than once each, and furthermore can have more than one signing/verifying handle in existence at any given time.

Note that new dkim_chunk() interface can replace the dkim_header()-dkim_eoh()-dkim_body() sequence for applications that don't have the header fields individually separated.

One can also use new dkim_getsighdr_d() in place of dkim_getsighdr() to allow larger-than-normal signatures to be generated.


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