1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GMimeMultipartSigned</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GMime 2.6 Reference Manual">
8 <link rel="up" href="MimeParts.html" title="MIME Messages and Parts">
9 <link rel="prev" href="GMimeMultipartEncrypted.html" title="GMimeMultipartEncrypted">
10 <link rel="next" href="GMimeMessagePart.html" title="GMimeMessagePart">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="GMimeMultipartEncrypted.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="MimeParts.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GMime 2.6 Reference Manual</th>
21 <td><a accesskey="n" href="GMimeMessagePart.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GMimeMultipartSigned.synopsis" class="shortcut">Top</a>
26 <a href="#GMimeMultipartSigned.description" class="shortcut">Description</a>
28 <a href="#GMimeMultipartSigned.object-hierarchy" class="shortcut">Object Hierarchy</a>
31 <div class="refentry">
32 <a name="GMimeMultipartSigned"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
35 <h2><span class="refentrytitle"><a name="GMimeMultipartSigned.top_of_page"></a>GMimeMultipartSigned</span></h2>
36 <p>GMimeMultipartSigned — Signed MIME multiparts</p>
38 <td valign="top" align="right"></td>
40 <div class="refsynopsisdiv">
41 <a name="GMimeMultipartSigned.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">struct <a class="link" href="GMimeMultipartSigned.html#GMimeMultipartSigned-struct" title="struct GMimeMultipartSigned">GMimeMultipartSigned</a>;
43 <a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="returnvalue">GMimeMultipartSigned</span></a> * <a class="link" href="GMimeMultipartSigned.html#g-mime-multipart-signed-new" title="g_mime_multipart_signed_new ()">g_mime_multipart_signed_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
44 <span class="returnvalue">int</span> <a class="link" href="GMimeMultipartSigned.html#g-mime-multipart-signed-sign" title="g_mime_multipart_signed_sign ()">g_mime_multipart_signed_sign</a> (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
45 <em class="parameter"><code><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> *content</code></em>,
46 <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
47 <em class="parameter"><code>const <span class="type">char</span> *userid</code></em>,
48 <em class="parameter"><code><a class="link" href="GMimeCertificate.html#GMimeDigestAlgo" title="enum GMimeDigestAlgo"><span class="type">GMimeDigestAlgo</span></a> digest</code></em>,
49 <em class="parameter"><code><span class="type">GError</span> **err</code></em>);
50 <a class="link" href="GMimeSignature.html#GMimeSignatureList"><span class="returnvalue">GMimeSignatureList</span></a> * <a class="link" href="GMimeMultipartSigned.html#g-mime-multipart-signed-verify" title="g_mime_multipart_signed_verify ()">g_mime_multipart_signed_verify</a> (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
51 <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
52 <em class="parameter"><code><span class="type">GError</span> **err</code></em>);
55 <div class="refsect1">
56 <a name="GMimeMultipartSigned.object-hierarchy"></a><h2>Object Hierarchy</h2>
57 <pre class="synopsis">
59 +----<a class="link" href="GMimeObject.html" title="GMimeObject">GMimeObject</a>
60 +----<a class="link" href="GMimeMultipart.html" title="GMimeMultipart">GMimeMultipart</a>
61 +----GMimeMultipartSigned
64 <div class="refsect1">
65 <a name="GMimeMultipartSigned.description"></a><h2>Description</h2>
67 A <a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> part is a special subclass of
68 <a class="link" href="GMimeMultipart.html" title="GMimeMultipart"><span class="type">GMimeMultipart</span></a> to make it easier to manipulate the
69 multipart/signed MIME type.
72 <div class="refsect1">
73 <a name="GMimeMultipartSigned.details"></a><h2>Details</h2>
74 <div class="refsect2">
75 <a name="GMimeMultipartSigned-struct"></a><h3>struct GMimeMultipartSigned</h3>
76 <pre class="programlisting">struct GMimeMultipartSigned;</pre>
78 A multipart/signed MIME part.
80 <div class="variablelist"><table border="0">
81 <col align="left" valign="top">
86 <div class="refsect2">
87 <a name="g-mime-multipart-signed-new"></a><h3>g_mime_multipart_signed_new ()</h3>
88 <pre class="programlisting"><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="returnvalue">GMimeMultipartSigned</span></a> * g_mime_multipart_signed_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
90 Creates a new MIME multipart/signed object.
92 <div class="variablelist"><table border="0">
93 <col align="left" valign="top">
95 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
96 <td>an empty MIME multipart/signed object.</td>
101 <div class="refsect2">
102 <a name="g-mime-multipart-signed-sign"></a><h3>g_mime_multipart_signed_sign ()</h3>
103 <pre class="programlisting"><span class="returnvalue">int</span> g_mime_multipart_signed_sign (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
104 <em class="parameter"><code><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> *content</code></em>,
105 <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
106 <em class="parameter"><code>const <span class="type">char</span> *userid</code></em>,
107 <em class="parameter"><code><a class="link" href="GMimeCertificate.html#GMimeDigestAlgo" title="enum GMimeDigestAlgo"><span class="type">GMimeDigestAlgo</span></a> digest</code></em>,
108 <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
110 Attempts to sign the <em class="parameter"><code>content</code></em> MIME part with <em class="parameter"><code>userid</code></em>'s private key
111 using the <em class="parameter"><code>ctx</code></em> signing context with the <em class="parameter"><code>digest</code></em> algorithm. If
112 successful, the signed <a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> is set as the signed part of
113 the multipart/signed object <em class="parameter"><code>mps</code></em>.
115 <div class="variablelist"><table border="0">
116 <col align="left" valign="top">
119 <td><p><span class="term"><em class="parameter"><code>mps</code></em> :</span></p></td>
120 <td>multipart/signed object</td>
123 <td><p><span class="term"><em class="parameter"><code>content</code></em> :</span></p></td>
124 <td>MIME part to sign</td>
127 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
128 <td>encryption crypto context</td>
131 <td><p><span class="term"><em class="parameter"><code>userid</code></em> :</span></p></td>
132 <td>user id to sign with</td>
135 <td><p><span class="term"><em class="parameter"><code>digest</code></em> :</span></p></td>
136 <td>preferred digest algorithm</td>
139 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
143 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
145 <code class="literal">0</code> on success or <code class="literal">-1</code> on fail. If the signing fails, an
146 exception will be set on <em class="parameter"><code>err</code></em> to provide information as to why the
147 failure occured.</td>
153 <div class="refsect2">
154 <a name="g-mime-multipart-signed-verify"></a><h3>g_mime_multipart_signed_verify ()</h3>
155 <pre class="programlisting"><a class="link" href="GMimeSignature.html#GMimeSignatureList"><span class="returnvalue">GMimeSignatureList</span></a> * g_mime_multipart_signed_verify (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
156 <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
157 <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
159 Attempts to verify the signed MIME part contained within the
160 multipart/signed object <em class="parameter"><code>mps</code></em> using the <em class="parameter"><code>ctx</code></em> crypto context.
162 <div class="variablelist"><table border="0">
163 <col align="left" valign="top">
166 <td><p><span class="term"><em class="parameter"><code>mps</code></em> :</span></p></td>
167 <td>multipart/signed object</td>
170 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
171 <td>encryption crypto context</td>
174 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
178 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
179 <td>a new <a class="link" href="GMimeSignature.html#GMimeSignatureList"><span class="type">GMimeSignatureList</span></a> object on success or <code class="literal">NULL</code> on fail. If
180 the verification fails, an exception will be set on <em class="parameter"><code>err</code></em> to provide
181 information as to why the failure occured.</td>
187 <div class="refsect1">
188 <a name="GMimeMultipartSigned.see-also"></a><h2>See Also</h2>
189 <a class="link" href="GMimeMultipart.html" title="GMimeMultipart"><span class="type">GMimeMultipart</span></a>
194 Generated by GTK-Doc V1.18</div>