Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Signature management: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-GPG-signature-verification-results.html" title="GPG signature verification results">
<link rel="next" href="ostree-ostree-bootconfig-parser.html" title="ostree-bootconfig-parser">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#ostree-Signature-management.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ostree-GPG-signature-verification-results.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ostree-ostree-bootconfig-parser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ostree-Signature-management"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ostree-Signature-management.top_of_page"></a>Signature management</span></h2>
<p>Signature management — Sign and verify commits</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ostree-Signature-management.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">GPtrArray</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-get-all" title="ostree_sign_get_all ()">ostree_sign_get_all</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-commit" title="ostree_sign_commit ()">ostree_sign_commit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-commit-verify" title="ostree_sign_commit_verify ()">ostree_sign_commit_verify</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-data" title="ostree_sign_data ()">ostree_sign_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-data-verify" title="ostree_sign_data_verify ()">ostree_sign_data_verify</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="returnvalue">OstreeSign</span></a> *
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-get-by-name" title="ostree_sign_get_by_name ()">ostree_sign_get_by_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-get-name" title="ostree_sign_get_name ()">ostree_sign_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-add-pk" title="ostree_sign_add_pk ()">ostree_sign_add_pk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-clear-keys" title="ostree_sign_clear_keys ()">ostree_sign_clear_keys</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-load-pk" title="ostree_sign_load_pk ()">ostree_sign_load_pk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-metadata-format" title="ostree_sign_metadata_format ()">ostree_sign_metadata_format</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-metadata-key" title="ostree_sign_metadata_key ()">ostree_sign_metadata_key</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-set-pk" title="ostree_sign_set_pk ()">ostree_sign_set_pk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-set-sk" title="ostree_sign_set_sk ()">ostree_sign_set_sk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-Signature-management.html#ostree-sign-summary" title="ostree_sign_summary ()">ostree_sign_summary</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ostree-Signature-management.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign">OstreeSign</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ostree-Signature-management.description"></a><h2>Description</h2>
<p>An <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> interface allows to select and use any available engine
for signing or verifying the commit object or summary file.</p>
</div>
<div class="refsect1">
<a name="ostree-Signature-management.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ostree-sign-get-all"></a><h3>ostree_sign_get_all ()</h3>
<pre class="programlisting"><span class="returnvalue">GPtrArray</span> *
ostree_sign_get_all (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Return an array with newly allocated instances of all available
signing engines; they will not be initialized.</p>
<div class="refsect3">
<a name="ostree-sign-get-all.returns"></a><h4>Returns</h4>
<p>an array of signing engines. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> OstreeSign]</span></p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-commit"></a><h3>ostree_sign_commit ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_commit (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                    <em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
                    <em class="parameter"><code>const <span class="type">gchar</span> *commit_checksum</code></em>,
                    <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                    <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Add a signature to a commit.</p>
