Sophie

Sophie

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

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

<html>
<head><title>dkim_get_sigsubstring()</title></head>
<body>
<!--
$Id: dkim_get_sigsubstring.html,v 1.3 2010/07/24 04:52:15 cm-msk Exp $
-->
<h1>dkim_get_sigsubstring()</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_get_sigsubstring(
	<a href="dkim.html"><tt>DKIM</tt></a> *dkim,
	<a href="dkim_siginfo.html"><tt>DKIM_SIGINFO</tt></a> *sig,
        char *buf,
        size_t *buflen
);
</pre>
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.
</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
    verifying handle, i.e. one returned by an earlier call to
    <a href="dkim_verify.html"><tt>dkim_verify()</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>sig</td>
	<td>Signature-specific handle, retrieved by a prior call to
            <a href="dkim_getsiglist.html"><tt>dkim_getsiglist()</tt></a>.
	</td></tr>
    <tr valign="top"><td>buf</td>
	<td>Pointer to a buffer that should receive a minimal unique
	    substring of the digital signature portion of <tt>sig</tt>.
	</td></tr>
    <tr valign="top"><td>buflen</td>
	<td>The address of an integer that should contain the number of
	    bytes available at <tt>buf</tt> and will be updated to contain
	    the number of bytes needed to produce a minimal substring.
	</td></tr>
    </table>
</td></tr>

<!----------- Notes ---------->
<tr>
<th valign="top" align=left>NOTES</th> 
<td>
<ul>
<li>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.
<li>If the size of <tt>buf</tt> is too small to contain the minimal substring
    of <tt>sig</tt>, <tt>DKIM_STAT_NORESOURCE</tt> is returned, <tt>buflen</tt>
    will be updated to indicate the minimal number of bytes required,
    and <tt>buf</tt> will be unchanged.
<li>The string written to <tt>buf</tt> will be NULL-terminated unless the
    provided buffer is exactly the right size to contain the output.
</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) 2010, 2011, 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>