Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > b5fdf68d1ef6711be4a04d1550358feb > files > 41

libopendkim-devel-2.4.2-5.fc14.x86_64.rpm

<html>
<head><title>dkim_getsighdr()</title></head>
<body>
<!--
$Id: dkim_getsighdr.html,v 1.2 2010/07/24 04:52:15 cm-msk Exp $
-->
<h1>dkim_getsighdr()</h1>
<p align="right"><a href="index.html">[back to index]</a></p>

<table border="0" cellspacing=4 cellpadding=4>
<!---------- Synopsis ----------->
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
<pre>
#include &lt;dkim.h&gt;
<a href="dkim_stat.html"><tt>DKIM_STAT</tt></a> dkim_getsighdr(
	<a href="dkim.html"><tt>DKIM</tt></a> *dkim,
        unsigned char *buf,
        size_t len,
        size_t initial
);
</pre>
Compute and retrieve the signature header for a message.
</td></tr>

<!----------- Description ---------->
<tr><th valign="top" align=left>DESCRIPTION</th><td>
<table border="1" cellspacing=1 cellpadding=4>
<tr align="left" valign=top>
<th width="80">Called When</th>
<td><tt>dkim_getsig()</tt> is called after
    <a href="dkim_eom.html"><tt>dkim_eom()</tt></a> when <tt>dkim</tt> is a
    signing handle, i.e. one returned by an earlier call to
    <a href="dkim_sign.html"><tt>dkim_sign()</tt></a>. </td>
</tr>
</table>

<!----------- Arguments ---------->
<tr><th valign="top" align=left>ARGUMENTS</th><td>
    <table border="1" cellspacing=0>
    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
    <tr valign="top"><td>dkim</td>
	<td>Message-specific handle, returned by <a href="dkim_sign.html">
        <tt>dkim_sign()</tt></a>.
	</td></tr>
    <tr valign="top"><td>buf</td>
	<td>A buffer into which the signature header should be stored.
	</td></tr>
    <tr valign="top"><td>len</td>
	<td>Number of bytes available at <tt>buf</tt>.
	</td></tr>
    <tr valign="top"><td>initial</td>
	<td>Line length already consumed on the first line.  Used to
            leave space when wrapping headers for the name of the header
            itself.
	</td></tr>
    </table>
</td></tr>

<!----------- Notes ---------->
<tr>
<th valign="top" align=left>NOTES</th> 
<td>
<ul>
<li>It is an error to call this function with a handle that was created
    using <a href="dkim_verify.html"><tt>dkim_verify()</tt></a>.
<li>If for example, you want to have your headers wrapped at 75 bytes
    and the header to be added will be called "DKIM-Signature", the
    <tt>initial</tt> value should be 16 (length of the header's name plus
    room for a colon and a space).  The default margin is 75; see
    <a href="dkim_set_margin.html"><tt>dkim_set_margin()</tt></a>.
<li>When signing and "simple" canonicalization is in use, the header added to
    the message must be identical to the internal version used to generate the
    signature, or the message will not verify.  In that case, the value of
    <tt>initial</tt> should be 16 (or more portably,
    <tt>strlen(DKIM_SIGNHEADER) + 2)</tt>. </a>
</ul>
</td>
</tr>
</table>

<hr size="1">
<font size="-1">
Copyright (c) 2005, 2007 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
Copyright (c) 2009, 2010, The OpenDKIM Project.  All rights reserved.

<br>
By using this file, you agree to the terms and conditions set
forth in the respective licenses.
</font>
</body>
</html>