The NetBSD Project

CVS log for src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c

[BACK] Up to [cvs.NetBSD.org] / src / crypto / external / bsd / netpgp / dist / src / lib

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.60 / (download) - annotate - [select for diffs], Mon Oct 3 05:34:31 2022 UTC (17 months ago) by rillig
Branch: MAIN
CVS Tags: triaxx-drm, netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

netpgp: fix build with Clang (since 2022-10-01)

error: passing 'char [1]' to parameter of type 'const uint8_t *'
    (aka 'const unsigned char *') converts between pointers to integer
    types where one is of the unique plain 'char' type and the other is
    not [-Werror,-Wpointer-sign]

Revision 1.59 / (download) - annotate - [select for diffs], Sat Oct 1 22:21:31 2022 UTC (17 months ago) by rillig
Branch: MAIN
Changes since 1.58: +2 -1 lines
Diff to previous 1.58 (colored)

netpgpkeys: properly terminate string before calling strdup

$ MALLOC_CONF=junk:true netpgpkeys \
    --export-key \
    --keyring=/usr/pkg/etc/gnupg/pkgsrc.gpg \
    b5952cabdd765a20

The above command printed "-----END PGP PUBLIC KEY BLOCK-----\r\n"
followed by "\xA5\xA5\xA5...".