<p>Depending of the signing engine used you will need to load
the secret key with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-sk" title="ostree_sign_set_sk ()"><span class="type">ostree_sign_set_sk</span></a>.</p>
<div class="refsect3">
<a name="ostree-sign-commit.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>repo</p></td>
<td class="parameter_description"><p>an <span class="type">OsreeRepo</span> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>commit_checksum</p></td>
<td class="parameter_description"><p>SHA256 of given commit to sign</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-commit.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
if commit has been signed successfully,
<em class="parameter"><code>FALSE</code></em>
in case of error (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-commit-verify"></a><h3>ostree_sign_commit_verify ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_commit_verify (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                           <em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *commit_checksum</code></em>,
                           <em class="parameter"><code><span class="type">char</span> **out_success_message</code></em>,
                           <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                           <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Verify if commit is signed with known key.</p>
<p>Depending of the signing engine used you will need to load
the public key(s) for verification with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-pk" title="ostree_sign_set_pk ()"><span class="type">ostree_sign_set_pk</span></a>,
<a class="link" href="ostree-Signature-management.html#ostree-sign-add-pk" title="ostree_sign_add_pk ()"><span class="type">ostree_sign_add_pk</span></a> and/or <a class="link" href="ostree-Signature-management.html#ostree-sign-load-pk" title="ostree_sign_load_pk ()"><span class="type">ostree_sign_load_pk</span></a>.</p>
<div class="refsect3">
<a name="ostree-sign-commit-verify.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>repo</p></td>
<td class="parameter_description"><p>an <span class="type">OsreeRepo</span> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>commit_checksum</p></td>
<td class="parameter_description"><p>SHA256 of given commit to verify</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_success_message</p></td>
<td class="parameter_description"><p>success message returned by the signing engine. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-commit-verify.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
if commit has been verified successfully,
<em class="parameter"><code>FALSE</code></em>
in case of error or no valid keys are available (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-data"></a><h3>ostree_sign_data ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_data (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                  <em class="parameter"><code><span class="type">GBytes</span> *data</code></em>,
                  <em class="parameter"><code><span class="type">GBytes</span> **signature</code></em>,
                  <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                  <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Sign the given <em class="parameter"><code>data</code></em>
 with pre-loaded secret key.</p>
<p>Depending of the signing engine used you will need to load
the secret key with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-sk" title="ostree_sign_set_sk ()"><span class="type">ostree_sign_set_sk</span></a>.</p>
<div class="refsect3">
<a name="ostree-sign-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>the raw data to be signed with pre-loaded secret key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signature</p></td>
<td class="parameter_description"><p>in case of success will contain signature. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-data.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
if <em class="parameter"><code>data</code></em>
has been signed successfully,
<em class="parameter"><code>FALSE</code></em>
in case of error (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-data-verify"></a><h3>ostree_sign_data_verify ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_data_verify (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                         <em class="parameter"><code><span class="type">GBytes</span> *data</code></em>,
                         <em class="parameter"><code><span class="type">GVariant</span> *signatures</code></em>,
                         <em class="parameter"><code><span class="type">char</span> **out_success_message</code></em>,
                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Verify given data against signatures with pre-loaded public keys.</p>
<p>Depending of the signing engine used you will need to load
the public key(s) with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-pk" title="ostree_sign_set_pk ()"><span class="type">ostree_sign_set_pk</span></a>, <a class="link" href="ostree-Signature-management.html#ostree-sign-add-pk" title="ostree_sign_add_pk ()"><span class="type">ostree_sign_add_pk</span></a>
or <a class="link" href="ostree-Signature-management.html#ostree-sign-load-pk" title="ostree_sign_load_pk ()"><span class="type">ostree_sign_load_pk</span></a>.</p>
<div class="refsect3">
<a name="ostree-sign-data-verify.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>the raw data to check</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signatures</p></td>
<td class="parameter_description"><p>the signatures to be checked</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_success_message</p></td>
<td class="parameter_description"><p>success message returned by the signing engine. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-data-verify.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
if <em class="parameter"><code>data</code></em>
has been signed at least with any single valid key,
<em class="parameter"><code>FALSE</code></em>
in case of error or no valid keys are available (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-get-by-name"></a><h3>ostree_sign_get_by_name ()</h3>
<pre class="programlisting"><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="returnvalue">OstreeSign</span></a> *
ostree_sign_get_by_name (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Create a new instance of a signing engine.</p>
<div class="refsect3">
<a name="ostree-sign-get-by-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>the name of desired signature engine</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-get-by-name.returns"></a><h4>Returns</h4>
<p>New signing engine, or <code class="literal">NULL</code> if the engine is not known. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-get-name"></a><h3>ostree_sign_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
ostree_sign_get_name (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>);</pre>
<p>Return the pointer to the name of currently used/selected signing engine.</p>
<div class="refsect3">
<a name="ostree-sign-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-get-name.returns"></a><h4>Returns</h4>
<p>pointer to the name
<em class="parameter"><code>NULL</code></em>
in case of error (unlikely). </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-add-pk"></a><h3>ostree_sign_add_pk ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_add_pk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                    <em class="parameter"><code><span class="type">GVariant</span> *public_key</code></em>,
                    <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Add the public key for verification. Could be called multiple times for
adding all needed keys to be used for verification.</p>
<p>The <em class="parameter"><code>public_key</code></em>
 argument depends of the particular engine implementation.</p>
<div class="refsect3">
<a name="ostree-sign-add-pk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>public_key</p></td>
<td class="parameter_description"><p>single public key to be added</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-add-pk.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
in case if the key could be added successfully,
<em class="parameter"><code>FALSE</code></em>
in case of error (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-clear-keys"></a><h3>ostree_sign_clear_keys ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_clear_keys (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                        <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Clear all previously preloaded secret and public keys.</p>
<div class="refsect3">
<a name="ostree-sign-clear-keys.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-clear-keys.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
in case if no errors, <em class="parameter"><code>FALSE</code></em>
in case of error</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-load-pk"></a><h3>ostree_sign_load_pk ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_load_pk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                     <em class="parameter"><code><span class="type">GVariant</span> *options</code></em>,
                     <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Load public keys for verification from anywhere.
It is expected that all keys would be added to already pre-loaded keys.</p>
<p>The <em class="parameter"><code>options</code></em>
 argument depends of the particular engine implementation.</p>
<p>For example, <em class="parameter"><code>ed25515</code></em>
 engine could use following string-formatted options:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><em class="parameter"><code>filename</code></em>
 -- single file to use to load keys from</p></li>
<li class="listitem"><p><em class="parameter"><code>basedir</code></em>
 -- directory containing subdirectories
'trusted.ed25519.d' and 'revoked.ed25519.d' with appropriate
public keys. Used for testing and re-definition of system-wide
directories if defaults are not suitable for any reason.</p></li>
</ul></div>
<div class="refsect3">
<a name="ostree-sign-load-pk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>options</p></td>
<td class="parameter_description"><p>any options</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-load-pk.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
in case if at least one key could be load successfully,
<em class="parameter"><code>FALSE</code></em>
in case of error (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-metadata-format"></a><h3>ostree_sign_metadata_format ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
ostree_sign_metadata_format (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>);</pre>
<p>Return the pointer to the string with format used in (detached) metadata for
current signing engine.</p>
<div class="refsect3">
<a name="ostree-sign-metadata-format.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-metadata-format.returns"></a><h4>Returns</h4>
<p>pointer to the metadata format,
<em class="parameter"><code>NULL</code></em>
in case of error (unlikely). </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-metadata-key"></a><h3>ostree_sign_metadata_key ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
ostree_sign_metadata_key (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>);</pre>
<p>Return the pointer to the name of the key used in (detached) metadata for
current signing engine.</p>
<div class="refsect3">
<a name="ostree-sign-metadata-key.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-metadata-key.returns"></a><h4>Returns</h4>
<p>pointer to the metadata key name,
<em class="parameter"><code>NULL</code></em>
in case of error (unlikely). </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-set-pk"></a><h3>ostree_sign_set_pk ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_set_pk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                    <em class="parameter"><code><span class="type">GVariant</span> *public_key</code></em>,
                    <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Set the public key for verification. It is expected what all
previously pre-loaded public keys will be dropped.</p>
<p>The <em class="parameter"><code>public_key</code></em>
 argument depends of the particular engine implementation.</p>
<div class="refsect3">
<a name="ostree-sign-set-pk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>public_key</p></td>
<td class="parameter_description"><p>single public key to be added</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-set-pk.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
in case if the key could be set successfully,
<em class="parameter"><code>FALSE</code></em>
in case of error (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-set-sk"></a><h3>ostree_sign_set_sk ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_set_sk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                    <em class="parameter"><code><span class="type">GVariant</span> *secret_key</code></em>,
                    <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Set the secret key to be used for signing data, commits and summary.</p>
<p>The <em class="parameter"><code>secret_key</code></em>
 argument depends of the particular engine implementation.</p>
<div class="refsect3">
<a name="ostree-sign-set-sk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>secret_key</p></td>
<td class="parameter_description"><p>secret key to be added</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-set-sk.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
in case if the key could be set successfully,
<em class="parameter"><code>FALSE</code></em>
in case of error (<em class="parameter"><code>error</code></em>
will contain the reason).</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-sign-summary"></a><h3>ostree_sign_summary ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_sign_summary (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
                     <em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
                     <em class="parameter"><code><span class="type">GVariant</span> *keys</code></em>,
                     <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
                     <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Add a signature to a summary file.
Based on ostree_repo_add_gpg_signature_summary implementation.</p>
<div class="refsect3">
<a name="ostree-sign-summary.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>Self</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>repo</p></td>
<td class="parameter_description"><p>ostree repository</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keys</p></td>
<td class="parameter_description"><p>keys -- GVariant containing keys as GVarints specific to signature type.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-sign-summary.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
if summary file has been signed with all provided keys</p>
</div>
<p class="since">Since: 2020.2</p>
</div>
</div>
<div class="refsect1">
<a name="ostree-Signature-management.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="OstreeSign"></a><h3>OstreeSign</h3>
<pre class="programlisting">typedef struct _OstreeSign OstreeSign;</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>