netpgp: import netbsd patch and disable tests
This commit is contained in:
parent
73a75891e1
commit
ddd2cc8c1b
|
@ -0,0 +1,21 @@
|
|||
$NetBSD: patch-src_lib_keyring.c,v 1.1 2017/02/20 01:09:11 khorben Exp $
|
||||
|
||||
Do not crash when listing keys without a keyring
|
||||
|
||||
--- src/lib/keyring.c.orig 2017-02-20 01:03:25.000000000 +0000
|
||||
+++ src/lib/keyring.c
|
||||
@@ -993,9 +993,12 @@ pgp_keyring_list(pgp_io_t *io, const pgp
|
||||
{
|
||||
pgp_key_t *key;
|
||||
unsigned n;
|
||||
+ unsigned keyc = (keyring != NULL) ? keyring->keyc : 0;
|
||||
|
||||
- (void) fprintf(io->res, "%u key%s\n", keyring->keyc,
|
||||
- (keyring->keyc == 1) ? "" : "s");
|
||||
+ (void) fprintf(io->res, "%u key%s\n", keyc, (keyc == 1) ? "" : "s");
|
||||
+ if (keyring == NULL) {
|
||||
+ return 1;
|
||||
+ }
|
||||
for (n = 0, key = keyring->keys; n < keyring->keyc; ++n, ++key) {
|
||||
if (pgp_is_key_secret(key)) {
|
||||
pgp_print_keydata(io, keyring, key, "sec",
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'netpgp'
|
||||
pkgname=netpgp
|
||||
version=20140220
|
||||
revision=10
|
||||
revision=11
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="automake libtool pkg-config"
|
||||
makedepends="zlib-devel bzip2-devel libressl-devel"
|
||||
|
@ -17,6 +17,11 @@ CFLAGS="-Wno-error=cpp"
|
|||
pre_configure() {
|
||||
autoreconf -fi
|
||||
}
|
||||
do_check() {
|
||||
# depends on the netpgpverify package which depends on libnetpgp
|
||||
# from this package
|
||||
:
|
||||
}
|
||||
post_install() {
|
||||
vlicense Licence LICENSE
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue