diff options
Diffstat (limited to 'src/gpg.c')
-rw-r--r-- | src/gpg.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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) |