summaryrefslogtreecommitdiffabout
path: root/src/gpg.c
authorSergey Poznyakoff <gray@gnu.org.ua>2007-08-22 19:09:04 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-08-22 19:09:04 (GMT)
commitc7e791e9563b7805fc7a375bc7e616b4252a9c57 (patch) (side-by-side diff)
tree7e34ebcd4326df7f562f73175762a322c4ce2d5e /src/gpg.c
parent180ca1d87d2bf69d9dbb0acb76422e9ae15f930c (diff)
downloadwydawca-c7e791e9563b7805fc7a375bc7e616b4252a9c57.tar.gz
wydawca-c7e791e9563b7805fc7a375bc7e616b4252a9c57.tar.bz2
Update
git-svn-id: file:///svnroot/wydawca/trunk@285 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
Diffstat (limited to 'src/gpg.c') (more/less context) (ignore whitespace changes)
-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.