aboutsummaryrefslogtreecommitdiff
path: root/src/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpg.c')
-rw-r--r--src/gpg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpg.c b/src/gpg.c
index ea011ff..8e67e63 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -14,6 +14,8 @@
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* GPG interface functions */
+
#include "wydawca.h"
#include "save-cwd.h"
#include <gpgme.h>
@@ -34,6 +36,8 @@ static char *homedir;
static int rmdir_r (const char *name);
+/* Auxiliary function: change to directory NAME and recursively remove
+ everything under it. */
static int
recursive_rmdir (const char *name)
{
@@ -80,6 +84,8 @@ recursive_rmdir (const char *name)
return rc;
}
+/* Recursively remove the contents of the directory NAME and the directory
+ itself. Do not change CWD. */
static int
rmdir_r (const char *name)
{
@@ -110,6 +116,7 @@ rmdir_r (const char *name)
return rc;
}
+/* Remove temporary GPG home directory */
static void
remove_homedir ()
{
@@ -119,6 +126,7 @@ remove_homedir ()
logmsg (LOG_CRIT, "Failed to remove GPG directory %s", homedir);
}
+/* Create a temporary GPG home directory */
int
wydawca_gpg_homedir ()
{
@@ -139,6 +147,7 @@ wydawca_gpg_homedir ()
return 0;
}
+/* Verify the directive file from TRP using public key PUBKEY */
/* FIXME: dpair currently unused */
int
verify_directive_signature (struct file_triplet *trp,
@@ -185,6 +194,9 @@ verify_directive_signature (struct file_triplet *trp,
return rc;
}
+/* Verify the detached signature of TRP.
+ NOTE: It is assumed that the public key is already registered (by
+ a previous call to verify_directive_signature). */
int
verify_detached_signature (struct file_triplet *trp,
struct directory_pair *dpair)

Return to:

Send suggestions and report system problems to the System administrator.