summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-add.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* highly polished whitespace, mostly fixing spaces-for-tab and baddjm2021-04-031-3/+3
| | | | indentation on continuation lines. Prompted by GHPR#185
* Change convtime() from returning long to returning int. On platformsdtucker2021-01-111-5/+5
| | | | | | where sizeof(int) != sizeof(long), convtime could accept values >MAX_INT which subsequently truncate when stored in an int during config parsing. bz#3250, ok djm@
* use the new variant log macros instead of prepending __func__ anddjm2020-10-181-18/+14
| | | | appending ssh_err(r) manually; ok markus@
* refuse to add verify-required (PINful) FIDO keys to ssh-agent untildjm2020-08-311-7/+16
| | | | the agent supports them properly
* allow "ssh-add -d -" to read keys to be deleted from stdindjm2020-06-261-17/+54
| | | | bz#3180; ok dtucker@
* Cast lifetime to u_long for comparison to prevent unsigned comparisondtucker2020-03-161-2/+2
| | | | warning on 32bit arches. Spotted by deraadt, ok djm.
* change explicit_bzero();free() to freezero()jsg2020-02-261-7/+4
| | | | | | | | While freezero() returns early if the pointer is NULL the tests for NULL in callers are left to avoid warnings about passing an uninitialised size argument across a function boundry. ok deraadt@ djm@
* Ensure that the key lifetime provided fits within the values allowed bydtucker2020-02-181-6/+7
| | | | | the wire format (u32). Prevents integer wraparound of the timeout values. bz#3119, ok markus@ djm@
* Replace "security key" with "authenticator" in program messages.naddy2020-02-061-4/+4
| | | | | | | This replaces "security key" in error/usage/verbose messages and distinguishes between "authenticator" and "authenticator-hosted key". ok djm@
* factor out reading/writing sshbufs to dedicated functions;djm2020-01-251-4/+2
| | | | feedback and ok markus@
* Document loading of resident keys from a FIDO authenticator.naddy2020-01-171-25/+15
| | | | | | | | * Rename -O to -K to keep "-O option" available. * Document -K. * Trim usage() message down to synopsis, like all other commands. ok markus@
* Extends the SK API to accept a set of key/value options for alldjm2020-01-061-2/+3
| | | | | | | | | | | | | | | | | | operations. These are intended to future-proof the API a little by making it easier to specify additional fields for without having to change the API version for each. At present, only two options are defined: one to explicitly specify the device for an operation (rather than accepting the middleware's autoselection) and another to specify the FIDO2 username that may be used when generating a resident key. These new options may be invoked at key generation time via ssh-keygen -O This also implements a suggestion from Markus to avoid "int" in favour of uint32_t for the algorithm argument in the API, to make implementation of ssh-sk-client/helper a little easier. feedback, fixes and ok markus@
* implement loading resident keys in ssh-adddjm2019-12-301-5/+63
| | | | | | | "ssh-add -O" will load resident keys from a FIDO2 token and add them to a ssh-agent. feedback and ok markus@
* Add new structure for signature optionsdjm2019-11-251-2/+2
| | | | | | | | | This is populated during signature verification with additional fields that are present in and covered by the signature. At the moment, it is only used to record security key-specific options, especially the flags field. with and ok markus@
* additional missing stdarg.h includes when built without WITH_OPENSSL; ok djm@naddy2019-11-181-1/+2
|
* directly support U2F/FIDO2 security keys in OpenSSH by linkingdjm2019-11-141-1/+4
| | | | | | against the (previously external) USB HID middleware. The dlopen() capability still exists for alternate middlewares, e.g. for Bluetooth, NFC and test/debugging.
* enable ed25519 support; ok djmmarkus2019-11-121-2/+3
|
* ssh-add support for U2F/FIDO keysdjm2019-10-311-10/+27
|
* add new agent key constraint for U2F/FIDO providerdjm2019-10-311-3/+3
| | | | feedback & ok markus@
* fixes for !WITH_OPENSSL compilation; ok dtucker@djm2019-09-061-2/+5
|
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-3/+3
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Replace calls to ssh_malloc_init() by a static init of malloc_options.otto2019-06-061-2/+1
| | | | Prepares for changes in the way malloc is initialized. ok guenther@ dtucker@
* add "-v" flags to ssh-add and ssh-pkcs11-helper to turn up debugdjm2019-01-211-2/+14
| | | | | | | | | | verbosity. Make ssh-agent turn on ssh-pkcs11-helper's verbosity when it is run in debug mode ("ssh-agent -d"), so we get to see errors from the PKCS#11 code. ok markus@
* add option to test whether keys in an agent are usable, by performingdjm2019-01-201-3/+49
| | | | | | a signature and a verification using each key "ssh-add -T pubkey [...]" work by markus@, ok djm@
* Make "ssh-add -q" do what it says on the tin: silence output fromdjm2018-09-191-23/+39
| | | | | | successful operations. Based on patch from Thijs van Dijk; ok dtucker@ deraadt@
* Add experimental support for PQC XMSS keys (Extended Hash-Based Signatures)markus2018-02-231-5/+69
| | | | | | | The code is not compiled in by default (see WITH_XMSS in Makefile.inc) Joint work with stefan-lukas_gazdag at genua.eu See https://tools.ietf.org/html/draft-irtf-cfrg-xmss-hash-based-signatures-12 ok djm@
* add a -q option to ssh-add to make it quiet on success.dlg2017-08-291-13/+23
| | | | | | | | if you want to silence ssh-add without this you generally redirect the output to /dev/null, but that can hide error output which you should see. ok djm@
* remove post-SSHv1 removal dead code from rsa.c and merge thedjm2017-07-011-2/+1
| | | | remaining bit that it still used into ssh-rsa.c; ok markus
* remove unused wrapper functions from key.[ch]; ok djm@markus2017-05-301-2/+2
|
* more simplification and removal of SSHv1-related code; ok djm@naddy2017-05-051-36/+26
|
* since a couple of people have asked, leave a comment explaining why wedjm2017-05-041-1/+6
| | | | retain SSH v.1 support in the "delete all keys from agent" path.
* unifdef WITH_SSH1djm2017-04-301-8/+1
| | | | ok markus@
* Add a function to enable security-related malloc_options. With and okdtucker2016-02-151-1/+2
| | | | deraadt@, something similar has been in the snaps for a while.
* Remove NULL-checks before sshkey_free().mmcc2015-12-111-5/+3
| | | | ok djm@
* fix some signed/unsigned integer type mismatches in formatdjm2015-10-151-2/+2
| | | | strings; reported by Nicholas Lemonias
* - Fix error message: passphrase needs to be at least 5 characters, not 4.tim2015-09-131-7/+6
| | | | | | | - Remove unused function argument. - Remove two unnecessary variables. OK djm@
* When adding keys to the agent, don't ignore the comment of keys for which thetim2015-09-131-9/+8
| | | | | | user is prompted for a passphrase. Tweak and OK djm@
* delete support for legacy v00 certificates; "sure" markus@ dtucker@djm2015-07-031-3/+2
|
* don't try to load .ssh/identity by default if SSH1 is disabled; ok markus@naddy2015-03-261-1/+3
|
* ignore v1 errors on ssh-add -D; only try v2 keys on -l/-L (unless WITH_SSH1)markus2015-03-251-7/+11
| | | | ok djm@
* make "ssh-add -d" properly remove a corresponding certificate, and alsohalex2015-02-211-4/+10
| | | | | | not whine and fail if there is none ok djm@
* slightly extend the passphrase prompt if running with -c in order tohalex2015-02-031-4/+5
| | | | | | give the user a chance to notice if unintentionally running without it wording tweak and ok djm@
* update to new API (key_fingerprint => sshkey_fingerprint)djm2015-01-281-2/+3
| | | | | check sshkey_fingerprint return values; ok markus
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-3/+3
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* move authfd.c and its tentacles to the new buffer/key API;djm2015-01-141-108/+151
| | | | ok markus@
* Add FingerprintHash option to control algorithm used for keydjm2014-12-211-13/+41
| | | | | | | fingerprints. Default changes from MD5 to SHA256 and format from hex to base64. Feedback and ok naddy@ markus@
* Prefer setvbuf() to setlinebuf() for portability; ok deraadt@millert2014-11-261-2/+2
|
* fix ssh-add crash while loading more than one keybenno2014-07-091-3/+3
| | | | ok markus@
* make stdout line-buffered; saves partial output getting lost whendjm2014-07-031-1/+3
| | | | | | ssh-add fatal()s part-way through (e.g. when listing keys from an agent that supports key types that ssh-add doesn't); bz#2234, reported by Phil Pennock
* fix loading of private keysmarkus2014-06-271-5/+5
|