Revision 1.58 / (download) - annotate - [select for diffs], Sat Aug 27 08:58:32 2022 UTC (18 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.57: +1 -4 lines
Diff to previous 1.57 (colored)

netpgp: fix or suppress a few lint warnings

No functional change.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Oct 14 05:19:41 2020 UTC (3 years, 4 months ago) by jhigh
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.56: +7 -4 lines
Diff to previous 1.56 (colored)

allow netpgp to absorb gpg2 subpkt 33 for list/enc/decrypt rsa keys

Revision 1.55.12.1 / (download) - annotate - [select for diffs], Mon Jun 10 21:41:10 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.55: +80 -13 lines
Diff to previous 1.55 (colored) next main 1.56 (colored)

Sync with HEAD

Revision 1.55.10.1 / (download) - annotate - [select for diffs], Mon Nov 26 01:49:55 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.55: +80 -13 lines
Diff to previous 1.55 (colored) next main 1.56 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.56 / (download) - annotate - [select for diffs], Tue Nov 13 14:52:30 2018 UTC (5 years, 3 months ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Changes since 1.55: +80 -13 lines
Diff to previous 1.55 (colored)

Fix some error handling, json support, keyring handling.

Revision 1.50.28.2 / (download) - annotate - [select for diffs], Wed Apr 26 02:52:13 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.50.28.1: +32 -6 lines
Diff to previous 1.50.28.1 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

Sync with HEAD

Revision 1.50.32.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:50:56 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.50: +37 -8 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)

Sync with HEAD

Revision 1.55 / (download) - annotate - [select for diffs], Mon Mar 27 21:19:12 2017 UTC (6 years, 11 months ago) by khorben
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-compat-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.54: +26 -2 lines
Diff to previous 1.54 (colored)

Do not ask for a passphrase when empty

Submitted on tech-pkg@ as:
[PATCH 06/11] Do not ask for a passphrase when empty

Only modified for consistency with the coding style.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Mar 27 21:06:50 2017 UTC (6 years, 11 months ago) by khorben
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Expect a FILE * for pgp_decrypt_seckey()

Submitted on tech-pkg@ as:
[PATCH 05/11] Expect a FILE * for pgp_decrypt_seckey()

No functional change intended.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Mar 27 21:00:43 2017 UTC (6 years, 11 months ago) by khorben
Branch: MAIN
Changes since 1.52: +4 -2 lines
Diff to previous 1.52 (colored)

Do not use random data for pass-phrases on EOF

Submitted on tech-pkg@ as:
[PATCH 04/11] Do not use random data for pass-phrases on EOF

Only modified for consistency with the coding style.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Mar 27 20:55:13 2017 UTC (6 years, 11 months ago) by khorben
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Avoid some type casts

Submitted on tech-pkg@ as:
[PATCH 03/11] Avoid some type casts

No functional change intended.

Revision 1.50.28.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:51:53 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.50: +6 -3 lines
Diff to previous 1.50 (colored)

Sync with HEAD

Revision 1.51 / (download) - annotate - [select for diffs], Mon Feb 20 00:51:08 2017 UTC (7 years ago) by khorben
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.50: +6 -3 lines
Diff to previous 1.50 (colored)

Do not crash when listing keys without a keyring

To test: (with an empty ~/.gnupg)
$ netpgpkeys --import-key /dev/null

Submitted on tech-pkg@ as:
[PATCH 01/11] Do not crash when listing keys without a keyring

Different patch for the same issue.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Jun 25 00:37:44 2011 UTC (12 years, 8 months ago) by agc
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, localcount-20160914, khorben-n900, bouyer-socketcan-base, agc-symver-base, agc-symver, agc-netpgp-standalone-base, agc-netpgp-standalone
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

change mj library to take an additional argument for a string type,
denoting its length. this allows binary strings to be encoded using
libmj.

escape magic characters in json strings in a more efficient manner.
the previous method was not scalable.

update callers to suit

bump libmj major version number

add examples to the libmj(3) man page

Revision 1.49 / (download) - annotate - [select for diffs], Mon Nov 15 08:50:32 2010 UTC (13 years, 3 months ago) by agc
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.48: +7 -7 lines
Diff to previous 1.48 (colored)

Don't prefix function names with "pgp_" if the functions are static.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Nov 7 08:39:59 2010 UTC (13 years, 4 months ago) by agc
Branch: MAIN
Changes since 1.47: +260 -260 lines
Diff to previous 1.47 (colored)

Take the internal functions and definitions back out of the implementation
namespace:

	:g/\<__ops/s//pgp/g
	:g/\<__OPS/s//__PGP/g
	:g/\<OPS/s//PGP/g

No functional change, regression tests complete successfully.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Oct 31 19:45:53 2010 UTC (13 years, 4 months ago) by stacktic
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

PR/42435 : Check pointers against NULL to avoid dereferencing them

Revision 1.46 / (download) - annotate - [select for diffs], Wed Sep 1 17:25:57 2010 UTC (13 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.45: +5 -2 lines
Diff to previous 1.45 (colored)

Various minor changes to netpgp:

+ be smarter when checking for a null id
+ add test for rubbish being returned when listing specific keys in netpgpkeys(1)
+ take the public key from the pubring, not the secring when exporting
  keys
+ allow hkpd to serve ssh keys in pgp format
+ test on whether a seckey is needed, not on a userid needed, for ssh keys

Revision 1.45 / (download) - annotate - [select for diffs], Wed Sep 1 06:20:23 2010 UTC (13 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Denote the signing key with the word "signature" (the encryption key
already has the tag "encryption"). This is a bit more meaningful than
"pub" and "sub".

Revision 1.44 / (download) - annotate - [select for diffs], Sat Aug 21 19:00:43 2010 UTC (13 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.43: +9 -6 lines
Diff to previous 1.43 (colored)

avoid false positives when matching a (non-existent) encryption subkey

use debugging output to point to the matching key

Revision 1.43 / (download) - annotate - [select for diffs], Sun Aug 15 16:10:56 2010 UTC (13 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.42: +6 -6 lines
Diff to previous 1.42 (colored)

fix some more amd64 lint

Revision 1.42 / (download) - annotate - [select for diffs], Sun Aug 15 07:52:26 2010 UTC (13 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.41: +11 -5 lines
Diff to previous 1.41 (colored)

+ rationalise birthtime/expiration timestamps into a single function

+ clean up some 64-bit (amd64) lint

Revision 1.41 / (download) - annotate - [select for diffs], Fri Aug 13 18:29:40 2010 UTC (13 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.40: +37 -23 lines
Diff to previous 1.40 (colored)

Changes to 3.99.9/20100809

+ add single character options to netpgp(1) and netpgpkeys(1)
+ add -o long-option(=value)? options to netpgp(1) and netpgpkeys(1)
+ add some small preparations for using the first subkey for encryption
  (much more to follow)

Revision 1.40 / (download) - annotate - [select for diffs], Sat Aug 7 04:16:40 2010 UTC (13 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.39: +39 -1 lines
Diff to previous 1.39 (colored)

Catch up the JSON routines being in their own library. Use the JSON routines
to return all the text as a JSON-encoded string for all keys and sigs which
are returned.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Jul 9 05:35:34 2010 UTC (13 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.38: +24 -6 lines
Diff to previous 1.38 (colored)

Changes to 3.99.7/20100701

+ recognise ascii-armoured encrypted messages properly, in memory and
  in files
+ print error message and exit for now when trying to encrypt with a DSA key
+ fix bug reported by dyoung when trying to print out the encryption key
  fingerprint

Revision 1.38 / (download) - annotate - [select for diffs], Fri Jun 25 03:37:27 2010 UTC (13 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.37: +8 -12 lines
Diff to previous 1.37 (colored)

Changes to 3.99.5

+ make ssh fingerprints (md5) match netpgp listing
+ use the more functional hexdump function from ssh2pgp in place of the
  older hexdump function from openpgpsdk
+ pass hash type down from command line where needed
+ add test for netpgp/ssh key fingerprint matching
+ make netpgpkeys(1) take a --hash= option

With these changes, netpgp can be made to generate the same fingerprint as
openssh (by default, ssh-keygen(1) uses an md5 digest)

% /usr/bin/netpgpkeys --ssh-keys --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub --list-keys --hash=md5
1 key
pub 1024/RSA (Encrypt or Sign) fcdd1c608bef4c4b 2008-08-11
Key fingerprint: e935 902d ebf1 76ba fcdd 1c60 8bef 4c4b
uid              osx-vm1.crowthorne.alistaircrooks.co.uk (/etc/ssh/ssh_host_rsa_key.pub) <root@osx-vm1.crowthorne.alistaircrooks.co.uk>

% ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub
1024 e9:35:90:2d:eb:f1:76:ba:fc:dd:1c:60:8b:ef:4c:4b /etc/ssh/ssh_host_rsa_key.pub (RSA)
%

Revision 1.37 / (download) - annotate - [select for diffs], Tue May 25 01:05:10 2010 UTC (13 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.36: +26 -28 lines
Diff to previous 1.36 (colored)

Simplify and shorten the internals of packet processing by getting rid of
the intermediate pseudo-abstraction layer, which detracted from understanding
and had no benefit whatsoever. Rename some enums and some definitions.

Revision 1.36 / (download) - annotate - [select for diffs], Fri May 21 14:28:44 2010 UTC (13 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

correct indentation - no functional change

Revision 1.35 / (download) - annotate - [select for diffs], Sat May 8 00:33:28 2010 UTC (13 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.34: +5 -19 lines
Diff to previous 1.34 (colored)

use hexdump() where possible.

get rid of all traces of dmalloc - it's not used anymore. we can now g/c
initialisation functions which do not do anything.

also get rid of the pkeyid() functions, which just prints a
hexadecimal string

Revision 1.34 / (download) - annotate - [select for diffs], Wed Apr 14 00:23:09 2010 UTC (13 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.33: +9 -11 lines
Diff to previous 1.33 (colored)

use a better name for a key in a function - no functional change

Revision 1.33 / (download) - annotate - [select for diffs], Sat Mar 13 23:30:41 2010 UTC (13 years, 11 months ago) by agc
Branch: MAIN
Changes since 1.32: +68 -38 lines
Diff to previous 1.32 (colored)

Changes to 2.99.1/20100313

+ add functionality to parse basic signature subkeys
+ in doing so, add expiration of keys
+ at the same time, add revocation of keys
+ recognise the primary user id, and use it when displaying user ids
+ recognise self signed keys and subkeys
+ rework the indentation of output
+ add the --list-sigs [userid] option to netpgpkeys(1)
+ use memcmp(3) rather than strcmp(3) when checking binary user ids to
  be exported
+ add expiration display to subkey signature output
+ update libnetpgp library version major number to 3

Revision 1.32 / (download) - annotate - [select for diffs], Fri Mar 12 01:22:01 2010 UTC (13 years, 11 months ago) by agc
Branch: MAIN
Changes since 1.31: +4 -2 lines
Diff to previous 1.31 (colored)

make sure that the expiration date and time are attached to the correct key

Revision 1.31 / (download) - annotate - [select for diffs], Mon Mar 8 08:56:03 2010 UTC (14 years ago) by agc
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

ensure that we have an element in the array before we try to store a value
in it.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Mar 8 07:37:24 2010 UTC (14 years ago) by agc
Branch: MAIN
Changes since 1.29: +29 -8 lines
Diff to previous 1.29 (colored)

Changes to 1.99.22/20100307
+ add key expiry information to public key information display

Revision 1.29 / (download) - annotate - [select for diffs], Fri Mar 5 16:30:05 2010 UTC (14 years ago) by agc
Branch: MAIN
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

clean up some lint that crept in.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Mar 5 16:01:09 2010 UTC (14 years ago) by agc
Branch: MAIN
Changes since 1.27: +23 -20 lines
Diff to previous 1.27 (colored)

Update netpgp to version 1.99.20/20100304 - portability improvements, and bug fixes:

	Changes to 1.99.20/20100304

	+ move args to some functions around to be consistent
	+ use uint*_t where appropriate
	+ fix bug in verify memory
	+ add documentation to manual pages to show how to do combined
	  signing/encryption and decryption/verification
	+ make verification of ascii-armoured memory work the same as binary
	+ eliminate use of strdup(3), strcasecmp(3), and strptime(3). NetBSD/pkgsrc
	  PR 42922 applies - need to define _XOPEN_SOURCE and _BSD_SOURCE for
	  newer linux platforms with glibc 2.10.1. solved a bit differently, by
	  implementing strdup(3) and strcasecmp(3) independently, and using regexps
	  to avoid calling strptime(3).

Revision 1.27 / (download) - annotate - [select for diffs], Sat Feb 6 02:24:33 2010 UTC (14 years, 1 month ago) by agc
Branch: MAIN
Changes since 1.26: +35 -12 lines
Diff to previous 1.26 (colored)

Changes to 1.99.16/20100205

+ minor simplifications to netpgp(1) internally
+ fix a bug in netpgp_verify_file where a non-existent file while listing
  packets would cause a SIGSEGV
+ add duration arg to netpgp(1), and check for validity when verifying
  signatures
+ add birthtime arg to netpgp(1), and check for validity when verifying
  signatures
+ add netpgp commands to print pubkey, if desired
+ allow the passphrase for the signature to be taken from --pass-fd
+ get rid of static indent value when printing packet contents
+ print signature validity times when verifying a file's signature

Revision 1.26 / (download) - annotate - [select for diffs], Mon Dec 14 23:29:56 2009 UTC (14 years, 2 months ago) by agc
Branch: MAIN
Changes since 1.25: +2 -8 lines
Diff to previous 1.25 (colored)

Prepare for a new netpgp-20091210 portable release.

Apart from infrastructure changes, there are the following functional ones:

+ Update to version 20091210

+ provide a new netpgp_match_list_keys(3) function to perform a
regular-expression based search of all the keys in the keyring.  If no
pattern is specified to match, then all keys are returned.

+ provide a new netpgp_set_homedir(3) function, and use it to set the
home directory from the library, rather than individually in all the
programs which use the library

+ provide a new netpgp_incvar(3) function which will add a constant
increment (which may be negative) to the value of an internal
variable.  This is primarily used for the verbosity level within the
library, and is again a movement of the function into the library from
the individual programs which use the library

+ move to the specification of an ssh key file by internal variable,
rather than the directory holding an ssh key file

+ autoconf infrastructure changes

+ take a hammer to the _GNU_SOURCE definitions problems

+ don't rely on strnlen(3) being present everywhere

Revision 1.25 / (download) - annotate - [select for diffs], Mon Dec 7 16:55:37 2009 UTC (14 years, 3 months ago) by martin
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

size_t %z police

Revision 1.24 / (download) - annotate - [select for diffs], Mon Dec 7 16:17:17 2009 UTC (14 years, 3 months ago) by agc
Branch: MAIN
Changes since 1.23: +84 -97 lines
Diff to previous 1.23 (colored)

+ When using ssh keys, use the first key as the default userid, unless
specified.

+ The internal variable "sshetcdir" has been renamed to "sshkeydir"

+ When matching the text fields in the username, use an ICASE, NOSUB, EXTENDED
regular expression. This allows more advanced ways of searching, such as:

% netpgpkeys --list-keys '\.de\>'

to find all the keys in the default keyring which have an email address
in Germany. This is actually surprisingly useful.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Dec 5 07:08:18 2009 UTC (14 years, 3 months ago) by agc
Branch: MAIN
Changes since 1.22: +45 -12 lines
Diff to previous 1.22 (colored)

Add the ability to use ssh host keys (on the fly) to provide RSA keys.

These keys can be used in the same way as normal PGP keys - to sign, verify,
encrypt and decrypt files and data.

	% cp configure a
	% sudo netpgp --ssh-keys --sign --userid 1e00404a a
	Password:
	pub 1024/RSA (Encrypt or Sign) 040180871e00404a 2008-08-11
	Key fingerprint: c4aa b385 4796 e6ce 606c f0c2 0401 8087 1e00 404a
	% sudo chmod 644 a.gpg
	% netpgp --ssh-keys --verify a.gpg
	netpgp: default key set to "C0596823"
	can't open '/etc/ssh/ssh_host_rsa_key'
	Good signature for a.gpg made Fri Dec  4 23:04:36 2009
	using RSA (Encrypt or Sign) key 040180871e00404a
	pub 1024/RSA (Encrypt or Sign) 040180871e00404a 2008-08-11
	Key fingerprint: c4aa b385 4796 e6ce 606c f0c2 0401 8087 1e00 404a
	uid              osx-vm1.crowthorne.alistaircrooks.co.uk (/etc/ssh/ssh_host_rsa_key.pub) <root@osx-vm1.crowthorne.alistaircrooks.co.uk>
	% uname -a
	NetBSD osx-vm1.crowthorne.alistaircrooks.co.uk 5.99.20 NetBSD 5.99.20 (ISCSI) #0: Wed Oct  7 17:16:33 PDT 2009  agc@osx-vm1.crowthorne.alistaircrooks.co.uk:/usr/obj/i386/usr/src/sys/arch/i386/compile/ISCSI i386
	%

The ssh host keys do not need to be manipulated in any way - the information
is read from existing files.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Oct 7 04:56:51 2009 UTC (14 years, 5 months ago) by agc
Branch: MAIN
Changes since 1.21: +16 -7 lines
Diff to previous 1.21 (colored)

More checks for the return value from memory allocation.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 6 02:26:05 2009 UTC (14 years, 5 months ago) by agc
Branch: MAIN
Changes since 1.20: +18 -18 lines
Diff to previous 1.20 (colored)

More Flexelint fixes from phk - just low-hanging fruit for just now -
many thanks!

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jun 11 04:57:52 2009 UTC (14 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.19: +5 -6 lines
Diff to previous 1.19 (colored)

+ only prompt for the passphrase for the secret key if the secret key is
  protected by a passphrase

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jun 11 01:12:42 2009 UTC (14 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.18: +9 -9 lines
Diff to previous 1.18 (colored)

CHANGES 1.99.10 -> 1.99.11

+ address keys array from 0 with unsigned indices
+ print results to io->res stream - default to stderr, and set using
	netpgp_setvar(..., "results", filename)
+ __ops_keyid()'s third arg was always the size of the keyid array - no need
  to pass it
+ get rid of the excessive type-checking in packet-show-cast.h, which wasn't
  necessary, and fold all the show routines into packet-show.c
+ introduce a generic __ops_new() and use it for some structure allocation

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jun 10 16:01:37 2009 UTC (14 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.17: +12 -12 lines
Diff to previous 1.17 (colored)

Get rid of an unusual architectural construct:

The original code had dynamic arrays indexed by unsigned indices,
except for the array of keys, which was indexed by a signed integer,
and initialised to -1.  Subsequently, when a new id was created, the
index was pre-incremented, and later on, in a different call, the
userid (a different packet) was assigned to the current index. This
has implications for growing the array, for signed comparison checks,
and just general cleanliness.

This change overhauls the construct:  don't special case anything,
just address the array from 0, use unsigned indices same as everything
else, and complain if we get a user id for which we haven't received a
public or secret key.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 10 00:38:09 2009 UTC (14 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.16: +69 -77 lines
Diff to previous 1.16 (colored)

CHANGES 1.99.9 -> 1.99.10

+ fix a bug in decryption whereby a bad passphrase would cause a segmentation
  violation
+ fix some regressions in key searching in the underlying find keys routines
+ add C++ declaration protection to the external interface in netpgp.h
+ split out the key management parts of netpgp(1) into netpgpkeys(1)

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 9 00:51:02 2009 UTC (14 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.15: +62 -63 lines
Diff to previous 1.15 (colored)

CHANGES 1.99.8 -> 1.99.9

+ make more use of __ops_io_t structure
+ addition of standalone, stripped-down netpgpverify utility
+ addition of test for --list-packets on an empty file
+ bring forward some simplifications from netpgpverify
	+ some name changes
	+ get rid of the increment and then decrement keycount around
	  accumulated data ("it's to do with counting")
	+ then use unsigned integers for the size and counts for the
	  dynamic array of keys, and use the common dynamic array macros
	  for keys in a keyring
	+ if it's a union, let's use it as a union, not a struct
+ modified documentation to correct the --list-packets command (sorry, ver)
+ add a new directory structure for both the distribution and the
  reachover Makefiles. The autotest framework has been partially overhauled
  but more TLC is needed here.
+ add a --pass-fd=n option so that external programs can provide the
  passphrase on a file descriptor without going through the callback,
  requested by joerg

Revision 1.15 / (download) - annotate - [select for diffs], Sun May 31 23:26:20 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.14: +46 -31 lines
Diff to previous 1.14 (colored)

CHANGES 1.99.7 -> 1.99.8

+ get rid of __ops_malloc_passphrase() - strdup() works just as well
+ generalise __ops_seckey_forget() to become __ops_forget(), give it a size
  parameter, and make it work on things other than secret keys (passphrases
  for instance)
+ minor struct field enum renaming
+ minor function call renaming
+ add ops_io_t struct to hold pointers to IO streams, and pass it down
  where necessary

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 28 01:52:43 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.13: +40 -46 lines
Diff to previous 1.13 (colored)

CHANGES 1.99.6 -> 1.99.7

+ added to the regression tests
+ get rid of some magic constants, replace with more obvious names
+ zero out the memory used for a passphrase before freeing it in one place

Revision 1.13 / (download) - annotate - [select for diffs], Wed May 27 00:38:27 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.12: +23 -21 lines
Diff to previous 1.12 (colored)

CHANGES 1.99.4 -> 1.99.5

+ Luke Mewburn completely overhauled the auto tools infrastructure
+ changed signature (hah!) of some netpgp file management prototypes to
  use const char * for file names and user ids, not char * - suggested by
  christos
+ change some of the openpgpsdk display functions to return integer values,
  and send those values back from the netpgp functions - suggested by
  christos
+ rather than passing a shedload of variables to netpgp_init(), get rid
  of them, and set variables using the netpgp_[gs]etvar() interface
+ replace some magic constants with descriptive names
+ use a netpgp variable to skip userid checks if necessary
+ add ability to allow coredumps via --coredumps if (a) you have taken
  leave of your sanity, and (b) you have some magical persistent
  storage which doesn't spare sectors, and (c) you know how to remove
  a file securely
+ bumped library version on NetBSD to 1.0 for interface changes

Revision 1.12 / (download) - annotate - [select for diffs], Mon May 25 06:43:32 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
CVS Tags: netpgp-1-99-4
Changes since 1.11: +52 -44 lines
Diff to previous 1.11 (colored)

CHANGES 1.99.3 -> 1.99.4

+ get rid of some magic constants
+ revamped regression test script to count number of tests passed
+ made checkhash array in ops_seckey_t dynamic, rather than statically
  allocated
+ made mdc array dynamic, and added a length field to mdc for future use
+ revamped usage message to match reality
+ made portable version again for the autoconfed package sources
+ add separate netpgpdigest.h file so that separate digest sizes can be
  used without having to include "packet.h" in everything

Revision 1.11 / (download) - annotate - [select for diffs], Thu May 21 00:33:31 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

CHANGES 1.99.1 -> 1.99.2

+ various minor cleanups
+ fix longstanding pasto where the key server preference packets are
  displayed with the correct ptag information
+ up until now, there has been an asymmetry in the command line
  options for netpgp(1) - whilst a file may have signature information
  added to it with the "--sign" command, there has been no way to
  retrieve the contents of the file without the signature.  The new
  "--cat" option does this (there are synonyms of "--verify-show" and
  "--verify-cat") - the signature is verified, and if it matches, the
  original contents of the file are sent to the output file (which
  defaults to stdout, and can be set with the --output option on the
  command line).  If the signature does not match, there is no output,
  and an EXIT_FAILURE code is returned.
+ revamped netpgp(1) to make it clear what commands are available, how
  these commands relate to each other, and which commands take custom
  options

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 19 05:13:10 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.9: +19 -38 lines
Diff to previous 1.9 (colored)

CHANGES 1.0.0 -> 1.99.1

+ released and tagged version 1.0.0; development version now 1.99.1
+ get rid of some fields which are no longer needed
+ minor name changes
+ add mmapped field to ops_data_t struct to denote that the array needs an
  munmap(2) and not a free(3)
+ add an __ops_mem_readfile() function, and use it for reading files.
  The function does mmap(2), and then falls back to read(2) if that fails.
  Retire unused __ops_fileread() which had an unusual interface
+ drop sign_detached() from netpgp.c down into signature.c as
  __ops_sign_detached()

Revision 1.9 / (download) - annotate - [select for diffs], Sat May 16 06:30:38 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
CVS Tags: netpgp-release-1-0-0
Changes since 1.8: +78 -71 lines
Diff to previous 1.8 (colored)

+ don't use arrays of length 1 to hold single instances of characters,
  unsigned or not - just use a single character itself
+ misc cleanup
+ rename cinfo to "output" and ops_createinfo_t to "ops_output_t" to
  be a bit more descriptive
+ shorten some long names
+ get rid of test for libgen.h - it's not needed anymore
+ bump to version 0.99.4, and 20090515 sources, regenerate configure and co
+ numerous name changes to be more consistent and more concise
+ add verbosity level to the variables that can be set and retrieved by
  netpgp_setvar() and netpgp_getvar()
+ added --verbose option to netpgp(1)
+ add __RCSID() to all files

Revision 1.8 / (download) - annotate - [select for diffs], Thu May 14 03:59:54 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
Changes since 1.7: +62 -137 lines
Diff to previous 1.7 (colored)

+ got rid of "local" header files. These aren't necessary since the openpgpsdk
  code was modified to all be in the same directory
+ added netpgp_getvar() and netpgp_setvar(), and use them to get and set the
  user id and hash algorithm preference
+ get rid of <stdbool.h> usage - I'm still not sure this is the way we should
  be going long term, but the bool changes got integrated with the others,
  and are there in cvs history if we want to resurrect them. Correct autoconf
  accordingly. Bump netpgp minimus version, and autoconf-based date version.
+ updated documentation to reflect these changes

Revision 1.7.2.2 / (download) - annotate - [select for diffs], Wed May 13 19:16:05 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.7.2.1: +1048 -0 lines
Diff to previous 1.7.2.1 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.7.2.1, Tue May 12 00:37:53 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.7: +0 -1066 lines
FILE REMOVED

file keyring.c was added on branch jym-xensuspend on 2009-05-13 19:16:05 +0000

Revision 1.7 / (download) - annotate - [select for diffs], Tue May 12 00:37:53 2009 UTC (14 years, 9 months ago) by agc
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Branch point for: jym-xensuspend
Changes since 1.6: +52 -23 lines
Diff to previous 1.6 (colored)

Commit the weekend's changes:

+ minor name changes
+ remove duplicated code (commented out) in packet-print.c
+ original code contained abstraction violations for hash size - fix them
+ get rid of some magic constants related to length of hash arrays
+ allow a choice of hash algorithms for the signature digest (rather
  than hardcoding SHA1 - it is looking as though collisions are easier
  to manufacture based on recent findings)
+ move default signature RSA hash algorithm to SHA256 (from SHA1). This is
  passed as a string parameter from the high-level interface. We'll
  revisit this later after a good way to specify the algorithm has been
  found.
+ display the size of the keys in --list-packets
+ display the keydata prior to file decryption

Revision 1.6 / (download) - annotate - [select for diffs], Wed May 6 07:01:43 2009 UTC (14 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.5: +15 -15 lines
Diff to previous 1.5 (colored)

More cosmetic changes, no functional differences.

Revision 1.5 / (download) - annotate - [select for diffs], Wed May 6 03:02:03 2009 UTC (14 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.4: +47 -50 lines
Diff to previous 1.4 (colored)

Change some names to something a bit less obscure.

e.g. For some unfathomable reason, I find "__ops_write_mem_from_file" a bit
counterintuitive - replace that by "__ops_fileread"

Revision 1.4 / (download) - annotate - [select for diffs], Tue May 5 01:28:15 2009 UTC (14 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.3: +63 -71 lines
Diff to previous 1.3 (colored)

+ __ops_packet_t -> __ops_subpacket_t
+ __ops_parser_content_t -> __ops_packet_t
+ rename some other long names
  51 chars is the record function name length so far
+ preliminary moves to support detached signatures
  as yet, incomplete
+ add back command line option to list packets in a signed or encrypted file
+ make __ops_parse() take an argument whether to print errors, and kill the
  __ops_parse_and_print_errors() function
+ get rid of some assertions in the code - this is a library - about 100 to go

Revision 1.3 / (download) - annotate - [select for diffs], Thu Apr 30 04:57:57 2009 UTC (14 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

WARNS=3 fixes

Revision 1.2 / (download) - annotate - [select for diffs], Sat Apr 25 01:29:15 2009 UTC (14 years, 10 months ago) by agc
Branch: MAIN
Changes since 1.1: +4 -2 lines
Diff to previous 1.1 (colored)

WARNS=4 changes

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Thu Apr 23 06:32:03 2009 UTC (14 years, 10 months ago) by agc
Branch: NETPGP
CVS Tags: netpgp-base
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Import netpgp source into crypto/external - this is a heavily-modified
version of openpgpsdk, and will replace it. Differences between netpgp
and the NetBSD repository version of openpgpsdk are:

+ Wrap source code in GNU autoconf/configure
+ New high-level interface for libnetpgp(3) and netpgp(1)
+ Hide prolifery of local headers in the internal lib directory -
  there is now one exported header called netpgp.h
+ Hide all ops_* functions and structs behind __ops_* names
+ Fix long-standing bug - make decryption work with files > 8192 bytes
  (fix for signature verification of signed files > 8192 bytes was already
  brought forward from the NetBSD repository of openpgpsdk)
+ Use mmap(2) to read files, falls back to read(2) if can't do mmap
+ Compile portable package using libtool
+ Rationalise the number of source files - merge a number of smaller ones
+ Case-insensitive matching of key ids
+ Use PRIsize throughout
+ Use calloc(3) throughout to zero memory
+ Get rid of global symbols which abused a macro
+ Use more descriptive names - remove "_arg_" components, name things for their
  purpose, rather than what they are (their type)
+ No more --passphrase= argument to netpgp(1) - this is now always
  done through callbacks
+ Report source code date and build date in version number, as well as the
  version number itself

This will form the basis of the portable netpgp package.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Apr 23 06:32:03 2009 UTC (14 years, 10 months ago) by agc
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>