OpenBSD CVS

CVS log for src/usr.bin/ssh/sshkey.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.142 / (download) - annotate - [select for diffs], Thu Jan 11 01:45:36 2024 UTC (4 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.141: +9 -1 lines
Diff to previous 1.141 (colored)

make DSA key support compile-time optional, defaulting to on

ok markus@

Revision 1.141 / (download) - annotate - [select for diffs], Wed Dec 20 00:06:25 2023 UTC (4 months, 3 weeks ago) by jsg
Branch: MAIN
Changes since 1.140: +2 -2 lines
Diff to previous 1.140 (colored)

spelling; ok markus@

Revision 1.140 / (download) - annotate - [select for diffs], Mon Oct 16 08:40:00 2023 UTC (7 months ago) by dtucker
Branch: MAIN
Changes since 1.139: +3 -2 lines
Diff to previous 1.139 (colored)

Move declaration of "len" into the block where it's used.  This lets
us compile Portable with -Werror with when OpenSSL doesn't have Ed25519
support.

Revision 1.139 / (download) - annotate - [select for diffs], Wed Oct 11 22:41:05 2023 UTC (7 months ago) by djm
Branch: MAIN
Changes since 1.138: +35 -2 lines
Diff to previous 1.138 (colored)

add support for reading ED25519 private keys in PEM PKCS8 format;
ok markus@ tb@

Revision 1.138 / (download) - annotate - [select for diffs], Mon Aug 21 04:36:46 2023 UTC (8 months, 3 weeks ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.137: +2 -1 lines
Diff to previous 1.137 (colored)

want stdlib.h for free(3)

Revision 1.137 / (download) - annotate - [select for diffs], Thu Jul 27 22:23:05 2023 UTC (9 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

increase default KDF work-factor for OpenSSH format private keys from
16 to 24; { feedback ok } x { deraadt markus }

Revision 1.136 / (download) - annotate - [select for diffs], Wed Jun 21 05:10:26 2023 UTC (10 months, 3 weeks ago) by djm
Branch: MAIN
Changes since 1.135: +5 -2 lines
Diff to previous 1.135 (colored)

better validate CASignatureAlgorithms in ssh_config and sshd_config.

Previously this directive would accept certificate algorithm names, but
these were unusable in practice as OpenSSH does not support CA chains.

part of bz3577; ok dtucker@

Revision 1.135 / (download) - annotate - [select for diffs], Fri Mar 31 03:22:49 2023 UTC (13 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.134: +1 -4 lines
Diff to previous 1.134 (colored)

remove unused variable; prompted by Coverity CID 291879

Revision 1.134 / (download) - annotate - [select for diffs], Fri Oct 28 02:47:04 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.133: +20 -2 lines
Diff to previous 1.133 (colored)

put sshkey_check_rsa_length() back in sshkey.c to unbreak
OPENSSL=no builds

Revision 1.133 / (download) - annotate - [select for diffs], Fri Oct 28 00:44:44 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.132: +29 -244 lines
Diff to previous 1.132 (colored)

refactor sshkey_private_deserialize

feedback/ok markus@

Revision 1.132 / (download) - annotate - [select for diffs], Fri Oct 28 00:44:17 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.131: +26 -166 lines
Diff to previous 1.131 (colored)

refactor sshkey_private_serialize_opt()

feedback/ok markus@

Revision 1.131 / (download) - annotate - [select for diffs], Fri Oct 28 00:43:30 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.130: +33 -91 lines
Diff to previous 1.130 (colored)

refactor certify

feedback/ok markus@

Revision 1.130 / (download) - annotate - [select for diffs], Fri Oct 28 00:43:08 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.129: +17 -64 lines
Diff to previous 1.129 (colored)

refactor sshkey_sign() and sshkey_verify()

feedback/ok markus@

Revision 1.129 / (download) - annotate - [select for diffs], Fri Oct 28 00:41:52 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.128: +22 -226 lines
Diff to previous 1.128 (colored)

refactor sshkey_from_blob_internal()

feedback/ok markus@

Revision 1.128 / (download) - annotate - [select for diffs], Fri Oct 28 00:41:17 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.127: +14 -123 lines
Diff to previous 1.127 (colored)

refactor sshkey_from_private()

feedback/ok markus@

Revision 1.127 / (download) - annotate - [select for diffs], Fri Oct 28 00:39:29 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.126: +14 -123 lines
Diff to previous 1.126 (colored)

factor out key generation

feedback/ok markus@

Revision 1.126 / (download) - annotate - [select for diffs], Fri Oct 28 00:38:58 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.125: +23 -119 lines
Diff to previous 1.125 (colored)

refactor and simplify sshkey_read()

feedback/ok markus@

Revision 1.125 / (download) - annotate - [select for diffs], Fri Oct 28 00:37:24 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.124: +24 -91 lines
Diff to previous 1.124 (colored)

factor out public key serialization

feedback/ok markus@

Revision 1.124 / (download) - annotate - [select for diffs], Fri Oct 28 00:36:31 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.123: +26 -72 lines
Diff to previous 1.123 (colored)

factor out sshkey_equal_public()

feedback/ok markus@

Revision 1.123 / (download) - annotate - [select for diffs], Fri Oct 28 00:35:40 2022 UTC (18 months, 2 weeks ago) by djm
Branch: MAIN
Changes since 1.122: +167 -258 lines
Diff to previous 1.122 (colored)

begin big refactor of sshkey

Move keytype data and some of the type-specific code (allocation,
cleanup, etc) out into each key type's implementation. Subsequent
commits will move more, with the goal of having each key-*.c file
owning as much of its keytype's implementation as possible.

lots of feedback + ok markus@

Revision 1.122 / (download) - annotate - [select for diffs], Sat Sep 17 10:30:45 2022 UTC (19 months, 4 weeks ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.121: +16 -10 lines
Diff to previous 1.121 (colored)

Add a sshkey_check_rsa_length() call for checking the length of an
RSA key; ok markus@

Revision 1.121 / (download) - annotate - [select for diffs], Thu May 5 01:04:14 2022 UTC (2 years ago) by djm
Branch: MAIN
Changes since 1.120: +32 -40 lines
Diff to previous 1.120 (colored)

sshkey_unshield_private() contains a exact duplicate of the code in
private2_check_padding(). Pull private2_check_padding() up so the code
can be reused. From Martin Vahlensieck, ok deraadt@

Revision 1.120 / (download) - annotate - [select for diffs], Thu Jan 6 22:05:42 2022 UTC (2 years, 4 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.119: +24 -1 lines
Diff to previous 1.119 (colored)

add a helper function to match a key type to a list of signature
algorithms. RSA keys can make signatures with multiple algorithms,
so some special handling is required.
ok markus@

Revision 1.119 / (download) - annotate - [select for diffs], Fri Jul 23 03:37:52 2021 UTC (2 years, 9 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.118: +21 -11 lines
Diff to previous 1.118 (colored)

Let allowed signers files used by ssh-keygen(1) signatures support key
lifetimes, and allow the verification mode to specify a signature time
to check at. This is intended for use by git to support signing
objects using ssh keys. ok dtucker@

Revision 1.118 / (download) - annotate - [select for diffs], Mon Jul 12 06:08:57 2021 UTC (2 years, 10 months ago) by dtucker
Branch: MAIN
Changes since 1.117: +5 -17 lines
Diff to previous 1.117 (colored)

Use existing format_absolute_time() function when printing cert validity
instead of doing it inline.  Part of bz#3329.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Jul 5 01:21:07 2021 UTC (2 years, 10 months ago) by dtucker
Branch: MAIN
Changes since 1.116: +1 -2 lines
Diff to previous 1.116 (colored)

Fix a couple of whitespace things.  Portable already has these so this
removes two diffs between the two.

Revision 1.116 / (download) - annotate - [select for diffs], Sat Apr 3 06:18:41 2021 UTC (3 years, 1 month ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.115: +11 -11 lines
Diff to previous 1.115 (colored)

highly polished whitespace, mostly fixing spaces-for-tab and bad
indentation on continuation lines. Prompted by GHPR#185

Revision 1.115 / (download) - annotate - [select for diffs], Tue Feb 2 22:36:46 2021 UTC (3 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.114: +20 -1 lines
Diff to previous 1.114 (colored)

fix memleaks in private key deserialisation; enforce more consistency
between redundant fields in private key certificate and private key
body; ok markus@

Revision 1.114 / (download) - annotate - [select for diffs], Tue Jan 26 00:49:30 2021 UTC (3 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.113: +35 -4 lines
Diff to previous 1.113 (colored)

move check_host_cert() from sshconnect,c to sshkey.c and refactor
it to make it more generally usable and testable.

ok markus@

Revision 1.113 / (download) - annotate - [select for diffs], Fri Jan 15 04:31:25 2021 UTC (3 years, 4 months ago) by dtucker
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

Make output buffer larger to prevent potential truncation warnings from
compilers not smart enough to know the strftime calls won't ever fully
fill "to" and "from".  ok djm@

Revision 1.112 / (download) - annotate - [select for diffs], Mon Oct 19 22:49:23 2020 UTC (3 years, 6 months ago) by dtucker
Branch: MAIN
Changes since 1.111: +5 -5 lines
Diff to previous 1.111 (colored)

Adapt XMSS to new logging infrastructure.  With markus@, ok djm@.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Aug 27 01:06:19 2020 UTC (3 years, 8 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.110: +11 -9 lines
Diff to previous 1.110 (colored)

support for user-verified FIDO keys

FIDO2 supports a notion of "user verification" where the user is
required to demonstrate their identity to the token before particular
operations (e.g. signing). Typically this is done by authenticating
themselves using a PIN that has been set on the token.

This adds support for generating and using user verified keys where
the verification happens via PIN (other options might be added in the
future, but none are in common use now). Practically, this adds
another key generation option "verify-required" that yields a key that
requires a PIN before each authentication.

feedback markus@ and Pedro Martelletto; ok markus@

Revision 1.110 / (download) - annotate - [select for diffs], Wed Jun 24 15:07:33 2020 UTC (3 years, 10 months ago) by markus
Branch: MAIN
Changes since 1.109: +4 -2 lines
Diff to previous 1.109 (colored)

only call sshkey_xmss_init() once for KEY_XMSS_CERT; ok djm

Revision 1.109 / (download) - annotate - [select for diffs], Mon Jun 22 05:58:35 2020 UTC (3 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.108: +3 -1 lines
Diff to previous 1.108 (colored)

Add support for FIDO webauthn (verification only). webauthn is a
standard for using FIDO keys in web browsers. webauthn signatures are
a slightly different format to plain FIDO signatures - this support
allows verification of these. Feedback and ok markus@

Revision 1.108 / (download) - annotate - [select for diffs], Sat Apr 11 10:16:11 2020 UTC (4 years, 1 month ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.107: +40 -147 lines
Diff to previous 1.107 (colored)

Refactor private key parsing. Eliminates a fair bit of duplicated
code and fixes oss-fuzz#20074 (NULL deref) caused by a missing
key type check in the ECDSA_CERT parsing path.

feedback and ok markus@

Revision 1.107 / (download) - annotate - [select for diffs], Wed Apr 8 00:08:46 2020 UTC (4 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.106: +65 -1 lines
Diff to previous 1.106 (colored)

add sshkey_parse_pubkey_from_private_fileblob_type()

Extracts a public key from the unencrypted envelope of a new-style
OpenSSH private key.

ok markus@

Revision 1.106 / (download) - annotate - [select for diffs], Wed Apr 8 00:07:19 2020 UTC (4 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.105: +5 -16 lines
Diff to previous 1.105 (colored)

simplify sshkey_parse_private_fileblob_type()

Try new format parser for all key types first, fall back to PEM
parser only for invalid format errors.

ok markus@

Revision 1.105 / (download) - annotate - [select for diffs], Wed Apr 8 00:05:59 2020 UTC (4 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.104: +7 -1 lines
Diff to previous 1.104 (colored)

check private key type against requested key type in new-style private
decoding; ok markus@

Revision 1.104 / (download) - annotate - [select for diffs], Wed Apr 8 00:04:32 2020 UTC (4 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.103: +19 -8 lines
Diff to previous 1.103 (colored)

check that pubkey in private key envelope matches actual private key

(this public key is currently unusued)

ok markus@

Revision 1.103 / (download) - annotate - [select for diffs], Wed Apr 8 00:01:52 2020 UTC (4 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.102: +114 -40 lines
Diff to previous 1.102 (colored)

refactor private key parsing a little

Split out the base64 decoding and private section decryption steps in
to separate functions. This will make the decryption step easier to fuzz
as well as making it easier to write a "load public key from new-format
private key" function.

ok markus@

Revision 1.102 / (download) - annotate - [select for diffs], Fri Mar 6 18:23:17 2020 UTC (4 years, 2 months ago) by markus
Branch: MAIN
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

sshkey_cert_check_authority requires reason to be set; ok djm

Revision 1.101 / (download) - annotate - [select for diffs], Fri Mar 6 18:21:28 2020 UTC (4 years, 2 months ago) by markus
Branch: MAIN
Changes since 1.100: +8 -8 lines
Diff to previous 1.100 (colored)

passphrase depends on kdfname, not ciphername (possible null-deref);
ok djm

Revision 1.100 / (download) - annotate - [select for diffs], Wed Feb 26 13:40:09 2020 UTC (4 years, 2 months ago) by jsg
Branch: MAIN
Changes since 1.99: +15 -29 lines
Diff to previous 1.99 (colored)

change explicit_bzero();free() to freezero()

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@

Revision 1.99 / (download) - annotate - [select for diffs], Tue Jan 21 05:56:56 2020 UTC (4 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.98: +4 -1 lines
Diff to previous 1.98 (colored)

fix ssh-keygen not displaying authenticator touch prompt;
reported by jmc@

Revision 1.98 / (download) - annotate - [select for diffs], Mon Dec 30 09:23:28 2019 UTC (4 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

SK API and sk-helper error/PIN passing

Allow passing a PIN via the SK API (API major crank) and let the
ssh-sk-helper API follow.

Also enhance the ssh-sk-helper API to support passing back an error
code instead of a complete reply. Will be used to signal "wrong PIN",
etc.

feedback and ok markus@

Revision 1.97 / (download) - annotate - [select for diffs], Fri Dec 13 19:09:10 2019 UTC (4 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.96: +5 -8 lines
Diff to previous 1.96 (colored)

use ssh-sk-helper for all security key signing operations

This extracts and refactors the client interface for ssh-sk-helper
from ssh-agent and generalises it for use by the other programs.
This means that most OpenSSH tools no longer need to link against
libfido2 or directly interact with /dev/uhid*

requested by, feedback and ok markus@

Revision 1.96 / (download) - annotate - [select for diffs], Mon Nov 25 00:51:37 2019 UTC (4 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.95: +14 -5 lines
Diff to previous 1.95 (colored)

Add new structure for signature options

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@

Revision 1.95 / (download) - annotate - [select for diffs], Mon Nov 18 06:58:00 2019 UTC (4 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.94: +2 -1 lines
Diff to previous 1.94 (colored)

fix a bug that prevented serialisation of ed25519-sk keys

Revision 1.94 / (download) - annotate - [select for diffs], Mon Nov 18 06:39:02 2019 UTC (4 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.93: +7 -1 lines
Diff to previous 1.93 (colored)

fix bug that prevented certification of ed25519-sk keys

Revision 1.93 / (download) - annotate - [select for diffs], Fri Nov 15 06:00:20 2019 UTC (4 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.92: +33 -57 lines
Diff to previous 1.92 (colored)

remove most uses of BN_CTX

We weren't following the rules re BN_CTX_start/BN_CTX_end and the places
we were using it didn't benefit from its use anyway. ok dtucker@

Revision 1.92 / (download) - annotate - [select for diffs], Wed Nov 13 22:00:21 2019 UTC (4 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.91: +6 -1 lines
Diff to previous 1.91 (colored)

in order to be able to figure out the number of signatures left on
a shielded key, we need to transfer the number of signatures left
from the private to the public key. ok djm@

Revision 1.91 / (download) - annotate - [select for diffs], Wed Nov 13 07:53:10 2019 UTC (4 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

fix shield/unshield for xmss keys:
- in ssh-agent we need to delay the call to shield
  until we have received key specific options.
- when serializing xmss keys for shield we need to deal with
  all optional components (e.g. state might not be loaded).
ok djm@

Revision 1.90 / (download) - annotate - [select for diffs], Tue Nov 12 19:33:08 2019 UTC (4 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.89: +153 -1 lines
Diff to previous 1.89 (colored)

enable ed25519 support; ok djm

Revision 1.89 / (download) - annotate - [select for diffs], Tue Nov 12 19:31:18 2019 UTC (4 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.88: +6 -1 lines
Diff to previous 1.88 (colored)

implement sshsk_ed25519_inner_sig(); ok djm

Revision 1.88 / (download) - annotate - [select for diffs], Tue Nov 12 19:30:50 2019 UTC (4 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

rename sshsk_ecdsa_sign() to sshsk_sign(); ok djm

Revision 1.87 / (download) - annotate - [select for diffs], Tue Nov 12 19:29:24 2019 UTC (4 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.86: +5 -1 lines
Diff to previous 1.86 (colored)

implement ssh-ed25519-sk verification; ok djm@

Revision 1.86 / (download) - annotate - [select for diffs], Thu Oct 31 21:23:19 2019 UTC (4 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.85: +18 -8 lines
Diff to previous 1.85 (colored)

Refactor signing - use sshkey_sign for everything, including the new
U2F signatures.

Don't use sshsk_ecdsa_sign() directly, instead make it reachable via
sshkey_sign() like all other signature operations. This means that
we need to add a provider argument to sshkey_sign(), so most of this
change is mechanically adding that.

Suggested by / ok markus@

Revision 1.85 / (download) - annotate - [select for diffs], Thu Oct 31 21:15:14 2019 UTC (4 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.84: +179 -26 lines
Diff to previous 1.84 (colored)

Initial infrastructure for U2F/FIDO support

Key library support: including allocation, marshalling public/private
keys and certificates, signature validation.

feedback & ok markus@

Revision 1.84 / (download) - annotate - [select for diffs], Wed Oct 9 00:04:42 2019 UTC (4 years, 7 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.83: +22 -4 lines
Diff to previous 1.83 (colored)

fix an unreachable integer overflow similar to the XMSS case, and some
other NULL dereferences found by fuzzing.

fix with and ok markus@

Revision 1.83 / (download) - annotate - [select for diffs], Fri Sep 6 05:23:55 2019 UTC (4 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.82: +5 -1 lines
Diff to previous 1.82 (colored)

fixes for !WITH_OPENSSL compilation; ok dtucker@

Revision 1.82 / (download) - annotate - [select for diffs], Tue Sep 3 08:31:20 2019 UTC (4 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.81: +7 -7 lines
Diff to previous 1.81 (colored)

make get_sigtype public as sshkey_get_sigtype(); ok markus@

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jul 16 13:18:39 2019 UTC (4 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.80: +7 -20 lines
Diff to previous 1.80 (colored)

remove mostly vestigal uuencode.[ch]; moving the only unique
functionality there (wrapping of base64-encoded data) to sshbuf
functions; feedback and ok markus@

Revision 1.80 / (download) - annotate - [select for diffs], Mon Jul 15 13:16:29 2019 UTC (4 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.79: +55 -21 lines
Diff to previous 1.79 (colored)

support PKCS8 as an optional format for storage of private keys,
enabled via "ssh-keygen -m PKCS8" on operations that save private
keys to disk.

The OpenSSH native key format remains the default, but PKCS8 is a
superior format to PEM if interoperability with non-OpenSSH software
is required, as it may use a less terrible KDF (IIRC PEM uses a single
round of MD5 as a KDF).

adapted from patch by Jakub Jelen via bz3013; ok markus

Revision 1.79 / (download) - annotate - [select for diffs], Sun Jul 7 01:05:00 2019 UTC (4 years, 10 months ago) by dtucker
Branch: MAIN
Changes since 1.78: +2 -4 lines
Diff to previous 1.78 (colored)

Remove some set but never used variables. ok daraadt@

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jun 27 06:29:35 2019 UTC (4 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

fix NULL deference (bzero) on error path added in last commit;
spotted by Reynir Björnsson

ok deraadt@ markus@ tb@

Revision 1.77 / (download) - annotate - [select for diffs], Sun Jun 23 12:21:46 2019 UTC (4 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

fix mismatch proto/decl from key shielding change; spotted via oss-fuzz

Revision 1.76 / (download) - annotate - [select for diffs], Fri Jun 21 04:21:05 2019 UTC (4 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.75: +282 -17 lines
Diff to previous 1.75 (colored)

Add protection for private keys at rest in RAM against speculation
and memory sidechannel attacks like Spectre, Meltdown, Rowhammer and
Rambleed. This change encrypts private keys when they are not in use
with a symmetic key that is derived from a relatively large "prekey"
consisting of random data (currently 16KB).

Attackers must recover the entire prekey with high accuracy before
they can attempt to decrypt the shielded private key, but the current
generation of attacks have bit error rates that, when applied
cumulatively to the entire prekey, make this unlikely.

Implementation-wise, keys are encrypted "shielded" when loaded and then
automatically and transparently unshielded when used for signatures or
when being saved/serialised.

Hopefully we can remove this in a few years time when computer
architecture has become less unsafe.

been in snaps for a bit already; thanks deraadt@

ok dtucker@ deraadt@

Revision 1.75 / (download) - annotate - [select for diffs], Mon May 20 00:20:35 2019 UTC (4 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.74: +8 -1 lines
Diff to previous 1.74 (colored)

When signing certificates with an RSA key, default to using the
rsa-sha2-512 signature algorithm. Certificates signed by RSA keys
will therefore be incompatible with OpenSSH < 7.2 unless the default
is overridden.

Document the ability of the ssh-keygen -t flag to override the
signature algorithm when signing certificates, and the new default.

ok deraadt@

Revision 1.74 / (download) - annotate - [select for diffs], Fri May 3 03:25:18 2019 UTC (5 years ago) by dtucker
Branch: MAIN
Changes since 1.73: +4 -2 lines
Diff to previous 1.73 (colored)

Wrap XMSS including in ifdef.  Patch from markus at blueflash.cc, ok djm

Revision 1.73 / (download) - annotate - [select for diffs], Mon Jan 21 09:54:11 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.72: +26 -70 lines
Diff to previous 1.72 (colored)

Make sshpkt_get_bignum2() allocate the bignum it is parsing rather
than make the caller do it. Saves a lot of boilerplate code.

from markus@ ok djm@

Revision 1.72 / (download) - annotate - [select for diffs], Thu Oct 11 00:52:46 2018 UTC (5 years, 7 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

typo in plain RSA algorithm counterpart names for certificates;
spotted by Adam Eijdenberg; ok dtucker@

Revision 1.71 / (download) - annotate - [select for diffs], Tue Oct 9 05:42:23 2018 UTC (5 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.70: +11 -2 lines
Diff to previous 1.70 (colored)

Treat all PEM_read_bio_PrivateKey() errors when a passphrase is specified
as "incorrect passphrase" instead of trying to choose between that and
"invalid format".

libcrypto can return ASN1 parsing errors rather than the expected
decrypt error in certain infrequent cases when trying to decrypt/parse
PEM private keys when supplied with an invalid passphrase.

Report and repro recipe from Thomas Deutschmann in bz#2901

ok markus@

Revision 1.70 / (download) - annotate - [select for diffs], Fri Sep 14 04:17:44 2018 UTC (5 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.69: +6 -17 lines
Diff to previous 1.69 (colored)

garbage-collect moribund ssh_new_private() API.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Sep 13 02:08:33 2018 UTC (5 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.68: +331 -289 lines
Diff to previous 1.68 (colored)

hold our collective noses and use the openssl-1.1.x API in OpenSSH;
feedback and ok tb@ jsing@ markus@

Revision 1.68 / (download) - annotate - [select for diffs], Wed Sep 12 01:32:54 2018 UTC (5 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.67: +22 -1 lines
Diff to previous 1.67 (colored)

add sshkey_check_cert_sigtype() that checks a cert->signature_type
against a supplied whitelist; ok markus

Revision 1.67 / (download) - annotate - [select for diffs], Wed Sep 12 01:31:30 2018 UTC (5 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.66: +67 -26 lines
Diff to previous 1.66 (colored)

add cert->signature_type field and keep it in sync with certificate
signature wrt loading and certification operations; ok markus@

Revision 1.66 / (download) - annotate - [select for diffs], Tue Jul 3 13:20:25 2018 UTC (5 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

some finesse to fix RSA-SHA2 certificate authentication for certs
hosted in ssh-agent

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jul 3 11:39:54 2018 UTC (5 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.64: +75 -21 lines
Diff to previous 1.64 (colored)

Improve strictness and control over RSA-SHA2 signature types:

In ssh, when an agent fails to return a RSA-SHA2 signature when
requested and falls back to RSA-SHA1 instead, retry the signature to
ensure that the public key algorithm sent in the SSH_MSG_USERAUTH
matches the one in the signature itself.

In sshd, strictly enforce that the public key algorithm sent in the
SSH_MSG_USERAUTH message matches what appears in the signature.

Make the sshd_config PubkeyAcceptedKeyTypes and
HostbasedAcceptedKeyTypes options control accepted signature algorithms
(previously they selected supported key types). This allows these
options to ban RSA-SHA1 in favour of RSA-SHA2.

Add new signature algorithms "rsa-sha2-256-cert-v01@openssh.com" and
"rsa-sha2-512-cert-v01@openssh.com" to force use of RSA-SHA2 signatures
with certificate keys.

feedback and ok markus@

Revision 1.64 / (download) - annotate - [select for diffs], Thu Mar 22 07:05:48 2018 UTC (6 years, 1 month ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.63: +6 -1 lines
Diff to previous 1.63 (colored)

ssh/xmss: fix deserialize for certs; ok djm@

Revision 1.63 / (download) - annotate - [select for diffs], Fri Mar 2 02:08:03 2018 UTC (6 years, 2 months ago) by djm
Branch: MAIN
Changes since 1.62: +135 -113 lines
Diff to previous 1.62 (colored)

refactor sshkey_read() to make it a little more, err, readable.
ok markus

Revision 1.62 / (download) - annotate - [select for diffs], Fri Feb 23 15:58:38 2018 UTC (6 years, 2 months ago) by markus
Branch: MAIN
Changes since 1.61: +395 -15 lines
Diff to previous 1.61 (colored)

Add experimental support for PQC XMSS keys (Extended Hash-Based Signatures)
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@

Revision 1.61 / (download) - annotate - [select for diffs], Wed Feb 14 16:03:32 2018 UTC (6 years, 3 months ago) by jsing
Branch: MAIN
Changes since 1.60: +11 -26 lines
Diff to previous 1.60 (colored)

Some obvious freezero() conversions.

This also zeros an ed25519_pk when it was not being zeroed previously.

ok djm@ dtucker@

Revision 1.60 / (download) - annotate - [select for diffs], Wed Feb 7 02:06:51 2018 UTC (6 years, 3 months ago) by jsing
Branch: MAIN
Changes since 1.59: +18 -35 lines
Diff to previous 1.59 (colored)

Remove all guards for calls to OpenSSL free functions - all of these
functions handle NULL, from at least OpenSSL 1.0.1g onwards.

Prompted by dtucker@ asking about guards for RSA_free(), when looking at
openssh-portable pr#84 on github.

ok deraadt@ dtucker@

Revision 1.59 / (download) - annotate - [select for diffs], Mon Dec 18 02:25:15 2017 UTC (6 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.58: +5 -4 lines
Diff to previous 1.58 (colored)

pass negotiated signing algorithm though to sshkey_verify() and
check that the negotiated algorithm matches the type in the
signature (only matters for RSA SHA1/SHA2 sigs). ok markus@

Revision 1.58 / (download) - annotate - [select for diffs], Mon Dec 18 02:22:29 2017 UTC (6 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.57: +26 -1 lines
Diff to previous 1.57 (colored)

sshkey_sigtype() function to return the type of a signature;
ok markus@

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 13 06:24:51 2017 UTC (6 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

BIO_get_mem_data() is supposed to take a char* as pointer argument,
so don't pass it a const char*

Revision 1.56 / (download) - annotate - [select for diffs], Sat Aug 12 06:42:52 2017 UTC (6 years, 9 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

Switch from aes256-cbc to aes256-ctr for encrypting new-style
private keys. The latter having the advantage of being supported
for no-OpenSSL builds; bz#2754 ok markus@

Revision 1.55 / (download) - annotate - [select for diffs], Wed Jul 19 08:30:41 2017 UTC (6 years, 9 months ago) by markus
Branch: MAIN
Changes since 1.54: +1 -6 lines
Diff to previous 1.54 (colored)

fix support for unknown key types; ok djm@

Revision 1.54 / (download) - annotate - [select for diffs], Sat Jul 1 13:50:45 2017 UTC (6 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.53: +3 -4 lines
Diff to previous 1.53 (colored)

remove post-SSHv1 removal dead code from rsa.c and merge the
remaining bit that it still used into ssh-rsa.c; ok markus

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jun 28 01:09:22 2017 UTC (6 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.52: +21 -4 lines
Diff to previous 1.52 (colored)

Allow ssh-keygen to use a key held in ssh-agent as a CA when signing
certificates. bz#2377 ok markus

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jun 9 06:40:24 2017 UTC (6 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.51: +62 -40 lines
Diff to previous 1.51 (colored)

better translate libcrypto errors by looking deeper in the accursed
error stack for codes that indicate the wrong passphrase was supplied
for a PEM key. bz#2699 ok dtucker@

Revision 1.51 / (download) - annotate - [select for diffs], Wed May 31 09:15:42 2017 UTC (6 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.50: +4 -3 lines
Diff to previous 1.50 (colored)

Switch to recallocarray() for a few operations.  Both growth and shrinkage
are handled safely, and there also is no need for preallocation dances.
Future changes in this area will be less error prone.
Review and one bug found by markus

Revision 1.50 / (download) - annotate - [select for diffs], Mon May 8 06:11:06 2017 UTC (7 years ago) by djm
Branch: MAIN
Changes since 1.49: +4 -3 lines
Diff to previous 1.49 (colored)

make requesting bad ECDSA bits yield the same error (SSH_ERR_KEY_LENGTH)
as the same mistake for RSA/DSA

Revision 1.49 / (download) - annotate - [select for diffs], Sun May 7 23:15:59 2017 UTC (7 years ago) by djm
Branch: MAIN
Changes since 1.48: +24 -5 lines
Diff to previous 1.48 (colored)

Refuse RSA keys <1024 bits in length. Improve reporting for keys that
do not meet this requirement. ok markus@

Revision 1.48 / (download) - annotate - [select for diffs], Sun Apr 30 23:18:44 2017 UTC (7 years ago) by djm
Branch: MAIN
Changes since 1.47: +7 -56 lines
Diff to previous 1.47 (colored)

remove KEY_RSA1

ok markus@

Revision 1.47 / (download) - annotate - [select for diffs], Sun Apr 30 23:15:04 2017 UTC (7 years ago) by djm
Branch: MAIN
Changes since 1.46: +2 -6 lines
Diff to previous 1.46 (colored)

remove SSHv1 ciphers; ok markus@

Revision 1.46 / (download) - annotate - [select for diffs], Sun Apr 30 23:10:43 2017 UTC (7 years ago) by djm
Branch: MAIN
Changes since 1.45: +1 -379 lines
Diff to previous 1.45 (colored)

unifdef WITH_SSH1
ok markus@

Revision 1.45 / (download) - annotate - [select for diffs], Fri Mar 10 04:07:20 2017 UTC (7 years, 2 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.44: +5 -3 lines
Diff to previous 1.44 (colored)

fix regression in 7.4 server-sig-algs, where we were accidentally
excluding SHA2 RSA signature methods. bz#2680, patch from Nuno
Goncalves; ok dtucker@

Revision 1.44 / (download) - annotate - [select for diffs], Fri Mar 10 03:48:57 2017 UTC (7 years, 2 months ago) by dtucker
Branch: MAIN
Changes since 1.43: +4 -1 lines
Diff to previous 1.43 (colored)

Check for NULL argument to sshkey_read.  Patch from jjelen at redhat.com
via bz#2687, ok djm@

Revision 1.43 / (download) - annotate - [select for diffs], Fri Feb 17 02:31:14 2017 UTC (7 years, 2 months ago) by dtucker
Branch: MAIN
Changes since 1.42: +3 -1 lines
Diff to previous 1.42 (colored)

ifdef out "rsa1" from the list of supported keytypes when compiled without
SSH1 support.  Found by kdunlop at guralp.com, ok djm@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Feb 10 04:34:50 2017 UTC (7 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.41: +46 -5 lines
Diff to previous 1.41 (colored)

bring back r1.34 that was backed out for problems loading public keys:

    translate OpenSSL error codes to something more
    meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@

with additional fix from Jakub Jelen to solve the backout.
bz#2525 bz#2523 re-ok dtucker@

Revision 1.41 / (download) - annotate - [select for diffs], Mon Oct 24 01:09:17 2016 UTC (7 years, 6 months ago) by dtucker
Branch: MAIN
Changes since 1.40: +1 -2 lines
Diff to previous 1.40 (colored)

Remove dead breaks, found via opencoverage.net.  ok deraadt@

Revision 1.40 / (download) - annotate - [select for diffs], Tue Oct 4 21:34:40 2016 UTC (7 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.39: +9 -1 lines
Diff to previous 1.39 (colored)

add a comment about implicitly-expected checks to
sshkey_ec_validate_public()

Revision 1.39 / (download) - annotate - [select for diffs], Mon Sep 26 21:16:11 2016 UTC (7 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.38: +6 -3 lines
Diff to previous 1.38 (colored)

Avoid a theoretical signed integer overflow should BN_num_bytes()
ever violate its manpage and return a negative value. Improve
order of tests to avoid confusing increasingly pedantic compilers.

Reported by Guido Vranken from stack (css.csail.mit.edu/stack)
unstable optimisation analyser output.  ok deraadt@

Revision 1.38 / (download) - annotate - [select for diffs], Mon Sep 12 23:31:27 2016 UTC (7 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

list all supported signature algorithms in the server-sig-algs
Reported by mb AT smartftp.com in bz#2547 and (independantly)
Ron Frederick; ok markus@

Revision 1.37 / (download) - annotate - [select for diffs], Mon Sep 12 01:22:38 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.36: +6 -7 lines
Diff to previous 1.36 (colored)

Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions
rather than pulling <sys/param.h> and unknown namespace pollution.
ok djm markus dtucker

Revision 1.36 / (download) - annotate - [select for diffs], Wed Aug 3 05:41:57 2016 UTC (7 years, 9 months ago) by djm
Branch: MAIN
Changes since 1.35: +14 -23 lines
Diff to previous 1.35 (colored)

small refactor of cipher.c: make ciphercontext opaque to callers
feedback and ok markus@

Revision 1.35 / (download) - annotate - [select for diffs], Sun Jun 19 07:48:02 2016 UTC (7 years, 10 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.34: +1 -38 lines
Diff to previous 1.34 (colored)

revert 1.34; causes problems loading public keys

reported by semarie@

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jun 17 05:06:23 2016 UTC (7 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.33: +39 -2 lines
Diff to previous 1.33 (colored)

translate OpenSSL error codes to something more meaninful;
bz#2522 reported by Jakub Jelen, ok dtucker@

Revision 1.33 / (download) - annotate - [select for diffs], Mon May 2 09:36:42 2016 UTC (8 years ago) by djm
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

support SHA256 and SHA512 RSA signatures in certificates;
ok markus@

Revision 1.32 / (download) - annotate - [select for diffs], Sat Apr 9 12:39:30 2016 UTC (8 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.31: +24 -16 lines
Diff to previous 1.31 (colored)

make private key loading functions consistently handle NULL
key pointer arguments; ok markus@

Revision 1.31 / (download) - annotate - [select for diffs], Fri Dec 11 04:21:12 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.30: +10 -19 lines
Diff to previous 1.30 (colored)

Remove NULL-checks before sshbuf_free().

ok djm@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Dec 11 02:31:47 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.29: +5 -9 lines
Diff to previous 1.29 (colored)

Remove NULL-checks before sshkey_free().

ok djm@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Dec 10 17:08:40 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.28: +6 -11 lines
Diff to previous 1.28 (colored)

Remove NULL-checks before free().

ok dtucker@

Revision 1.28 / (download) - annotate - [select for diffs], Fri Dec 4 16:41:28 2015 UTC (8 years, 5 months ago) by markus
Branch: MAIN
Changes since 1.27: +23 -20 lines
Diff to previous 1.27 (colored)

implement SHA2-{256,512} for RSASSA-PKCS1-v1_5 signatures (user and host auth)
based on draft-rsa-dsa-sha2-256-03.txt and draft-ssh-ext-info-04.txt;
with & ok djm@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Nov 19 01:08:55 2015 UTC (8 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.26: +38 -1 lines
Diff to previous 1.26 (colored)

move the certificate validity formatting code to sshkey.[ch]

Revision 1.26 / (download) - annotate - [select for diffs], Mon Nov 16 23:47:52 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Replace remaining calls to index(3) with strchr(3).  OK jca@ krw@

Revision 1.25 / (download) - annotate - [select for diffs], Mon Nov 16 22:50:01 2015 UTC (8 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.24: +15 -13 lines
Diff to previous 1.24 (colored)

improve sshkey_read() semantics; only update *cpp when a key
is successfully read; ok markus@

Revision 1.24 / (download) - annotate - [select for diffs], Thu Oct 15 23:08:23 2015 UTC (8 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.23: +3 -7 lines
Diff to previous 1.23 (colored)

argument to sshkey_from_private() and sshkey_demote() can't be NULL

Revision 1.23 / (download) - annotate - [select for diffs], Sun Sep 13 14:39:16 2015 UTC (8 years, 8 months ago) by tim
Branch: MAIN
Changes since 1.22: +7 -13 lines
Diff to previous 1.22 (colored)

- Fix error message: passphrase needs to be at least 5 characters, not 4.
- Remove unused function argument.
- Remove two unnecessary variables.

OK djm@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Sep 2 07:51:12 2015 UTC (8 years, 8 months ago) by jsg
Branch: MAIN
Changes since 1.21: +11 -11 lines
Diff to previous 1.21 (colored)

Fix occurrences of "r = func() != 0" which result in the wrong error
codes being returned due to != having higher precedence than =.

ok deraadt@ markus@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Aug 19 23:19:01 2015 UTC (8 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.20: +1 -2 lines
Diff to previous 1.20 (colored)

fix double-free() in error path of DSA key generation reported by
Mateusz Kocielski; ok markus@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jul 3 03:43:18 2015 UTC (8 years, 10 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.19: +16 -92 lines
Diff to previous 1.19 (colored)

delete support for legacy v00 certificates; "sure" markus@ dtucker@

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 21 04:55:51 2015 UTC (8 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.18: +99 -75 lines
Diff to previous 1.18 (colored)

refactor: split base64 encoding of pubkey into its own
sshkey_to_base64() function and out of sshkey_write();
ok markus@

Revision 1.18 / (download) - annotate - [select for diffs], Fri May 8 03:17:49 2015 UTC (9 years ago) by djm
Branch: MAIN
Changes since 1.17: +11 -4 lines
Diff to previous 1.17 (colored)

don't choke on new-format private keys encrypted with an AEAD cipher;
bz#2366, patch from Ron Frederick; ok markus@

Revision 1.17 / (download) - annotate - [select for diffs], Mon May 4 06:10:48 2015 UTC (9 years ago) by djm
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Remove pattern length argument from match_pattern_list(),
we only ever use it for strlen(pattern).

Prompted by hanno AT hboeck.de pointing an out-of-bound read
error caused by an incorrect pattern length found using AFL
and his own tools.

ok markus@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Apr 3 22:17:27 2015 UTC (9 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.15: +7 -7 lines
Diff to previous 1.15 (colored)

correct return value in pubkey parsing, spotted by Ben Hawkes
ok markus@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Mar 6 01:40:56 2015 UTC (9 years, 2 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

fix sshkey_certify() return value for unsupported key types;
ok markus@ deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jan 26 02:59:11 2015 UTC (9 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.13: +75 -35 lines
Diff to previous 1.13 (colored)

small refactor and add some convenience functions;
ok markus

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:12 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
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)

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jan 14 10:46:28 2015 UTC (9 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

avoid an warning for the !OPENSSL case

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jan 13 07:39:19 2015 UTC (9 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.10: +27 -5 lines
Diff to previous 1.10 (colored)

add sshd_config HostbasedAcceptedKeyTypes and PubkeyAcceptedKeyTypes
options to allow sshd to control what public key types will be
accepted. Currently defaults to all. Feedback & ok markus@

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jan 12 20:13:27 2015 UTC (9 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.9: +9 -9 lines
Diff to previous 1.9 (colored)

unbreak parsing of pubkey comments; with gerhard; ok djm/deraadt

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jan 12 13:29:27 2015 UTC (9 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.8: +7 -3 lines
Diff to previous 1.8 (colored)

allow WITH_OPENSSL w/o WITH_SSH1; ok djm@

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jan 8 10:14:08 2015 UTC (9 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.7: +7 -19 lines
Diff to previous 1.7 (colored)

deprecate key_load_private_pem() and sshkey_load_private_pem()
interfaces. Refactor the generic key loading API to not require
pathnames to be specified (they weren't really used).

Fixes a few other things en passant:

Makes ed25519 keys work for hostbased authentication (ssh-keysign
previously used the PEM-only routines).

Fixes key comment regression bz#2306: key pathnames were being lost as
comment fields.

ok markus@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Dec 21 22:27:55 2014 UTC (9 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.6: +76 -38 lines
Diff to previous 1.6 (colored)

Add FingerprintHash option to control algorithm used for key
fingerprints. Default changes from MD5 to SHA256 and format
from hex to base64.

Feedback and ok naddy@ markus@

Revision 1.6 / (download) - annotate - [select for diffs], Wed Dec 10 01:24:09 2014 UTC (9 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.5: +2 -5 lines
Diff to previous 1.5 (colored)

better error value for invalid signature length

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 18 01:02:25 2014 UTC (9 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.4: +3 -5 lines
Diff to previous 1.4 (colored)

fix NULL pointer dereference crash in key loading

found by Michal Zalewski's AFL fuzzer

Revision 1.4 / (download) - annotate - [select for diffs], Wed Oct 8 21:45:48 2014 UTC (9 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.3: +47 -51 lines
Diff to previous 1.3 (colored)

parse cert sections using nested buffers to reduce copies; ok markus

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 3 01:45:38 2014 UTC (9 years, 10 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.2: +17 -8 lines
Diff to previous 1.2 (colored)

make Ed25519 keys' title fit properly in the randomart border; bz#2247
based on patch from Christian Hesse

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jun 27 18:50:39 2014 UTC (9 years, 10 months ago) by markus
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

fix loading of private keys

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jun 24 01:16:58 2014 UTC (9 years, 10 months ago) by djm
Branch: MAIN

New key API: refactor key-related functions to be more library-like,
existing API is offered as a set of wrappers.

with and ok markus@

Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
Dempsky and Ron Bowes for a detailed review a few months ago.

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.