pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/pkg_install/files/lib
Module Name: pkgsrc
Committed By: agc
Date: Wed Jul 6 21:00:04 UTC 2016
Modified Files:
pkgsrc/pkgtools/pkg_install/files/lib: gpgsig.c
Log Message:
catch up with the new opaque pgpv_t and pgpv_cursor_t structures in libnetpgpverify.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/pkgtools/pkg_install/files/lib/gpgsig.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/pkg_install/files/lib/gpgsig.c
diff -u pkgsrc/pkgtools/pkg_install/files/lib/gpgsig.c:1.4 pkgsrc/pkgtools/pkg_install/files/lib/gpgsig.c:1.5
--- pkgsrc/pkgtools/pkg_install/files/lib/gpgsig.c:1.4 Tue Sep 1 12:14:06 2015
+++ pkgsrc/pkgtools/pkg_install/files/lib/gpgsig.c Wed Jul 6 21:00:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: gpgsig.c,v 1.4 2015/09/01 12:14:06 jperkin Exp $ */
+/* $NetBSD: gpgsig.c,v 1.5 2016/07/06 21:00:04 agc Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: gpgsig.c,v 1.4 2015/09/01 12:14:06 jperkin Exp $");
+__RCSID("$NetBSD: gpgsig.c,v 1.5 2016/07/06 21:00:04 agc Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -57,8 +57,8 @@ int
gpg_verify(const char *content, size_t len, const char *keyring,
const char *sig, size_t sig_len)
{
- pgpv_t pgp;
- pgpv_cursor_t cursor;
+ pgpv_t *pgp;
+ pgpv_cursor_t *cursor;
static const char hdr1[] = "-----BEGIN PGP SIGNED MESSAGE-----\n";
static const char hdr2[] = "Hash: SHA512\n\n";
ssize_t buflen;
@@ -76,17 +76,17 @@ gpg_verify(const char *content, size_t l
buflen = len;
}
- memset(&pgp, 0, sizeof(pgp));
- memset(&cursor, 0, sizeof(cursor));
+ pgp = pgpv_new();
+ cursor = pgpv_new_cursor();
- if (!pgpv_read_pubring(&pgp, keyring, -1))
+ if (!pgpv_read_pubring(pgp, keyring, -1))
err(EXIT_FAILURE, "cannot read keyring");
- if (!pgpv_verify(&cursor, &pgp, buf, buflen))
+ if (!pgpv_verify(cursor, pgp, buf, buflen))
errx(EXIT_FAILURE, "unable to verify signature: %s",
- cursor.why);
+ pgpv_get_cursor_str(cursor, "why"));
- pgpv_close(&pgp);
+ pgpv_close(pgp);
if (sig_len)
free(buf);
Home |
Main Index |
Thread Index |
Old Index