summaryrefslogtreecommitdiff
path: root/usr.bin/signify/signify.c
AgeCommit message (Collapse)Author
2017-04-18use freezero() instead of explicit_bzero + freeTheo de Raadt
2016-10-06- better check for seckeyname/pubkeyname "equality", remove the pathMarc Espie
(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@
2016-10-05when generating keys, make sure the names specified adhere to allTed Unangst
department of keyname compliance regulations. see if anybody complains...
2016-10-05more properly check the secret key extension. from espieTed Unangst
2016-10-05combining an assignment and *two* tests in one conditional is a bit much.Ted Unangst
pull things apart. reported by espie in a separate complaint. :)
2016-09-27the keytype checking is logically part of verify, and it's small, soTed Unangst
always include it. but it can be made a bit simpler with zero malloc.
2016-09-27no need to copy keypath if we already have oneTed Unangst
2016-09-26have to advance pointer past the / to get basename.Ted Unangst
noticed by naddy
2016-09-26there's a hidden feature to infer the public key from the signatureTed Unangst
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.
2016-09-10spaces found during re-readTheo de Raadt
2016-09-03fix parameters checkingMarc Espie
2016-09-02use err() instead of errx when an errno is setTed Unangst
2016-09-02the old check for when verify needed to create files (affecting pledge)Ted Unangst
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.
2016-09-02combine the pledge switch with the execution switch. no changes yet,Ted Unangst
but we can do a little better in some cases.
2016-09-02-e and -z cannot be combinedTed Unangst
2016-09-02document the new stuff, usage nits.Marc Espie
some input by jmc@, to be polished later "get it in now" tedu@ deraadt@
2016-09-02add a new option (-z) for signing gzip archives.Marc Espie
- 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@
2016-09-02move more code into createsig. callers just pass seckey filename.Ted Unangst
2016-09-02split the sign() function into two, with a pure memory core madeTed Unangst
available as a separate function to make it easier to reuse in other code.
2016-09-01don't initialize variables with functionsTed Unangst
2016-09-01add a -t keytype option for untrusted comment automatic key extractionMarc Espie
(not in VERIFYONLY mode) to be documented and used shortly okay tedu@
2016-06-08use getprognameTed Unangst
2015-12-04polishingTed Unangst
2015-11-02Make signify's stdout line buffered. This allows to run the verboseAlexander Bluhm
output through a pipe and still see the progress immediately. OK tedu@
2015-10-30mark usage __deadTed Unangst
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-08add some tame calls. we may need a bunch of permissions to create filesTed Unangst
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.
2015-01-16improve checksum parsing slightly. now handles filenames with spaces.Ted Unangst
(though not names with ')'; sorry.)
2015-01-16just to be careful, add a cpp guard that the sscanf sizes are okTed Unangst
2015-01-15use PATH_MAX for path buffers. in case, you know...Ted Unangst
2015-01-09absurd optimization. reduce initial space by one to avoid leaving one byteTed Unangst
hanging off on a page by itself.
2015-01-07bcallah noticed the ifndef guard for headers was wrong. don't fix, justTed Unangst
remove it, and put these includes up with their friends.
2014-12-29useless change. overwriting the nul byte with a newline means b64_ntopTed Unangst
can use the whole buffer, even the last byte.
2014-12-29rename fingerprint struct field. no longer exposed to users, but since it'sTed Unangst
not technically a fingerprint as others understand the term, pick another. now it's a keynum! after an email from Florian Weimer
2014-12-29remove the inspect debug command. should not be used by users, who are notTed Unangst
supposed to know what fingerprints are or that they exist.
2014-11-20Yet more #include de-duplication.Kenneth R Westerback
ok deraadt@ tedu@
2014-07-13compare snprintf return value with -1. this isn't really necessary becauseTed Unangst
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.
2014-05-30don't assign variables in if() that's not error checkingTed Unangst
2014-05-30a little style consistency with error checkingTed Unangst
2014-05-16save up the failures for the end in the argc == 0.Ted Unangst
help ok espie
2014-05-16a few changes for new code to match local styleTed Unangst
2014-05-16checksum mode can use magic pubkey finder tooTed Unangst
2014-05-16rework -C (perfect candidate for using hash tables, really):Marc Espie
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@
2014-05-15fix the band-aid error.Marc Espie
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@
2014-05-14let cpp do some of the workTed Unangst
2014-05-14spell out base64 in error messagesTed Unangst
2014-05-14save some memory by reducing buffer sizesTed Unangst
2014-05-14recode base64 hashes if necessaryTed Unangst
2014-05-14realloc like a boss, so checksum verification doesn't take minutes.Ted Unangst
2014-05-06temp variable for a bit of clarityTed Unangst