OpenBSD CVS

CVS log for src/usr.bin/signify/signify.c


[BACK] Up to [local] / src / usr.bin / signify

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.136 / (download) - annotate - [select for diffs], Fri Aug 26 00:24:56 2022 UTC (20 months, 3 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.135: +15 -14 lines
Diff to previous 1.135 (colored)

Move (unused) variables under !VERIFYONLY

install media does not use any of -cns, so move their handling out under
!VERIFYONLY to silence -Wunused-but-set-variable warnings in
distrib/special/signify.

OK deraadt

Revision 1.135 / (download) - annotate - [select for diffs], Tue Jan 21 12:13:21 2020 UTC (4 years, 3 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.134: +6 -6 lines
Diff to previous 1.134 (colored)

In -C mode, the public key is optional since it can be deduced from
the untrusted comment.  In this case, don't ignore -t but rather make
it work as expected.

ok tedu

Revision 1.134 / (download) - annotate - [select for diffs], Sun Dec 22 06:37:25 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.133: +3 -1 lines
Diff to previous 1.133 (colored)

have parseb64file be non-destructive, so we can write the
comment in zsig without needing an extra copy

okay tedu@

Revision 1.133 / (download) - annotate - [select for diffs], Mon Sep 9 13:50:06 2019 UTC (4 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

use PATH_MAX instead of 1024; ok tedu

Revision 1.132 / (download) - annotate - [select for diffs], Wed Jul 3 03:24:02 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.131: +5 -5 lines
Diff to previous 1.131 (colored)

snprintf/vsnprintf return < 0 on error, rather than -1.

Revision 1.131 / (download) - annotate - [select for diffs], Sat Mar 23 07:10:06 2019 UTC (5 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.130: +7 -8 lines
Diff to previous 1.130 (colored)

allow -n to zero the gzip header timestamp. suggestion from Andre Stoebe.
ok tb

Revision 1.130 / (download) - annotate - [select for diffs], Thu Jan 17 05:40:10 2019 UTC (5 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

change an error message to be less misleading.
a secret key can have a valid base64 encoding but still won't parse as a
public key.
request from tb

Revision 1.129 / (download) - annotate - [select for diffs], Thu Jan 17 05:31:28 2019 UTC (5 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.128: +9 -6 lines
Diff to previous 1.128 (colored)

clean up the user's password even after various errors.
noticed by Gabriel Bartolini via Jesper Wallin

Revision 1.128 / (download) - annotate - [select for diffs], Tue Jul 11 23:27:13 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.127: +4 -4 lines
Diff to previous 1.127 (colored)

fix style compliance, in the keyname compliance function no less

Revision 1.127 / (download) - annotate - [select for diffs], Tue Apr 18 02:20:50 2017 UTC (7 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.126: +2 -3 lines
Diff to previous 1.126 (colored)

use freezero() instead of explicit_bzero + free

Revision 1.126 / (download) - annotate - [select for diffs], Thu Oct 6 22:38:25 2016 UTC (7 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.125: +32 -27 lines
Diff to previous 1.125 (colored)

- better check for seckeyname/pubkeyname "equality", remove the path
(you could legitimately store secret keys on a temporary mount
- error out if seckeyname does not follow the *.sec pattern for signing,
augment the check to deal with that.
- special case: seckeyfile can come from a pipe, and then, well, there's no
way to store *.pub in the comment.

okay tedu@

Revision 1.125 / (download) - annotate - [select for diffs], Wed Oct 5 15:58:50 2016 UTC (7 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.124: +23 -1 lines
Diff to previous 1.124 (colored)

when generating keys, make sure the names specified adhere to all
department of keyname compliance regulations. see if anybody complains...

Revision 1.124 / (download) - annotate - [select for diffs], Wed Oct 5 15:48:39 2016 UTC (7 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored)

more properly check the secret key extension. from espie

Revision 1.123 / (download) - annotate - [select for diffs], Wed Oct 5 14:48:58 2016 UTC (7 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.122: +14 -11 lines
Diff to previous 1.122 (colored)

combining an assignment and *two* tests in one conditional is a bit much.
pull things apart.
reported by espie in a separate complaint. :)

Revision 1.122 / (download) - annotate - [select for diffs], Tue Sep 27 02:13:27 2016 UTC (7 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.121: +16 -19 lines
Diff to previous 1.121 (colored)

the keytype checking is logically part of verify, and it's small, so
always include it. but it can be made a bit simpler with zero malloc.

Revision 1.121 / (download) - annotate - [select for diffs], Tue Sep 27 02:02:47 2016 UTC (7 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.120: +3 -6 lines
Diff to previous 1.120 (colored)

no need to copy keypath if we already have one

Revision 1.120 / (download) - annotate - [select for diffs], Mon Sep 26 21:47:54 2016 UTC (7 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.119: +3 -1 lines
Diff to previous 1.119 (colored)

have to advance pointer past the / to get basename.
noticed by naddy

Revision 1.119 / (download) - annotate - [select for diffs], Mon Sep 26 17:49:52 2016 UTC (7 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.118: +17 -8 lines
Diff to previous 1.118 (colored)

there's a hidden feature to infer the public key from the signature
comment, but it doesn't work well because it encodes the full path.
signature creaters don't usually keep the secret keys in /etc/signify,
but that's where we look for public keys.
switch to saving only the basename, and have the verifier add the path.
should make it easier to start using this feature.
anybody depending on the current behavior may have to adjust, but
there's a reason this was never officially documented.

Revision 1.118 / (download) - annotate - [select for diffs], Sat Sep 10 12:23:16 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.117: +6 -6 lines
Diff to previous 1.117 (colored)

spaces found during re-read

Revision 1.117 / (download) - annotate - [select for diffs], Sat Sep 3 12:21:38 2016 UTC (7 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.116: +3 -1 lines
Diff to previous 1.116 (colored)

fix parameters checking

Revision 1.116 / (download) - annotate - [select for diffs], Fri Sep 2 21:45:37 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored)

use err() instead of errx when an errno is set

Revision 1.115 / (download) - annotate - [select for diffs], Fri Sep 2 21:31:22 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.114: +8 -7 lines
Diff to previous 1.114 (colored)

the old check for when verify needed to create files (affecting pledge)
was slightly wrong, but it didn't matter. new gzip mode however falls
into the gap. the zsig code will default to stdout, therefore it needs
much fewer privileges if msgfile is not specified.

Revision 1.114 / (download) - annotate - [select for diffs], Fri Sep 2 21:18:50 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.113: +15 -26 lines
Diff to previous 1.113 (colored)

combine the pledge switch with the execution switch. no changes yet,
but we can do a little better in some cases.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Sep 2 21:12:03 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.112: +4 -1 lines
Diff to previous 1.112 (colored)

-e and -z cannot be combined

Revision 1.112 / (download) - annotate - [select for diffs], Fri Sep 2 17:27:31 2016 UTC (7 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.111: +2 -2 lines
Diff to previous 1.111 (colored)

document the new stuff, usage nits.
some input by jmc@, to be polished later
"get it in now" tedu@ deraadt@

Revision 1.111 / (download) - annotate - [select for diffs], Fri Sep 2 16:10:56 2016 UTC (7 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.110: +50 -15 lines
Diff to previous 1.110 (colored)

add a new option (-z) for signing gzip archives.
- simple barebones gzip header parsing
- signature is outside of the archive
- checksums for blocks of 64K
- verify stuff then pass it to the pipeline
lots of inputs by tedu@ and deraadt@
okay tedu@

Revision 1.110 / (download) - annotate - [select for diffs], Fri Sep 2 15:08:48 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.109: +33 -33 lines
Diff to previous 1.109 (colored)

move more code into createsig. callers just pass seckey filename.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Sep 2 14:50:39 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.108: +71 -49 lines
Diff to previous 1.108 (colored)

split the sign() function into two, with a pure memory core made
available as a separate function to make it easier to reuse in other code.

Revision 1.108 / (download) - annotate - [select for diffs], Thu Sep 1 17:35:23 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.107: +6 -3 lines
Diff to previous 1.107 (colored)

don't initialize variables with functions

Revision 1.107 / (download) - annotate - [select for diffs], Thu Sep 1 17:30:04 2016 UTC (7 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.106: +39 -12 lines
Diff to previous 1.106 (colored)

add a -t keytype option for untrusted comment automatic key extraction
(not in VERIFYONLY mode) to be documented and used shortly
okay tedu@

Revision 1.106 / (download) - annotate - [select for diffs], Wed Jun 8 04:16:06 2016 UTC (7 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.105: +2 -4 lines
Diff to previous 1.105 (colored)

use getprogname

Revision 1.105 / (download) - annotate - [select for diffs], Fri Dec 4 11:05:22 2015 UTC (8 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.104: +3 -4 lines
Diff to previous 1.104 (colored)

polishing

Revision 1.104 / (download) - annotate - [select for diffs], Mon Nov 2 22:01:10 2015 UTC (8 years, 6 months ago) by bluhm
Branch: MAIN
Changes since 1.103: +4 -1 lines
Diff to previous 1.103 (colored)

Make signify's stdout line buffered.  This allows to run the verbose
output through a pipe and still see the progress immediately.
OK tedu@

Revision 1.103 / (download) - annotate - [select for diffs], Fri Oct 30 01:57:43 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

mark usage __dead

Revision 1.102 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:08 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.101: +11 -11 lines
Diff to previous 1.101 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.101 / (download) - annotate - [select for diffs], Thu Oct 8 16:45:50 2015 UTC (8 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.100: +27 -1 lines
Diff to previous 1.100 (colored)

add some tame calls. we may need a bunch of permissions to create files
and manipulate the tty for readpassphrase, but once we've parsed options
and have some idea of what's going to happen next, we can reduce down
quite a bit more. particular use case of "signify | patch" is limited to
feeding garbage to patch.

Revision 1.100 / (download) - annotate - [select for diffs], Fri Jan 16 06:16:12 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.99: +3 -4 lines
Diff to previous 1.99 (colored)

improve checksum parsing slightly. now handles filenames with spaces.
(though not names with ')'; sorry.)

Revision 1.99 / (download) - annotate - [select for diffs], Fri Jan 16 06:00:39 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.98: +4 -1 lines
Diff to previous 1.98 (colored)

just to be careful, add a cpp guard that the sscanf sizes are ok

Revision 1.98 / (download) - annotate - [select for diffs], Thu Jan 15 22:21:01 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.97: +4 -3 lines
Diff to previous 1.97 (colored)

use PATH_MAX for path buffers. in case, you know...

Revision 1.97 / (download) - annotate - [select for diffs], Fri Jan 9 21:49:59 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored)

absurd optimization. reduce initial space by one to avoid leaving one byte
hanging off on a page by itself.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Jan 7 19:53:34 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.95: +3 -5 lines
Diff to previous 1.95 (colored)

bcallah noticed the ifndef guard for headers was wrong. don't fix, just
remove it, and put these includes up with their friends.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Dec 29 14:35:04 2014 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.94: +2 -2 lines
Diff to previous 1.94 (colored)

useless change. overwriting the nul byte with a newline means b64_ntop
can use the whole buffer, even the last byte.

Revision 1.94 / (download) - annotate - [select for diffs], Mon Dec 29 14:23:17 2014 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.93: +11 -11 lines
Diff to previous 1.93 (colored)

rename fingerprint struct field. no longer exposed to users, but since it's
not technically a fingerprint as others understand the term, pick another.
now it's a keynum!
after an email from Florian Weimer

Revision 1.93 / (download) - annotate - [select for diffs], Mon Dec 29 14:16:04 2014 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.92: +2 -37 lines
Diff to previous 1.92 (colored)

remove the inspect debug command. should not be used by users, who are not
supposed to know what fingerprints are or that they exist.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Nov 20 14:51:42 2014 UTC (9 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.91: +1 -2 lines
Diff to previous 1.91 (colored)

Yet more #include de-duplication.

ok deraadt@ tedu@

Revision 1.91 / (download) - annotate - [select for diffs], Sun Jul 13 18:59:40 2014 UTC (9 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.90: +17 -16 lines
Diff to previous 1.90 (colored)

compare snprintf return value with -1. this isn't really necessary because
int promotion rules guarantee the correct result when compared with sizeof,
but it is perhaps easier for some people to understand it this way.
from Doug Hogan.

Revision 1.90 / (download) - annotate - [select for diffs], Fri May 30 21:20:49 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.89: +5 -3 lines
Diff to previous 1.89 (colored)

don't assign variables in if() that's not error checking

Revision 1.89 / (download) - annotate - [select for diffs], Fri May 30 21:17:42 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.88: +6 -11 lines
Diff to previous 1.88 (colored)

a little style consistency with error checking

Revision 1.88 / (download) - annotate - [select for diffs], Fri May 16 18:35:01 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.87: +16 -16 lines
Diff to previous 1.87 (colored)

save up the failures for the end in the argc == 0.
help ok espie

Revision 1.87 / (download) - annotate - [select for diffs], Fri May 16 17:46:07 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.86: +11 -11 lines
Diff to previous 1.86 (colored)

a few changes for new code to match local style

Revision 1.86 / (download) - annotate - [select for diffs], Fri May 16 17:42:24 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored)

checksum mode can use magic pubkey finder too

Revision 1.85 / (download) - annotate - [select for diffs], Fri May 16 16:18:33 2014 UTC (10 years ago) by espie
Branch: MAIN
Changes since 1.84: +89 -71 lines
Diff to previous 1.84 (colored)

rework -C (perfect candidate for using hash tables, really):

insert files we want to check into a hash,
parse SHA256 message on the fly, delete entries whose checksum match,
then display entries that failed.

This completely avoids allocating temporary storage for file names and checksums
and removes the quadratic match (argv[i] vs line[n]).

okay tedu@

Revision 1.84 / (download) - annotate - [select for diffs], Thu May 15 13:14:15 2014 UTC (10 years ago) by espie
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

fix the band-aid error.
tedu was bitten by the RETARDED interface in sha2.h (who names string LENGTH
things that are actually buffer SIZES) ?
make -C mode work again.

okay beck@

Revision 1.83 / (download) - annotate - [select for diffs], Wed May 14 16:02:34 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.82: +5 -4 lines
Diff to previous 1.82 (colored)

let cpp do some of the work

Revision 1.82 / (download) - annotate - [select for diffs], Wed May 14 15:56:41 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored)

spell out base64 in error messages

Revision 1.81 / (download) - annotate - [select for diffs], Wed May 14 15:55:11 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.80: +5 -5 lines
Diff to previous 1.80 (colored)

save some memory by reducing buffer sizes

Revision 1.80 / (download) - annotate - [select for diffs], Wed May 14 15:52:24 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.79: +17 -1 lines
Diff to previous 1.79 (colored)

recode base64 hashes if necessary

Revision 1.79 / (download) - annotate - [select for diffs], Wed May 14 15:33:41 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.78: +8 -5 lines
Diff to previous 1.78 (colored)

realloc like a boss, so checksum verification doesn't take minutes.

Revision 1.78 / (download) - annotate - [select for diffs], Tue May 6 23:50:53 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.77: +6 -6 lines
Diff to previous 1.77 (colored)

temp variable for a bit of clarity

Revision 1.77 / (download) - annotate - [select for diffs], Tue May 6 23:33:04 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.76: +2 -4 lines
Diff to previous 1.76 (colored)

remove unneeded variable

Revision 1.76 / (download) - annotate - [select for diffs], Tue May 6 23:27:50 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored)

factor out the safepath

Revision 1.75 / (download) - annotate - [select for diffs], Tue May 6 23:24:19 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.74: +5 -5 lines
Diff to previous 1.74 (colored)

be more explicit about what's a string

Revision 1.74 / (download) - annotate - [select for diffs], Tue May 6 23:19:46 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

better alloc idiom

Revision 1.73 / (download) - annotate - [select for diffs], Tue May 6 23:17:13 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.72: +4 -3 lines
Diff to previous 1.72 (colored)

factor max message size

Revision 1.72 / (download) - annotate - [select for diffs], Tue Apr 22 21:24:20 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

use reallocarray

Revision 1.71 / (download) - annotate - [select for diffs], Tue Apr 22 05:44:40 2014 UTC (10 years ago) by tedu
Branch: MAIN
Changes since 1.70: +7 -7 lines
Diff to previous 1.70 (colored)

errx when errno won't be set.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Apr 14 00:35:32 2014 UTC (10 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.69: +13 -4 lines
Diff to previous 1.69 (colored)

confirm passwords when generating keys

Revision 1.69 / (download) - annotate - [select for diffs], Mon Mar 17 15:19:06 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.68: +1 -3 lines
Diff to previous 1.68 (colored)

quiet time is over

Revision 1.68 / (download) - annotate - [select for diffs], Mon Mar 17 11:47:06 2014 UTC (10 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored)

clean up after ourselves.
okay tedu@

Revision 1.67 / (download) - annotate - [select for diffs], Mon Mar 17 04:09:39 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.66: +6 -7 lines
Diff to previous 1.66 (colored)

simplify readmsg loop

Revision 1.66 / (download) - annotate - [select for diffs], Mon Mar 17 03:33:57 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.65: +8 -8 lines
Diff to previous 1.65 (colored)

tweak a few messages

Revision 1.65 / (download) - annotate - [select for diffs], Mon Mar 17 03:10:26 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.64: +6 -6 lines
Diff to previous 1.64 (colored)

check memcmp return explicitly

Revision 1.64 / (download) - annotate - [select for diffs], Mon Mar 17 03:07:10 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.63: +24 -25 lines
Diff to previous 1.63 (colored)

pull out the pubkey reading bits

Revision 1.63 / (download) - annotate - [select for diffs], Mon Mar 17 02:54:54 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.62: +56 -36 lines
Diff to previous 1.62 (colored)

refactor and recombine verify functions.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Mar 17 02:10:54 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.61: +10 -21 lines
Diff to previous 1.61 (colored)

move fingerprint check into verifymsg
(stop printing fingerprints here; probably not that helpful)

Revision 1.61 / (download) - annotate - [select for diffs], Mon Mar 17 01:23:58 2014 UTC (10 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.60: +8 -8 lines
Diff to previous 1.60 (colored)

clarify a variable or two; ok tedu

Revision 1.60 / (download) - annotate - [select for diffs], Mon Mar 17 00:01:58 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

have to fill in comment before we can use it.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Mar 16 23:39:42 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.58: +4 -1 lines
Diff to previous 1.58 (colored)

do filename check in the other place too. needs a refactor

Revision 1.58 / (download) - annotate - [select for diffs], Sun Mar 16 23:29:41 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.57: +11 -16 lines
Diff to previous 1.57 (colored)

resolve espie's complaints about appendall (maybe) by folding it into
writeb64file. idea from deraadt

Revision 1.57 / (download) - annotate - [select for diffs], Sun Mar 16 22:43:13 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.56: +3 -2 lines
Diff to previous 1.56 (colored)

oops, forgot the err function here. noticed by Henri Kemppainen

Revision 1.56 / (download) - annotate - [select for diffs], Sun Mar 16 22:01:35 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

we want strncmp here to be safer. spotted by halex.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Mar 16 20:17:10 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

grow buffer faster

Revision 1.54 / (download) - annotate - [select for diffs], Sun Mar 16 18:12:08 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

tweak path checks. now you can create keys named ......pub
by deraadt

Revision 1.53 / (download) - annotate - [select for diffs], Sun Mar 16 18:09:49 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

prevent common(?) mistake. can't use a directory as a file

Revision 1.52 / (download) - annotate - [select for diffs], Sun Mar 16 18:03:19 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.51: +6 -3 lines
Diff to previous 1.51 (colored)

check the inferred path is in /etc/signify

Revision 1.51 / (download) - annotate - [select for diffs], Sun Mar 16 17:58:28 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.50: +32 -11 lines
Diff to previous 1.50 (colored)

start trusting the untrusted comment. (a little)
embed the name of the verification key to save some typing

Revision 1.50 / (download) - annotate - [select for diffs], Fri Mar 7 19:53:33 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.49: +7 -5 lines
Diff to previous 1.49 (colored)

if message file is stdin, don't read passphrase from stdin, it won't work.
too many features; this circus needs a lion tamer

Revision 1.49 / (download) - annotate - [select for diffs], Fri Mar 7 19:49:44 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.48: +30 -26 lines
Diff to previous 1.48 (colored)

allow reading input messages on a pipe. use at your own peril.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Mar 6 20:04:45 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.47: +5 -2 lines
Diff to previous 1.47 (colored)

allow password on stdin if it's not a tty. commonly requested.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Mar 6 15:01:58 2014 UTC (10 years, 2 months ago) by naddy
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

tweak; from jmc@ and yours truly
ok jmc@ tedu@

Revision 1.46 / (download) - annotate - [select for diffs], Wed Mar 5 23:11:18 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.45: +18 -18 lines
Diff to previous 1.45 (colored)

consistently say buflen so i know what length it is

Revision 1.45 / (download) - annotate - [select for diffs], Wed Mar 5 23:03:19 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.44: +7 -10 lines
Diff to previous 1.44 (colored)

when reading a message, add one byte so we can nul terminuate.
simplify verifychecksums with the knowledge that input is a proper string.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Mar 5 22:55:07 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.43: +5 -9 lines
Diff to previous 1.43 (colored)

tighten up code a little

Revision 1.43 / (download) - annotate - [select for diffs], Wed Mar 5 22:53:36 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.42: +8 -6 lines
Diff to previous 1.42 (colored)

check calloc and free memory. noticed by jsg and lteo.
tweak failure tracking

Revision 1.42 / (download) - annotate - [select for diffs], Tue Mar 4 16:44:07 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.41: +155 -7 lines
Diff to previous 1.41 (colored)

add -C checksum mode, which works with sha256 files in safe easy fashion.
ok deraadt

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jan 22 21:11:03 2014 UTC (10 years, 3 months ago) by tedu
Branch: MAIN
Changes since 1.40: +10 -10 lines
Diff to previous 1.40 (colored)

replace sensitive memsets with explicit_bzero

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jan 19 23:20:30 2014 UTC (10 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.39: +18 -7 lines
Diff to previous 1.39 (colored)

do not truncate strlcpy/snprintf, fail hard and proper
ok tedu

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jan 19 18:39:34 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

better error message for readpassphrase. from fritjof. ok deraadt

Revision 1.38 / (download) - annotate - [select for diffs], Wed Jan 15 00:31:34 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.37: +19 -13 lines
Diff to previous 1.37 (colored)

pipes mean read/write may short out.

okay tedu@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jan 14 21:34:30 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.36: +3 -1 lines
Diff to previous 1.36 (colored)

most common pbkdf failure is no password, so check that first.
prompted by fritjof

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 14 21:33:10 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.35: +27 -30 lines
Diff to previous 1.35 (colored)

rearrange the bottom of main so it is less of a "zoo". ok deraadt

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jan 14 17:25:06 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

this can be static

Revision 1.34 / (download) - annotate - [select for diffs], Tue Jan 14 17:15:12 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

stdlib.h for malloc. from Fritjof

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jan 13 09:42:53 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.32: +12 -18 lines
Diff to previous 1.32 (colored)

premature, only wanted to commit n: -> n

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jan 13 09:41:16 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.31: +20 -14 lines
Diff to previous 1.31 (colored)

duh, -n does not take args

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jan 13 01:40:43 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.30: +46 -35 lines
Diff to previous 1.30 (colored)

new day, new options. -m message and -x signature.
this should be less confusing and more consistent in various modes.
also support stdin/stdout where feasible. touch up usage to be helpful.
ok deraadt

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jan 12 21:18:52 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.29: +6 -4 lines
Diff to previous 1.29 (colored)

we only write to writable files, so use O_WRONLY.
st_size is only meaningful for regular files, so check S_ISREG

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jan 11 04:29:07 2014 UTC (10 years, 4 months ago) by lteo
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Check the return value of fstat() in readmsg().

OK deraadt@ tedu@

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jan 10 17:52:50 2014 UTC (10 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

sort options

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jan 10 17:38:24 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.26: +16 -8 lines
Diff to previous 1.26 (colored)

-c comment, for people who don't like the default. ok deraadt

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 10 04:49:35 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.25: +1 -3 lines
Diff to previous 1.25 (colored)

quiet time. printing verified was an artifact of development, to be sure
we didn't accidentally fall through main without doing anything, but tools
should be quiet unless there's an error.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jan 10 04:36:58 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.24: +5 -8 lines
Diff to previous 1.24 (colored)

use a single positional argument instead of a creeping list of __progname

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jan 10 04:34:24 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

a little more consistent with names, notably call signature files sigfiles
for short, instead of output.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jan 10 04:23:37 2014 UTC (10 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +5 -5 lines
Diff to previous 1.22 (colored)

change the listing of the options, because there is way too much
befuddlement.
sorry jmc
ok tedu

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jan 10 04:15:38 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.21: +44 -4 lines
Diff to previous 1.21 (colored)

at least for now, we're going to need some -Inspector magic

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jan 9 21:19:38 2014 UTC (10 years, 4 months ago) by jmc
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

sync usage();

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jan 9 20:37:25 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.19: +6 -6 lines
Diff to previous 1.19 (colored)

revert to O_EXCL for generating keys, so we don't erase them by accident.
internal code a bit yucky, can be fixed some more later.
okay tedu@

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jan 9 19:05:21 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

change O_EXCL to O_TRUNC before deraadt kills me.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jan 9 18:59:35 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.17: +19 -12 lines
Diff to previous 1.17 (colored)

copy secret key comment into signature. requested by deraadt

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jan 9 17:13:36 2014 UTC (10 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

oops, re-adapt for the install media

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jan 9 15:36:40 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.15: +72 -28 lines
Diff to previous 1.15 (colored)

-e embedded signatures. ok deraadt

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jan 8 07:04:29 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.14: +11 -2 lines
Diff to previous 1.14 (colored)

fix logic/usage in VERIFYONLY case
okay deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jan 8 05:00:01 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.13: +13 -4 lines
Diff to previous 1.13 (colored)

allow building a VERIFYONLY version that's considerably smaller.
most of the savings comes from eliminating the large constant table
in ge25519.c. ok deraadt

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jan 8 03:57:57 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.12: +42 -23 lines
Diff to previous 1.12 (colored)

no tomfoolery: mark the comment as untrusted, and enforce it.
usability: add random key fingerprints to detect sig/pubkey mismatch
feedback espie naddy

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jan 6 01:50:54 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.11: +1 -3 lines
Diff to previous 1.11 (colored)

tedu unused macro.
okay tedu@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jan 3 17:14:47 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.10: +7 -3 lines
Diff to previous 1.10 (colored)

don't initialize declared variable with a function call

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jan 3 17:13:42 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.9: +6 -7 lines
Diff to previous 1.9 (colored)

replace hand rolled strchr with strchr

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jan 3 17:10:27 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.8: +33 -25 lines
Diff to previous 1.8 (colored)

let signify have an actual parameters: the file to sign/verify
clarify SYNOPSIS, as options are highly dependent on the mode.
okay tedu@,
usage suggestion by jmc@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 3 15:42:22 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.7: +3 -2 lines
Diff to previous 1.7 (colored)

terminate b64 encoded lines. decoding happily skips \n.
okay tedu@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jan 2 16:34:02 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.6: +19 -11 lines
Diff to previous 1.6 (colored)

display proper error messages for read/write.
after a lot of bickering with tedu...

"fine, fix it" tedu@

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jan 1 17:50:33 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.5: +35 -17 lines
Diff to previous 1.5 (colored)

revert to mostly lowercase options, with uppercase for actions.
ok deraadt espie naddy. wth man tweaks from jmc

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 31 17:33:17 2013 UTC (10 years, 4 months ago) by jmc
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

various tweaks; ok tedu

Revision 1.4 / (download) - annotate - [select for diffs], Tue Dec 31 03:54:05 2013 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

another last minute bug i introduced. found by jturner

Revision 1.3 / (download) - annotate - [select for diffs], Tue Dec 31 03:23:41 2013 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

update usage

Revision 1.2 / (download) - annotate - [select for diffs], Tue Dec 31 03:08:48 2013 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.1: +5 -4 lines
Diff to previous 1.1 (colored)

wha! commit a working version

Revision 1.1 / (download) - annotate - [select for diffs], Tue Dec 31 03:03:32 2013 UTC (10 years, 4 months ago) by tedu
Branch: MAIN

add signify, a tool to sign and verify signatures.
man page and error message help from espie
other feedback from deraadt djm mikeb

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.