Module Name:    src
Committed By:   christos
Date:           Mon Feb  5 23:56:01 UTC 2018

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: openssl_crypto.c
            signature.c
        src/crypto/external/bsd/netpgp/dist/src/netpgp: Makefile

Log Message:
centralize the conversion functions and make this work with both
openssl-1.0 and 1.1


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 \
    src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c
cvs rdiff -u -r1.37 -r1.38 \
    src/crypto/external/bsd/netpgp/dist/src/lib/signature.c
cvs rdiff -u -r1.19 -r1.20 \
    src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c:1.33 src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c:1.34
--- src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c:1.33	Sun Nov  7 03:39:59 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c	Mon Feb  5 18:56:01 2018
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: openssl_crypto.c,v 1.33 2010/11/07 08:39:59 agc Exp $");
+__RCSID("$NetBSD: openssl_crypto.c,v 1.34 2018/02/05 23:56:01 christos Exp $");
 #endif
 
 #ifdef HAVE_OPENSSL_DSA_H
@@ -89,18 +89,144 @@ __RCSID("$NetBSD: openssl_crypto.c,v 1.3
 #include "netpgpdigest.h"
 #include "packet.h"
 
+static void
+takeRSA(const RSA *orsa, pgp_rsa_pubkey_t *pk, pgp_rsa_seckey_t *sk)
+{
+	const BIGNUM *n, *e, *d, *q, *p;
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+	RSA_get0_key(orsa, &n, &e, &d);
+	RSA_get0_factors(orsa, &q, &p);
+#else
+	n = orsa->n;
+	e = orsa->e;
+	d = orsa->d;
+	p = orsa->p;
+	q = orsa->q;
+#endif
+	if (sk) {
+		sk->d = BN_dup(d);
+		sk->p = BN_dup(p);
+		sk->q = BN_dup(q);
+	}
+	if (pk) {
+		pk->n = BN_dup(n);
+		pk->e = BN_dup(e);
+	}
+}
 
-static void 
-test_seckey(const pgp_seckey_t *seckey)
+static RSA *
+makeRSA(const pgp_rsa_pubkey_t *pubkey, const pgp_rsa_seckey_t *seckey)
+{
+	BIGNUM	*n, *e, *d, *p, *q;
+	RSA *orsa;
+
+	orsa = RSA_new();
+	n = BN_dup(pubkey->n);
+	e = BN_dup(pubkey->e);
+
+	if (seckey) {
+		d = BN_dup(seckey->d);
+		p = BN_dup(seckey->p);
+		q = BN_dup(seckey->q);
+	} else {
+		d = p = q = NULL;
+	}
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+	RSA_set0_key(orsa, n, e, d);
+	RSA_set0_factors(orsa, p, q);
+#else
+	BN_free(orsa->n);
+	BN_free(orsa->e);
+	orsa->n = n;
+	orsa->e = e;
+	if (d) {
+		BN_free(orsa->d);
+		orsa->d = d;
+	}
+	if (p) {
+		BN_free(orsa->p);
+		orsa->p = p;
+	}
+	if (q) {
+		BN_free(orsa->q);
+		orsa->q = q;
+	}
+#endif
+	return orsa;
+}
+
+static DSA_SIG *
+makeDSA_SIG(const pgp_dsa_sig_t *sig)
+{
+	DSA_SIG        *osig;
+	BIGNUM	       *r, *s;
+
+	osig = DSA_SIG_new();
+	r = BN_dup(sig->r);
+	s = BN_dup(sig->s);
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+	DSA_SIG_set0(osig, r, s);
+#else
+	BN_free(osig->r);
+	BN_free(osig->s);
+	osig->r = r;
+	osig->s = s;
+#endif
+
+	return osig;
+}
+
+static DSA *
+makeDSA(const pgp_dsa_pubkey_t *dsa, const pgp_dsa_seckey_t *secdsa)
 {
-	RSA            *test = RSA_new();
+	DSA            *odsa;
+	BIGNUM	       *p, *q, *g, *y, *x;
 
-	test->n = BN_dup(seckey->pubkey.key.rsa.n);
-	test->e = BN_dup(seckey->pubkey.key.rsa.e);
+	odsa = DSA_new();
 
-	test->d = BN_dup(seckey->key.rsa.d);
-	test->p = BN_dup(seckey->key.rsa.p);
-	test->q = BN_dup(seckey->key.rsa.q);
+	p = BN_dup(dsa->p);
+	q = BN_dup(dsa->q);
+	g = BN_dup(dsa->g);
+	y = BN_dup(dsa->y);
+	x = secdsa ? secdsa->x : NULL;
+
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+	DSA_set0_key(odsa, y, x);
+#else
+	BN_free(odsa->p);
+	BN_free(odsa->q);
+	BN_free(odsa->g);
+	BN_free(odsa->pub_key);
+	odsa->p = p;
+	odsa->q = q;
+	odsa->g = g;
+	odsa->pub_key = y;
+	if (x) {
+		BN_free(odsa->priv_key);
+		odsa->priv_key = x;
+	}
+#endif
+	return odsa;
+}
+
+static void
+takeDSA(const DSA *odsa, pgp_dsa_seckey_t *sk)
+{
+	const BIGNUM *x;
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+	DSA_get0_key(odsa, NULL, &x);
+#else
+	x = odsa->priv_key;
+#endif
+	sk->x = BN_dup(x);
+}
+
+static void 
+test_seckey(const pgp_seckey_t *seckey)
+{
+	RSA *test = makeRSA(&seckey->pubkey.key.rsa, &seckey->key.rsa);
 
 	if (RSA_check_key(test) != 1) {
 		(void) fprintf(stderr,
@@ -435,25 +561,15 @@ pgp_dsa_verify(const uint8_t *hash, size
 	       const pgp_dsa_pubkey_t *dsa)
 {
 	unsigned	qlen;
-	DSA_SIG        *osig;
-	DSA            *odsa;
+	DSA_SIG        *osig = makeDSA_SIG(sig);
+	DSA	       *odsa = makeDSA(dsa, NULL);
 	int             ret;
 
-	osig = DSA_SIG_new();
-	osig->r = sig->r;
-	osig->s = sig->s;
-
-	odsa = DSA_new();
-	odsa->p = dsa->p;
-	odsa->q = dsa->q;
-	odsa->g = dsa->g;
-	odsa->pub_key = dsa->y;
-
 	if (pgp_get_debug_level(__FILE__)) {
 		hexdump(stderr, "input hash", hash, hash_length);
-		(void) fprintf(stderr, "Q=%d\n", BN_num_bytes(odsa->q));
+		(void) fprintf(stderr, "Q=%d\n", BN_num_bytes(dsa->q));
 	}
-	if ((qlen = (unsigned)BN_num_bytes(odsa->q)) < hash_length) {
+	if ((qlen = (unsigned)BN_num_bytes(dsa->q)) < hash_length) {
 		hash_length = qlen;
 	}
 	ret = DSA_do_verify(hash, (int)hash_length, osig, odsa);
@@ -465,10 +581,7 @@ pgp_dsa_verify(const uint8_t *hash, size
 		return 0;
 	}
 
-	odsa->p = odsa->q = odsa->g = odsa->pub_key = NULL;
 	DSA_free(odsa);
-
-	osig->r = osig->s = NULL;
 	DSA_SIG_free(osig);
 
 	return (unsigned)ret;
@@ -489,19 +602,14 @@ pgp_rsa_public_decrypt(uint8_t *out,
 			size_t length,
 			const pgp_rsa_pubkey_t *pubkey)
 {
-	RSA            *orsa;
-	int             n;
-
-	orsa = RSA_new();
-	orsa->n = pubkey->n;
-	orsa->e = pubkey->e;
+	RSA            *orsa = makeRSA(pubkey, NULL);
+	int             ret;
 
-	n = RSA_public_decrypt((int)length, in, out, orsa, RSA_NO_PADDING);
+	ret = RSA_public_decrypt((int)length, in, out, orsa, RSA_NO_PADDING);
 
-	orsa->n = orsa->e = NULL;
 	RSA_free(orsa);
 
-	return n;
+	return ret;
 }
 
 /**
@@ -521,21 +629,10 @@ pgp_rsa_private_encrypt(uint8_t *out,
 			const pgp_rsa_seckey_t *seckey,
 			const pgp_rsa_pubkey_t *pubkey)
 {
-	RSA            *orsa;
-	int             n;
+	RSA            *orsa = makeRSA(pubkey, seckey);
+	int             ret;
 
-	orsa = RSA_new();
-	orsa->n = BN_dup(pubkey->n);
-	orsa->d = seckey->d;
-	orsa->p = seckey->q;	/* p and q are round the other way in openssl */
-	orsa->q = seckey->p;
-
-	/* debug */
-	orsa->e = BN_dup(pubkey->e);
-	/* If this isn't set, it's very likely that the programmer hasn't */
-	/* decrypted the secret key. RSA_check_key segfaults in that case. */
-	/* Use pgp_decrypt_seckey() to do that. */
-	if (orsa->d == NULL) {
+	if (seckey->d == NULL) {
 		(void) fprintf(stderr, "orsa is not set\n");
 		return 0;
 	}
@@ -545,12 +642,11 @@ pgp_rsa_private_encrypt(uint8_t *out,
 	}
 	/* end debug */
 
-	n = RSA_private_encrypt((int)length, in, out, orsa, RSA_NO_PADDING);
+	ret = RSA_private_encrypt((int)length, in, out, orsa, RSA_NO_PADDING);
 
-	orsa->n = orsa->d = orsa->p = orsa->q = NULL;
 	RSA_free(orsa);
 
-	return n;
+	return ret;
 }
 
 /**
@@ -570,18 +666,10 @@ pgp_rsa_private_decrypt(uint8_t *out,
 			const pgp_rsa_seckey_t *seckey,
 			const pgp_rsa_pubkey_t *pubkey)
 {
-	RSA            *keypair;
+	RSA            *keypair = makeRSA(pubkey, seckey);
 	int             n;
 	char            errbuf[1024];
 
-	keypair = RSA_new();
-	keypair->n = pubkey->n;	/* XXX: do we need n? */
-	keypair->d = seckey->d;
-	keypair->p = seckey->q;
-	keypair->q = seckey->p;
-
-	/* debug */
-	keypair->e = pubkey->e;
 	if (RSA_check_key(keypair) != 1) {
 		(void) fprintf(stderr, "RSA_check_key is not set\n");
 		return 0;
@@ -601,7 +689,6 @@ pgp_rsa_private_decrypt(uint8_t *out,
 		ERR_error_string(err, &errbuf[0]);
 		(void) fprintf(stderr, "openssl error : %s\n", errbuf);
 	}
-	keypair->n = keypair->d = keypair->p = keypair->q = NULL;
 	RSA_free(keypair);
 
 	return n;
@@ -621,15 +708,11 @@ pgp_rsa_public_encrypt(uint8_t *out,
 			size_t length,
 			const pgp_rsa_pubkey_t *pubkey)
 {
-	RSA            *orsa;
+	RSA            *orsa = makeRSA(pubkey, NULL);
 	int             n;
 
 	/* printf("pgp_rsa_public_encrypt: length=%ld\n", length); */
 
-	orsa = RSA_new();
-	orsa->n = pubkey->n;
-	orsa->e = pubkey->e;
-
 	/* printf("len: %ld\n", length); */
 	/* pgp_print_bn("n: ", orsa->n); */
 	/* pgp_print_bn("e: ", orsa->e); */
@@ -641,7 +724,6 @@ pgp_rsa_public_encrypt(uint8_t *out,
 		fd_out = BIO_new_fd(fileno(stderr), BIO_NOCLOSE);
 		ERR_print_errors(fd_out);
 	}
-	orsa->n = orsa->e = NULL;
 	RSA_free(orsa);
 
 	return n;
@@ -657,7 +739,9 @@ void 
 pgp_crypto_finish(void)
 {
 	CRYPTO_cleanup_all_ex_data();
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
 	ERR_remove_state((unsigned long)0);
+#endif
 }
 
 /**
@@ -693,25 +777,33 @@ rsa_generate_keypair(pgp_key_t *keydata,
 	BN_CTX         *ctx;
 	pgp_output_t *output;
 	pgp_memory_t   *mem;
+	BIGNUM *bne;
+	pgp_rsa_pubkey_t *pk;
+	pgp_rsa_seckey_t *sk;
 
 	ctx = BN_CTX_new();
 	pgp_keydata_init(keydata, PGP_PTAG_CT_SECRET_KEY);
 	seckey = pgp_get_writable_seckey(keydata);
+	pk = &seckey->pubkey.key.rsa;
+	sk = &seckey->key.rsa;
 
 	/* generate the key pair */
 
-	rsa = RSA_generate_key(numbits, e, NULL, NULL);
+	bne = BN_new();
+	BN_set_word(bne, e);
+
+	rsa = RSA_new();
+	RSA_generate_key_ex(rsa, numbits, bne, NULL);
+	BN_free(bne);
 
 	/* populate pgp key from ssl key */
+	takeRSA(rsa, pk, sk);
 
 	seckey->pubkey.version = PGP_V4;
 	seckey->pubkey.birthtime = time(NULL);
 	seckey->pubkey.days_valid = 0;
 	seckey->pubkey.alg = PGP_PKA_RSA;
 
-	seckey->pubkey.key.rsa.n = BN_dup(rsa->n);
-	seckey->pubkey.key.rsa.e = BN_dup(rsa->e);
-
 	seckey->s2k_usage = PGP_S2KU_ENCRYPTED_AND_HASHED;
 	seckey->s2k_specifier = PGP_S2KS_SALTED;
 	/* seckey->s2k_specifier=PGP_S2KS_SIMPLE; */
@@ -722,11 +814,8 @@ rsa_generate_keypair(pgp_key_t *keydata,
 	seckey->octetc = 0;
 	seckey->checksum = 0;
 
-	seckey->key.rsa.d = BN_dup(rsa->d);
-	seckey->key.rsa.p = BN_dup(rsa->p);
-	seckey->key.rsa.q = BN_dup(rsa->q);
-	seckey->key.rsa.u = BN_mod_inverse(NULL, rsa->p, rsa->q, ctx);
-	if (seckey->key.rsa.u == NULL) {
+	sk->u = BN_mod_inverse(NULL, sk->p, sk->q, ctx);
+	if (sk->u == NULL) {
 		(void) fprintf(stderr, "seckey->key.rsa.u is NULL\n");
 		return 0;
 	}
@@ -818,18 +907,10 @@ pgp_dsa_sign(uint8_t *hashbuf,
 		const pgp_dsa_pubkey_t *pubdsa)
 {
 	DSA_SIG        *dsasig;
-	DSA            *odsa;
-
-	odsa = DSA_new();
-	odsa->p = pubdsa->p;
-	odsa->q = pubdsa->q;
-	odsa->g = pubdsa->g;
-	odsa->pub_key = pubdsa->y;
-	odsa->priv_key = secdsa->x;
+	DSA            *odsa = makeDSA(pubdsa, secdsa);
 
 	dsasig = DSA_do_sign(hashbuf, (int)hashsize, odsa);
 
-	odsa->p = odsa->q = odsa->g = odsa->pub_key = odsa->priv_key = NULL;
 	DSA_free(odsa);
 
 	return dsasig;
@@ -861,15 +942,12 @@ openssl_read_pem_seckey(const char *f, p
 				rsa = PEM_read_RSAPrivateKey(fp, NULL, NULL, pass);
 			} while (rsa == NULL);
 		}
-		key->key.seckey.key.rsa.d = rsa->d;
-		key->key.seckey.key.rsa.p = rsa->p;
-		key->key.seckey.key.rsa.q = rsa->q;
-		key->key.seckey.key.rsa.d = rsa->d;
+		takeRSA(rsa, NULL, &key->key.seckey.key.rsa);
 	} else if (strcmp(type, "ssh-dss") == 0) {
 		if ((dsa = PEM_read_DSAPrivateKey(fp, NULL, NULL, NULL)) == NULL) {
 			ok = 0;
 		} else {
-			key->key.seckey.key.dsa.x = dsa->priv_key;
+			takeDSA(dsa, &key->key.seckey.key.dsa);
 		}
 	} else {
 		ok = 0;

Index: src/crypto/external/bsd/netpgp/dist/src/lib/signature.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/signature.c:1.37 src/crypto/external/bsd/netpgp/dist/src/lib/signature.c:1.38
--- src/crypto/external/bsd/netpgp/dist/src/lib/signature.c:1.37	Sun Apr  9 19:03:50 2017
+++ src/crypto/external/bsd/netpgp/dist/src/lib/signature.c	Mon Feb  5 18:56:01 2018
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: signature.c,v 1.37 2017/04/09 23:03:50 khorben Exp $");
+__RCSID("$NetBSD: signature.c,v 1.38 2018/02/05 23:56:01 christos Exp $");
 #endif
 
 #include <sys/types.h>
@@ -232,6 +232,7 @@ dsa_sign(pgp_hash_t *hash,
 	unsigned        t;
 	uint8_t		hashbuf[NETPGP_BUFSIZ];
 	DSA_SIG        *dsasig;
+	const BIGNUM   *r, *s;
 
 	/* hashsize must be "equal in size to the number of bits of q,  */
 	/* the group generated by the DSA key's generator value */
@@ -252,8 +253,14 @@ dsa_sign(pgp_hash_t *hash,
 	dsasig = pgp_dsa_sign(hashbuf, hashsize, sdsa, dsa);
 
 	/* convert and write the sig out to memory */
-	pgp_write_mpi(output, dsasig->r);
-	pgp_write_mpi(output, dsasig->s);
+#if OPENSSL_VERSION_NUMBER >= 0x10100000
+	DSA_SIG_get0(dsasig, &r, &s);
+#else
+	r = dsasig->r;
+	s = dsasig->s;
+#endif
+	pgp_write_mpi(output, r);
+	pgp_write_mpi(output, s);
 	DSA_SIG_free(dsasig);
 	return 1;
 }

Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile:1.19 src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile:1.20
--- src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile:1.19	Thu Nov  4 03:01:53 2010
+++ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile	Mon Feb  5 18:56:01 2018
@@ -30,8 +30,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_triplet = i386-unknown-netbsdelf5.99.26
-host_triplet = i386-unknown-netbsdelf5.99.26
+build_triplet = x86_64-unknown-netbsd8.99
+host_triplet = x86_64-unknown-netbsd8.99
 bin_PROGRAMS = netpgp$(EXEEXT)
 subdir = src/netpgp
 DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
@@ -49,8 +49,8 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_netpgp_OBJECTS = netpgp-netpgp.$(OBJEXT)
 netpgp_OBJECTS = $(am_netpgp_OBJECTS)
-netpgp_DEPENDENCIES = ../lib/libnetpgp.la
-DEFAULT_INCLUDES = -I. -I$(top_builddir)/src/lib
+netpgp_DEPENDENCIES = ../lib/libnetpgp.la ../libmj/libmj.la
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/lib
 depcomp = $(SHELL) $(top_srcdir)/buildaux/depcomp
 am__depfiles_maybe = depfiles
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -66,101 +66,92 @@ SOURCES = $(netpgp_SOURCES)
 DIST_SOURCES = $(netpgp_SOURCES)
 man1dir = $(mandir)/man1
 NROFF = nroff
-MANS = $(dist_man_MANS) $(man1_MANS)
+MANS = $(dist_man_MANS)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /usr/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run aclocal-1.10
-AMTAR = ${SHELL} /usr/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run tar
+ACLOCAL = ${SHELL} /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run aclocal-1.10
+AMTAR = ${SHELL} /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run tar
 AR = ar
-AUTOCONF = ${SHELL} /usr/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run autoconf
-AUTOHEADER = ${SHELL} /usr/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run autoheader
-AUTOM4TE = ${SHELL} /usr/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run autom4te
-AUTOMAKE = ${SHELL} /usr/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run automake-1.10
+AUTOCONF = ${SHELL} /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run autoconf
+AUTOHEADER = ${SHELL} /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run autoheader
+AUTOM4TE = ${SHELL} /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run autom4te
+AUTOMAKE = ${SHELL} /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run automake-1.10
 AWK = gawk
-CANONICAL_HOST = i386-unknown-netbsdelf5.99.26
+CANONICAL_HOST = x86_64-unknown-netbsd8.99
 CC = gcc
 CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2 -I/usr/include
+CFLAGS = -g -O2
 CPP = gcc -E
-CPPFLAGS =  -I/usr/include
-CXX = g++
-CXXCPP = g++ -E
-CXXDEPMODE = depmode=gcc3
-CXXFLAGS = -g -O2
+CPPFLAGS = 
 CYGPATH_W = echo
 DEFS = -DHAVE_CONFIG_H
 DEPDIR = .deps
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO = /bin/echo
+DSYMUTIL = 
+DUMPBIN = 
 ECHO_C = 
 ECHO_N = -n
 ECHO_T = 
 EGREP = /usr/bin/grep -E
 EXEEXT = 
-F77 = 
-FFLAGS = 
-FGREP = @FGREP@
+FGREP = /usr/bin/grep -F
 GREP = /usr/bin/grep
 INSTALL = /usr/bin/install -c
 INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}
 INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-LD = @LD@
-LDFLAGS =  -L/usr/lib
+LD = /usr/bin/ld
+LDFLAGS = 
 LIBOBJS = 
-LIBS = -lcrypto -lbz2 -lz  -lssl -lcrypto
+LIBS = -lcrypto -lbz2 -lz 
 LIBTOOL = $(SHELL) $(top_builddir)/libtool
-LIPO = @LIPO@
+LIPO = 
 LN_S = ln -s
 LTLIBOBJS = 
 MAINT = #
-MAKEINFO = ${SHELL} /usr/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run makeinfo
+MAKEINFO = ${SHELL} /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/missing --run makeinfo
 MKDIR_P = ../../buildaux/install-sh -c -d
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
 OBJEXT = o
-OPENSSL_INCLUDES = -I/usr/include
-OPENSSL_LDFLAGS = -L/usr/lib
-OPENSSL_LIBS = -lssl -lcrypto
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
+OPENSSL_INCLUDES =  
+OPENSSL_LDFLAGS =  
+OPENSSL_LIBS = -lssl -lcrypto  
+OTOOL = 
+OTOOL64 = 
 PACKAGE = netpgp
 PACKAGE_BUGREPORT = Alistair Crooks <[email protected]> c0596823
 PACKAGE_NAME = netpgp
-PACKAGE_STRING = netpgp 20101103
+PACKAGE_STRING = netpgp 20140220
 PACKAGE_TARNAME = netpgp
-PACKAGE_VERSION = 20101103
+PACKAGE_VERSION = 20140220
 PATH_SEPARATOR = :
 PKG_CONFIG = /usr/pkg/bin/pkg-config
 RANLIB = ranlib
-SED = /usr/bin/sed
+SED = /usr/pkg/bin/gsed
 SET_MAKE = 
-SHELL = /bin/ksh
+SHELL = /bin/sh
 STRIP = strip
-VERSION = 20101103
+VERSION = 20140220
 WARNCFLAGS = -Werror -Wall -Wpointer-arith
 abs_builddir = /usr/src/crypto/external/bsd/netpgp/dist/src/netpgp
 abs_srcdir = /usr/src/crypto/external/bsd/netpgp/dist/src/netpgp
 abs_top_builddir = /usr/src/crypto/external/bsd/netpgp/dist
 abs_top_srcdir = /usr/src/crypto/external/bsd/netpgp/dist
 ac_ct_CC = gcc
-ac_ct_CXX = g++
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_F77 = 
+ac_ct_DUMPBIN = 
 am__include = include
 am__leading_dot = .
 am__quote = 
 am__tar = ${AMTAR} chof - "$$tardir"
 am__untar = ${AMTAR} xf -
 bindir = ${exec_prefix}/bin
-build = i386-unknown-netbsdelf5.99.26
+build = x86_64-unknown-netbsd8.99
 build_alias = 
-build_cpu = i386
-build_os = netbsdelf5.99.26
+build_cpu = x86_64
+build_os = netbsd8.99
 build_vendor = unknown
 builddir = .
 datadir = ${datarootdir}
@@ -168,20 +159,20 @@ datarootdir = ${prefix}/share
 docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
 dvidir = ${docdir}
 exec_prefix = ${prefix}
-host = i386-unknown-netbsdelf5.99.26
+host = x86_64-unknown-netbsd8.99
 host_alias = 
-host_cpu = i386
-host_os = netbsdelf5.99.26
+host_cpu = x86_64
+host_os = netbsd8.99
 host_vendor = unknown
 htmldir = ${docdir}
 includedir = ${prefix}/include
 infodir = ${datarootdir}/info
-install_sh = $(SHELL) /usr/src/crypto/external/bsd/netpgp/dist/buildaux/install-sh
+install_sh = $(SHELL) /net/quasar/src-5/NetBSD/src/crypto/external/bsd/netpgp/dist/buildaux/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localedir = ${datarootdir}/locale
 localstatedir = ${prefix}/var
-lt_ECHO = @lt_ECHO@
+lt_ECHO = echo
 mandir = ${datarootdir}/man
 mkdir_p = $(top_builddir)/buildaux/install-sh -c -d
 oldincludedir = /usr/include
@@ -200,8 +191,7 @@ top_srcdir = ../..
 AM_CFLAGS = $(WARNCFLAGS)
 netpgp_SOURCES = netpgp.c
 netpgp_CPPFLAGS = -I$(top_srcdir)/include
-netpgp_LDADD = ../lib/libnetpgp.la
-man1_MANS = netpgp.1
+netpgp_LDADD = ../lib/libnetpgp.la ../libmj/libmj.la
 dist_man_MANS = netpgp.1
 all: all-am
 

Reply via email to