OSDN Git Service

Merge openssh 7.5p1
authorGreg Hartman <ghartman@google.com>
Fri, 23 Jun 2017 03:49:52 +0000 (20:49 -0700)
committerGreg Hartman <ghartman@google.com>
Fri, 23 Jun 2017 22:44:15 +0000 (15:44 -0700)
BUG: 35443510
Change-Id: I2558fb80234e145c13ccb7a51859f2a5fd2e0324

520 files changed:
Android.mk
CREDITS
ChangeLog
INSTALL
Makefile.in
PROTOCOL
PROTOCOL.agent
PROTOCOL.certkeys
PROTOCOL.chacha20poly1305
README
README.platform
README.privsep
README.version
TODO
aclocal.m4
addrmatch.c
atomicio.c
audit-bsm.c
audit-linux.c
audit.c
audit.h
auth-bsdauth.c
auth-chall.c [deleted file]
auth-krb5.c
auth-options.c
auth-options.h
auth-pam.c
auth-pam.h
auth-passwd.c
auth-rh-rsa.c [deleted file]
auth-rhosts.c
auth-rsa.c [deleted file]
auth.c
auth.h
auth1.c [deleted file]
auth2-chall.c
auth2-hostbased.c
auth2-pubkey.c
auth2.c
authfd.c
authfd.h
authfile.c
buildpkg.sh.in
canohost.c
canohost.h
chacha.h
channels.c
channels.h
cipher-3des1.c
cipher-bf1.c
cipher-chachapoly.c
cipher.c
cipher.h
clientloop.c
clientloop.h
compat.c
config.guess
config.h
config.h.in
config.sub
configure
configure.ac
contrib/Makefile
contrib/cygwin/README
contrib/cygwin/ssh-host-config
contrib/gnome-ssh-askpass2.c
contrib/redhat/openssh.spec
contrib/ssh-copy-id
contrib/ssh-copy-id.1
contrib/suse/openssh.spec
defines.h
dh.c
dh.h
digest-openssl.c
entropy.h
gss-genr.c
hostfile.c
includes.h
kex.c
kex.h
kexc25519.c
kexc25519s.c
kexdh.c
kexdhc.c
kexdhs.c
kexecdhs.c
kexgexc.c
kexgexs.c
key.c
key.h
krl.c
krl.h
log.c
log.h
loginrec.c
mac.c
mac.h
match.c
match.h
md5crypt.h
mdoc2man.awk
misc.c
misc.h
moduli
moduli.0
moduli.c
monitor.c
monitor.h
monitor_fdpass.c
monitor_mm.c [deleted file]
monitor_mm.h [deleted file]
monitor_wrap.c
monitor_wrap.h
mux.c
myproposal.h
opacket.c
opacket.h
openbsd-compat/.cvsignore [deleted file]
openbsd-compat/Makefile.in
openbsd-compat/arc4random.c
openbsd-compat/base64.h
openbsd-compat/bindresvport.c
openbsd-compat/bsd-asprintf.c
openbsd-compat/bsd-cray.c
openbsd-compat/bsd-cray.h
openbsd-compat/bsd-cygwin_util.c
openbsd-compat/bsd-cygwin_util.h
openbsd-compat/bsd-err.c [new file with mode: 0644]
openbsd-compat/bsd-misc.c
openbsd-compat/bsd-misc.h
openbsd-compat/bsd-nextstep.c
openbsd-compat/bsd-nextstep.h
openbsd-compat/bsd-openpty.c
openbsd-compat/bsd-poll.c
openbsd-compat/bsd-poll.h
openbsd-compat/bsd-setres_id.c
openbsd-compat/bsd-setres_id.h
openbsd-compat/bsd-snprintf.c
openbsd-compat/bsd-statvfs.c
openbsd-compat/bsd-statvfs.h
openbsd-compat/bsd-waitpid.c
openbsd-compat/bsd-waitpid.h
openbsd-compat/explicit_bzero.c
openbsd-compat/fake-rfc2553.c
openbsd-compat/fake-rfc2553.h
openbsd-compat/fmt_scaled.c
openbsd-compat/getcwd.c
openbsd-compat/getgrouplist.c
openbsd-compat/getrrsetbyname.c
openbsd-compat/glob.c
openbsd-compat/glob.h
openbsd-compat/inet_aton.c
openbsd-compat/openbsd-compat.h
openbsd-compat/openssl-compat.c
openbsd-compat/openssl-compat.h
openbsd-compat/port-aix.c
openbsd-compat/port-aix.h
openbsd-compat/port-irix.c
openbsd-compat/port-irix.h
openbsd-compat/port-linux.c
openbsd-compat/port-linux.h
openbsd-compat/port-solaris.c
openbsd-compat/port-solaris.h
openbsd-compat/port-tun.c
openbsd-compat/readpassphrase.c
openbsd-compat/realpath.c
openbsd-compat/regress/.cvsignore [deleted file]
openbsd-compat/setproctitle.c
openbsd-compat/sha2.c
openbsd-compat/sha2.h
openbsd-compat/strcasestr.c [new file with mode: 0644]
openbsd-compat/vis.c
openbsd-compat/vis.h
openbsd-compat/xcrypt.c
openbsd-compat/xmmap.c [deleted file]
opensshd.init.in
packet.c
packet.h
pathnames.h
platform-pledge.c [new file with mode: 0644]
platform-tracing.c [new file with mode: 0644]
platform.c
platform.h
progressmeter.c
readconf.c
readconf.h
readpass.c
regress/Makefile [new file with mode: 0644]
regress/README.regress [new file with mode: 0644]
regress/addrmatch.sh [new file with mode: 0644]
regress/agent-getpeereid.sh [new file with mode: 0644]
regress/agent-pkcs11.sh [new file with mode: 0644]
regress/agent-ptrace.sh [new file with mode: 0644]
regress/agent-timeout.sh [new file with mode: 0644]
regress/agent.sh [new file with mode: 0644]
regress/allow-deny-users.sh [new file with mode: 0644]
regress/banner.sh [new file with mode: 0644]
regress/broken-pipe.sh [new file with mode: 0644]
regress/brokenkeys.sh [new file with mode: 0644]
regress/cert-file.sh [new file with mode: 0644]
regress/cert-hostkey.sh [new file with mode: 0644]
regress/cert-userkey.sh [new file with mode: 0644]
regress/cfginclude.sh [new file with mode: 0644]
regress/cfgmatch.sh [new file with mode: 0644]
regress/cfgparse.sh [new file with mode: 0644]
regress/check-perm.c [new file with mode: 0644]
regress/cipher-speed.sh [new file with mode: 0644]
regress/conch-ciphers.sh [new file with mode: 0644]
regress/connect-privsep.sh [new file with mode: 0644]
regress/connect.sh [new file with mode: 0644]
regress/dhgex.sh [new file with mode: 0644]
regress/dsa_ssh2.prv [new file with mode: 0644]
regress/dsa_ssh2.pub [new file with mode: 0644]
regress/dynamic-forward.sh [new file with mode: 0644]
regress/envpass.sh [new file with mode: 0644]
regress/exit-status.sh [new file with mode: 0644]
regress/forcecommand.sh [new file with mode: 0644]
regress/forward-control.sh [new file with mode: 0644]
regress/forwarding.sh [new file with mode: 0644]
regress/host-expand.sh [new file with mode: 0644]
regress/hostkey-agent.sh [new file with mode: 0644]
regress/hostkey-rotate.sh [new file with mode: 0644]
regress/integrity.sh [new file with mode: 0644]
regress/kextype.sh [new file with mode: 0644]
regress/key-options.sh [new file with mode: 0644]
regress/keygen-change.sh [new file with mode: 0644]
regress/keygen-convert.sh [new file with mode: 0644]
regress/keygen-knownhosts.sh [new file with mode: 0644]
regress/keygen-moduli.sh [new file with mode: 0644]
regress/keys-command.sh [new file with mode: 0644]
regress/keyscan.sh [new file with mode: 0644]
regress/keytype.sh [new file with mode: 0644]
regress/krl.sh [new file with mode: 0644]
regress/limit-keytype.sh [new file with mode: 0644]
regress/localcommand.sh [new file with mode: 0644]
regress/login-timeout.sh [new file with mode: 0644]
regress/misc/Makefile [new file with mode: 0644]
regress/misc/kexfuzz/Makefile [new file with mode: 0644]
regress/misc/kexfuzz/README [new file with mode: 0644]
regress/misc/kexfuzz/kexfuzz.c [new file with mode: 0644]
regress/modpipe.c [new file with mode: 0755]
regress/moduli.in [new file with mode: 0644]
regress/multiplex.sh [new file with mode: 0644]
regress/multipubkey.sh [new file with mode: 0644]
regress/netcat.c [new file with mode: 0644]
regress/portnum.sh [new file with mode: 0644]
regress/principals-command.sh [new file with mode: 0644]
regress/proto-mismatch.sh [new file with mode: 0644]
regress/proto-version.sh [new file with mode: 0644]
regress/proxy-connect.sh [new file with mode: 0644]
regress/putty-ciphers.sh [new file with mode: 0644]
regress/putty-kex.sh [new file with mode: 0644]
regress/putty-transfer.sh [new file with mode: 0644]
regress/reconfigure.sh [new file with mode: 0644]
regress/reexec.sh [new file with mode: 0644]
regress/rekey.sh [new file with mode: 0644]
regress/rsa_openssh.prv [new file with mode: 0644]
regress/rsa_openssh.pub [new file with mode: 0644]
regress/rsa_ssh2.prv [new file with mode: 0644]
regress/scp-ssh-wrapper.sh [new file with mode: 0644]
regress/scp.sh [new file with mode: 0644]
regress/setuid-allowed.c [moved from roaming_dummy.c with 52% similarity]
regress/sftp-badcmds.sh [new file with mode: 0644]
regress/sftp-batch.sh [new file with mode: 0644]
regress/sftp-chroot.sh [new file with mode: 0644]
regress/sftp-cmds.sh [new file with mode: 0644]
regress/sftp-glob.sh [new file with mode: 0644]
regress/sftp-perm.sh [new file with mode: 0644]
regress/sftp.sh [new file with mode: 0644]
regress/ssh-com-client.sh [new file with mode: 0644]
regress/ssh-com-keygen.sh [new file with mode: 0644]
regress/ssh-com-sftp.sh [new file with mode: 0644]
regress/ssh-com.sh [new file with mode: 0644]
regress/ssh2putty.sh [new file with mode: 0755]
regress/sshcfgparse.sh [new file with mode: 0644]
regress/sshd-log-wrapper.sh [new file with mode: 0644]
regress/stderr-after-eof.sh [new file with mode: 0644]
regress/stderr-data.sh [new file with mode: 0644]
regress/t11.ok [new file with mode: 0644]
regress/t4.ok [new file with mode: 0644]
regress/t5.ok [new file with mode: 0644]
regress/test-exec.sh [new file with mode: 0644]
regress/transfer.sh [new file with mode: 0644]
regress/try-ciphers.sh [new file with mode: 0644]
regress/unittests/Makefile [new file with mode: 0644]
regress/unittests/Makefile.inc [new file with mode: 0644]
regress/unittests/bitmap/Makefile [new file with mode: 0644]
regress/unittests/bitmap/tests.c [new file with mode: 0644]
regress/unittests/conversion/Makefile [new file with mode: 0644]
regress/unittests/conversion/tests.c [new file with mode: 0644]
regress/unittests/hostkeys/Makefile [new file with mode: 0644]
regress/unittests/hostkeys/mktestdata.sh [new file with mode: 0644]
regress/unittests/hostkeys/test_iterate.c [new file with mode: 0644]
regress/unittests/hostkeys/testdata/dsa_1.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/dsa_2.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/dsa_3.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/dsa_4.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/dsa_5.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/dsa_6.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ecdsa_1.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ecdsa_2.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ecdsa_3.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ecdsa_4.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ecdsa_5.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ecdsa_6.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ed25519_1.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ed25519_2.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ed25519_3.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ed25519_4.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ed25519_5.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/ed25519_6.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/known_hosts [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa1_1.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa1_2.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa1_3.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa1_4.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa1_5.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa1_6.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa_1.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa_2.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa_3.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa_4.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa_5.pub [new file with mode: 0644]
regress/unittests/hostkeys/testdata/rsa_6.pub [new file with mode: 0644]
regress/unittests/hostkeys/tests.c [new file with mode: 0644]
regress/unittests/kex/Makefile [new file with mode: 0644]
regress/unittests/kex/test_kex.c [new file with mode: 0644]
regress/unittests/kex/tests.c [new file with mode: 0644]
regress/unittests/match/Makefile [new file with mode: 0644]
regress/unittests/match/tests.c [new file with mode: 0644]
regress/unittests/sshbuf/Makefile [new file with mode: 0644]
regress/unittests/sshbuf/test_sshbuf.c [new file with mode: 0644]
regress/unittests/sshbuf/test_sshbuf_fixed.c [new file with mode: 0644]
regress/unittests/sshbuf/test_sshbuf_fuzz.c [new file with mode: 0644]
regress/unittests/sshbuf/test_sshbuf_getput_basic.c [new file with mode: 0644]
regress/unittests/sshbuf/test_sshbuf_getput_crypto.c [new file with mode: 0644]
regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c [new file with mode: 0644]
regress/unittests/sshbuf/test_sshbuf_misc.c [new file with mode: 0644]
regress/unittests/sshbuf/tests.c [new file with mode: 0644]
regress/unittests/sshkey/Makefile [new file with mode: 0644]
regress/unittests/sshkey/common.c [new file with mode: 0644]
regress/unittests/sshkey/common.h [new file with mode: 0644]
regress/unittests/sshkey/mktestdata.sh [new file with mode: 0755]
regress/unittests/sshkey/test_file.c [new file with mode: 0644]
regress/unittests/sshkey/test_fuzz.c [new file with mode: 0644]
regress/unittests/sshkey/test_sshkey.c [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1 [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1-cert.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1-cert.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1.param.g [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1.param.priv [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1.param.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_1_pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_2 [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_2.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_2.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_2.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_n [new file with mode: 0644]
regress/unittests/sshkey/testdata/dsa_n_pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1 [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1-cert.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1-cert.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1.param.curve [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1.param.priv [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1.param.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_1_pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_2 [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_2.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_2.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_2.param.curve [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_2.param.priv [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_2.param.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_2.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_n [new file with mode: 0644]
regress/unittests/sshkey/testdata/ecdsa_n_pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_1 [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_1-cert.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_1-cert.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_1.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_1.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_1.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_1_pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_2 [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_2.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_2.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/ed25519_2.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_1 [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_1.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_1.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_1.param.n [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_1.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_1_pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_2 [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_2.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_2.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_2.param.n [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa1_2.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1 [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1-cert.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1-cert.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1.param.n [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1.param.p [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1.param.q [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_1_pw [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_2 [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_2.fp [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_2.fp.bb [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_2.param.n [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_2.param.p [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_2.param.q [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_2.pub [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_n [new file with mode: 0644]
regress/unittests/sshkey/testdata/rsa_n_pw [new file with mode: 0644]
regress/unittests/sshkey/tests.c [new file with mode: 0644]
regress/unittests/test_helper/Makefile [new file with mode: 0644]
regress/unittests/test_helper/fuzz.c [new file with mode: 0644]
regress/unittests/test_helper/test_helper.c [new file with mode: 0644]
regress/unittests/test_helper/test_helper.h [new file with mode: 0644]
regress/unittests/utf8/Makefile [new file with mode: 0644]
regress/unittests/utf8/tests.c [new file with mode: 0644]
regress/valgrind-unit.sh [new file with mode: 0755]
regress/yes-head.sh [new file with mode: 0644]
roaming.h [deleted file]
roaming_client.c [deleted file]
roaming_common.c [deleted file]
sandbox-darwin.c
sandbox-pledge.c [new file with mode: 0644]
sandbox-rlimit.c
sandbox-seccomp-filter.c
sandbox-solaris.c [new file with mode: 0644]
sandbox-systrace.c
scp.0
scp.1
scp.c
servconf.c
servconf.h
serverloop.c
serverloop.h
session.c
session.h
sftp-client.c
sftp-client.h
sftp-common.c
sftp-server-main.c
sftp-server.0
sftp-server.c
sftp.0
sftp.1
sftp.c
ssh-add.0
ssh-add.c
ssh-agent.0
ssh-agent.1
ssh-agent.c
ssh-dss.c
ssh-ecdsa.c
ssh-ed25519.c
ssh-keygen.0
ssh-keygen.1
ssh-keygen.c
ssh-keyscan.0
ssh-keyscan.1
ssh-keyscan.c
ssh-keysign.0
ssh-keysign.8
ssh-keysign.c
ssh-pkcs11-client.c
ssh-pkcs11-helper.0
ssh-pkcs11-helper.c
ssh-pkcs11.c
ssh-rsa.c
ssh.0
ssh.1
ssh.c
ssh.h
ssh1.h
ssh2.h
ssh_api.c
ssh_config
ssh_config.0
ssh_config.5
sshbuf-getput-basic.c
sshbuf-misc.c
sshbuf.c
sshbuf.h
sshconnect.c
sshconnect.h
sshconnect1.c
sshconnect2.c
sshd.0
sshd.8
sshd.c
sshd_config
sshd_config.0
sshd_config.5
ssherr.c
sshkey.c
sshkey.h
sshlogin.c
sshpty.c
sshpty.h
ttymodes.c
ttymodes.h
uidswap.c
umac.c
utf8.c [new file with mode: 0644]
utf8.h [moved from roaming_serv.c with 61% similarity]
version.h
xmalloc.c
xmalloc.h

index 5f23184..33387b1 100644 (file)
@@ -86,12 +86,12 @@ LOCAL_SRC_FILES := \
     openbsd-compat/strtonum.c \
     openbsd-compat/timingsafe_bcmp.c \
     openbsd-compat/vis.c \
-    openbsd-compat/xmmap.c \
     packet.c \
+    platform-pledge.c \
+    platform-tracing.c \
     poly1305.c \
     readpass.c \
     rijndael.c \
-    roaming_dummy.c \
     rsa.c \
     sc25519.c \
     smult_curve25519_ref.c \
@@ -109,6 +109,7 @@ LOCAL_SRC_FILES := \
     uidswap.c \
     umac.c \
     umac128.c \
+    utf8.c \
     uuencode.c \
     verify.c \
     xmalloc.c
@@ -140,8 +141,7 @@ LOCAL_MODULE_TAGS := optional
 
 LOCAL_SRC_FILES := \
     ssh.c readconf.c clientloop.c sshtty.c \
-    sshconnect.c sshconnect1.c sshconnect2.c mux.c \
-    roaming_common.c roaming_client.c
+    sshconnect.c sshconnect1.c sshconnect2.c mux.c
 
 LOCAL_MODULE := ssh
 
@@ -212,18 +212,14 @@ LOCAL_SRC_FILES := \
     audit-linux.c \
     audit.c \
     auth-bsdauth.c \
-    auth-chall.c \
     auth-krb5.c \
     auth-options.c \
     auth-pam.c \
-    auth-rh-rsa.c \
     auth-rhosts.c \
-    auth-rsa.c \
     auth-shadow.c \
     auth-sia.c \
     auth-skey.c \
     auth.c \
-    auth1.c \
     auth2-chall.c \
     auth2-gss.c \
     auth2-hostbased.c \
@@ -242,11 +238,8 @@ LOCAL_SRC_FILES := \
     loginrec.c \
     md5crypt.c \
     monitor.c \
-    monitor_mm.c \
     monitor_wrap.c \
     platform.c \
-    roaming_common.c \
-    roaming_serv.c \
     sandbox-null.c \
     sandbox-rlimit.c \
     sandbox-systrace.c \
diff --git a/CREDITS b/CREDITS
index eaf105a..43be5e5 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -100,6 +100,3 @@ Zack Weinberg <zack@wolery.cumb.org> - GNOME askpass enhancement
 Apologies to anyone I have missed.
 
 Damien Miller <djm@mindrot.org>
-
-$Id: CREDITS,v 1.81 2006/08/30 17:24:41 djm Exp $
-
index 35a1a76..48f648d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
-commit c88ac102f0eb89f2eaa314cb2e2e0ca3c890c443
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 14 11:08:19 2016 +1100
-
-    bump version numbers
-
-commit 302bc21e6fadacb04b665868cd69b625ef69df90
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 14 11:04:04 2016 +1100
+commit d38f05dbdd291212bc95ea80648b72b7177e9f4e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Mar 20 13:38:27 2017 +1100
 
-    openssh-7.1p2
+    Add llabs() implementation.
 
-commit 6b33763242c063e4e0593877e835eeb1fd1b60aa
+commit 72536316a219b7394996a74691a5d4ec197480f7
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 14 11:02:58 2016 +1100
+Date:   Mon Mar 20 12:23:04 2017 +1100
 
-    forcibly disable roaming support in the client
+    crank version numbers
 
-commit 34d364f0d2e1e30a444009f0e04299bb7c94ba13
+commit 3be52bc36bdfd24ded7e0f46999e7db520fb4e3f
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Oct 5 17:11:21 2015 +0000
+Date:   Mon Mar 20 01:18:59 2017 +0000
 
     upstream commit
     
-    some more bzero->explicit_bzero, from Michael McConville
+    openssh-7.5
     
-    Upstream-ID: 17f19545685c33327db2efdc357c1c9225ff00d0
+    Upstream-ID: b8b9a4a949427c393cd868215e1724ceb3467ee5
 
-commit 8f5b93026797b9f7fba90d0c717570421ccebbd3
-Author: guenther@openbsd.org <guenther@openbsd.org>
-Date:   Fri Sep 11 08:50:04 2015 +0000
+commit db84e52fe9cfad57f22e7e23c5fbf00092385129
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Mar 20 12:07:20 2017 +1100
 
-    upstream commit
-    
-    Use explicit_bzero() when zeroing before free()
-    
-    from Michael McConville (mmcconv1 (at) sccs.swarthmore.edu)
-    ok millert@ djm@
+    I'm a doofus.
     
-    Upstream-ID: 2e3337db046c3fe70c7369ee31515ac73ec00f50
+    Unbreak obvious syntax error.
 
-commit d77148e3a3ef6c29b26ec74331455394581aa257
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Nov 8 21:59:11 2015 +0000
+commit 89f04852db27643717c9c3a2b0dde97ae50099ee
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Mar 20 11:53:34 2017 +1100
 
-    upstream commit
-    
-    fix OOB read in packet code caused by missing return
-     statement found by Ben Hawkes; ok markus@ deraadt@
+    on Cygwin, check paths from server for backslashes
     
-    Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62
+    Pointed out by Jann Horn of Google Project Zero
 
-commit 076d849e17ab12603627f87b301e2dca71bae518
+commit 7ef1f9bafc2cc8d97ff2fbd4f280002b6e8ea5d9
 Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Nov 14 18:44:49 2015 +1100
+Date:   Mon Mar 20 11:48:34 2017 +1100
 
-    read back from libcrypto RAND when privdropping
+    Yet another synonym for ASCII: "646"
     
-    makes certain libcrypto implementations cache a /dev/urandom fd
-    in preparation of sandboxing. Based on patch by Greg Hartman.
+    Used by NetBSD; this unbreaks mprintf() and friends there for the C
+    locale (caught by dtucker@ and his menagerie of test systems).
 
-commit f72adc0150011a28f177617a8456e1f83733099d
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Dec 13 22:42:23 2015 +0000
+commit 9165abfea3f68a0c684a6ed2e575e59bc31a3a6b
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Mar 20 09:58:34 2017 +1100
 
-    upstream commit
-    
-    unbreak connections with peers that set
-     first_kex_follows; fix from Matt Johnston va bz#2515
+    create test mux socket in /tmp
     
-    Upstream-ID: decc88ec4fc7515594fdb42b04aa03189a44184b
+    Creating the socket in $OBJ could blow past the (quite limited)
+    path limit for Unix domain sockets. As a bandaid for bz#2660,
+    reported by Colin Watson; ok dtucker@
 
-commit 04bd8d019ccd906cac1a2b362517b8505f3759e6
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 12 23:42:54 2016 +0000
+commit 2adbe1e63bc313d03e8e84e652cc623af8ebb163
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Mar 15 07:07:39 2017 +0000
 
     upstream commit
     
-    use explicit_bzero() more liberally in the buffer code; ok
-     deraadt
+    disallow KEXINIT before NEWKEYS; ok djm; report by
+    vegard.nossum at oracle.com
     
-    Upstream-ID: 0ece37069fd66bc6e4f55eb1321f93df372b65bf
+    Upstream-ID: 3668852d1f145050e62f1da08917de34cb0c5234
 
-commit e91346dc2bbf460246df2ab591b7613908c1b0ad
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 21 14:49:03 2015 +1000
+commit 2fbf91684d76d38b9cf06550b69c9e41bca5a71c
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Mar 16 14:05:46 2017 +1100
 
-    we don't use Github for issues/pull-requests
+    Include includes.h for compat bits.
 
-commit a4f5b507c708cc3dc2c8dd2d02e4416d7514dc23
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 21 14:43:55 2015 +1000
+commit b55f634e96b9c5b0cd991e23a9ca181bec4bdbad
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Mar 16 13:45:17 2017 +1100
 
-    fix URL for connect.c
+    Wrap stdint.h in #ifdef HAVE_STDINT_H
 
-commit d026a8d3da0f8186598442997c7d0a28e7275414
+commit 55a1117d7342a0bf8b793250cf314bab6b482b99
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 21 13:47:10 2015 +1000
+Date:   Thu Mar 16 11:22:42 2017 +1100
 
-    update version numbers for 7.1
+    Adapt Cygwin config script to privsep knob removal
+    
+    Patch from Corinna Vinschen.
 
-commit 78f8f589f0ca1c9f41e5a9bae3cda5ce8a6b42ed
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Aug 21 03:45:26 2015 +0000
+commit 1a321bfdb91defe3c4d9cca5651724ae167e5436
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Wed Mar 15 03:52:30 2017 +0000
 
     upstream commit
     
-    openssh-7.1
+    accidents happen to the best of us; ok djm
     
-    Upstream-ID: ff7b1ef4b06caddfb45e08ba998128c88be3d73f
+    Upstream-ID: b7a9dbd71011ffde95e06f6945fe7197dedd1604
 
-commit 32a181980c62fce94f7f9ffaf6a79d90f0c309cf
+commit 25f837646be8c2017c914d34be71ca435dfc0e07
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Aug 21 03:42:19 2015 +0000
+Date:   Wed Mar 15 02:25:09 2017 +0000
 
     upstream commit
     
-    fix inverted logic that broke PermitRootLogin; reported
-     by Mantas Mikulenas; ok markus@
+    fix regression in 7.4: deletion of PKCS#11-hosted keys
+    would fail unless they were specified by full physical pathname. Report and
+    fix from Jakub Jelen via bz#2682; ok dtucker@
     
-    Upstream-ID: 260dd6a904c1bb7e43267e394b1c9cf70bdd5ea5
+    Upstream-ID: 5b5bc20ca11cacb5d5eb29c3f93fd18425552268
 
-commit ce445b0ed927e45bd5bdce8f836eb353998dd65c
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Thu Aug 20 22:32:42 2015 +0000
+commit a8c5eeacf032a7d3408957e45dd7603cc1baf55f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Mar 15 02:19:09 2017 +0000
 
     upstream commit
     
-    Do not cast result of malloc/calloc/realloc* if stdlib.h
-     is in scope ok krw millert
+    Fix segfault when sshd attempts to load RSA1 keys (can
+    only happen when protocol v.1 support is enabled for the client). Reported by
+    Jakub Jelen in bz#2686; ok dtucker
     
-    Upstream-ID: 5e50ded78cadf3841556649a16cc4b1cb6c58667
+    Upstream-ID: 8fdaec2ba4b5f65db1d094f6714ce64b25d871d7
 
-commit 05291e5288704d1a98bacda269eb5a0153599146
-Author: naddy@openbsd.org <naddy@openbsd.org>
-Date:   Thu Aug 20 19:20:06 2015 +0000
+commit 66705948c0639a7061a0d0753266da7685badfec
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 14 07:19:07 2017 +0000
 
     upstream commit
     
-    In the certificates section, be consistent about using
-     "host_key" and "user_key" for the respective key types.  ok sthen@ deraadt@
+    Mark the sshd_config UsePrivilegeSeparation option as
+    deprecated, effectively making privsep mandatory in sandboxing mode. ok
+    markus@ deraadt@
     
-    Upstream-ID: 9e037ea3b15577b238604c5533e082a3947f13cb
+    (note: this doesn't remove the !privsep code paths, though that will
+    happen eventually).
+    
+    Upstream-ID: b4c52666256c4dd865f8ce9431af5d6ce2d74a0a
 
-commit 8543d4ef6f2e9f98c3e6b77c894ceec30c5e4ae4
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Aug 19 23:21:42 2015 +0000
+commit f86586b03fe6cd8f595289bde200a94bc2c191af
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Mar 14 18:26:29 2017 +1100
 
-    upstream commit
-    
-    Better compat matching for WinSCP, add compat matching
-     for FuTTY (fork of PuTTY); ok markus@ deraadt@
+    Make seccomp-bpf sandbox work on Linux/X32
     
-    Upstream-ID: 24001d1ac115fa3260fbdc329a4b9aeb283c5389
+    Allow clock_gettime syscall with X32 bit masked off. Apparently
+    this is required for at least some kernel versions. bz#2142
+    Patch mostly by Colin Watson. ok dtucker@
 
-commit ec6eda16ebab771aa3dfc90629b41953b999cb1e
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Aug 19 23:19:01 2015 +0000
+commit 2429cf78dd2a9741ce27ba25ac41c535274a0af6
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Mar 14 18:01:52 2017 +1100
 
-    upstream commit
+    require OpenSSL >=1.0.1
+
+commit e3ea335abeab731c68f2b2141bee85a4b0bf680f
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Mar 14 17:48:43 2017 +1100
+
+    Remove macro trickery; no binary change
     
-    fix double-free() in error path of DSA key generation
-     reported by Mateusz Kocielski; ok markus@
+    This stops the SC_ALLOW(), SC_ALLOW_ARG() and SC_DENY() macros
+    prepending __NR_ to the syscall number parameter and just makes
+    them explicit in the macro invocations.
     
-    Upstream-ID: 4735d8f888b10599a935fa1b374787089116713c
+    No binary change in stripped object file before/after.
 
-commit 45b0eb752c94954a6de046bfaaf129e518ad4b5b
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Aug 19 23:18:26 2015 +0000
+commit 5f1596e11d55539678c41f68aed358628d33d86f
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Mar 14 13:15:18 2017 +1100
+
+    support ioctls for ICA crypto card on Linux/s390
+    
+    Based on patch from Eduardo Barretto; ok dtucker@
+
+commit b1b22dd0df2668b322dda174e501dccba2cf5c44
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Mar 14 14:19:36 2017 +1100
+
+    Plumb conversion test into makefile.
+
+commit f57783f1ddfb4cdfbd612c6beb5ec01cb5b9a6b9
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Mar 14 01:20:29 2017 +0000
 
     upstream commit
     
-    fix free() of uninitialised pointer reported by Mateusz
-     Kocielski; ok markus@
+    Add unit test for convtime().
     
-    Upstream-ID: 519552b050618501a06b7b023de5cb104e2c5663
+    Upstream-Regress-ID: 8717bc0ca4c21120f6dd3a1d3b7a363f707c31e1
 
-commit c837643b93509a3ef538cb6624b678c5fe32ff79
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Aug 19 23:17:51 2015 +0000
+commit 8884b7247d094cd11ff9e39c325ba928c5bdbc6c
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Mar 14 01:10:07 2017 +0000
 
     upstream commit
     
-    fixed unlink([uninitialised memory]) reported by Mateusz
-     Kocielski; ok markus@
+    Add ASSERT_LONG_* helpers.
     
-    Upstream-ID: 14a0c4e7d891f5a8dabc4b89d4f6b7c0d5a20109
+    Upstream-Regress-ID: fe15beaea8f5063c7f21b0660c722648e3d76431
 
-commit 1f8d3d629cd553031021068eb9c646a5f1e50994
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Fri Aug 14 15:32:41 2015 +0000
+commit c6774d21185220c0ba11e8fd204bf0ad1a432071
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Mar 14 00:55:37 2017 +0000
 
     upstream commit
     
-    match myproposal.h order; from brian conway (i snuck in a
-     tweak while here)
-    
-    ok dtucker
+    Fix convtime() overflow test on boundary condition,
+    spotted by & ok djm.
     
-    Upstream-ID: 35174a19b5237ea36aa3798f042bf5933b772c67
+    Upstream-ID: 51f14c507ea87a3022e63f574100613ab2ba5708
 
-commit 1dc8d93ce69d6565747eb44446ed117187621b26
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Thu Aug 6 14:53:21 2015 +0000
+commit f5746b40cfe6d767c8e128fe50c43274b31cd594
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Mar 14 00:25:03 2017 +0000
 
     upstream commit
     
-    add prohibit-password as a synonymn for without-password,
-     since the without-password is causing too many questions.  Harden it to ban
-     all but pubkey, hostbased, and GSSAPI auth (when the latter is enabled) from
-     djm, ok markus
+    Check for integer overflow when parsing times in
+    convtime().  Reported by nicolas.iooss at m4x.org, ok djm@
     
-    Upstream-ID: d53317d7b28942153e6236d3fd6e12ceb482db7a
+    Upstream-ID: 35e6a4e98f6fa24df50bfb8ba1307cf70e966f13
 
-commit 90a95a4745a531b62b81ce3b025e892bdc434de5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 11 13:53:41 2015 +1000
+commit f5907982f42a8d88a430b8a46752cbb7859ba979
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Mar 14 13:38:15 2017 +1100
 
-    update version in README
+    Add a "unit" target to run only unit tests.
 
-commit 318c37743534b58124f1bab37a8a0087a3a9bd2f
+commit 9e96b41682aed793fadbea5ccd472f862179fb02
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 11 13:53:09 2015 +1000
+Date:   Tue Mar 14 12:24:47 2017 +1100
 
-    update versions in *.spec
+    Fix weakness in seccomp-bpf sandbox arg inspection
+    
+    Syscall arguments are passed via an array of 64-bit values in struct
+    seccomp_data, but we were only inspecting the bottom 32 bits and not
+    even those correctly for BE systems.
+    
+    Fortunately, the only case argument inspection was used was in the
+    socketcall filtering so using this for sandbox escape seems
+    impossible.
+    
+    ok dtucker
 
-commit 5e75f5198769056089fb06c4d738ab0e5abc66f7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 11 13:34:12 2015 +1000
+commit 8ff3fc3f2f7c13e8968717bc2b895ee32c441275
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Mar 11 23:44:16 2017 +0000
 
-    set sshpam_ctxt to NULL after free
+    upstream commit
     
-    Avoids use-after-free in monitor when privsep child is compromised.
-    Reported by Moritz Jodeit; ok dtucker@
+    regress tests for loading certificates without public keys;
+    bz#2617 based on patch from Adam Eijdenberg; ok markus@ dtucker@
+    
+    Upstream-Regress-ID: 0145d19328ed995b73fe2d9da33596b17429d0d0
 
-commit d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 11 13:33:24 2015 +1000
+commit 1e24552716194db8f2f620587b876158a9ef56ad
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Mar 11 23:40:26 2017 +0000
 
-    Don't resend username to PAM; it already has it.
+    upstream commit
     
-    Pointed out by Moritz Jodeit; ok dtucker@
+    allow ssh to use certificates accompanied by a private
+    key file but no corresponding plain *.pub public key. bz#2617 based on patch
+    from Adam Eijdenberg; ok dtucker@ markus@
+    
+    Upstream-ID: 295668dca2c39505281577217583ddd2bd4b00b9
 
-commit 88763a6c893bf3dfe951ba9271bf09715e8d91ca
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Jul 27 12:14:25 2015 +1000
+commit 0fb1a617a07b8df5de188dd5a0c8bf293d4bfc0e
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Sat Mar 11 13:07:35 2017 +0000
 
-    Import updated moduli file from OpenBSD.
+    upstream commit
+    
+    Don't count the initial block twice when computing how
+    many bytes to discard for the work around for the attacks against CBC-mode.
+    ok djm@; report from Jean Paul, Kenny, Martin and Torben @ RHUL
+    
+    Upstream-ID: f445f509a4e0a7ba3b9c0dae7311cb42458dc1e2
 
-commit 55b263fb7cfeacb81aaf1c2036e0394c881637da
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Aug 10 11:13:44 2015 +1000
+commit ef653dd5bd5777132d9f9ee356225f9ee3379504
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 07:18:32 2017 +0000
 
-    let principals-command.sh work for noexec /var/run
+    upstream commit
+    
+    krl.c
+    
+    Upstream-ID: fc5e695d5d107d730182e2da7b23f00b489e0ee1
 
-commit 2651e34cd11b1aac3a0fe23b86d8c2ff35c07897
+commit d94c1dfef2ea30ca67b1204ada7c3b537c54f4d0
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Aug 6 11:43:42 2015 +1000
+Date:   Sun Mar 12 10:48:14 2017 +1100
 
-    work around echo -n / sed behaviour in tests
+    sync fmt_scaled.c with OpenBSD
+    
+    revision 1.13
+    date: 2017/03/11 23:37:23;  author: djm;  state: Exp;  lines: +14 -1;  commitid: jnFKyHkB3CEiEZ2R;
+    fix signed integer overflow in scan_scaled. Found by Nicolas Iooss
+    using AFL against ssh_config. ok deraadt@ millert@
+    ----------------------------
+    revision 1.12
+    date: 2013/11/29 19:00:51;  author: deraadt;  state: Exp;  lines: +6 -5;
+    fairly simple unsigned char casts for ctype
+    ok krw
+    ----------------------------
+    revision 1.11
+    date: 2012/11/12 14:07:20;  author: halex;  state: Exp;  lines: +4 -2;
+    make scan_scaled set errno to EINVAL rather than ERANGE if it encounters
+    an invalid multiplier, like the man page says it should
+    
+    "looks sensible" deraadt@, ok ian@
+    ----------------------------
+    revision 1.10
+    date: 2009/06/20 15:00:04;  author: martynas;  state: Exp;  lines: +4 -4;
+    use llabs instead of the home-grown version;  and some comment changes
+    ok ian@, millert@
+    ----------------------------
 
-commit d85dad81778c1aa8106acd46930b25fdf0d15b2a
+commit 894221a63fa061e52e414ca58d47edc5fe645968
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Aug 5 05:27:33 2015 +0000
+Date:   Fri Mar 10 05:01:13 2017 +0000
 
     upstream commit
     
-    adjust for RSA minimum modulus switch; ok deraadt@
+    When updating hostkeys, accept RSA keys if
+    HostkeyAlgorithms contains any RSA keytype. Previously, ssh could ignore RSA
+    keys when any of the ssh-rsa-sha2-* methods was enabled in HostkeyAlgorithms
+    nit ssh-rsa (SHA1 signatures) was not. bz#2650 reported by Luis Ressel; ok
+    dtucker@
     
-    Upstream-Regress-ID: 5a72c83431b96224d583c573ca281cd3a3ebfdae
+    Upstream-ID: c5e8cfee15c42f4a05d126158a0766ea06da79d2
 
-commit 57e8e229bad5fe6056b5f1199665f5f7008192c6
+commit dd3e2298663f4cc1a06bc69582d00dcfee27d73c
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Aug 4 05:23:06 2015 +0000
+Date:   Fri Mar 10 04:24:55 2017 +0000
 
     upstream commit
     
-    backout SSH_RSA_MINIMUM_MODULUS_SIZE increase for this
-     release; problems spotted by sthen@ ok deraadt@ markus@
+    make hostname matching really insensitive to case;
+    bz#2685, reported by Petr Cerny; ok dtucker@
     
-    Upstream-ID: d0bd60dde9e8c3cd7030007680371894c1499822
+    Upstream-ID: e467622ff154269e36ba8b6c9e3d105e1c4a9253
 
-commit f097d0ea1e0889ca0fa2e53a00214e43ab7fa22a
+commit 77a9be9446697fe8b5499fe651f4a82a71a4b51f
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Aug 2 09:56:42 2015 +0000
+Date:   Fri Mar 10 03:52:48 2017 +0000
 
     upstream commit
     
-    openssh 7.0; ok deraadt@
+    reword a comment to make it fit 80 columns
     
-    Upstream-ID: c63afdef537f57f28ae84145c5a8e29e9250221f
+    Upstream-ID: 4ef509a66b96c7314bbcc87027c2af71fa9d0ba4
 
-commit 3d5728a0f6874ce4efb16913a12963595070f3a9
-Author: chris@openbsd.org <chris@openbsd.org>
-Date:   Fri Jul 31 15:38:09 2015 +0000
+commit 61b8ef6a66efaec07e023342cb94a10bdc2254dc
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Mar 10 04:27:32 2017 +0000
 
     upstream commit
     
-    Allow PermitRootLogin to be overridden by config
-    
-    ok markus@ deeradt@
+    better match sshd config parser behaviour: fatal() if
+    line is overlong, increase line buffer to match sshd's; bz#2651 reported by
+    Don Fong; ok dtucker@
     
-    Upstream-ID: 5cf3e26ed702888de84e2dc9d0054ccf4d9125b4
+    Upstream-ID: b175ae7e0ba403833f1ee566edf10f67443ccd18
 
-commit 6f941396b6835ad18018845f515b0c4fe20be21a
+commit db2597207e69912f2592cd86a1de8e948a9d7ffb
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jul 30 23:09:15 2015 +0000
+Date:   Fri Mar 10 04:26:06 2017 +0000
 
     upstream commit
     
-    fix pty permissions; patch from Nikolay Edigaryev; ok
-     deraadt
+    ensure hostname is lower-case before hashing it;
+    bz#2591 reported by Griff Miller II; ok dtucker@
     
-    Upstream-ID: 40ff076d2878b916fbfd8e4f45dbe5bec019e550
+    Upstream-ID: c3b8b93804f376bd00d859b8bcd9fc0d86b4db17
 
-commit f4373ed1e8fbc7c8ce3fc4ea97d0ba2e0c1d7ef0
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Thu Jul 30 19:23:02 2015 +0000
+commit df9936936c695f85c1038bd706d62edf752aca4b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Mar 10 04:24:55 2017 +0000
 
     upstream commit
     
-    change default: PermitRootLogin without-password matching
-     install script changes coming as well ok djm markus
+    make hostname matching really insensitive to case;
+    bz#2685, reported by Petr Cerny; ok dtucker@
     
-    Upstream-ID: 0e2a6c4441daf5498b47a61767382bead5eb8ea6
+    Upstream-ID: e632b7a9bf0d0558d5ff56dab98b7cca6c3db549
 
-commit 0c30ba91f87fcda7e975e6ff8a057f624e87ea1c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 30 12:31:39 2015 +1000
+commit 67eed24bfa7645d88fa0b883745fccb22a0e527e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 04:11:00 2017 +0000
 
-    downgrade OOM adjustment logging: verbose -> debug
+    upstream commit
+    
+    Remove old null check from config dumper.  Patch from
+    jjelen at redhat.com vi bz#2687, ok djm@
+    
+    Upstream-ID: 824ab71467b78c4bab0dd1b3a38e8bc5f63dd528
 
-commit f9eca249d4961f28ae4b09186d7dc91de74b5895
+commit 183ba55aaaecca0206184b854ad6155df237adbe
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jul 30 00:01:34 2015 +0000
+Date:   Fri Mar 10 04:07:20 2017 +0000
 
     upstream commit
     
-    Allow ssh_config and sshd_config kex parameters options be
-     prefixed by a '+' to indicate that the specified items be appended to the
-     default rather than replacing it.
-    
-    approach suggested by dtucker@, feedback dlg@, ok markus@
+    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@
     
-    Upstream-ID: 0f901137298fc17095d5756ff1561a7028e8882a
+    Upstream-ID: 81ac8bfb30960447740b9b8f6a214dcf322f12e8
 
-commit 5cefe769105a2a2e3ca7479d28d9a325d5ef0163
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 29 08:34:54 2015 +0000
+commit 66be4fe8c4435af5bbc82998501a142a831f1181
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 03:53:11 2017 +0000
 
     upstream commit
     
-    fix bug in previous; was printing incorrect string for
-     failed host key algorithms negotiation
+    Check for NULL return value from key_new.  Patch from
+    jjelen at redhat.com via bz#2687, ok djm@
     
-    Upstream-ID: 22c0dc6bc61930513065d92e11f0753adc4c6e6e
+    Upstream-ID: 059e33cd43cba88dc8caf0b1936fd4dd88fd5b8e
 
-commit f319912b0d0e1675b8bb051ed8213792c788bcb2
+commit ec2892b5c7fea199914cb3a6afb3af38f84990bf
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 29 04:43:06 2015 +0000
+Date:   Fri Mar 10 03:52:48 2017 +0000
 
     upstream commit
     
-    include the peer's offer when logging a failure to
-     negotiate a mutual set of algorithms (kex, pubkey, ciphers, etc.) ok markus@
+    reword a comment to make it fit 80 columns
     
-    Upstream-ID: bbb8caabf5c01790bb845f5ce135565248d7c796
+    Upstream-ID: b4b48b4487c0821d16e812c40c9b09f03b28e349
 
-commit b6ea0e573042eb85d84defb19227c89eb74cf05a
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jul 28 23:20:42 2015 +0000
+commit 7fadbb6da3f4122de689165651eb39985e1cba85
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 03:48:57 2017 +0000
 
     upstream commit
     
-    add Cisco to the list of clients that choke on the
-     hostkeys update extension. Pointed out by Howard Kash
+    Check for NULL argument to sshkey_read.  Patch from
+    jjelen at redhat.com via bz#2687, ok djm@
     
-    Upstream-ID: c9eadde28ecec056c73d09ee10ba4570dfba7e84
+    Upstream-ID: c2d00c2ea50c4861d271d0a586f925cc64a87e0e
 
-commit 3f628c7b537291c1019ce86af90756fb4e66d0fd
-Author: guenther@openbsd.org <guenther@openbsd.org>
-Date:   Mon Jul 27 16:29:23 2015 +0000
+commit 5a06b9e019e2b0b0f65a223422935b66f3749de3
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 03:45:40 2017 +0000
 
     upstream commit
     
-    Permit kbind(2) use in the sandbox now, to ease testing
-     of ld.so work using it
-    
-    reminded by miod@, ok deraadt@
+    Plug some mem leaks mostly on error paths.  From jjelen
+    at redhat.com via bz#2687, ok djm@
     
-    Upstream-ID: 523922e4d1ba7a091e3824e77a8a3c818ee97413
+    Upstream-ID: 3fb030149598957a51b7c8beb32bf92cf30c96f2
 
-commit ebe27ebe520098bbc0fe58945a87ce8490121edb
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Mon Jul 20 18:44:12 2015 +0000
+commit f6edbe9febff8121f26835996b1229b5064d31b7
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 03:24:48 2017 +0000
 
     upstream commit
     
-    Move .Pp before .Bl, not after to quiet mandoc -Tlint.
-     Noticed by jmc@
+    Plug mem leak on GLOB_NOMATCH case.  From jjelen at
+    redhat.com via bz#2687, ok djm@
     
-    Upstream-ID: 59fadbf8407cec4e6931e50c53cfa0214a848e23
+    Upstream-ID: 8016a7ae97719d3aa55fb723fc2ad3200058340d
 
-commit d5d91d0da819611167782c66ab629159169d94d4
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Mon Jul 20 18:42:35 2015 +0000
+commit 566b3a46e89a2fda2db46f04f2639e92da64a120
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 03:22:40 2017 +0000
 
     upstream commit
     
-    Sync usage with SYNOPSIS
+    Plug descriptor leaks of auth_sock.  From jjelen at
+    redhat.com via bz#2687, ok djm@
     
-    Upstream-ID: 7a321a170181a54f6450deabaccb6ef60cf3f0b7
+    Upstream-ID: 248acb99a5ed2fdca37d1aa33c0fcee7be286d88
 
-commit 79ec2142fbc68dd2ed9688608da355fc0b1ed743
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Mon Jul 20 15:39:52 2015 +0000
+commit 8a2834454c73dfc1eb96453c0e97690595f3f4c2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Mar 10 03:18:24 2017 +0000
 
     upstream commit
     
-    Better desciption of Unix domain socket forwarding.
-     bz#2423; ok jmc@
+    correctly hash hosts with a port number. Reported by Josh
+    Powers in bz#2692; ok dtucker@
     
-    Upstream-ID: 85e28874726897e3f26ae50dfa2e8d2de683805d
-
-commit d56fd1828074a4031b18b8faa0bf949669eb18a0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Jul 20 11:19:51 2015 +1000
-
-    make realpath.c compile -Wsign-compare clean
+    Upstream-ID: 468e357ff143e00acc05bdd2803a696b3d4b6442
 
-commit c63c9a691dca26bb7648827f5a13668832948929
+commit 9747b9c742de409633d4753bf1a752cbd211e2d3
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jul 20 00:30:01 2015 +0000
+Date:   Fri Mar 10 03:15:58 2017 +0000
 
     upstream commit
     
-    mention that the default of UseDNS=no implies that
-     hostnames cannot be used for host matching in sshd_config and
-     authorized_keys; bz#2045, ok dtucker@
+    don't truncate off \r\n from long stderr lines; bz#2688,
+    reported by Brian Dyson; ok dtucker@
     
-    Upstream-ID: 0812705d5f2dfa59aab01f2764ee800b1741c4e1
+    Upstream-ID: cdfdc4ba90639af807397ce996153c88af046ca4
 
-commit 63ebcd0005e9894fcd6871b7b80aeea1fec0ff76
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Jul 18 08:02:17 2015 +0000
+commit 4a4b75adac862029a1064577eb5af299b1580cdd
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 10 02:59:51 2017 +0000
 
     upstream commit
     
-    don't ignore PKCS#11 hosted keys that return empty
-     CKA_ID; patch by Jakub Jelen via bz#2429; ok markus
+    Validate digest arg in ssh_digest_final; from jjelen at
+    redhat.com via bz#2687, ok djm@
     
-    Upstream-ID: 2f7c94744eb0342f8ee8bf97b2351d4e00116485
+    Upstream-ID: dbe5494dfddfe523fab341a3dab5a79e7338f878
 
-commit b15fd989c8c62074397160147a8d5bc34b3f3c63
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Jul 18 08:00:21 2015 +0000
+commit bee0167be2340d8de4bdc1ab1064ec957c85a447
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Mar 10 13:40:18 2017 +1100
 
-    upstream commit
+    Check for NULL from malloc.
     
-    skip uninitialised PKCS#11 slots; patch from Jakub Jelen
-     in bz#2427 ok markus@
+    Part of bz#2687, from jjelen at redhat.com.
+
+commit da39b09d43b137a5a3d071b51589e3efb3701238
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Mar 10 13:22:32 2017 +1100
+
+    If OSX is using launchd, remove screen no.
     
-    Upstream-ID: 744c1e7796e237ad32992d0d02148e8a18f27d29
+    Check for socket with and without screen number.  From Apple and Jakob
+    Schlyter via bz#2341, with contributions from Ron Frederick, ok djm@
 
-commit 5b64f85bb811246c59ebab70aed331f26ba37b18
+commit 8fb15311a011517eb2394bb95a467c209b8b336c
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Jul 18 07:57:14 2015 +0000
+Date:   Wed Mar 8 12:07:47 2017 +0000
 
     upstream commit
     
-    only query each keyboard-interactive device once per
-     authentication request regardless of how many times it is listed; ok markus@
+    quote [host]:port in generated ProxyJump commandline; the
+    [ / ] characters can confuse some shells (e.g. zsh). Reported by Lauri
+    Tirkkonen via bugs@
     
-    Upstream-ID: d73fafba6e86030436ff673656ec1f33d9ffeda1
+    Upstream-ID: 65cdd161460e1351c3d778e974c1c2a4fa4bc182
 
-commit cd7324d0667794eb5c236d8a4e0f236251babc2d
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 17 03:34:27 2015 +0000
+commit 18501151cf272a15b5f2c5e777f2e0933633c513
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Mar 6 02:03:20 2017 +0000
 
     upstream commit
     
-    remove -u flag to diff (only used for error output) to make
-     things easier for -portable
+    Check l->hosts before dereferencing; fixes potential null
+    pointer deref. ok djm@
     
-    Upstream-Regress-ID: a5d6777d2909540d87afec3039d9bb2414ade548
+    Upstream-ID: 81c0327c6ec361da794b5c680601195cc23d1301
 
-commit deb8d99ecba70b67f4af7880b11ca8768df9ec3a
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 17 03:09:19 2015 +0000
+commit d072370793f1a20f01ad827ba8fcd3b8f2c46165
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Mar 6 00:44:51 2017 +0000
 
     upstream commit
     
-    direct-streamlocal@openssh.com Unix domain foward
-     messages do not contain a "reserved for future use" field and in fact,
-     serverloop.c checks that there isn't one. Remove erroneous mention from
-     PROTOCOL description. bz#2421 from Daniel Black
+    linenum is unsigned long so use %lu in log formats.  ok
+    deraadt@
     
-    Upstream-ID: 3d51a19e64f72f764682f1b08f35a8aa810a43ac
+    Upstream-ID: 9dc582d9bb887ebe0164e030d619fc20b1a4ea08
 
-commit 356b61f365405b5257f5b2ab446e5d7bd33a7b52
+commit 12d3767ba4c84c32150cbe6ff6494498780f12c9
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 17 03:04:27 2015 +0000
+Date:   Fri Mar 3 06:13:11 2017 +0000
 
     upstream commit
     
-    describe magic for setting up Unix domain socket fowards
-     via the mux channel; bz#2422 patch from Daniel Black
+    fix ssh-keygen -H accidentally corrupting known_hosts that
+    contained already-hashed entries. HKF_MATCH_HOST_HASHED is only set by
+    hostkeys_foreach() when hostname matching is in use, so we need to look for
+    the hash marker explicitly.
     
-    Upstream-ID: 943080fe3864715c423bdeb7c920bb30c4eee861
+    Upstream-ID: da82ad653b93e8a753580d3cf5cd448bc2520528
 
-commit d3e2aee41487d55b8d7d40f538b84ff1db7989bc
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jul 17 12:52:34 2015 +1000
+commit d7abb771bd5a941b26144ba400a34563a1afa589
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Feb 28 06:10:08 2017 +0000
 
-    Check if realpath works on nonexistent files.
-    
-    On some platforms the native realpath doesn't work with non-existent
-    files (this is actually specified in some versions of POSIX), however
-    the sftp spec says its realpath with "canonicalize any given path name".
-    On those platforms, use realpath from the compat library.
+    upstream commit
     
-    In addition, when compiling with -DFORTIFY_SOURCE, glibc redefines
-    the realpath symbol to the checked version, so redefine ours to
-    something else so we pick up the compat version we want.
+    small memleak: free fd_set on connection timeout (though
+    we are heading to exit anyway). From Tom Rix in bz#2683
     
-    bz#2428, ok djm@
+    Upstream-ID: 10e3dadbb8199845b66581473711642d9e6741c4
 
-commit 25b14610dab655646a109db5ef8cb4c4bf2a48a0
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 17 02:47:45 2015 +0000
+commit 78142e3ab3887e53a968d6e199bcb18daaf2436e
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Mon Feb 27 14:30:33 2017 +0000
 
     upstream commit
     
-    fix incorrect test for SSH1 keys when compiled without SSH1
-     support
+    errant dot; from klemens nanni
     
-    Upstream-ID: 6004d720345b8e481c405e8ad05ce2271726e451
+    Upstream-ID: 83d93366a5acf47047298c5d3ebc5e7426f37921
 
-commit df56a8035d429b2184ee94aaa7e580c1ff67f73a
+commit 8071a6924c12bb51406a9a64a4b2892675112c87
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 15 08:00:11 2015 +0000
+Date:   Fri Feb 24 03:16:34 2017 +0000
 
     upstream commit
     
-    fix NULL-deref when SSH1 reenabled
+    might as well set the listener socket CLOEXEC
     
-    Upstream-ID: f22fd805288c92b3e9646782d15b48894b2d5295
+    Upstream-ID: 9c538433d6a0ca79f5f21decc5620e46fb68ab57
 
-commit 41e38c4d49dd60908484e6703316651333f16b93
+commit d5499190559ebe374bcdfa8805408646ceffad64
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 15 07:19:50 2015 +0000
+Date:   Sun Feb 19 00:11:29 2017 +0000
 
     upstream commit
     
-    regen RSA1 test keys; the last batch was missing their
-     private parts
+    add test cases for C locale; ok schwarze@
     
-    Upstream-Regress-ID: 7ccf437305dd63ff0b48dd50c5fd0f4d4230c10a
+    Upstream-Regress-ID: 783d75de35fbc923d46e2a5e6cee30f8f381ba87
 
-commit 5bf0933184cb622ca3f96d224bf3299fd2285acc
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Fri Jul 10 06:23:25 2015 +0000
+commit 011c8ffbb0275281a0cf330054cf21be10c43e37
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Feb 19 00:10:57 2017 +0000
 
     upstream commit
     
-    Adapt tests, now that DSA if off by default; use
-     PubkeyAcceptedKeyTypes and PubkeyAcceptedKeyTypes to test DSA.
+    Add a common nl_langinfo(CODESET) alias for US-ASCII
+    "ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for
+    non-UTF-8 locales on Linux spotted by dtucker@; ok deraadt@ schwarze@
     
-    Upstream-Regress-ID: 0ff2a3ff5ac1ce5f92321d27aa07b98656efcc5c
+    Upstream-ID: c6808956ebffd64066f9075d839f74ff0dd60719
 
-commit 7a6e3fd7b41dbd3756b6bf9acd67954c0b1564cc
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Jul 7 14:54:16 2015 +0000
+commit 0c4430a19b73058a569573492f55e4c9eeaae67b
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Feb 7 23:03:11 2017 +0000
 
     upstream commit
     
-    regen test data after mktestdata.sh changes
+    Remove deprecated SSH1 options RSAAuthentication and
+    RhostsRSAAuthentication from regression test sshd_config.
     
-    Upstream-Regress-ID: 3495ecb082b9a7c048a2d7c5c845d3bf181d25a4
+    Upstream-Regress-ID: 8066b753d9dce7cf02ff87af5c727ff680d99491
 
-commit 7c8c174c69f681d4910fa41c37646763692b28e2
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Jul 7 14:53:30 2015 +0000
+commit 3baa4cdd197c95d972ec3d07f1c0d08f2d7d9199
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Feb 17 02:32:05 2017 +0000
 
     upstream commit
     
-    adapt tests to new minimum RSA size and default FP format
+    Do not show rsa1 key type in usage when compiled without
+    SSH1 support.
     
-    Upstream-Regress-ID: a4b30afd174ce82b96df14eb49fb0b81398ffd0e
+    Upstream-ID: 068b5c41357a02f319957746fa4e84ea73960f57
 
-commit 6a977a4b68747ade189e43d302f33403fd4a47ac
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 3 04:39:23 2015 +0000
+commit ecc35893715f969e98fee118481f404772de4132
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Feb 17 02:31:14 2017 +0000
 
     upstream commit
     
-    legacy v00 certificates are gone; adapt and don't try to
-     test them; "sure" markus@ dtucker@
+    ifdef out "rsa1" from the list of supported keytypes when
+    compiled without SSH1 support.  Found by kdunlop at guralp.com, ok djm@
     
-    Upstream-Regress-ID: c57321e69b3cd4a3b3396dfcc43f0803d047da12
+    Upstream-ID: cea93a26433d235bb1d64b1d990f19a9c160a70f
 
-commit 0c4123ad5e93fb90fee9c6635b13a6cdabaac385
+commit 10577c6d96a55b877a960b2d0b75edef1b9945af
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 23:11:18 2015 +0000
+Date:   Fri Feb 17 02:04:15 2017 +0000
 
     upstream commit
     
-    don't expect SSH v.1 in unittests
+    For ProxyJump/-J, surround host name with brackets to
+    allow literal IPv6 addresses. From Dick Visser; ok dtucker@
     
-    Upstream-Regress-ID: f8812b16668ba78e6a698646b2a652b90b653397
+    Upstream-ID: 3a5d3b0171250daf6a5235e91bce09c1d5746bf1
 
-commit 3c099845798a817cdde513c39074ec2063781f18
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jun 15 06:38:50 2015 +0000
+commit b2afdaf1b52231aa23d2153f4a8c5a60a694dda4
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Wed Feb 15 23:38:31 2017 +0000
 
     upstream commit
     
-    turn SSH1 back on to match src/usr.bin/ssh being tested
+    Fix memory leaks in match_filter_list() error paths.
     
-    Upstream-Regress-ID: 6c4f763a2f0cc6893bf33983919e9030ae638333
+    ok dtucker@ markus@
+    
+    Upstream-ID: c7f96ac0877f6dc9188bbc908100a8d246cc7f0e
 
-commit b1dc2b33689668c75e95f873a42d5aea1f4af1db
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Mon Jul 13 04:57:14 2015 +0000
+commit 6d5a41b38b55258213ecfaae9df7a758caa752a1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Feb 15 01:46:47 2017 +0000
 
     upstream commit
     
-    Add "PuTTY_Local:" to the clients to which we do not
-     offer DH-GEX. This was the string that was used for development versions
-     prior to September 2014 and they don't do RFC4419 DH-GEX, but unfortunately
-     there are some extant products based on those versions.  bx2424 from Jay
-     Rouman, ok markus@ djm@
+    fix division by zero crash in "df" output when server
+    returns zero total filesystem blocks/inodes. Spotted by Guido Vranken; ok
+    dtucker@
     
-    Upstream-ID: be34d41e18b966832fe09ca243d275b81882e1d5
+    Upstream-ID: 6fb6c2ae6b289aa07b6232dbc0be54682ef5419f
 
-commit 3a1638dda19bbc73d0ae02b4c251ce08e564b4b9
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Fri Jul 10 06:21:53 2015 +0000
+commit bd5d7d239525d595ecea92765334af33a45d9d63
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Sun Feb 12 15:45:15 2017 +1100
 
-    upstream commit
-    
-    Turn off DSA by default; add HostKeyAlgorithms to the
-     server and PubkeyAcceptedKeyTypes to the client side, so it still can be
-     tested or turned back on; feedback and ok djm@
+    ifdef out EVP_R_PRIVATE_KEY_DECODE_ERROR
     
-    Upstream-ID: 8450a9e6d83f80c9bfed864ff061dfc9323cec21
+    EVP_R_PRIVATE_KEY_DECODE_ERROR was added in OpenSSL 1.0.0 so ifdef out
+    for the benefit of OpenSSL versions prior to that.
 
-commit 16db0a7ee9a87945cc594d13863cfcb86038db59
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Thu Jul 9 09:49:46 2015 +0000
+commit 155d540d00ff55f063421ec182ec8ff2b7ab6cbe
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Feb 10 04:34:50 2017 +0000
 
     upstream commit
     
-    re-enable ed25519-certs if compiled w/o openssl; ok djm
+    bring back r1.34 that was backed out for problems loading
+    public keys:
     
-    Upstream-ID: e10c90808b001fd2c7a93778418e9b318f5c4c49
-
-commit c355bf306ac33de6545ce9dac22b84a194601e2f
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jul 8 20:24:02 2015 +0000
-
-    upstream commit
+    translate OpenSSL error codes to something more
+    meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@
     
-    no need to include the old buffer/key API
+    with additional fix from Jakub Jelen to solve the backout.
+    bz#2525 bz#2523 re-ok dtucker@
     
-    Upstream-ID: fb13c9f7c0bba2545f3eb0a0e69cb0030819f52b
+    Upstream-ID: a9d5bc0306f4473d9b4f4484f880e95f3c1cc031
 
-commit a3cc48cdf9853f1e832d78cb29bedfab7adce1ee
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jul 8 19:09:25 2015 +0000
+commit a287c5ad1e0bf9811c7b9221979b969255076019
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Feb 10 03:36:40 2017 +0000
 
     upstream commit
     
-    typedefs for Cipher&CipherContext are unused
+    Sanitise escape sequences in key comments sent to printf
+    but preserve valid UTF-8 when the locale supports it; bz#2520 ok dtucker@
     
-    Upstream-ID: 50e6a18ee92221d23ad173a96d5b6c42207cf9a7
+    Upstream-ID: e8eed28712ba7b22d49be534237eed019875bd1e
 
-commit a635bd06b5c427a57c3ae760d3a2730bb2c863c0
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jul 8 19:04:21 2015 +0000
+commit e40269be388972848aafcca7060111c70aab5b87
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Wed Feb 8 20:32:43 2017 +0000
 
     upstream commit
     
-    xmalloc.h is unused
+    Avoid printf %s NULL.  From semarie@, OK djm@
     
-    Upstream-ID: afb532355b7fa7135a60d944ca1e644d1d63cb58
+    Upstream-ID: 06beef7344da0208efa9275d504d60d2a5b9266c
 
-commit 2521cf0e36c7f3f6b19f206da0af134f535e4a31
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jul 8 19:01:15 2015 +0000
+commit 5b90709ab8704dafdb31e5651073b259d98352bc
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Feb 6 09:22:51 2017 +0000
 
     upstream commit
     
-    compress.c is gone
+    Restore \r\n newline sequence for server ident string. The CR
+    got lost in the flensing of SSHv1. Pointed out by Stef Bon
     
-    Upstream-ID: 174fa7faa9b9643cba06164b5e498591356fbced
+    Upstream-ID: 5333fd43ce5396bf5999496096fac5536e678fac
 
-commit c65a7aa6c43aa7a308ee1ab8a96f216169ae9615
+commit 97c31c46ee2e6b46dfffdfc4f90bbbf188064cbc
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 3 04:05:54 2015 +0000
+Date:   Fri Feb 3 23:01:42 2017 +0000
 
     upstream commit
     
-    another SSH_RSA_MINIMUM_MODULUS_SIZE that needed
-     cranking
+    unit test for match_filter_list() function; still want a
+    better name for this...
     
-    Upstream-ID: 9d8826cafe96aab4ae8e2f6fd22800874b7ffef1
+    Upstream-Regress-ID: 840ad6118552c35111f0a897af9c8d93ab8de92a
 
-commit b1f383da5cd3cb921fc7776f17a14f44b8a31757
+commit f1a193464a7b77646f0d0cedc929068e4a413ab4
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 3 03:56:25 2015 +0000
+Date:   Fri Feb 3 23:05:57 2017 +0000
 
     upstream commit
     
-    add an XXX reminder for getting correct key paths from
-     sshd_config
+    use ssh_packet_set_log_preamble() to include connection
+    username in packet log messages, e.g.
     
-    Upstream-ID: feae52b209d7782ad742df04a4260e9fe41741db
+    Connection closed by invalid user foo 10.1.1.1 port 44056 [preauth]
+    
+    ok markus@ bz#113
+    
+    Upstream-ID: 3591b88bdb5416d6066fb3d49d8fff2375bf1a15
 
-commit 933935ce8d093996c34d7efa4d59113163080680
+commit 07edd7e9537ab32aa52abb5fb2a915c350fcf441
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 3 03:49:45 2015 +0000
+Date:   Fri Feb 3 23:03:33 2017 +0000
 
     upstream commit
     
-    refuse to generate or accept RSA keys smaller than 1024
-     bits; feedback and ok dtucker@
+    add ssh_packet_set_log_preamble() to allow inclusion of a
+    preamble string in disconnect messages; ok markus@
     
-    Upstream-ID: 7ea3d31271366ba264f06e34a3539bf1ac30f0ba
+    Upstream-ID: 34cb41182cd76d414c214ccb01c01707849afead
 
-commit bdfd29f60b74f3e678297269dc6247a5699583c1
+commit 68bc8cfa7642d3ccbf2cd64281c16b8b9205be59
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 3 03:47:00 2015 +0000
+Date:   Fri Feb 3 23:01:19 2017 +0000
 
     upstream commit
     
-    turn off 1024 bit diffie-hellman-group1-sha1 key
-     exchange method (already off in server, this turns it off in the client by
-     default too) ok dtucker@
+    support =- for removing methods from algorithms lists,
+    e.g. Ciphers=-*cbc; suggested by Cristian Ionescu-Idbohrn in bz#2671 "I like
+    it" markus@
     
-    Upstream-ID: f59b88f449210ab7acf7d9d88f20f1daee97a4fa
+    Upstream-ID: c78c38f9f81a963b33d0eade559f6048add24a6d
 
-commit c28fc62d789d860c75e23a9fa9fb250eb2beca57
+commit c924b2ef941028a1f31e6e94f54dfeeeef462a4e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jul 3 03:43:18 2015 +0000
+Date:   Fri Feb 3 05:05:56 2017 +0000
 
     upstream commit
     
-    delete support for legacy v00 certificates; "sure"
-     markus@ dtucker@
+    allow form-feed characters at EOL; bz#2431 ok dtucker@
     
-    Upstream-ID: b5b9bb5f9202d09e88f912989d74928601b6636f
+    Upstream-ID: 1f453afaba6da2ae69d6afdf1ae79a917552f1a2
 
-commit 564d63e1b4a9637a209d42a9d49646781fc9caef
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 23:10:47 2015 +0000
+commit 523db8540b720c4d21ab0ff6f928476c70c38aab
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Feb 3 16:01:22 2017 +1100
 
-    upstream commit
+    prefer to use ldns-config to find libldns
     
-    Compile-time disable SSH v.1 again
+    Should fix bz#2603 - "Build with ldns and without kerberos support
+    fails if ldns compiled with kerberos support" by including correct
+    cflags/libs
     
-    Upstream-ID: 1d4b513a3a06232f02650b73bad25100d1b800af
+    ok dtucker@
 
-commit 868109b650504dd9bcccdb1f51d0906f967c20ff
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 02:39:06 2015 +0000
+commit c998bf0afa1a01257a53793eba57941182e9e0b7
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Feb 3 02:56:00 2017 +0000
 
     upstream commit
     
-    twiddle PermitRootLogin back
+    Make ssh_packet_set_rekey_limits take u32 for the number of
+    seconds until rekeying (negative values are rejected at config parse time).
+    This allows the removal of some casts and a signed vs unsigned comparison
+    warning.
     
-    Upstream-ID: 2bd23976305d0512e9f84d054e1fc23cd70b89f2
+    rekey_time is cast to int64 for the comparison which is a no-op
+    on OpenBSD, but should also do the right thing in -portable on
+    anything still using 32bit time_t (until the system time actually
+    wraps, anyway).
+    
+    some early guidance deraadt@, ok djm@
+    
+    Upstream-ID: c9f18613afb994a07e7622eb326f49de3d123b6c
 
-commit 7de4b03a6e4071d454b72927ffaf52949fa34545
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 02:32:17 2015 +0000
+commit 3ec5fa4ba97d4c4853620daea26a33b9f1fe3422
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Thu Feb 2 10:54:25 2017 +0000
 
     upstream commit
     
-    twiddle; (this commit marks the openssh-6.9 release)
+    In vasnmprintf() return an error if malloc fails and
+    don't set a function argument to the address of free'd memory.
     
-    Upstream-ID: 78500582819f61dd8adee36ec5cc9b9ac9351234
+    ok djm@
+    
+    Upstream-ID: 1efffffff2f51d53c9141f245b90ac23d33b9779
 
-commit 1bf477d3cdf1a864646d59820878783d42357a1d
+commit 858252fb1d451ebb0969cf9749116c8f0ee42753
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Feb 1 02:59:09 2017 +0000
+
+    upstream commit
+    
+    Return true reason for port forwarding failures where
+    feasible rather than always "administratively prohibited".  bz#2674, ok djm@
+    
+    Upstream-ID: d901d9887951774e604ca970e1827afaaef9e419
+
+commit 6ba9f893838489add6ec4213c7a997b425e4a9e0
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Jan 30 23:27:39 2017 +0000
+
+    upstream commit
+    
+    Small correction to the known_hosts section on when it is
+    updated. Patch from lkppo at free.fr some time ago, pointed out by smallm at
+    sdf.org
+    
+    Upstream-ID: 1834d7af179dea1a12ad2137f84566664af225d5
+
+commit c61d5ec3c11e7ff9779b6127421d9f166cf10915
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Feb 3 14:10:34 2017 +1100
+
+    Remove _XOPEN_SOURCE from wide char detection.
+    
+    Having _XOPEN_SOURCE unconditionally causes problems on some platforms
+    and configurations, notably Solaris 64-bit binaries.  It was there for
+    the benefit of Linux put the required bits in the *-*linux* section.
+    
+    Patch from yvoinov at gmail.com.
+
+commit f25ee13b3e81fd80efeb871dc150fe49d7fc8afd
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 02:26:31 2015 +0000
+Date:   Mon Jan 30 05:22:14 2017 +0000
 
     upstream commit
     
-    better refuse ForwardX11Trusted=no connections attempted
-     after ForwardX11Timeout expires; reported by Jann Horn
+    fully unbreak: some $SSH invocations did not have -F
+    specified and could pick up the ~/.ssh/config of the user running the tests
     
-    Upstream-ID: bf0fddadc1b46a0334e26c080038313b4b6dea21
+    Upstream-Regress-ID: f362d1892c0d3e66212d5d3fc02d915c58ef6b89
 
-commit 47aa7a0f8551b471fcae0447c1d78464f6dba869
+commit 6956e21fb26652887475fe77ea40d2efcf25908b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 01:56:13 2015 +0000
+Date:   Mon Jan 30 04:54:07 2017 +0000
 
     upstream commit
     
-    put back default PermitRootLogin=no
+    partially unbreak: was not specifying hostname on some
+    $SSH invocations
     
-    Upstream-ID: 7bdedd5cead99c57ed5571f3b6b7840922d5f728
+    Upstream-Regress-ID: bc8a5e98e57bad0a92ef4f34ed91c1d18294e2cc
 
-commit 984b064fe2a23733733262f88d2e1b2a1a501662
+commit 52763dd3fe0a4678dafdf7aeb32286e514130afc
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 01:55:13 2015 +0000
+Date:   Mon Jan 30 01:03:00 2017 +0000
 
     upstream commit
     
-    openssh-6.9
+    revise keys/principals command hang fix (bz#2655) to
+    consume entire output, avoiding sending SIGPIPE to subprocesses early; ok
+    dtucker@
     
-    Upstream-ID: 6cfe8e1904812531080e6ab6e752d7001b5b2d45
+    Upstream-ID: 7cb04b31a61f8c78c4e48ceededcd2fd5c4ee1bc
 
-commit d921082ed670f516652eeba50705e1e9f6325346
+commit 381a2615a154a82c4c53b787f4a564ef894fe9ac
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jul 1 01:55:00 2015 +0000
+Date:   Mon Jan 30 00:38:50 2017 +0000
 
     upstream commit
     
-    reset default PermitRootLogin to 'yes' (momentarily, for
-     release)
+    small cleanup post SSHv1 removal:
     
-    Upstream-ID: cad8513527066e65dd7a1c16363d6903e8cefa24
+    remove SSHv1-isms in commented examples
+    
+    reorder token table to group deprecated and compile-time conditional tokens
+    better
+    
+    fix config dumping code for some compile-time conditional options that
+    weren't being correctly skipped (SSHv1 and PKCS#11)
+    
+    Upstream-ID: f2e96b3cb3158d857c5a91ad2e15925df3060105
 
-commit 66295e0e1ba860e527f191b6325d2d77dec4dbce
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 1 11:49:12 2015 +1000
+commit 4833d01591b7eb049489d9558b65f5553387ed43
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jan 30 00:34:01 2017 +0000
 
-    crank version numbers for release
+    upstream commit
+    
+    some explicit NULL tests when dumping configured
+    forwardings; from Karsten Weiss
+    
+    Upstream-ID: 40957b8dea69672b0e50df6b4a91a94e3e37f72d
 
-commit 37035c07d4f26bb1fbe000d2acf78efdb008681d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 1 10:49:37 2015 +1000
+commit 326e2fae9f2e3e067b5651365eba86b35ee5a6b2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jan 30 00:32:28 2017 +0000
 
-    s/--with-ssh1/--without-ssh1/
+    upstream commit
+    
+    misplaced braces in test; from Karsten Weiss
+    
+    Upstream-ID: f7b794074d3aae8e35b69a91d211c599c94afaae
 
-commit 629df770dbadc2accfbe1c81b3f31f876d0acd84
+commit 3e032a95e46bfaea9f9e857678ac8fa5f63997fb
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jun 30 05:25:07 2015 +0000
+Date:   Mon Jan 30 00:32:03 2017 +0000
 
     upstream commit
     
-    fatal() when a remote window update causes the window
-     value to overflow. Reported by Georg Wicherski, ok markus@
+    don't dereference authctxt before testing != NULL, it
+    causes compilers to make assumptions; from Karsten Weiss
     
-    Upstream-ID: ead397a9aceb3bf74ebfa5fcaf259d72e569f351
+    Upstream-ID: 794243aad1e976ebc717885b7a97a25e00c031b2
 
-commit f715afebe735d61df3fd30ad72d9ac1c8bd3b5f2
+commit 01cfaa2b1cfb84f3cdd32d1bf82b120a8d30e057
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jun 30 05:23:25 2015 +0000
+Date:   Fri Jan 6 02:51:16 2017 +0000
 
     upstream commit
     
-    Fix math error in remote window calculations that causes
-     eventual stalls for datagram channels. Reported by Georg Wicherski, ok
-     markus@
+    use correct ssh-add program; bz#2654, from Colin Watson
     
-    Upstream-ID: be54059d11bf64e0d85061f7257f53067842e2ab
+    Upstream-Regress-ID: 7042a36e1bdaec6562f6e57e9d047efe9c7a6030
 
-commit 52fb6b9b034fcfd24bf88cc7be313e9c31de9889
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jun 30 16:05:40 2015 +1000
+commit e5c7ec67cdc42ae2584085e0fc5cc5ee91133cf5
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jan 6 02:26:10 2017 +0000
 
-    skip IPv6-related portions on hosts without IPv6
+    upstream commit
     
-    with Tim Rice
+    Account for timeouts in the integrity tests as failures.
+    
+    If the first test in a series for a given MAC happens to modify the low
+    bytes of a packet length, then ssh will time out and this will be
+    interpreted as a test failure.  Patch from cjwatson at debian.org via
+    bz#2658.
+    
+    Upstream-Regress-ID: e7467613b0badedaa300bc6fc7495ec2f44e2fb9
 
-commit 512caddf590857af6aa12218461b5c0441028cf5
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jun 29 22:35:12 2015 +0000
+commit dbaf599b61bd6e0f8469363a8c8e7f633b334018
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jan 6 02:09:25 2017 +0000
 
     upstream commit
     
-    add getpid to sandbox, reachable by grace_alarm_handler
+    Make forwarding test less racy by using unix domain
+    sockets instead of TCP ports where possible.  Patch from cjwatson at
+    debian.org via bz#2659.
     
-    reported by Jakub Jelen; bz#2419
+    Upstream-Regress-ID: 4756375aac5916ef9d25452a1c1d5fa9e90299a9
+
+commit 9390b0031ebd6eb5488d3bc4d4333c528dffc0a6
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Sun Jan 29 21:35:23 2017 +0000
+
+    upstream commit
     
-    Upstream-ID: d0da1117c16d4c223954995d35b0f47c8f684cd8
+    Fix typo in ~C error message for bad port forward
+    cancellation. bz#2672, from Brad Marshall via Colin Watson and Ubuntu's
+    bugtracker.
+    
+    Upstream-ID: 0d4a7e5ead6cc59c9a44b4c1e5435ab3aada09af
 
-commit 78c2a4f883ea9aba866358e2acd9793a7f42ca93
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jun 26 05:13:20 2015 +0000
+commit 4ba15462ca38883b8a61a1eccc093c79462d5414
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Sat Jan 21 11:32:04 2017 +0000
 
     upstream commit
     
-    Fix \-escaping bug that caused forward path parsing to skip
-     two characters and skip past the end of the string.
+    The POSIX APIs that that sockaddrs all ignore the s*_len
+    field in the incoming socket, so userspace doesn't need to set it unless it
+    has its own reasons for tracking the size along with the sockaddr.
     
-    Based on patch by Salvador Fandino; ok dtucker@
+    ok phessler@ deraadt@ florian@
     
-    Upstream-ID: 7b879dc446335677cbe4cb549495636a0535f3bd
+    Upstream-ID: ca6e49e2f22f2b9e81d6d924b90ecd7e422e7437
 
-commit bc20205c91c9920361d12b15d253d4997dba494a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jun 25 09:51:39 2015 +1000
+commit a1187bd3ef3e4940af849ca953a1b849dae78445
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Jan 6 16:28:12 2017 +0000
 
-    add missing pselect6
+    upstream commit
     
-    patch from Jakub Jelen
+    keep the tokens list sorted;
+    
+    Upstream-ID: b96239dae4fb3aa94146bb381afabcc7740a1638
 
-commit 9d27fb73b4a4e5e99cb880af790d5b1ce44f720a
+commit b64077f9767634715402014f509e58decf1e140d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jun 24 23:47:23 2015 +0000
+Date:   Fri Jan 6 09:27:52 2017 +0000
 
     upstream commit
     
-    correct test to sshkey_sign(); spotted by Albert S.
+    fix previous
     
-    Upstream-ID: 5f7347f40f0ca6abdaca2edb3bd62f4776518933
+    Upstream-ID: c107d6a69bc22325d79fbf78a2a62e04bcac6895
 
-commit 7ed01a96a1911d8b4a9ef4f3d064e1923bfad7e3
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed Jun 24 01:49:19 2015 +0000
+commit 5e820e9ea2e949aeb93071fe31c80b0c42f2b2de
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jan 6 03:53:58 2017 +0000
 
     upstream commit
     
-    Revert previous commit.  We still want to call setgroups
-     in the case where there are zero groups to remove any that we might otherwise
-     inherit (as pointed out by grawity at gmail.com) and since the 2nd argument
-     to setgroups is always a static global it's always valid to dereference in
-     this case.  ok deraadt@ djm@
+    show a useful error message when included config files
+    can't be opened; bz#2653, ok dtucker@
     
-    Upstream-ID: 895b5ac560a10befc6b82afa778641315725fd01
+    Upstream-ID: f598b73b5dfe497344cec9efc9386b4e5a3cb95b
 
-commit 882f8bf94f79528caa65b0ba71c185d705bb7195
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed Jun 24 01:49:19 2015 +0000
+commit 13bd2e2d622d01dc85d22b94520a5b243d006049
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jan 6 03:45:41 2017 +0000
 
     upstream commit
     
-    Revert previous commit.  We still want to call setgroups in
-     the case where there are zero groups to remove any that we might otherwise
-     inherit (as pointed out by grawity at gmail.com) and since the 2nd argument
-     to setgroups is always a static global it's always valid to dereference in
-     this case.  ok deraadt@ djm@
+    sshd_config is documented to set
+    GSSAPIStrictAcceptorCheck=yes by default, so actually make it do this.
+    bz#2637 ok dtucker
     
-    Upstream-ID: 895b5ac560a10befc6b82afa778641315725fd01
+    Upstream-ID: 99ef8ac51f17f0f7aec166cb2e34228d4d72a665
 
-commit 9488538a726951e82b3a4374f3c558d72c80a89b
+commit f89b928534c9e77f608806a217d39a2960cc7fd0
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jun 22 23:42:16 2015 +0000
+Date:   Fri Jan 6 03:41:58 2017 +0000
 
     upstream commit
     
-    Don't count successful partial authentication as failures
-     in monitor; this may have caused the monitor to refuse multiple
-     authentications that would otherwise have successfully completed; ok markus@
+    Avoid confusing error message when attempting to use
+    ssh-keyscan built without SSH protocol v.1 to scan for v.1 keys; bz#2583
     
-    Upstream-ID: eb74b8e506714d0f649bd5c300f762a527af04a3
+    Upstream-ID: 5d214abd3a21337d67c6dcc5aa6f313298d0d165
 
-commit 63b78d003bd8ca111a736e6cea6333da50f5f09b
+commit 0999533014784579aa6f01c2d3a06e3e8804b680
 Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Mon Jun 22 12:29:57 2015 +0000
+Date:   Fri Jan 6 02:34:54 2017 +0000
 
     upstream commit
     
-    Don't call setgroups if we have zero groups; there's no
-     guarantee that it won't try to deref the pointer.  Based on a patch from mail
-     at quitesimple.org, ok djm deraadt
+    Re-add '%k' token for AuthorizedKeysCommand which was
+    lost during the re-org in rev 1.235.  bz#2656, from jboning at gmail.com.
     
-    Upstream-ID: 2fff85e11d7a9a387ef7fddf41fbfaf566708ab1
-
-commit 5c15e22c691c79a47747bcf5490126656f97cecd
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jun 18 15:07:56 2015 +1000
-
-    fix syntax error
+    Upstream-ID: 2884e203c02764d7b3fe7472710d9c24bdc73e38
 
-commit 596dbca82f3f567fb3d2d69af4b4e1d3ba1e6403
-Author: jsing@openbsd.org <jsing@openbsd.org>
-Date:   Mon Jun 15 18:44:22 2015 +0000
+commit 51045869fa084cdd016fdd721ea760417c0a3bf3
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jan 4 05:37:40 2017 +0000
 
     upstream commit
     
-    If AuthorizedPrincipalsCommand is specified, however
-     AuthorizedPrincipalsFile is not (or is set to "none"), authentication will
-     potentially fail due to key_cert_check_authority() failing to locate a
-     principal that matches the username, even though an authorized principal has
-     already been matched in the output of the subprocess. Fix this by using the
-     same logic to determine if pw->pw_name should be passed, as is used to
-     determine if a authorized principal must be matched earlier on.
+    unbreak Unix domain socket forwarding for root; ok
+    markus@
     
-    ok djm@
+    Upstream-ID: 6649c76eb7a3fa15409373295ca71badf56920a2
+
+commit 58fca12ba967ea5c768653535604e1522d177e44
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jan 16 09:08:32 2017 +1100
+
+    Remove LOGIN_PROGRAM.
     
-    Upstream-ID: 43b42302ec846b0ea68aceb40677245391b9409d
+    UseLogin is gone, remove leftover.  bz#2665, from cjwatson at debian.org
 
-commit aff3e94c0d75d0d0fa84ea392b50ab04f8c57905
-Author: jsing@openbsd.org <jsing@openbsd.org>
-Date:   Mon Jun 15 18:42:19 2015 +0000
+commit b108ce92aae0ca0376dce9513d953be60e449ae1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jan 4 02:21:43 2017 +0000
 
     upstream commit
     
-    Make the arguments to match_principals_command() similar
-     to match_principals_file(), by changing the last argument a struct
-     sshkey_cert * and dereferencing key->cert in the caller.
+    relax PKCS#11 whitelist a bit to allow libexec as well as
+    lib directories.
     
-    No functional change.
+    Upstream-ID: cf5617958e2e2d39f8285fd3bc63b557da484702
+
+commit c7995f296b9222df2846f56ecf61e5ae13d7a53d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jan 3 05:46:51 2017 +0000
+
+    upstream commit
     
-    ok djm@
+    check number of entries in SSH2_FXP_NAME response; avoids
+    unreachable overflow later. Reported by Jann Horn
     
-    Upstream-ID: 533f99b844b21b47342b32b62e198dfffcf8651c
+    Upstream-ID: b6b2b434a6d6035b1644ca44f24cd8104057420f
 
-commit 97e2e1596c202a4693468378b16b2353fd2d6c5e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jun 17 14:36:54 2015 +1000
+commit ddd3d34e5c7979ca6f4a3a98a7d219a4ed3d98c2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Dec 30 22:08:02 2016 +0000
 
-    trivial optimisation for seccomp-bpf
+    upstream commit
     
-    When doing arg inspection and the syscall doesn't match, skip
-    past the instruction that reloads the syscall into the accumulator,
-    since the accumulator hasn't been modified at this point.
+    fix deadlock when keys/principals command produces a lot of
+    output and a key is matched early; bz#2655, patch from jboning AT gmail.com
+    
+    Upstream-ID: e19456429bf99087ea994432c16d00a642060afe
 
-commit 99f33d7304893bd9fa04d227cb6e870171cded19
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jun 17 10:50:51 2015 +1000
+commit 30eee7d1b2fec33c14870cc11910610be5d2aa6f
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 20 12:16:11 2016 +1100
 
-    aarch64 support for seccomp-bpf sandbox
+    Re-add missing "Prerequisites" header and fix typo
     
-    Also resort and tidy syscall list. Based on patches by Jakub Jelen
-    bz#2361; ok dtucker@
+    Patch from HARUYAMA Seigo <haruyama at unixuser org>.
 
-commit 4ef702e1244633c1025ec7cfe044b9ab267097bf
+commit c8c60f3663165edd6a52632c6ddbfabfce1ca865
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jun 15 01:32:50 2015 +0000
+Date:   Mon Dec 19 22:35:23 2016 +0000
 
     upstream commit
     
-    return failure on RSA signature error; reported by Albert S
+    use standard /bin/sh equality test; from Mike Frysinger
     
-    Upstream-ID: e61bb93dbe0349625807b0810bc213a6822121fa
+    Upstream-Regress-ID: 7b6f0b63525f399844c8ac211003acb8e4b0bec2
 
-commit a170f22baf18af0b1acf2788b8b715605f41a1f9
-Author: Tim Rice <tim@multitalents.net>
-Date:   Tue Jun 9 22:41:13 2015 -0700
+commit 4a354fc231174901f2629437c2a6e924a2dd6772
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Dec 19 15:59:26 2016 +1100
 
-    Fix t12 rules for out of tree builds.
+    crank version numbers for release
 
-commit ec04dc4a5515c913121bc04ed261857e68fa5c18
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Fri Jun 5 15:13:13 2015 +0000
+commit 5f8d0bb8413d4d909cc7aa3c616fb0538224c3c9
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Dec 19 04:55:51 2016 +0000
 
     upstream commit
     
-    For "ssh -L 12345:/tmp/sock" don't fail with "No forward host
-     name." (we have a path, not a host name).  Based on a diff from Jared
-     Yanovich. OK djm@
+    openssh-7.4
     
-    Upstream-ID: 2846b0a8c7de037e33657f95afbd282837fc213f
+    Upstream-ID: 1ee404adba6bbe10ae9277cbae3a94abe2867b79
 
-commit 732d61f417a6aea0aa5308b59cb0f563bcd6edd6
+commit 3a8213ea0ed843523e34e55ab9c852332bab4c7b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jun 5 03:44:14 2015 +0000
+Date:   Mon Dec 19 04:55:18 2016 +0000
 
     upstream commit
     
-    typo: accidental repetition; bz#2386
+    remove testcase that depends on exact output and
+    behaviour of snprintf(..., "%s", NULL)
     
-    Upstream-ID: 45e620d99f6bc301e5949d34a54027374991c88b
+    Upstream-Regress-ID: cab4288531766bd9593cb556613b91a2eeefb56f
 
-commit adfb24c69d1b6f5e758db200866c711e25a2ba73
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jun 5 14:51:40 2015 +1000
+commit eae735a82d759054f6ec7b4e887fb7a5692c66d7
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Dec 19 03:32:57 2016 +0000
 
-    Add Linux powerpc64le and powerpcle entries.
+    upstream commit
     
-    Stopgap to resolve bz#2409 because we are so close to release and will
-    update config.guess and friends shortly after the release.  ok djm@
-
-commit a1195a0fdc9eddddb04d3e9e44c4775431cb77da
-Merge: 6397eed d2480bc
-Author: Tim Rice <tim@multitalents.net>
-Date:   Wed Jun 3 21:43:13 2015 -0700
-
-    Merge branch 'master' of git.mindrot.org:/var/git/openssh
+    Use LOGNAME to get current user and fall back to whoami if
+    not set. Mainly to benefit -portable since some platforms don't have whoami.
+    
+    Upstream-Regress-ID: e3a16b7836a3ae24dc8f8a4e43fdf8127a60bdfa
 
-commit 6397eedf953b2b973d2d7cbb504ab501a07f8ddc
-Author: Tim Rice <tim@multitalents.net>
-Date:   Wed Jun 3 21:41:11 2015 -0700
+commit 0d2f88428487518eea60602bd593989013831dcf
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Dec 16 03:51:19 2016 +0000
 
-    Remove unneeded backslashes. Patch from Ángel González
+    upstream commit
+    
+    Add regression test for AllowUsers and DenyUsers.  Patch from
+    Zev Weiss <zev at bewilderbeest.net>
+    
+    Upstream-Regress-ID: 8f1aac24d52728398871dac14ad26ea38b533fb9
 
-commit d2480bcac1caf31b03068de877a47d6e1027bf6d
+commit 3bc8180a008929f6fe98af4a56fb37d04444b417
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Jun 4 14:10:55 2015 +1000
+Date:   Fri Dec 16 15:02:24 2016 +1100
 
-    Remove redundant include of stdarg.h.  bz#2410
+    Add missing monitor.h include.
+    
+    Fixes warning pointed out by Zev Weiss <zev at bewilderbeest.net>
 
-commit 5e67859a623826ccdf2df284cbb37e2d8e2787eb
+commit 410681f9015d76cc7b137dd90dac897f673244a0
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jun 2 09:10:40 2015 +0000
+Date:   Fri Dec 16 02:48:55 2016 +0000
 
     upstream commit
     
-    mention CheckHostIP adding addresses to known_hosts;
-     bz#1993; ok dtucker@
+    revert to rev1.2; the new bits in this test depend on changes
+    to ssh that aren't yet committed
     
-    Upstream-ID: fd44b68440fd0dc29abf9f2d3f703d74a2396cb7
+    Upstream-Regress-ID: 828ffc2c7afcf65d50ff2cf3dfc47a073ad39123
 
-commit d7a58bbac6583e33fd5eca8e2c2cc70c57617818
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Jun 2 20:15:26 2015 +1000
+commit 2f2ffa4fbe4b671bbffa0611f15ba44cff64d58e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Dec 16 01:06:27 2016 +0000
 
-    Replace strcpy with strlcpy.
+    upstream commit
     
-    ok djm, sanity check by Corinna Vinschen.
-
-commit 51a1c2115265c6e80ede8a5c9dccada9aeed7143
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri May 29 18:27:21 2015 +1000
-
-    skip, rather than fatal when run without SUDO set
-
-commit 599f01142a376645b15cbc9349d7e8975e1cf245
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri May 29 18:03:15 2015 +1000
-
-    fix merge botch that left ",," in KEX algs
-
-commit 0c2a81dfc21822f2423edd30751e5ec53467b347
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri May 29 17:08:28 2015 +1000
-
-    re-enable SSH protocol 1 at compile time
+    Move the "stop sshd" code into its own helper function.
+    Patch from Zev Weiss <zev at bewilderbeest.net>, ok djm@
+    
+    Upstream-Regress-ID: a113dea77df5bd97fb4633ea31f3d72dbe356329
 
-commit db438f9285d64282d3ac9e8c0944f59f037c0151
+commit e15e7152331e3976b35475fd4e9c72897ad0f074
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 29 03:05:13 2015 +0000
+Date:   Fri Dec 16 01:01:07 2016 +0000
 
     upstream commit
     
-    make this work without SUDO set; ok dtucker@
+    regression test for certificates along with private key
+    with no public half. bz#2617, mostly from Adam Eijdenberg
     
-    Upstream-Regress-ID: bca88217b70bce2fe52b23b8e06bdeb82d98c715
+    Upstream-Regress-ID: 2e74dc2c726f4dc839609b3ce045466b69f01115
 
-commit 1d9a2e2849c9864fe75daabf433436341c968e14
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 28 07:37:31 2015 +0000
+commit 9a70ec085faf6e55db311cd1a329f1a35ad2a500
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Dec 15 23:50:37 2016 +0000
 
     upstream commit
     
-    wrap all moduli-related code in #ifdef WITH_OPENSSL.
-     based on patch from Reuben Hawkins; bz#2388 feedback and ok dtucker@
+    Use $SUDO to read pidfile in case root's umask is
+    restricted.  From portable.
     
-    Upstream-ID: d80cfc8be3e6ec65b3fac9e87c4466533b31b7cf
+    Upstream-Regress-ID: f6b1c7ffbc5a0dfb7d430adb2883344899174a98
 
-commit 496aeb25bc2d6c434171292e4714771b594bd00e
+commit fe06b68f824f8f55670442fb31f2c03526dd326c
 Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Thu May 28 05:41:29 2015 +0000
+Date:   Thu Dec 15 21:29:05 2016 +0000
 
     upstream commit
     
-    Increase the allowed length of the known host file name
-     in the log message to be consistent with other cases.  Part of bz#1993, ok
-     deraadt.
+    Add missing braces in DenyUsers code.  Patch from zev at
+    bewilderbeest.net, ok deraadt@
     
-    Upstream-ID: a9e97567be49f25daf286721450968251ff78397
+    Upstream-ID: d747ace338dcf943b077925f90f85f789714b54e
 
-commit dd2cfeb586c646ff8d70eb93567b2e559ace5b14
+commit dcc7d74242a574fd5c4afbb4224795b1644321e7
 Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Thu May 28 05:09:45 2015 +0000
+Date:   Thu Dec 15 21:20:41 2016 +0000
 
     upstream commit
     
-    Fix typo (keywork->keyword)
+    Fix text in error message.  Patch from zev at
+    bewilderbeest.net.
     
-    Upstream-ID: 8aacd0f4089c0a244cf43417f4f9045dfaeab534
+    Upstream-ID: deb0486e175e7282f98f9a15035d76c55c84f7f6
 
-commit 9cc6842493fbf23025ccc1edab064869640d3bec
+commit b737e4d7433577403a31cff6614f6a1b0b5e22f4
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 28 04:50:53 2015 +0000
+Date:   Wed Dec 14 00:36:34 2016 +0000
 
     upstream commit
     
-    add error message on ftruncate failure; bz#2176
+    disable Unix-domain socket forwarding when privsep is
+    disabled
     
-    Upstream-ID: cbcc606e0b748520c74a210d8f3cc9718d3148cf
+    Upstream-ID: ab61516ae0faadad407857808517efa900a0d6d0
 
-commit d1958793a0072c22be26d136dbda5ae263e717a0
+commit 08a1e7014d65c5b59416a0e138c1f73f417496eb
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 28 04:40:13 2015 +0000
+Date:   Fri Dec 9 03:04:29 2016 +0000
 
     upstream commit
     
-    make ssh-keygen default to ed25519 keys when compiled
-     without OpenSSL; bz#2388, ok dtucker@
+    log connections dropped in excess of MaxStartups at
+    verbose LogLevel; bz#2613 based on diff from Tomas Kuthan; ok dtucker@
     
-    Upstream-ID: 85a471fa6d3fa57a7b8e882d22cfbfc1d84cdc71
+    Upstream-ID: 703ae690dbf9b56620a6018f8a3b2389ce76d92b
 
-commit 3ecde664c9fc5fb3667aedf9e6671462600f6496
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed May 27 23:51:10 2015 +0000
+commit 10e290ec00964b2bf70faab15a10a5574bb80527
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 13 13:51:32 2016 +1100
 
-    upstream commit
+    Get default of TEST_SSH_UTF8 from environment.
+
+commit b9b8ba3f9ed92c6220b58d70d1e6d8aa3eea1104
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 13 12:56:40 2016 +1100
+
+    Remove commented-out includes.
     
-    Reorder client proposal to prefer
-     diffie-hellman-group-exchange-sha1 over diffie-hellman-group14-sha1.  ok djm@
+    These commented-out includes have "Still needed?" comments.  Since
+    they've been commented out for ~13 years I assert that they're not.
+
+commit 25275f1c9d5f01a0877d39444e8f90521a598ea0
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 13 12:54:23 2016 +1100
+
+    Add prototype for strcasestr in compat library.
+
+commit afec07732aa2985142f3e0b9a01eb6391f523dec
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 13 10:23:03 2016 +1100
+
+    Add strcasestr to compat library.
     
-    Upstream-ID: 552c08d47347c3ee1a9a57d88441ab50abe17058
+    Fixes build on (at least) Solaris 10.
 
-commit 40f64292b907afd0a674fdbf3e4c2356d17a7d68
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed May 27 23:39:18 2015 +0000
+commit dda78a03af32e7994f132d923c2046e98b7c56c8
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Dec 12 13:57:10 2016 +1100
 
-    upstream commit
+    Force Turkish locales back to C/POSIX; bz#2643
     
-    Add a stronger (4k bit) fallback group that sshd can use
-     when the moduli file is missing or broken, sourced from RFC3526.  bz#2302, ok
-     markus@ (earlier version), djm@
+    Turkish locales are unique in their handling of the letters 'i' and
+    'I' (yes, they are different letters) and OpenSSH isn't remotely
+    prepared to deal with that. For now, the best we can do is to force
+    OpenSSH to use the C/POSIX locale and try to preserve the UTF-8
+    encoding if possible.
     
-    Upstream-ID: b635215746a25a829d117673d5e5a76d4baee7f4
+    ok dtucker@
 
-commit 5ab7d5fa03ad55bc438fab45dfb3aeb30a3c237a
+commit c35995048f41239fc8895aadc3374c5f75180554
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu May 28 10:03:40 2015 +1000
+Date:   Fri Dec 9 12:52:02 2016 +1100
 
-    New moduli file from OpenBSD, removing 1k groups.
+    exit is in stdlib.h not unistd.h (that's _exit).
+
+commit d399a8b914aace62418c0cfa20341aa37a192f98
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Dec 9 12:33:25 2016 +1100
+
+    Include <unistd.h> for exit in utf8 locale test.
+
+commit 47b8c99ab3221188ad3926108dd9d36da3b528ec
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Dec 8 15:48:34 2016 +1100
+
+    Check for utf8 local support before testing it.
     
-    Remove 1k bit groups.  ok deraadt@, markus@
+    Check for utf8 local support and if not found, do not attempt to run the
+    utf8 tests.  Suggested by djm@
 
-commit a71ba58adf34e599f30cdda6e9b93ae6e3937eea
+commit 4089fc1885b3a2822204effbb02b74e3da58240d
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Dec 8 12:57:24 2016 +1100
+
+    Use AC_PATH_TOOL for krb5-config.
+    
+    This will use the host-prefixed version when cross compiling; patch from
+    david.michael at coreos.com.
+
+commit b4867e0712c89b93be905220c82f0a15e6865d1e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed May 27 05:15:02 2015 +0000
+Date:   Tue Dec 6 07:48:01 2016 +0000
 
     upstream commit
     
-    support PKCS#11 devices with external PIN entry devices
-     bz#2240, based on patch from Dirk-Willem van Gulik; feedback and ok dtucker@
+    make IdentityFile successfully load and use certificates that
+    have no corresponding bare public key. E.g. just a private id_rsa and
+    certificate id_rsa-cert.pub (and no id_rsa.pub).
     
-    Upstream-ID: 504568992b55a8fc984375242b1bd505ced61b0d
+    bz#2617 ok dtucker@
+    
+    Upstream-ID: c1e9699b8c0e3b63cc4189e6972e3522b6292604
 
-commit b282fec1aa05246ed3482270eb70fc3ec5f39a00
+commit c9792783a98881eb7ed295680013ca97a958f8ac
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Nov 25 14:04:21 2016 +1100
+
+    Add a gnome-ssh-askpass3 target for GTK+3 version
+    
+    Based on patch from Colin Watson via bz#2640
+
+commit 7be85ae02b9de0993ce0a1d1e978e11329f6e763
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Nov 25 14:03:53 2016 +1100
+
+    Make gnome-ssh-askpass2.c GTK+3-friendly
+    
+    Patch from Colin Watson via bz#2640
+
+commit b9844a45c7f0162fd1b5465683879793d4cc4aaa
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Dec 4 23:54:02 2016 +0000
+
+    upstream commit
+    
+    Fix public key authentication when multiple
+    authentication is in use. Instead of deleting and re-preparing the entire
+    keys list, just reset the 'used' flags; the keys list is already in a good
+    order (with already- tried keys at the back)
+    
+    Analysis and patch from Vincent Brillault on bz#2642; ok dtucker@
+    
+    Upstream-ID: 7123f12dc2f3bcaae715853035a97923d7300176
+
+commit f2398eb774075c687b13af5bc22009eb08889abe
 Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Tue May 26 23:23:40 2015 +0000
+Date:   Sun Dec 4 22:27:25 2016 +0000
 
     upstream commit
     
-    Cap DH-GEX group size at 4kbits for Cisco implementations.
-     Some of them will choke when asked for preferred sizes >4k instead of
-     returning the 4k group that they do have.  bz#2209, ok djm@
+    Unlink PidFile on SIGHUP and always recreate it when the
+    new sshd starts. Regression tests (and possibly other things) depend on the
+    pidfile being recreated after SIGHUP, and unlinking it means it won't contain
+    a stale pid if sshd fails to restart.  ok djm@ markus@
     
-    Upstream-ID: 54b863a19713446b7431f9d06ad0532b4fcfef8d
+    Upstream-ID: 132dd6dda0c77dd49d2f15b2573b5794f6160870
 
-commit 3e91b4e8b0dc2b4b7e7d42cf6e8994a32e4cb55e
+commit 85aa2efeba51a96bf6834f9accf2935d96150296
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun May 24 23:39:16 2015 +0000
+Date:   Wed Nov 30 03:01:33 2016 +0000
 
     upstream commit
     
-    add missing 'c' option to getopt(), case statement was
-     already there; from Felix Bolte
+    test new behaviour of cert force-command restriction vs.
+    authorized_key/ principals
     
-    Upstream-ID: 9b19b4e2e0b54d6fefa0dfac707c51cf4bae3081
+    Upstream-Regress-ID: 399efa7469d40c404c0b0a295064ce75d495387c
 
-commit 64a89ec07660abba4d0da7c0095b7371c98bab62
-Author: jsg@openbsd.org <jsg@openbsd.org>
-Date:   Sat May 23 14:28:37 2015 +0000
+commit 5d333131cd8519d022389cfd3236280818dae1bc
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Wed Nov 30 06:54:26 2016 +0000
 
     upstream commit
     
-    fix a memory leak in an error path ok markus@ dtucker@
+    tweak previous; while here fix up FILES and AUTHORS;
     
-    Upstream-ID: bc1da0f205494944918533d8780fde65dff6c598
+    Upstream-ID: 93f6e54086145a75df8d8ec7d8689bdadbbac8fa
 
-commit f948737449257d2cb83ffcfe7275eb79b677fd4a
+commit 786d5994da79151180cb14a6cf157ebbba61c0cc
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 22 05:28:45 2015 +0000
+Date:   Wed Nov 30 03:07:37 2016 +0000
 
     upstream commit
     
-    mention ssh-keygen -E for comparing legacy MD5
-     fingerprints; bz#2332
+    add a whitelist of paths from which ssh-agent will load
+    (via ssh-pkcs11-helper) a PKCS#11 module; ok markus@
     
-    Upstream-ID: 079a3669549041dbf10dbc072d9563f0dc3b2859
+    Upstream-ID: fe79769469d9cd6d26fe0dc15751b83ef2a06e8f
 
-commit 0882332616e4f0272c31cc47bf2018f9cb258a4e
+commit 7844f357cdd90530eec81340847783f1f1da010b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 22 04:45:52 2015 +0000
+Date:   Wed Nov 30 03:00:05 2016 +0000
 
     upstream commit
     
-    Reorder EscapeChar option parsing to avoid a single-byte
-     out- of-bounds read. bz#2396 from Jaak Ristioja; ok dtucker@
+    Add a sshd_config DisableForwaring option that disables
+    X11, agent, TCP, tunnel and Unix domain socket forwarding, as well as
+    anything else we might implement in the future.
     
-    Upstream-ID: 1dc6b5b63d1c8d9a88619da0b27ade461d79b060
+    This, like the 'restrict' authorized_keys flag, is intended to be a
+    simple and future-proof way of restricting an account. Suggested as
+    a complement to 'restrict' by Jann Horn; ok markus@
+    
+    Upstream-ID: 203803f66e533a474086b38a59ceb4cf2410fcf7
 
-commit d7c31da4d42c115843edee2074d7d501f8804420
+commit fd6dcef2030d23c43f986d26979f84619c10589d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 22 03:50:02 2015 +0000
+Date:   Wed Nov 30 02:57:40 2016 +0000
 
     upstream commit
     
-    add knob to relax GSSAPI host credential check for
-     multihomed hosts bz#928, patch by Simon Wilkinson; ok dtucker
-     (kerberos/GSSAPI is not compiled by default on OpenBSD)
+    When a forced-command appears in both a certificate and
+    an authorized keys/principals command= restriction, refuse to accept the
+    certificate unless they are identical.
     
-    Upstream-ID: 15ddf1c6f7fd9d98eea9962f480079ae3637285d
+    The previous (documented) behaviour of having the certificate forced-
+    command override the other could be a bit confused and more error-prone.
+    
+    Pointed out by Jann Horn of Project Zero; ok dtucker@
+    
+    Upstream-ID: 79d811b6eb6bbe1221bf146dde6928f92d2cd05f
 
-commit aa72196a00be6e0b666215edcffbc10af234cb0e
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri May 22 17:49:46 2015 +1000
+commit 7fc4766ac78abae81ee75b22b7550720bfa28a33
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Nov 30 00:28:31 2016 +0000
 
-    Include signal.h for sig_atomic_t, used by kex.h.
+    upstream commit
     
-    bz#2402, from tomas.kuthan at oracle com.
+    On startup, check to see if sshd is already daemonized
+    and if so, skip the call to daemon() and do not rewrite the PidFile.  This
+    means that when sshd re-execs itself on SIGHUP the process ID will no longer
+    change.  Should address bz#2641.  ok djm@ markus@.
+    
+    Upstream-ID: 5ea0355580056fb3b25c1fd6364307d9638a37b9
 
-commit 8b02481143d75e91c49d1bfae0876ac1fbf9511a
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri May 22 12:47:24 2015 +1000
+commit c9f880c195c65f1dddcbc4ce9d6bfea7747debcc
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Nov 30 13:51:49 2016 +1100
 
-    Import updated moduli file from OpenBSD.
+    factor out common PRNG reseed before privdrop
+    
+    Add a call to RAND_poll() to ensure than more than pid+time gets
+    stirred into child processes states. Prompted by analysis from Jann
+    Horn at Project Zero. ok dtucker@
 
-commit 4739e8d5e1c0be49624082bd9f6b077e9e758db9
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 21 12:01:19 2015 +0000
+commit 79e4829ec81dead1b30999e1626eca589319a47f
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Nov 25 03:02:01 2016 +0000
 
     upstream commit
     
-    Support "ssh-keygen -lF hostname" to find search known_hosts
-     and print key hashes. Already advertised by ssh-keygen(1), but not delivered
-     by code; ok dtucker@
+    Allow PuTTY interop tests to run unattended.  bz#2639,
+    patch from cjwatson at debian.org.
     
-    Upstream-ID: 459e0e2bf39825e41b0811c336db2d56a1c23387
+    Upstream-Regress-ID: 4345253558ac23b2082aebabccd48377433b6fe0
 
-commit e97201feca10b5196da35819ae516d0b87cf3a50
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 21 17:55:15 2015 +1000
+commit 504c3a9a1bf090f6b27260fc3e8ea7d984d163dc
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Nov 25 02:56:49 2016 +0000
 
-    conditionalise util.h inclusion
+    upstream commit
+    
+    Reverse args to sshd-log-wrapper.  Matches change in
+    portable, where it allows sshd do be optionally run under Valgrind.
+    
+    Upstream-Regress-ID: b438d1c6726dc5caa2a45153e6103a0393faa906
 
-commit 13640798c7dd011ece0a7d02841fe48e94cfa0e0
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 21 06:44:25 2015 +0000
+commit bd13017736ec2f8f9ca498fe109fb0035f322733
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Nov 25 02:49:18 2016 +0000
 
     upstream commit
     
-    regress test for AuthorizedPrincipalsCommand
+    Fix typo in trace message; from portable.
     
-    Upstream-Regress-ID: c658fbf1ab6b6011dc83b73402322e396f1e1219
+    Upstream-Regress-ID: 4c4a2ba0d37faf5fd230a91b4c7edb5699fbd73a
 
-commit 84452c5d03c21f9bfb28c234e0dc1dc67dd817b1
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 21 06:40:02 2015 +0000
+commit 7da751d8b007c7f3e814fd5737c2351440d78b4c
+Author: tb@openbsd.org <tb@openbsd.org>
+Date:   Tue Nov 1 13:43:27 2016 +0000
 
     upstream commit
     
-    regress test for AuthorizedKeysCommand arguments
+    Clean up MALLOC_OPTIONS.  For the unittests, move
+    MALLOC_OPTIONS and TEST_ENV to unittets/Makefile.inc.
     
-    Upstream-Regress-ID: bbd65c13c6b3be9a442ec115800bff9625898f12
+    ok otto
+    
+    Upstream-Regress-ID: 890d497e0a38eeddfebb11cc429098d76cf29f12
 
-commit bcc50d816187fa9a03907ac1f3a52f04a52e10d1
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 21 06:43:30 2015 +0000
+commit 36f58e68221bced35e06d1cca8d97c48807a8b71
+Author: tb@openbsd.org <tb@openbsd.org>
+Date:   Mon Oct 31 23:45:08 2016 +0000
 
     upstream commit
     
-    add AuthorizedPrincipalsCommand that allows getting
-     authorized_principals from a subprocess rather than a file, which is quite
-     useful in deployments with large userbases
+    Remove the obsolete A and P flags from MALLOC_OPTIONS.
     
-    feedback and ok markus@
+    ok dtucker
     
-    Upstream-ID: aa1bdac7b16fc6d2fa3524ef08f04c7258d247f6
+    Upstream-Regress-ID: 6cc25024c8174a87e5734a0dc830194be216dd59
 
-commit 24232a3e5ab467678a86aa67968bbb915caffed4
+commit b0899ee26a6630883c0f2350098b6a35e647f512
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Nov 29 03:54:50 2016 +0000
+
+    upstream commit
+    
+    Factor out code to disconnect from controlling terminal
+    into its own function.  ok djm@
+    
+    Upstream-ID: 39fd9e8ebd7222615a837312face5cc7ae962885
+
+commit 54d022026aae4f53fa74cc636e4a032d9689b64d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 21 06:38:35 2015 +0000
+Date:   Fri Nov 25 23:24:45 2016 +0000
 
     upstream commit
     
-    support arguments to AuthorizedKeysCommand
+    use sshbuf_allocate() to pre-allocate the buffer used for
+    loading keys. This avoids implicit realloc inside the buffer code, which
+    might theoretically leave fragments of the key on the heap. This doesn't
+    appear to happen in practice for normal sized keys, but was observed for
+    novelty oversize ones.
     
-    bz#2081 loosely based on patch by Sami Hartikainen
-    feedback and ok markus@
+    Pointed out by Jann Horn of Project Zero; ok markus@
     
-    Upstream-ID: b080387a14aa67dddd8ece67c00f268d626541f7
+    Upstream-ID: d620e1d46a29fdea56aeadeda120879eddc60ab1
 
-commit d80fbe41a57c72420c87a628444da16d09d66ca7
+commit a9c746088787549bb5b1ae3add7d06a1b6d93d5e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu May 21 04:55:51 2015 +0000
+Date:   Fri Nov 25 23:22:04 2016 +0000
 
     upstream commit
     
-    refactor: split base64 encoding of pubkey into its own
-     sshkey_to_base64() function and out of sshkey_write(); ok markus@
+    split allocation out of sshbuf_reserve() into a separate
+    sshbuf_allocate() function; ok markus@
     
-    Upstream-ID: 54fc38f5832e9b91028900819bda46c3959a0c1a
+    Upstream-ID: 11b8a2795afeeb1418d508a2c8095b3355577ec2
 
-commit 7cc44ef74133a473734bbcbd3484f24d6a7328c5
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Mon May 18 15:06:05 2015 +0000
+commit f0ddedee460486fa0e32fefb2950548009e5026e
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Nov 23 23:14:15 2016 +0000
 
     upstream commit
     
-    getentropy() and sendsyslog() have been around long
-     enough. openssh-portable may want the #ifdef's but not base. discussed with
-     djm few weeks back
+    allow ClientAlive{Interval,CountMax} in Match; ok dtucker,
+    djm
     
-    Upstream-ID: 0506a4334de108e3fb6c66f8d6e0f9c112866926
+    Upstream-ID: 8beb4c1eadd588f1080b58932281983864979f55
 
-commit 9173d0fbe44de7ebcad8a15618e13a8b8d78902e
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Fri May 15 05:44:21 2015 +0000
+commit 1a6f9d2e2493d445cd9ee496e6e3c2a2f283f66a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Nov 8 22:04:34 2016 +0000
 
     upstream commit
     
-    Use a salted hash of the lock passphrase instead of plain
-     text and do constant-time comparisons of it. Should prevent leaking any
-     information about it via timing, pointed out by Ryan Castellucci.  Add a 0.1s
-     incrementing delay for each failed unlock attempt up to 10s.  ok markus@
-     (earlier version), djm@
+    unbreak DenyUsers; reported by henning@
     
-    Upstream-ID: c599fcc325aa1cc65496b25220b622d22208c85f
+    Upstream-ID: 1c67d4148f5e953c35acdb62e7c08ae8e33f7cb2
 
-commit d028d5d3a697c71b21e4066d8672cacab3caa0a8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue May 5 19:10:58 2015 +1000
+commit 010359b32659f455fddd2bd85fd7cc4d7a3b994a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Nov 6 05:46:37 2016 +0000
 
     upstream commit
     
-       - tedu@cvs.openbsd.org 2015/01/12 03:20:04
-         [bcrypt_pbkdf.c]
-         rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,
-         nor are they the same size.
+    Validate address ranges for AllowUser/DenyUsers at
+    configuration load time and refuse to accept bad ones. It was previously
+    possible to specify invalid CIDR address ranges (e.g. djm@127.1.2.3/55) and
+    these would always match.
+    
+    Thanks to Laurence Parry for a detailed bug report. ok markus (for
+    a previous diff version)
+    
+    Upstream-ID: 9dfcdd9672b06e65233ea4434c38226680d40bfb
 
-commit f6391d4e59b058984163ab28f4e317e7a72478f1
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue May 5 19:10:23 2015 +1000
+commit efb494e81d1317209256b38b49f4280897c61e69
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Oct 28 03:33:52 2016 +0000
 
     upstream commit
     
-       - deraadt@cvs.openbsd.org 2015/01/08 00:30:07
-         [bcrypt_pbkdf.c]
-         declare a local version of MIN(), call it MINIMUM()
+    Improve pkcs11_add_provider() logging: demote some
+    excessively verbose error()s to debug()s, include PKCS#11 provider name and
+    slot in log messages where possible. bz#2610, based on patch from Jakub Jelen
+    
+    Upstream-ID: 3223ef693cfcbff9079edfc7e89f55bf63e1973d
 
-commit 8ac6b13cc9113eb47cd9e86c97d7b26b4b71b77f
+commit 5ee3fb5affd7646f141749483205ade5fc54adaf
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Nov 1 08:12:33 2016 +1100
+
+    Use ptrace(PT_DENY_ATTACH, ..) on OS X.
+
+commit 315d2a4e674d0b7115574645cb51f968420ebb34
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue May 5 19:09:46 2015 +1000
+Date:   Fri Oct 28 14:34:07 2016 +1100
 
-    upstream commit
+    Unbreak AES-CTR ciphers on old (~0.9.8) OpenSSL
     
-       - djm@cvs.openbsd.org 2014/12/30 01:41:43
-         [bcrypt_pbkdf.c]
-         typo in comment: ouput => output
+    ok dtucker@
 
-commit 1f792489d5cf86a4f4e3003e6e9177654033f0f2
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon May 4 06:10:48 2015 +0000
+commit a9ff3950b8e80ff971b4d44bbce96df27aed28af
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Oct 28 14:26:58 2016 +1100
 
-    upstream commit
-    
-    Remove pattern length argument from match_pattern_list(), we
-     only ever use it for strlen(pattern).
+    Move OPENSSL_NO_RIPEMD160 to compat.
     
-    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.
+    Move OPENSSL_NO_RIPEMD160 to compat and add ifdefs to mac.c around the
+    ripemd160 MACs.
+
+commit bce58885160e5db2adda3054c3b81fe770f7285a
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Oct 28 13:52:31 2016 +1100
+
+    Check if RIPEMD160 is disabled in OpenSSL.
+
+commit d924640d4c355d1b5eca1f4cc60146a9975dbbff
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Oct 28 13:38:19 2016 +1100
+
+    Skip ssh1 specfic ciphers.
     
-    ok markus@
+    cipher-3des1.c and cipher-bf1.c are specific to sshv1 so don't even try
+    to compile them when Protocol 1 is not enabled.
 
-commit 639d6bc57b1942393ed12fb48f00bc05d4e093e4
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 07:10:01 2015 +0000
+commit 79d078e7a49caef746516d9710ec369ba45feab6
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Tue Oct 25 04:08:13 2016 +0000
 
     upstream commit
     
-    refactor ssh_dispatch_run_fatal() to use sshpkt_fatal()
-     to better report error conditions. Teach sshpkt_fatal() about ECONNRESET.
+    Fix logic in add_local_forward() that inverted a test
+    when code was refactored out into bind_permitted().  This broke ssh port
+    forwarding for non-priv ports as a non root user.
     
-    Improves error messages on TCP connection resets. bz#2257
+    ok dtucker@ 'looks good' deraadt@
     
-    ok dtucker@
+    Upstream-ID: ddb8156ca03cc99997de284ce7777536ff9570c9
 
-commit 9559d7de34c572d4d3fd990ca211f8ec99f62c4d
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 07:08:08 2015 +0000
+commit a903e315dee483e555c8a3a02c2946937f9b4e5d
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Oct 24 01:09:17 2016 +0000
 
     upstream commit
     
-    a couple of parse targets were missing activep checks,
-     causing them to be misapplied in match context; bz#2272 diagnosis and
-     original patch from Sami Hartikainen ok dtucker@
+    Remove dead breaks, found via opencoverage.net.  ok
+    deraadt@
+    
+    Upstream-ID: ad9cc655829d67fad219762810770787ba913069
 
-commit 7e8528cad04b2775c3b7db08abf8fb42e47e6b2a
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 04:17:51 2015 +0000
+commit b4e96b4c9bea4182846e4942ba2048e6d708ee54
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Oct 26 08:43:25 2016 +1100
 
-    upstream commit
+    Use !=NULL instead of >0 for getdefaultproj.
     
-    make handling of AuthorizedPrincipalsFile=none more
-     consistent with other =none options; bz#2288 from Jakub Jelen; ok dtucker@
+    getdefaultproj() returns a pointer so test it for NULL inequality
+    instead of >0.  Fixes compiler warning and is more correct.  Patch from
+    David Binderman.
 
-commit ca430d4d9cc0f62eca3b1fb1e2928395b7ce80f7
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 04:03:20 2015 +0000
+commit 1c4ef0b808d3d38232aeeb1cebb7e9a43def42c5
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Sun Oct 23 22:04:05 2016 +0000
 
     upstream commit
     
-    remove failed remote forwards established by muliplexing
-     from the list of active forwards; bz#2363, patch mostly by Yoann Ricordel; ok
-     dtucker@
+    Factor out "can bind to low ports" check into its own function.  This will
+    make it easier for Portable to support platforms with permissions models
+    other than uid==0 (eg bz#2625).  ok djm@, "doesn't offend me too much"
+    deraadt@.
+    
+    Upstream-ID: 86213df4183e92b8f189a6d2dac858c994bfface
 
-commit 8312cfb8ad88657517b3e23ac8c56c8e38eb9792
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 04:01:58 2015 +0000
+commit 0b9ee623d57e5de7e83e66fd61a7ba9a5be98894
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Oct 19 23:21:56 2016 +0000
 
     upstream commit
     
-    reduce stderr spam when using ssh -S /path/mux -O forward
-     -R 0:... ok dtucker@
+    When tearing down ControlMaster connecctions, don't
+    pollute stderr when LogLevel=quiet.  Patch from Tim Kuijsten via tech@.
+    
+    Upstream-ID: d9b3a68b2a7c2f2fc7f74678e29a4618d55ceced
 
-commit 179be0f5e62f1f492462571944e45a3da660d82b
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 03:23:51 2015 +0000
+commit 09e6a7d8354224933febc08ddcbc2010f542284e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Oct 24 09:06:18 2016 +1100
 
-    upstream commit
-    
-    prevent authorized_keys options picked up on public key
-     tests without a corresponding private key authentication being applied to
-     other authentication methods. Reported by halex@, ok markus@
+    Wrap stdint.h include in ifdef.
 
-commit a42d67be65b719a430b7fcaba2a4e4118382723a
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 03:20:54 2015 +0000
+commit 08d9e9516e587b25127545c029e5464b2e7f2919
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Oct 21 09:46:46 2016 +1100
 
-    upstream commit
-    
-    Don't make parsing of authorized_keys' environment=
-     option conditional on PermitUserEnv - always parse it, but only use the
-     result if the option is enabled. This prevents the syntax of authorized_keys
-     changing depending on which sshd_config options were enabled.
-    
-    bz#2329; based on patch from coladict AT gmail.com, ok dtucker@
+    Fix formatting.
 
-commit e661a86353e11592c7ed6a847e19a83609f49e77
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon May 4 06:10:48 2015 +0000
+commit 461f50e7ab8751d3a55e9158c44c13031db7ba1d
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Oct 21 06:55:58 2016 +1100
 
-    upstream commit
-    
-    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.
+    Update links to https.
     
-    ok markus@
+    www.openssh.com now supports https and ftp.openbsd.org no longer
+    supports ftp.  Make all links to these https.
 
-commit 0ef1de742be2ee4b10381193fe90730925b7f027
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Thu Apr 23 05:01:19 2015 +0000
+commit dd4e7212a6141f37742de97795e79db51e4427ad
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Oct 21 06:48:46 2016 +1100
 
-    upstream commit
+    Update host key generation examples.
     
-    Add a simple regression test for sshd's configuration
-     parser.  Right now, all it does is run the output of sshd -T back through
-     itself and ensure the output is valid and invariant.
+    Remove ssh1 host key generation, add ssh-keygen -A
 
-commit 368f83c793275faa2c52f60eaa9bdac155c4254b
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Apr 22 01:38:36 2015 +0000
+commit 6d49ae82634c67e9a4d4af882bee20b40bb8c639
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Oct 21 05:22:55 2016 +1100
 
-    upstream commit
+    Update links.
     
-    use correct key for nested certificate test
+    Make links to openssh.com HTTPS now that it's supported, point release
+    notes link to the HTML release notes page, and update a couple of other
+    links and bits of text.
 
-commit 8d4d1bfddbbd7d21f545dc6997081d1ea1fbc99a
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 1 07:11:47 2015 +0000
+commit fe0d1ca6ace06376625084b004ee533f2c2ea9d6
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Oct 20 03:42:09 2016 +1100
 
-    upstream commit
+    Remote channels .orig and .rej files.
     
-    mention that the user's shell from /etc/passwd is used
-     for commands too; bz#1459 ok dtucker@
+    These files were incorrectly added during an OpenBSD sync.
 
-commit 5ab283d0016bbc9d4d71e8e5284d011bc5a930cf
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 8 07:29:00 2015 +0000
+commit 246aa842a4ad368d8ce030495e657ef3a0e1f95c
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Oct 18 17:32:54 2016 +0000
 
     upstream commit
     
-    whitespace
+    Remove channel_input_port_forward_request(); the only caller
+    was the recently-removed SSH1 server code so it's now dead code.  ok markus@
     
-    Upstream-Regress-ID: 6b708a3e709d5b7fd37890f874bafdff1f597519
+    Upstream-ID: 05453983230a1f439562535fec2818f63f297af9
 
-commit 8377d5008ad260048192e1e56ad7d15a56d103dd
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 8 07:26:13 2015 +0000
+commit 2c6697c443d2c9c908260eed73eb9143223e3ec9
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Tue Oct 18 12:41:22 2016 +0000
 
     upstream commit
     
-    whitespace at EOL
+    Install a signal handler for tty-generated signals and
+    wait for the ssh child to suspend before suspending sftp.  This lets ssh
+    restore the terminal mode as needed when it is suspended at the password
+    prompt.  OK dtucker@
     
-    Upstream-Regress-ID: 9c48911643d5b05173b36a012041bed4080b8554
+    Upstream-ID: a31c1f42aa3e2985dcc91e46e6a17bd22e372d69
 
-commit c28a3436fa8737709ea88e4437f8f23a6ab50359
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 8 06:45:13 2015 +0000
+commit fd2a8f1033fa2316fff719fd5176968277560158
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Sat Oct 15 19:56:25 2016 +0000
 
     upstream commit
     
-    moar whitespace at eol
+    various formatting fixes, specifically removing Dq;
     
-    Upstream-ID: 64eaf872a3ba52ed41e494287e80d40aaba4b515
+    Upstream-ID: 81e85df2b8e474f5f93d66e61d9a4419ce87347c
 
-commit 2b64c490468fd4ca35ac8d5cc31c0520dc1508bb
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 8 06:41:56 2015 +0000
+commit 8f866d8a57b9a2dc5dd04504e27f593b551618e3
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Oct 19 03:26:09 2016 +1100
 
-    upstream commit
+    Import readpassphrase.c rev 1.26.
     
-    whitespace at EOL
+    Author: miller@openbsd.org:
+    Avoid generate SIGTTOU when restoring the terminal mode.  If we get
+    SIGTTOU it means the process is not in the foreground process group
+    which, in most cases, means that the shell has taken control of the tty.
+    Requiring the user the fg the process in this case doesn't make sense
+    and can result in both SIGTSTP and SIGTTOU being sent which can lead to
+    the process being suspended again immediately after being brought into
+    the foreground.
+
+commit f901440cc844062c9bab0183d133f7ccc58ac3a5
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Oct 19 03:23:16 2016 +1100
+
+    Import readpassphrase.c rev 1.25.
     
-    Upstream-ID: 57bcf67d666c6fc1ad798aee448fdc3f70f7ec2c
+    Wrap <readpassphrase.h> so internal calls go direct and
+    readpassphrase is weak.
+    
+    (DEF_WEAK is a no-op in portable.)
 
-commit 4e636cf201ce6e7e3b9088568218f9d4e2c51712
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 8 03:56:51 2015 +0000
+commit 032147b69527e5448a511049b2d43dbcae582624
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Sat Oct 15 05:51:12 2016 +1100
 
-    upstream commit
+    Move DEF_WEAK into defines.h.
     
-    whitespace at EOL
+    As well pull in more recent changes from OpenBSD these will start to
+    arrive so put it where the definition is shared.
 
-commit 38b8272f823dc1dd4e29dbcee83943ed48bb12fa
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Mon May 4 01:47:53 2015 +0000
+commit e0259a82ddd950cfb109ddee86fcebbc09c6bd04
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Sat Oct 15 04:34:46 2016 +1100
 
-    upstream commit
+    Remove do_pam_set_tty which is dead code.
     
-    Use diff w/out -u for better portability
+    The callers of do_pam_set_tty were removed in 2008, so this is now dead
+    code.  bz#2604, pointed out by jjelen at redhat.com.
 
-commit 297060f42d5189a4065ea1b6f0afdf6371fb0507
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Fri May 8 03:25:07 2015 +0000
+commit ca04de83f210959ad2ed870a30ba1732c3ae00e3
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Oct 13 18:53:43 2016 +1100
 
-    upstream commit
+    unbreak principals-command test
     
-    Use xcalloc for permitted_adm_opens instead of xmalloc to
-     ensure it's zeroed. Fixes post-auth crash with permitopen=none.  bz#2355, ok
-     djm@
+    Undo inconsistetly updated variable name.
 
-commit 63ebf019be863b2d90492a85e248cf55a6e87403
+commit 1723ec92eb485ce06b4cbf49712d21975d873909
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri May 8 03:17:49 2015 +0000
+Date:   Tue Oct 11 21:49:54 2016 +0000
 
     upstream commit
     
-    don't choke on new-format private keys encrypted with an
-     AEAD cipher; bz#2366, patch from Ron Frederick; ok markus@
+    fix the KEX fuzzer - the previous method of obtaining the
+    packet contents was broken. This now uses the new per-packet input hook, so
+    it sees exact post-decrypt packets and doesn't have to pass packet integrity
+    checks. ok markus@
+    
+    Upstream-Regress-ID: 402fb6ffabd97de590e8e57b25788949dce8d2fd
 
-commit f8484dac678ab3098ae522a5f03bb2530f822987
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed May 6 05:45:17 2015 +0000
+commit 09f997893f109799cddbfce6d7e67f787045cbb2
+Author: natano@openbsd.org <natano@openbsd.org>
+Date:   Thu Oct 6 09:31:38 2016 +0000
 
     upstream commit
     
-    Clarify pseudo-terminal request behaviour and use
-     "pseudo-terminal" consistently.  bz#1716, ok jmc@ "I like it" deraadt@.
+    Move USER out of the way to unbreak the BUILDUSER
+    mechanism. ok tb
+    
+    Upstream-Regress-ID: 74ab9687417dd071d62316eaadd20ddad1d5af3c
 
-commit ea139507bef8bad26e86ed99a42c7233ad115c38
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed May 6 04:07:18 2015 +0000
+commit 3049a012c482a7016f674db168f23fd524edce27
+Author: bluhm@openbsd.org <bluhm@openbsd.org>
+Date:   Fri Sep 30 11:55:20 2016 +0000
 
     upstream commit
     
-    Blacklist DH-GEX for specific PuTTY versions known to
-     send non-RFC4419 DH-GEX messages rather than all versions of PuTTY.
-     According to Simon Tatham, 0.65 and newer versions will send RFC4419 DH-GEX
-     messages.  ok djm@
+    In ssh tests set REGRESS_FAIL_EARLY with ?= so that the
+    environment can change it. OK djm@
+    
+    Upstream-Regress-ID: 77bcb50e47b68c7209c7f0a5a020d73761e5143b
 
-commit b58234f00ee3872eb84f6e9e572a9a34e902e36e
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Tue May 5 10:17:49 2015 +0000
+commit 39af7b444db28c1cb01b7ea468a4f574a44f375b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 11 21:47:45 2016 +0000
 
     upstream commit
     
-    WinSCP doesn't implement RFC4419 DH-GEX so flag it so we
-     don't offer that KEX method.  ok markus@
+    Add a per-packet input hook that is called with the
+    decrypted packet contents. This will be used for fuzzing; ok markus@
+    
+    Upstream-ID: a3221cee6b1725dd4ae1dd2c13841b4784cb75dc
 
-commit d5b1507a207253b39e810e91e68f9598691b7a29
-Author: jsg@openbsd.org <jsg@openbsd.org>
-Date:   Tue May 5 02:48:17 2015 +0000
+commit ec165c392ca54317dbe3064a8c200de6531e89ad
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Mon Oct 10 19:28:48 2016 +0000
 
     upstream commit
     
-    use the sizeof the struct not the sizeof a pointer to the
-     struct in ssh_digest_start()
-    
-    This file is only used if ssh is built with OPENSSL=no
+    Unregister the KEXINIT handler after message has been
+    received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause
+    allocation of up to 128MB -- until the connection is closed. Reported by
+    shilei-c at 360.cn
     
-    ok markus@
+    Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
 
-commit a647b9b8e616c231594b2710c925d31b1b8afea3
+commit 29d40319392e6e19deeca9d45468aa1119846e50
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri May 8 11:07:27 2015 +1000
+Date:   Thu Oct 13 04:07:20 2016 +1100
 
-    Put brackets around mblen() compat constant.
+    Import rev 1.24 from OpenBSD.
     
-    This might help with the reported problem cross compiling for Android
-    ("error: expected identifier or '(' before numeric constant") but
-    shouldn't hurt in any case.
+    revision 1.24
+    date: 2013/11/24 23:51:29;  author: deraadt;  state: Exp;  lines: +4 -4;
+    most obvious unsigned char casts for ctype
+    ok jca krw ingo
 
-commit d1680d36e17244d9af3843aeb5025cb8e40d6c07
+commit 12069e56221de207ed666c2449dedb431a2a7ca2
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Apr 30 09:18:11 2015 +1000
+Date:   Thu Oct 13 04:04:44 2016 +1100
 
-    xrealloc -> xreallocarray in portable code too.
+    Import rev 1.23 from OpenBSD.  Fixes bz#2619.
+    
+    revision 1.23
+    date: 2010/05/14 13:30:34;  author: millert;  state: Exp;  lines: +41 -39;
+    Defer installing signal handlers until echo is disabled so that we
+    get suspended normally when not the foreground process.  Fix potential
+    infinite loop when restoring terminal settings if process is in the
+    background when restore occurs.  OK miod@
 
-commit 531a57a3893f9fcd4aaaba8c312b612bbbcc021e
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed Apr 29 03:48:56 2015 +0000
+commit 7508d83eff89af069760b4cc587305588a64e415
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Oct 13 03:53:51 2016 +1100
 
-    upstream commit
+    If we don't have TCSASOFT, define it to zero.
     
-    Allow ListenAddress, Port and AddressFamily in any
-     order.  bz#68, ok djm@, jmc@ (for the man page bit).
+    This makes it a no-op when we use it below, which allows us to re-sync
+    those lines with the upstream and make future updates easier.
 
-commit c1d5bcf1aaf1209af02f79e48ba1cbc76a87b56f
+commit aae4dbd4c058d3b1fe1eb5c4e6ddf35827271377
 Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Tue Apr 28 13:47:38 2015 +0000
+Date:   Fri Oct 7 14:41:52 2016 +0000
 
     upstream commit
     
-    enviroment -> environment: apologies to darren for not
-     spotting that first time round...
+    tidy up the formatting in this file. more specifically,
+    replace .Dq, which looks appalling, with .Cm, where appropriate;
+    
+    Upstream-ID: ff8e90aa0343d9bb56f40a535e148607973cc738
 
-commit 43beea053db191cac47c2cd8d3dc1930158aff1a
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Tue Apr 28 10:25:15 2015 +0000
+commit a571dbcc7b7b25371174569b13df5159bc4c6c7a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 4 21:34:40 2016 +0000
 
     upstream commit
     
-    Fix typo in previous
+    add a comment about implicitly-expected checks to
+    sshkey_ec_validate_public()
+    
+    Upstream-ID: 74a7f71c28f7c13a50f89fc78e7863b9cd61713f
 
-commit 85b96ef41374f3ddc9139581f87da09b2cd9199e
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Tue Apr 28 10:17:58 2015 +0000
+commit 2f78a2a698f4222f8e05cad57ac6e0c3d1faff00
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 30 20:24:46 2016 +0000
 
     upstream commit
     
-    Document that the TERM environment variable is not
-     subject to SendEnv and AcceptEnv.  bz#2386, based loosely on a patch from
-     jjelen at redhat, help and ok jmc@
+    fix some -Wpointer-sign warnings in the new mux proxy; ok
+    markus@
+    
+    Upstream-ID: b1ba7b3769fbc6b7f526792a215b0197f5e55dfd
 
-commit 88a7c598a94ff53f76df228eeaae238d2d467565
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Apr 27 21:42:48 2015 +0000
+commit ca71c36645fc26fcd739a8cfdc702cec85607761
+Author: bluhm@openbsd.org <bluhm@openbsd.org>
+Date:   Wed Sep 28 20:09:52 2016 +0000
 
     upstream commit
     
-    Make sshd default to PermitRootLogin=no; ok deraadt@
-     rpe@
+    Add a makefile rule to create the ssh library when
+    regress needs it.  This allows to run the ssh regression tests without doing
+    a "make build" before. Discussed with dtucker@ and djm@; OK djm@
+    
+    Upstream-Regress-ID: ce489bd53afcd471225a125b4b94565d4717c025
 
-commit 734226b4480a6c736096c729fcf6f391400599c7
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Apr 27 01:52:30 2015 +0000
+commit ce44c970f913d2a047903dba8670554ac42fc479
+Author: bluhm@openbsd.org <bluhm@openbsd.org>
+Date:   Mon Sep 26 21:34:38 2016 +0000
 
     upstream commit
     
-    fix compilation with OPENSSL=no; ok dtucker@
+    Allow to run ssh regression tests as root.  If the user
+    is already root, the test should not expect that SUDO is set.  If ssh needs
+    another user, use sudo or doas to switch from root if necessary. OK dtucker@
+    
+    Upstream-Regress-ID: b464e55185ac4303529e3e6927db41683aaeace2
 
-commit a4b9d2ce1eb7703eaf0809b0c8a82ded8aa4f1c6
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Mon Apr 27 00:37:53 2015 +0000
+commit 8d0578478586e283e751ca51e7b0690631da139a
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Fri Sep 30 09:19:13 2016 +0000
 
     upstream commit
     
-    Include stdio.h for FILE (used in sshkey.h) so it
-     compiles with OPENSSL=no.
+    ssh proxy mux mode (-O proxy; idea from Simon Tatham): - mux
+    client speaks the ssh-packet protocol directly over unix-domain socket. - mux
+    server acts as a proxy, translates channel IDs and relays to the server. - no
+    filedescriptor passing necessary. - combined with unix-domain forwarding it's
+    even possible to run mux client   and server on different machines. feedback
+    & ok djm@
+    
+    Upstream-ID: 666a2fb79f58e5c50e246265fb2b9251e505c25b
 
-commit dbcc652f4ca11fe04e5930c7ef18a219318c6cda
+commit b7689155f3f5c4999846c07a852b1c7a43b09cec
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Apr 27 00:21:21 2015 +0000
+Date:   Wed Sep 28 21:44:52 2016 +0000
 
     upstream commit
     
-    allow "sshd -f none" to skip reading the config file,
-     much like "ssh -F none" does. ok dtucker
+    put back some pre-auth zlib bits that I shouldn't have
+    removed - they are still used by the client. Spotted by naddy@
+    
+    Upstream-ID: 80919468056031037d56a1f5b261c164a6f90dc2
 
-commit b7ca276fca316c952f0b90f5adb1448c8481eedc
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Fri Apr 24 06:26:49 2015 +0000
+commit 4577adead6a7d600c8e764619d99477a08192c8f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 28 20:32:42 2016 +0000
 
     upstream commit
     
-    combine -Dd onto one line and update usage();
+    restore pre-auth compression support in the client -- the
+    previous commit was intended to remove it from the server only.
+    
+    remove a few server-side pre-auth compression bits that escaped
+    
+    adjust wording of Compression directive in sshd_config(5)
+    
+    pointed out by naddy@ ok markus@
+    
+    Upstream-ID: d23696ed72a228dacd4839dd9f2dec424ba2016b
 
-commit 2ea974630d7017e4c7666d14d9dc939707613e96
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 24 05:26:44 2015 +0000
+commit 80d1c963b4dc84ffd11d09617b39c4bffda08956
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Wed Sep 28 17:59:22 2016 +0000
 
     upstream commit
     
-    add ssh-agent -D to leave ssh-agent in foreground
-     without enabling debug mode; bz#2381 ok dtucker@
+    use a separate TOKENS section, as we've done for
+    sshd_config(5); help/ok djm
+    
+    Upstream-ID: 640e32b5e4838e4363738cdec955084b3579481d
 
-commit 8ac2ffd7aa06042f6b924c87139f2fea5c5682f7
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Fri Apr 24 01:36:24 2015 +0000
+commit 1cfd5c06efb121e58e8b6671548fda77ef4b4455
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Sep 29 03:19:23 2016 +1000
 
-    upstream commit
+    Remove portability support for mmap
     
-    2*len -> use xreallocarray() ok djm
+    We no longer need to wrap/replace mmap for portability now that
+    pre-auth compression has been removed from OpenSSH.
 
-commit 657a5fbc0d0aff309079ff8fb386f17e964963c2
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Fri Apr 24 01:36:00 2015 +0000
+commit 0082fba4efdd492f765ed4c53f0d0fbd3bdbdf7f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 28 16:33:06 2016 +0000
 
     upstream commit
     
-    rename xrealloc() to xreallocarray() since it follows
-     that form. ok djm
+    Remove support for pre-authentication compression. Doing
+    compression early in the protocol probably seemed reasonable in the 1990s,
+    but today it's clearly a bad idea in terms of both cryptography (cf. multiple
+    compression oracle attacks in TLS) and attack surface.
+    
+    Moreover, to support it across privilege-separation zlib needed
+    the assistance of a complex shared-memory manager that made the
+    required attack surface considerably larger.
+    
+    Prompted by Guido Vranken pointing out a compiler-elided security
+    check in the shared memory manager found by Stack
+    (http://css.csail.mit.edu/stack/); ok deraadt@ markus@
+    
+    NB. pre-auth authentication has been disabled by default in sshd
+    for >10 years.
+    
+    Upstream-ID: 32af9771788d45a0779693b41d06ec199d849caf
 
-commit 1108ae242fdd2c304307b68ddf46aebe43ebffaa
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Thu Apr 23 04:59:10 2015 +0000
+commit 27c3a9c2aede2184856b5de1e6eca414bb751c38
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Sep 26 21:16:11 2016 +0000
 
     upstream commit
     
-    Two small fixes for sshd -T: ListenAddress'es are added
-     to a list head so reverse the order when printing them to ensure the
-     behaviour remains the same, and print StreamLocalBindMask as octal with
-     leading zero.  ok deraadt@
+    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@
+    
+    Upstream-ID: f8508c830c86d8f36c113985e52bf8eedae23505
 
-commit bd902b8473e1168f19378d5d0ae68d0c203525df
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Thu Apr 23 04:53:53 2015 +0000
+commit 8663e51c80c6aa3d750c6d3bcff6ee05091922be
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Sep 28 07:40:33 2016 +1000
 
-    upstream commit
+    fix mdoc2man.awk formatting for top-level lists
     
-    Check for and reject missing arguments for
-     VersionAddendum and ForceCommand. bz#2281, patch from plautrba at redhat com,
-     ok djm@
+    Reported by Glenn Golden
+    Diagnosis and fix from Ingo Schwarze
 
-commit ca42c1758575e592239de1d5755140e054b91a0d
+commit b97739dc21570209ed9d4e7beee0c669ed23b097
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Apr 22 01:24:01 2015 +0000
+Date:   Thu Sep 22 21:15:41 2016 +0000
 
     upstream commit
     
-    unknown certificate extensions are non-fatal, so don't
-     fatal when they are encountered; bz#2387 reported by Bob Van Zant; ok
-     dtucker@
+    missing bit from previous commit
+    
+    Upstream-ID: 438d5ed6338b28b46e822eb13eee448aca31df37
 
-commit 39bfbf7caad231cc4bda6909fb1af0705bca04d8
-Author: jsg@openbsd.org <jsg@openbsd.org>
-Date:   Tue Apr 21 07:01:00 2015 +0000
+commit de6a175a99d22444e10d19ad3fffef39bc3ee3bb
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Thu Sep 22 19:19:01 2016 +0000
 
     upstream commit
     
-    Add back a backslash removed in rev 1.42 so
-     KEX_SERVER_ENCRYPT will include aes again.
+    organise the token stuff into a separate section; ok
+    markus for an earlier version of the diff ok/tweaks djm
     
-    ok deraadt@
+    Upstream-ID: 81a6daa506a4a5af985fce7cf9e59699156527c8
 
-commit 6b0d576bb87eca3efd2b309fcfe4edfefc289f9c
+commit 16277fc45ffc95e4ffc3d45971ff8320b974de2b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 17 13:32:09 2015 +0000
+Date:   Thu Sep 22 17:55:13 2016 +0000
 
     upstream commit
     
-    s/recommended/required/ that private keys be og-r this
-     wording change was made a while ago but got accidentally reverted
+    mention curve25519-sha256 KEX
+    
+    Upstream-ID: 33ae1f433ce4795ffa6203761fbdf86e0d7ffbaf
 
-commit 44a8e7ce6f3ab4c2eb1ae49115c210b98e53c4df
+commit 0493766d5676c7ca358824ea8d3c90f6047953df
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 17 13:25:52 2015 +0000
+Date:   Thu Sep 22 17:52:53 2016 +0000
 
     upstream commit
     
-    don't try to cleanup NULL KEX proposals in
-     kex_prop_free(); found by Jukka Taimisto and Markus Hietava
+    support plain curve25519-sha256 KEX algorithm now that it
+    is approaching standardisation (same algorithm is currently supported as
+    curve25519-sha256@libssh.org)
+    
+    Upstream-ID: 5e2b6db2e72667048cf426da43c0ee3fc777baa2
 
-commit 3038a191872d2882052306098c1810d14835e704
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 17 13:19:22 2015 +0000
+commit f31c654b30a6f02ce0b8ea8ab81791b675489628
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Sep 22 02:29:57 2016 +0000
 
     upstream commit
     
-    use error/logit/fatal instead of fprintf(stderr, ...)
-     and exit(0), fix a few errors that were being printed to stdout instead of
-     stderr and a few non-errors that were going to stderr instead of stdout
-     bz#2325; ok dtucker
+    If ssh receives a PACKET_DISCONNECT during userauth it
+    will cause ssh_dispatch_run(DISPATCH_BLOCK, ...) to return without the
+    session being authenticated.  Check for this and exit if necessary.  ok djm@
+    
+    Upstream-ID: b3afe126c0839d2eae6cddd41ff2ba317eda0903
 
-commit a58be33cb6cd24441fa7e634db0e5babdd56f07f
+commit 1622649b7a829fc8dc313042a43a974f0f3e8a99
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 17 13:16:48 2015 +0000
+Date:   Wed Sep 21 19:53:12 2016 +0000
 
     upstream commit
     
-    debug log missing DISPLAY environment when X11
-     forwarding requested; bz#1682 ok dtucker@
+    correctly return errors from kex_send_ext_info(). Fix from
+    Sami Farin via https://github.com/openssh/openssh-portable/pull/50
+    
+    Upstream-ID: c85999af28aaecbf92cfa2283381df81e839b42c
 
-commit 17d4d9d9fbc8fb80e322f94d95eecc604588a474
+commit f83a0cfe16c7a73627b46a9a94e40087d60f32fb
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 17 04:32:31 2015 +0000
+Date:   Wed Sep 21 17:44:20 2016 +0000
 
     upstream commit
     
-    don't call record_login() in monitor when UseLogin is
-     enabled; bz#278 reported by drk AT sgi.com; ok dtucker
+    cast uint64_t for printf
+    
+    Upstream-ID: 76d23e89419ccbd2320f92792a6d878211666ac1
 
-commit 40132ff87b6cbc3dc05fb5df2e9d8e3afa06aafd
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Fri Apr 17 04:12:35 2015 +0000
+commit 5f63ab474f58834feca4f35c498be03b7dd38a16
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 21 17:03:54 2016 +0000
 
     upstream commit
     
-    Add some missing options to sshd -T and fix the output
-     of VersionAddendum HostCertificate.  bz#2346, patch from jjelen at redhat
-     com, ok djm.
+    disable tests for affirmative negated match after backout of
+    match change
+    
+    Upstream-Regress-ID: acebb8e5042f03d66d86a50405c46c4de0badcfd
 
-commit 6cc7cfa936afde2d829e56ee6528c7ea47a42441
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Thu Apr 16 23:25:50 2015 +0000
+commit a5ad3a9db5a48f350f257a67b62fafd719ecb7e0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 21 16:55:42 2016 +0000
 
     upstream commit
     
-    Document "none" for PidFile XAuthLocation
-     TrustedUserCAKeys and RevokedKeys. bz#2382, feedback from jmc@, ok djm@
+    Revert two recent changes to negated address matching. The
+    new behaviour offers unintuitive surprises. We'll find a better way to deal
+    with single negated matches.
+    
+    match.c 1.31:
+    > fix matching for pattern lists that contain a single negated match,
+    > e.g. "Host !example"
+    >
+    > report and patch from Robin Becker. bz#1918 ok dtucker@
+    
+    addrmatch.c 1.11:
+    > fix negated address matching where the address list consists of a
+    > single negated match, e.g. "Match addr !192.20.0.1"
+    >
+    > Report and patch from Jakub Jelen. bz#2397 ok dtucker@
+    
+    Upstream-ID: ec96c770f0f5b9a54e5e72fda25387545e9c80c6
 
-commit 15fdfc9b1c6808b26bc54d4d61a38b54541763ed
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Wed Apr 15 23:23:25 2015 +0000
+commit 119b7a2ca0ef2bf3f81897ae10301b8ca8cba844
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 21 01:35:12 2016 +0000
 
     upstream commit
     
-    Plug leak of address passed to logging.  bz#2373, patch
-     from jjelen at redhat, ok markus@
+    test all the AuthorizedPrincipalsCommand % expansions
+    
+    Upstream-Regress-ID: 0a79a84dfaa59f958e46b474c3db780b454d30e3
 
-commit bb2289e2a47d465eaaaeff3dee2a6b7777b4c291
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Tue Apr 14 04:17:03 2015 +0000
+commit bfa9d969ab6235d4938ce069d4db7e5825c56a19
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 21 01:34:45 2016 +0000
 
     upstream commit
     
-    Output remote username in debug output since with Host
-     and Match it's not always obvious what it will be.  bz#2368, ok djm@
+    add a way for principals command to get see key ID and serial
+    too
+    
+    Upstream-ID: 0d30978bdcf7e8eaeee4eea1b030eb2eb1823fcb
 
-commit 70860b6d07461906730632f9758ff1b7c98c695a
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Apr 17 10:56:13 2015 +1000
+commit 920585b826af1c639e4ed78b2eba01fd2337b127
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 16 06:09:31 2016 +0000
 
-    Format UsePAM setting when using sshd -T.
+    upstream commit
     
-    Part of bz#2346, patch from jjelen at redhat com.
+    add a note on kexfuzz' limitations
+    
+    Upstream-Regress-ID: 03804d4a0dbc5163e1a285a4c8cc0a76a4e864ec
 
-commit ee15d9c9f0720f5a8b0b34e4b10ecf21f9824814
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Apr 17 10:40:23 2015 +1000
+commit 0445ff184080b196e12321998b4ce80b0f33f8d1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 16 01:01:41 2016 +0000
 
-    Wrap endian.h include inside ifdef (bz#2370).
+    upstream commit
+    
+    fix for newer modp DH groups
+    (diffie-hellman-group14-sha256 etc)
+    
+    Upstream-Regress-ID: fe942c669959462b507516ae1634fde0725f1c68
 
-commit 408f4c2ad4a4c41baa7b9b2b7423d875abbfa70b
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Apr 17 09:39:58 2015 +1000
+commit 28652bca29046f62c7045e933e6b931de1d16737
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Mon Sep 19 19:02:19 2016 +0000
 
-    Look for '${host}-ar' before 'ar'.
+    upstream commit
     
-    This changes configure.ac to look for '${host}-ar' as set by
-    AC_CANONICAL_HOST before looking for the unprefixed 'ar'.
-    Useful when cross-compiling when all your binutils are prefixed.
+    move inbound NEWKEYS handling to kex layer; otherwise
+    early NEWKEYS causes NULL deref; found by Robert Swiecki/honggfuzz; fixed
+    with & ok djm@
     
-    Patch from moben at exherbo org via astrand at lysator liu se and
-    bz#2352.
+    Upstream-ID: 9a68b882892e9f51dc7bfa9f5a423858af358b2f
 
-commit 673a1c16ad078d41558247ce739fe812c960acc8
-Author: Damien Miller <djm@google.com>
-Date:   Thu Apr 16 11:40:20 2015 +1000
+commit 492710894acfcc2f173d14d1d45bd2e688df605d
+Author: natano@openbsd.org <natano@openbsd.org>
+Date:   Mon Sep 19 07:52:42 2016 +0000
 
-    remove dependency on arpa/telnet.h
+    upstream commit
+    
+    Replace two more arc4random() loops with
+    arc4random_buf().
+    
+    tweaks and ok dtucker
+    ok deraadt
+    
+    Upstream-ID: 738d3229130ccc7eac975c190276ca6fcf0208e4
 
-commit 202d443eeda1829d336595a3cfc07827e49f45ed
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Apr 15 15:59:49 2015 +1000
+commit 1036356324fecc13099ac6e986b549f6219327d7
+Author: tedu@openbsd.org <tedu@openbsd.org>
+Date:   Sat Sep 17 18:00:27 2016 +0000
 
-    Remove duplicate include of pwd.h.  bz#2337, patch from Mordy Ovits.
+    upstream commit
+    
+    replace two arc4random loops with arc4random_buf ok
+    deraadt natano
+    
+    Upstream-ID: e18ede972d1737df54b49f011fa4f3917a403f48
 
-commit 597986493412c499f2bc2209420cb195f97b3668
-Author: Damien Miller <djm@google.com>
-Date:   Thu Apr 9 10:14:48 2015 +1000
+commit 00df97ff68a49a756d4b977cd02283690f5dfa34
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 14 20:11:26 2016 +0000
 
-    platform's with openpty don't need pty_release
+    upstream commit
+    
+    take fingerprint of correct key for
+    AuthorizedPrincipalsCommand
+    
+    Upstream-ID: 553581a549cd6a3e73ce9f57559a325cc2cb1f38
 
-commit 318be28cda1fd9108f2e6f2f86b0b7589ba2aed0
+commit e7907c1cb938b96dd33d27c2fea72c4e08c6b2f6
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Apr 13 02:04:08 2015 +0000
+Date:   Wed Sep 14 05:42:25 2016 +0000
 
     upstream commit
     
-    deprecate ancient, pre-RFC4419 and undocumented
-     SSH2_MSG_KEX_DH_GEX_REQUEST_OLD message; ok markus@ deraadt@ "seems
-     reasonable" dtucker@
+    add %-escapes to AuthorizedPrincipalsCommand to match those
+    supported for AuthorizedKeysCommand (key, key type, fingerprint, etc) and a
+    few more to provide access to the certificate's CA key; 'looks ok' dtucker@
+    
+    Upstream-ID: 6b00fd446dbebe67f4e4e146d2e492d650ae04eb
 
-commit d8f391caef62378463a0e6b36f940170dadfe605
+commit 2b939c272a81c4d0c47badeedbcb2ba7c128ccda
 Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Fri Apr 10 05:16:50 2015 +0000
+Date:   Wed Sep 14 00:45:31 2016 +0000
 
     upstream commit
     
-    Don't send hostkey advertisments
-     (hostkeys-00@openssh.com) to current versions of Tera Term as they can't
-     handle them.  Newer versions should be OK.  Patch from Bryan Drewery and
-     IWAMOTO Kouichi, ok djm@
+    Improve test coverage of ssh-keygen -T a bit.
+    
+    Upstream-Regress-ID: 8851668c721bcc2b400600cfc5a87644cc024e72
 
-commit 2c2cfe1a1c97eb9a08cc9817fd0678209680c636
+commit 44d82fc83be6c5ccd70881c2dac1a73e5050398b
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Sep 12 02:25:46 2016 +0000
+
+    upstream commit
+    
+    Add testcase for ssh-keygen -j, -J and -K options for
+    moduli screening. Does not currently test generation as that is extremely
+    slow.
+    
+    Upstream-Regress-ID: 9de6ce801377ed3ce0a63a1413f1cd5fd3c2d062
+
+commit 44e5f756d286bc3a1a5272ea484ee276ba3ac5c2
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 10 00:08:55 2015 +0000
+Date:   Tue Aug 23 08:17:04 2016 +0000
 
     upstream commit
     
-    include port number if a non-default one has been
-     specified; based on patch from Michael Handler
+    add tests for addr_match_list()
+    
+    Upstream-Regress-ID: fae2d1fef84687ece584738a924c7bf969616c8e
 
-commit 4492a4f222da4cf1e8eab12689196322e27b08c4
+commit 445e218878035b59c704c18406e8aeaff4c8aa25
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Apr 7 23:00:42 2015 +0000
+Date:   Mon Sep 12 23:39:34 2016 +0000
 
     upstream commit
     
-    treat Protocol=1,2|2,1 as Protocol=2 when compiled
-     without SSH1 support; ok dtucker@ millert@
+    handle certs in rsa_hash_alg_from_ident(), saving an
+    unnecessary special case elsewhere.
+    
+    Upstream-ID: 901cb081c59d6d2698b57901c427f3f6dc7397d4
 
-commit c265e2e6e932efc6d86f6cc885dea33637a67564
-Author: miod@openbsd.org <miod@openbsd.org>
-Date:   Sun Apr 5 15:43:43 2015 +0000
+commit 130f5df4fa37cace8c079dccb690e5cafbf00751
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Sep 12 23:31:27 2016 +0000
 
     upstream commit
     
-    Do not use int for sig_atomic_t; spotted by
-     christos@netbsd; ok markus@
+    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@
+    
+    Upstream-ID: ddf702d721f54646b11ef2cee6d916666cb685cd
 
-commit e7bf3a5eda6a1b02bef6096fed78527ee11e54cc
+commit 8f750ccfc07acb8aa98be5a5dd935033a6468cfd
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Apr 7 10:48:04 2015 +1000
+Date:   Mon Sep 12 14:43:58 2016 +1000
 
-    Use do{}while(0) for no-op functions.
-    
-    From FreeBSD.
+    Remove no-op brackets to resync with upstream.
 
-commit bb99844abae2b6447272f79e7fa84134802eb4df
+commit 7050896e7395866278c19c2ff080c26152619d1d
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Apr 7 10:47:15 2015 +1000
+Date:   Mon Sep 12 13:57:28 2016 +1000
 
-    Wrap blf.h include in ifdef.  From FreeBSD.
+    Resync ssh-keygen -W error message with upstream.
 
-commit d9b9b43656091cf0ad55c122f08fadb07dad0abd
+commit 43cceff82cc20413cce58ba3375e19684e62cec4
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Apr 7 09:10:00 2015 +1000
+Date:   Mon Sep 12 13:55:37 2016 +1000
 
-    Fix misspellings of regress CONFOPTS env variables.
-    
-    Patch from Bryan Drewery.
+    Move ssh-keygen -W handling code to match upstream
 
-commit 3f4ea3c9ab1d32d43c9222c4351f58ca11144156
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Apr 3 22:17:27 2015 +0000
+commit af48d541360b1d7737b35740a4b1ca34e1652cd9
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Sep 12 13:52:17 2016 +1000
+
+    Move ssh-keygen -T handling code to match upstream.
+
+commit d8c3cfbb018825c6c86547165ddaf11924901c49
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Sep 12 13:30:50 2016 +1000
+
+    Move -M handling code to match upstream.
+
+commit 7b63cf6dbbfa841c003de57d1061acbf2ff22364
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Sep 12 03:29:16 2016 +0000
 
     upstream commit
     
-    correct return value in pubkey parsing, spotted by Ben Hawkes
-     ok markus@
+    Spaces->tabs.
+    
+    Upstream-ID: f4829dfc3f36318273f6082b379ac562eead70b7
 
-commit 7da2be0cb9601ed25460c83aa4d44052b967ba0f
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 31 22:59:01 2015 +0000
+commit 11e5e644536821ceb3bb4dd8487fbf0588522887
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Sep 12 03:25:20 2016 +0000
 
     upstream commit
     
-    adapt to recent hostfile.c change: when parsing
-     known_hosts without fully parsing the keys therein, hostkeys_foreach() will
-     now correctly identify KEY_RSA1 keys; ok markus@ miod@
+    Style whitespace fix.  Also happens to remove a no-op
+    diff with portable.
+    
+    Upstream-ID: 45d90f9a62ad56340913a433a9453eb30ceb8bf3
 
-commit 9e1777a0d1c706714b055811c12ab8cc21033e4a
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Mar 24 20:19:15 2015 +0000
+commit 9136ec134c97a8aff2917760c03134f52945ff3c
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Mon Sep 12 01:22:38 2016 +0000
 
     upstream commit
     
-    use ${SSH} for -Q instead of installed ssh
+    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
+    
+    Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8
 
-commit ce1b358ea414a2cc88e4430cd5a2ea7fecd9de57
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Mar 16 22:46:14 2015 +0000
+commit f219fc8f03caca7ac82a38ed74bbd6432a1195e7
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Wed Sep 7 18:39:24 2016 +0000
 
     upstream commit
     
-    make CLEANFILES clean up more of the tests' droppings
+    sort; from matthew martin
+    
+    Upstream-ID: 73cec7f7ecc82d37a4adffad7745e4684de67ce7
 
-commit 398f9ef192d820b67beba01ec234d66faca65775
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 31 22:57:06 2015 +0000
+commit 06ce56b05def9460aecc7cdb40e861a346214793
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Sep 6 09:22:56 2016 +0000
 
     upstream commit
     
-    downgrade error() for known_hosts parse errors to debug()
-     to quiet warnings from ssh1 keys present when compiled !ssh1.
-    
-    also identify ssh1 keys when scanning, even when compiled !ssh1
+    ssh_set_newkeys: print correct block counters on
+    rekeying; ok djm@
     
-    ok markus@ miod@
+    Upstream-ID: 32bb7a9cb9919ff5bab28d50ecef3a2b2045dd1e
 
-commit 9a47ab80030a31f2d122b8fd95bd48c408b9fcd9
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 31 22:55:50 2015 +0000
+commit e5e8d9114ac6837a038f4952994ca95a97fafe8d
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Sep 6 09:14:05 2016 +0000
 
     upstream commit
     
-    fd leak for !ssh1 case; found by unittests; ok markus@
+    update ext_info_c every time we receive a kexinit msg;
+    fixes sending of ext_info if privsep is disabled; report Aris Adamantiadis &
+    Mancha; ok djm@
+    
+    Upstream-ID: 2ceaa1076e19dbd3542254b4fb8e42d608f28856
 
-commit c9a0805a6280681901c270755a7cd630d7c5280e
+commit da95318dbedbaa1335323dba370975c2f251afd8
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 31 22:55:24 2015 +0000
+Date:   Mon Sep 5 14:02:42 2016 +0000
 
     upstream commit
     
-    don't fatal when a !ssh1 sshd is reexeced from a w/ssh1
-     listener; reported by miod@; ok miod@ markus@
-
-commit 704d8c88988cae38fb755a6243b119731d223222
-Author: tobias@openbsd.org <tobias@openbsd.org>
-Date:   Tue Mar 31 11:06:49 2015 +0000
-
-    upstream commit
+    remove 3des-cbc from the client's default proposal;
+    64-bit block ciphers are not safe in 2016 and we don't want to wait until
+    attacks like sweet32 are extended to SSH.
     
-    Comments are only supported for RSA1 keys. If a user
-     tried to add one and entered his passphrase, explicitly clear it before exit.
-     This is done in all other error paths, too.
+    As 3des-cbc was the only mandatory cipher in the SSH RFCs, this may
+    cause problems connecting to older devices using the defaults, but
+    it's highly likely that such devices already need explicit
+    configuration for KEX and hostkeys anyway.
     
-    ok djm
-
-commit 78de1673c05ea2c33e0d4a4b64ecb5186b6ea2e9
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Mon Mar 30 18:28:37 2015 +0000
-
-    upstream commit
+    ok deraadt, markus, dtucker
     
-    ssh-askpass(1) is the default, overridden by SSH_ASKPASS;
-     diff originally from jiri b;
+    Upstream-ID: a505dfe65c6733af0f751b64cbc4bb7e0761bc2f
 
-commit 26e0bcf766fadb4a44fb6199386fb1dcab65ad00
+commit b33ad6d997d36edfea65e243cd12ccd01f413549
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Mar 30 00:00:29 2015 +0000
+Date:   Mon Sep 5 13:57:31 2016 +0000
 
     upstream commit
     
-    fix uninitialised memory read when parsing a config file
-     consisting of a single nul byte. Found by hanno AT hboeck.de using AFL; ok
-     dtucker
+    enforce expected request flow for GSSAPI calls; thanks to
+    Jakub Jelen for testing; ok markus@
+    
+    Upstream-ID: d4bc0e70e1be403735d3d9d7e176309b1fd626b9
 
-commit fecede00a76fbb33a349f5121c0b2f9fbc04a777
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Thu Mar 26 19:32:19 2015 +0000
+commit 0bb2980260fb24e5e0b51adac471395781b66261
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Sep 12 11:07:00 2016 +1000
 
-    upstream commit
+    Restore ssh-keygen's -J and -j option handling.
     
-    sigp and lenp are not optional in ssh_agent_sign(); ok
-     djm@
+    These were incorrectly removed in the 1d9a2e28 sync commit.
 
-commit 1b0ef3813244c78669e6d4d54c624f600945327d
-Author: naddy@openbsd.org <naddy@openbsd.org>
-Date:   Thu Mar 26 12:32:38 2015 +0000
+commit 775f8a23f2353f5869003c57a213d14b28e0736e
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Aug 31 10:48:07 2016 +1000
 
-    upstream commit
+    tighten PAM monitor calls
     
-    don't try to load .ssh/identity by default if SSH1 is
-     disabled; ok markus@
+    only allow kbd-interactive ones when that authentication method is
+    enabled. Prompted by Solar Designer
 
-commit f9b78852379b74a2d14e6fc94fe52af30b7e9c31
+commit 7fd0ea8a1db4bcfb3d8cd9df149e5d571ebea1f4
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Mar 26 07:00:04 2015 +0000
+Date:   Tue Aug 30 07:50:21 2016 +0000
 
     upstream commit
     
-    ban all-zero curve25519 keys as recommended by latest
-     CFRG curves draft; ok markus
+    restrict monitor auth calls to be allowed only when their
+    respective authentication methods are enabled in the configuration.
+    
+    prompted by Solar Designer; ok markus dtucker
+    
+    Upstream-ID: 6eb3f89332b3546d41d6dbf5a8e6ff920142b553
 
-commit b8afbe2c1aaf573565e4da775261dfafc8b1ba9c
+commit b38b95f5bcc52278feb839afda2987933f68ff96
+Author: Damien Miller <djm@mindrot.org>
+Date:   Mon Aug 29 11:47:07 2016 +1000
+
+    Tighten monitor state-machine flow for PAM calls
+    
+    (attack surface reduction)
+
+commit dc664d1bd0fc91b24406a3e9575b81c285b8342b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Mar 26 06:59:28 2015 +0000
+Date:   Sun Aug 28 22:28:12 2016 +0000
 
     upstream commit
     
-    relax bits needed check to allow
-     diffie-hellman-group1-sha1 key exchange to complete for chacha20-poly1305 was
-     selected as symmetric cipher; ok markus
+    fix uninitialised optlen in getsockopt() call; harmless
+    on Unix/BSD but potentially crashy on Cygwin. Reported by James Slepicka ok
+    deraadt@
+    
+    Upstream-ID: 1987ccee508ba5b18f016c85100d7ac3f70ff965
 
-commit 47842f71e31da130555353c1d57a1e5a8937f1c0
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Mar 25 19:29:58 2015 +0000
+commit 5bcc1e2769f7d6927d41daf0719a9446ceab8dd7
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Sat Aug 27 04:05:12 2016 +0000
 
     upstream commit
     
-    ignore v1 errors on ssh-add -D; only try v2 keys on
-     -l/-L (unless WITH_SSH1) ok djm@
+    Pull in <sys/time.h> for struct timeval
+    
+    ok deraadt@
+    
+    Upstream-ID: ae34525485a173bccd61ac8eefeb91c57e3b7df6
 
-commit 5f57e77f91bf2230c09eca96eb5ecec39e5f2da6
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Mar 25 19:21:48 2015 +0000
+commit fa4a4c96b19127dc2fd4e92f20d99c0c7f34b538
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Sat Aug 27 04:04:56 2016 +0000
 
     upstream commit
     
-    unbreak ssh_agent_sign (lenp vs *lenp)
+    Pull in <stdlib.h> for NULL
+    
+    ok deraadt@
+    
+    Upstream-ID: 7baa6a0f1e049bb3682522b4b95a26c866bfc043
 
-commit 4daeb67181054f2a377677fac919ee8f9ed3490e
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Mar 24 20:10:08 2015 +0000
+commit ae363d74ccc1451185c0c8bd4631e28c67c7fd36
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Aug 25 23:57:54 2016 +0000
 
     upstream commit
     
-    don't leak 'setp' on error; noted by Nicholas Lemonias;
-     ok djm@
+    add a sIgnore opcode that silently ignores options and
+    use it to suppress noisy deprecation warnings for the Protocol directive.
+    
+    req henning, ok markus
+    
+    Upstream-ID: 9fe040aca3d6ff393f6f7e60045cdd821dc4cbe0
 
-commit 7d4f96f9de2a18af0d9fa75ea89a4990de0344f5
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Mar 24 20:09:11 2015 +0000
+commit a94c60306643ae904add6e8ed219e4be3494255c
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Aug 25 23:56:51 2016 +0000
 
     upstream commit
     
-    consistent check for NULL as noted by Nicholas
-     Lemonias; ok djm@
+    remove superfluous NOTREACHED comment
+    
+    Upstream-ID: a7485c1f1be618e8c9e38fd9be46c13b2d03b90c
 
-commit df100be51354e447d9345cf1ec22e6013c0eed50
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Mar 24 20:03:44 2015 +0000
+commit fc041c47144ce28cf71353124a8a5d183cd6a251
+Author: otto@openbsd.org <otto@openbsd.org>
+Date:   Tue Aug 23 16:21:45 2016 +0000
 
     upstream commit
     
-    correct fmt-string for size_t as noted by Nicholas
-     Lemonias; ok djm@
+    fix previous, a condition was modified incorrectly; ok
+    markus@ deraadt@
+    
+    Upstream-ID: c443e339768e7ed396dff3bb55f693e7d3641453
 
-commit a22b9ef21285e81775732436f7c84a27bd3f71e0
+commit 23555eb13a9b0550371a16dcf8beaab7a5806a64
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 24 09:17:21 2015 +0000
+Date:   Tue Aug 23 08:17:42 2016 +0000
 
     upstream commit
     
-    promote chacha20-poly1305@openssh.com to be the default
-     cipher; ok markus
+    downgrade an error() to a debug2() to match similar cases
+    in addr_match_list()
+    
+    Upstream-ID: 07c3d53e357214153d9d08f234411e0d1a3d6f5c
 
-commit 2aa9da1a3b360cf7b13e96fe1521534b91501fb5
+commit a39627134f6d90e7009eeb14e9582ecbc7a99192
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 24 01:29:19 2015 +0000
+Date:   Tue Aug 23 06:36:23 2016 +0000
 
     upstream commit
     
-    Compile-time disable SSH protocol 1. You can turn it
-     back on using the Makefile.inc knob if you need it to talk to ancient
-     devices.
+    remove Protocol directive from client/server configs that
+    causes spammy deprecation warnings
+    
+    hardcode SSH_PROTOCOLS=2, since that's all we support on the server
+    now (the client still may support both, so it could get confused)
+    
+    Upstream-Regress-ID: c16662c631af51633f9fd06aca552a70535de181
 
-commit 53097b2022154edf96b4e8526af5666f979503f7
+commit 6ee4f1c01ee31e65245881d49d4bccf014956066
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 23 16:33:48 2016 +1000
+
+    hook match and utf8 unittests up to Makefile
+
+commit 114efe2bc0dd2842d997940a833f115e6fc04854
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 24 01:11:12 2015 +0000
+Date:   Fri Aug 19 06:44:13 2016 +0000
 
     upstream commit
     
-    fix double-negative error message "ssh1 is not
-     unsupported"
+    add tests for matching functions
+    
+    Upstream-Regress-ID: 0869d4f5c5d627c583c6a929d69c17d5dd65882c
 
-commit 5c27e3b6ec2db711dfcd40e6359c0bcdd0b62ea9
+commit 857568d2ac81c14bcfd625b27536c1e28c992b3c
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 23 14:32:37 2016 +1000
+
+    removing UseLogin bits from configure.ac
+
+commit cc182d01cef8ca35a1d25ea9bf4e2ff72e588208
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Mar 23 06:06:38 2015 +0000
+Date:   Tue Aug 23 03:24:10 2016 +0000
 
     upstream commit
     
-    for ssh-keygen -A, don't try (and fail) to generate ssh
-     v.1 keys when compiled without SSH1 support RSA/DSA/ECDSA keys when compiled
-     without OpenSSL based on patch by Mike Frysinger; bz#2369
+    fix negated address matching where the address list
+    consists of a single negated match, e.g. "Match addr !192.20.0.1"
+    
+    Report and patch from Jakub Jelen. bz#2397 ok dtucker@
+    
+    Upstream-ID: 01dcac3f3e6ca47518cf293e31c73597a4bb40d8
 
-commit 725fd22a8c41db7de73a638539a5157b7e4424ae
+commit 4067ec8a4c64ccf16250c35ff577b4422767da64
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Mar 18 01:44:21 2015 +0000
+Date:   Tue Aug 23 03:22:49 2016 +0000
 
     upstream commit
     
-    KRL support doesn't need OpenSSL anymore, remove #ifdefs
-     from around call
+    fix matching for pattern lists that contain a single
+    negated match, e.g. "Host !example"
+    
+    report and patch from Robin Becker. bz#1918 ok dtucker@
+    
+    Upstream-ID: 05a0cb323ea4bc20e98db099b42c067bfb9ea1ea
 
-commit b07011c18e0b2e172c5fd09d21fb159a0bf5fcc7
+commit 83b581862a1dbb06fc859959f829dde2654aef3c
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Mar 16 11:09:52 2015 +0000
+Date:   Fri Aug 19 03:18:06 2016 +0000
 
     upstream commit
     
-    #if 0 some more arrays used only for decrypting (we don't
-     use since we only need encrypt for AES-CTR)
+    remove UseLogin option and support for having /bin/login
+    manage login sessions; ok deraadt markus dtucker
+    
+    Upstream-ID: bea7213fbf158efab7e602d9d844fba4837d2712
 
-commit 1cb3016635898d287e9d58b50c430995652d5358
-Author: jsg@openbsd.org <jsg@openbsd.org>
-Date:   Wed Mar 11 00:48:39 2015 +0000
+commit ffe6549c2f7a999cc5264b873a60322e91862581
+Author: naddy@openbsd.org <naddy@openbsd.org>
+Date:   Mon Aug 15 12:32:04 2016 +0000
 
     upstream commit
     
-    add back the changes from rev 1.206, djm reverted this by
-     mistake in rev 1.207
+    Catch up with the SSH1 code removal and delete all
+    mention of protocol 1 particularities, key files and formats, command line
+    options, and configuration keywords from the server documentation and
+    examples.  ok jmc@
+    
+    Upstream-ID: 850328854675b4b6a0d4a90f0b4a9dd9ca4e905f
 
-commit 4d24b3b6a4a6383e05e7da26d183b79fa8663697
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Mar 20 09:11:59 2015 +1100
+commit c38ea634893a1975dbbec798fb968c9488013f4a
+Author: naddy@openbsd.org <naddy@openbsd.org>
+Date:   Mon Aug 15 12:27:56 2016 +0000
 
-    remove error() accidentally inserted for debugging
+    upstream commit
+    
+    Remove more SSH1 server code: * Drop sshd's -k option. *
+    Retire configuration keywords that only apply to protocol 1, as well as   the
+    "protocol" keyword. * Remove some related vestiges of protocol 1 support.
+    
+    ok markus@
     
-    pointed out by Christian Hesse
+    Upstream-ID: 9402f82886de917779db12f8ee3f03d4decc244d
 
-commit 9f82e5a9042f2d872e98f48a876fcab3e25dd9bb
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Mar 16 22:49:20 2015 -0700
+commit 33ba55d9e358c07f069e579bfab80eccaaad52cb
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Aug 17 16:26:04 2016 +1000
 
-    portability fix: Solaris systems may not have a grep that understands -q
+    Only check for prctl once.
 
-commit 8ef691f7d9ef500257a549d0906d78187490668f
-Author: Damien Miller <djm@google.com>
-Date:   Wed Mar 11 10:35:26 2015 +1100
+commit 976ba8a8fd66a969bf658280c1e5adf694cc2fc6
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Aug 17 15:33:10 2016 +1000
 
-    fix compile with clang
+    Fix typo.
 
-commit 4df590cf8dc799e8986268d62019b487a8ed63ad
-Author: Damien Miller <djm@google.com>
-Date:   Wed Mar 11 10:02:39 2015 +1100
+commit 9abf84c25ff4448891edcde60533a6e7b2870de1
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Aug 17 14:25:43 2016 +1000
 
-    make unit tests work for !OPENSSH_HAS_ECC
+    Correct LDFLAGS for clang example.
+    
+    --with-ldflags isn't used until after the -ftrapv test, so mention
+    LDFLAGS instead for now.
 
-commit 307bb40277ca2c32e97e61d70d1ed74b571fd6ba
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Mar 7 04:41:48 2015 +0000
+commit 1e8013a17ff11e3c6bd0012fb1fc8d5f1330eb21
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Aug 17 14:08:42 2016 +1000
 
-    upstream commit
+    Remove obsolete CVS $Id from source files.
     
-    unbreak for w/SSH1 (default) case; ok markus@ deraadt@
+    Since -portable switched to git the CVS $Id tags are no longer being
+    updated and are becoming increasingly misleading.  Remove them.
 
-commit b44ee0c998fb4c5f3c3281f2398af5ce42840b6f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Mar 5 18:39:20 2015 -0800
+commit adab758242121181700e48b4f6c60d6b660411fe
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Aug 17 13:40:58 2016 +1000
 
-    unbreak hostkeys test for w/ SSH1 case
+    Remove now-obsolete CVS $Id tags from text files.
+    
+    Since -portable switched to git, the CVS $Id tags are no longer being
+    updated and are becoming increasingly misleading.  Remove them.
 
-commit 55e5bdeb519cb60cc18b7ba0545be581fb8598b4
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Mar 6 01:40:56 2015 +0000
+commit 560c0068541315002ec4c1c00a560bbd30f2d671
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Aug 17 13:38:30 2016 +1000
 
-    upstream commit
+    Add a section for compiler specifics.
     
-    fix sshkey_certify() return value for unsupported key types;
-     ok markus@ deraadt@
+    Add a section for compiler specifics and document the runtime requirements
+    for clang's integer sanitization.
 
-commit be8f658e550a434eac04256bfbc4289457a24e99
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 15:38:03 2015 -0800
+commit a8fc0f42e1eda2fa3393d1ea5e61322d5e07a9cd
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Aug 17 13:35:43 2016 +1000
 
-    update version numbers to match version.h
+    Test multiplying two long long ints.
+    
+    When using clang with -ftrapv or -sanitize=integer the tests would pass
+    but linking would fail with "undefined reference to __mulodi4".
+    Explicitly test for this before enabling -trapv.
 
-commit ac5e8acefa253eb5e5ba186e34236c0e8007afdc
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Mar 4 23:22:35 2015 +0000
+commit a1cc637e7e11778eb727559634a6ef1c19c619f6
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 16 14:47:34 2016 +1000
 
-    upstream commit
+    add a --with-login-program configure argument
     
-    make these work with !SSH1; ok markus@ deraadt@
+    Saves messing around with LOGIN_PROGRAM env var, which come
+    packaging environments make hard to do during configure phase.
 
-commit 2f04af92f036b0c87a23efb259c37da98cd81fe6
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Mar 4 21:12:59 2015 +0000
+commit 8bd81e1596ab1bab355146cb65e82fb96ade3b23
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Aug 16 13:30:56 2016 +1000
 
-    upstream commit
+    add --with-pam-service to specify PAM service name
     
-    make ssh-add -D work with !SSH1 agent
+    Saves messing around with CFLAGS to do it.
 
-commit a05adf95d2af6abb2b7826ddaa7a0ec0cdc1726b
+commit 74433a19bb6f4cef607680fa4d1d7d81ca3826aa
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 00:55:48 2015 -0800
+Date:   Tue Aug 16 13:28:23 2016 +1000
 
-    netcat needs poll.h portability goop
+    fix false positives when compiled with msan
+    
+    Our explicit_bzero successfully confused clang -fsanitize-memory
+    in to thinking that memset is never called to initialise memory.
+    Ensure that it is called in a way that the compiler recognises.
 
-commit dad2b1892b4c1b7e58df483a8c5b983c4454e099
+commit 6cb6dcffe1a2204ba9006de20f73255c268fcb6b
 Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Mar 3 22:35:19 2015 +0000
+Date:   Sat Aug 13 17:47:40 2016 +0000
 
     upstream commit
     
-    make it possible to run tests w/o ssh1 support; ok djm@
+    remove ssh1 server code; ok djm@
+    
+    Upstream-ID: c24c0c32c49b91740d5a94ae914fb1898ea5f534
 
-commit d48a22601bdd3eec054794c535f4ae8d8ae4c6e2
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Mar 4 18:53:53 2015 +0000
+commit 42d47adc5ad1187f22c726cbc52e71d6b1767ca2
+Author: jca@openbsd.org <jca@openbsd.org>
+Date:   Fri Aug 12 19:19:04 2016 +0000
 
     upstream commit
     
-    crank; ok markus, deraadt
+    Use 2001:db8::/32, the official IPv6 subnet for
+    configuration examples.
+    
+    This makes the IPv6 example consistent with IPv4, and removes a dubious
+    mention of a 6bone subnet.
+    
+    ok sthen@ millert@
+    
+    Upstream-ID: b027f3d0e0073419a132fd1bf002e8089b233634
 
-commit bbffb23daa0b002dd9f296e396a9ab8a5866b339
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Mar 3 13:50:27 2015 -0800
+commit b61f53c0c3b43c28e013d3b3696d64d1c0204821
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Aug 11 01:42:11 2016 +0000
+
+    upstream commit
+    
+    Update moduli file.
+    
+    Upstream-ID: 6da9a37f74aef9f9cc639004345ad893cad582d8
+
+commit f217d9bd42d306f69f56335231036b44502d8191
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Aug 11 11:42:48 2016 +1000
 
-    more --without-ssh1 fixes
+    Import updated moduli.
 
-commit 6c2039286f503e2012a58a1d109e389016e7a99b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Mar 3 13:48:48 2015 -0800
+commit 67dca60fbb4923b7a11c1645b90a5ca57c03d8be
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Aug 8 22:40:57 2016 +0000
 
-    fix merge both that broke --without-ssh1 compile
+    upstream commit
+    
+    Improve error message for overlong ControlPath.  ok markus@
+    djm@
+    
+    Upstream-ID: aed374e2e88dd3eb41390003e5303d0089861eb5
 
-commit 111dfb225478a76f89ecbcd31e96eaf1311b59d3
+commit 4706c1d8c15cd5565b59512853c2da9bd4ca26c9
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 21:21:13 2015 +0000
+Date:   Wed Aug 3 05:41:57 2016 +0000
+
+    upstream commit
+    
+    small refactor of cipher.c: make ciphercontext opaque to
+    callers feedback and ok markus@
+    
+    Upstream-ID: 094849f8be68c3bdad2c0f3dee551ecf7be87f6f
+
+commit e600348a7afd6325cc5cd783cb424065cbc20434
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Aug 3 04:23:55 2016 +0000
 
     upstream commit
     
-    add SSH1 Makefile knob to make it easier to build without
-     SSH1 support; ok markus@
+    Fix bug introduced in rev 1.467 which causes
+    "buffer_get_bignum_ret: incomplete message" errors when built with WITH_SSH1
+    and run such that no Protocol 1 ephemeral host key is generated (eg "Protocol
+    2", no SSH1 host key supplied).  Reported by rainer.laatsch at t-online.de,
+    ok deraadt@
+    
+    Upstream-ID: aa6b132da5c325523aed7989cc5a320497c919dc
 
-commit 3f7f5e6c5d2aa3f6710289c1a30119e534e56c5c
+commit d7e7348e72f9b203189e3fffb75605afecba4fda
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 20:42:49 2015 +0000
+Date:   Wed Jul 27 23:18:12 2016 +0000
 
     upstream commit
     
-    expand __unused to full __attribute__ for better portability
+    better bounds check on iovcnt (we only ever use fixed,
+    positive values)
+    
+    Upstream-ID: 9baa6eb5cd6e30c9dc7398e5fe853721a3a5bdee
 
-commit 2fab9b0f8720baf990c931e3f68babb0bf9949c6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 07:41:27 2015 +1100
+commit 5faa52d295f764562ed6dd75c4a4ce9134ae71e3
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Aug 2 15:22:40 2016 +1000
 
-    avoid warning
+    Use tabs consistently inside "case $host".
 
-commit d1bc844322461f882b4fd2277ba9a8d4966573d2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 06:31:45 2015 +1100
+commit 20e5e8ba9c5d868d897896190542213a60fffbd2
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Aug 2 12:16:34 2016 +1000
 
-    Revert "define __unused to nothing if not already defined"
+    Explicitly test for broken strnvis.
+    
+    NetBSD added an strnvis and unfortunately made it incompatible with the
+    existing one in OpenBSD and Linux's libbsd (the former having existed
+    for over ten years). Despite this incompatibility being reported during
+    development (see http://gnats.netbsd.org/44977) they still shipped it.
+    Even more unfortunately FreeBSD and later MacOS picked up this incompatible
+    implementation.  Try to detect this mess, and assume the only safe option
+    if we're cross compiling.
     
-    This reverts commit 1598419e38afbaa8aa5df8dd6b0af98301e2c908.
+    OpenBSD 2.9 (2001): strnvis(char *dst, const char *src, size_t dlen, int flag);
+    NetBSD 6.0 (2012):  strnvis(char *dst, size_t dlen, const char *src, int flag);
     
-    Some system headers have objects named __unused
+    ok djm@
 
-commit 00797e86b2d98334d1bb808f65fa1fd47f328ff1
+commit b0b48beab1b74100b61ecbadb9140c9ab4c2ea8c
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 05:02:45 2015 +1100
+Date:   Tue Aug 2 11:06:23 2016 +1000
 
-    check for crypt and DES_crypt in openssl block
-    
-    fixes builds on systems that use DES_crypt; based on patch
-    from Roumen Petrov
+    update recommended autoconf version
 
-commit 1598419e38afbaa8aa5df8dd6b0af98301e2c908
+commit 23902e31dfd18c6d7bb41ccd73de3b5358a377da
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Mar 4 04:59:13 2015 +1100
+Date:   Tue Aug 2 10:48:04 2016 +1000
 
-    define __unused to nothing if not already defined
+    update config.guess and config.sub to current
     
-    fixes builds on BSD/OS
+    upstream commit 562f3512b3911ba0c77a7f68214881d1f241f46e
 
-commit d608a51daad4f14ad6ab43d7cf74ef4801cc3fe9
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 17:53:40 2015 +0000
+commit dd1031b78b83083615b68d7163c44f4408635be2
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Aug 2 10:01:52 2016 +1000
 
-    upstream commit
+    Replace spaces with tabs.
     
-    reorder logic for better portability; patch from Roumen
-     Petrov
+    Mechanically replace spaces with tabs in compat files not synced with
+    OpenBSD.
 
-commit 68d2dfc464fbcdf8d6387884260f9801f4352393
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Mar 3 06:48:58 2015 +0000
+commit c20dccb5614c5714f4155dda01bcdebf97cfae7e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Aug 2 09:44:25 2016 +1000
 
-    upstream commit
+    Strip trailing whitespace.
     
-    Allow "ssh -Q protocol-version" to list supported SSH
-     protocol versions. Useful for detecting builds without SSH v.1 support; idea
-     and ok markus@
+    Mechanically strip trailing whitespace on files not synced with OpenBSD
+    (or in the case of bsd-snprint.c, rsync).
 
-commit 39e2f1229562e1195169905607bc12290d21f021
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Sun Mar 1 15:44:40 2015 +0000
+commit 30f9bd1c0963c23bfba8468dfd26aa17609ba42f
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Aug 2 09:06:27 2016 +1000
 
-    upstream commit
-    
-    Make sure we only call getnameinfo() for AF_INET or AF_INET6
-     sockets. getpeername() of a Unix domain socket may return without error on
-     some systems without actually setting ss_family so getnameinfo() was getting
-     called with ss_family set to AF_UNSPEC.  OK djm@
+    Repair $OpenBSD markers.
 
-commit e47536ba9692d271b8ad89078abdecf0a1c11707
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Feb 28 08:20:11 2015 -0800
+commit 9715d4ad4b53877ec23dc8681dd7a405de9419a6
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Aug 2 09:02:42 2016 +1000
 
-    portability fixes for regress/netcat.c
-    
-    Mostly avoiding "err(1, NULL)"
+    Repair $OpenBSD marker.
+
+commit cf3e0be7f5828a5e5f6c296a607d20be2f07d60c
+Author: Tim Rice <tim@multitalents.net>
+Date:   Mon Aug 1 14:31:52 2016 -0700
+
+    modified:   configure.ac opensshd.init.in
+    Skip generating missing RSA1 key on startup unless ssh1 support is enabled.
+    Spotted by Jean-Pierre Radley
 
-commit 02973ad5f6f49d8420e50a392331432b0396c100
+commit 99522ba7ec6963a05c04a156bf20e3ba3605987c
 Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Feb 28 08:05:27 2015 -0800
+Date:   Thu Jul 28 08:54:27 2016 +1000
 
-    twiddle another test for portability
+    define _OPENBSD_SOURCE for reallocarray on NetBSD
     
-    from Tom G. Christensen
+    Report by and debugged with Hisashi T Fujinaka, dtucker nailed
+    the problem (lack of prototype causing return type confusion).
 
-commit f7f3116abf2a6e2f309ab096b08c58d19613e5d0
+commit 3e1e076550c27c6bbdddf36d8f42bd79fbaaa187
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 27 15:52:49 2015 -0800
+Date:   Wed Jul 27 08:25:42 2016 +1000
 
-    twiddle test for portability
+    KNF
 
-commit 1ad3a77cc9d5568f5437ff99d377aa7a41859b83
+commit d99ee9c4e5e217e7d05eeec84e9ce641f4675331
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 26 20:33:22 2015 -0800
+Date:   Wed Jul 27 08:25:23 2016 +1000
 
-    make regress/netcat.c fd passing (more) portable
+    Linux auditing also needs packet.h
 
-commit 9e1cfca7e1fe9cf8edb634fc894e43993e4da1ea
+commit 393bd381a45884b589baa9aed4394f1d250255ca
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 26 20:32:58 2015 -0800
+Date:   Wed Jul 27 08:18:05 2016 +1000
 
-    create OBJ/valgrind-out before running unittests
+    fix auditing on Linux
+    
+    get_remote_ipaddr() was replaced with ssh_remote_ipaddr()
 
-commit bd58853102cee739f0e115e6d4b5334332ab1442
+commit 80e766fb089de4f3c92b1600eb99e9495e37c992
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Feb 25 16:58:22 2015 -0800
+Date:   Sun Jul 24 21:50:13 2016 +1000
 
-    valgrind support
+    crank version numbers
 
-commit f43d17269194761eded9e89f17456332f4c83824
+commit b1a478792d458f2e938a302e64bab2b520edc1b3
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Feb 26 20:45:47 2015 +0000
+Date:   Sun Jul 24 11:45:36 2016 +0000
 
     upstream commit
     
-    don't printf NULL key comments; reported by Tom Christensen
+    openssh-7.3
+    
+    Upstream-ID: af106a7eb665f642648cf1993e162c899f358718
 
-commit 6e6458b476ec854db33e3e68ebf4f489d0ab3df8
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Feb 25 23:05:47 2015 +0000
+commit 353766e0881f069aeca30275ab706cd60a1a8fdd
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Sat Jul 23 16:14:42 2016 +1000
+
+    Move Cygwin IPPORT_RESERVED overrride to defines.h
+    
+    Patch from vinschen at redhat.com.
+
+commit 368dd977ae07afb93f4ecea23615128c95ab2b32
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Jul 23 02:54:08 2016 +0000
 
     upstream commit
     
-    zero cmsgbuf before use; we initialise the bits we use
-     but valgrind still spams warning on it
+    fix pledge violation with ssh -f; reported by Valentin
+    Kozamernik ok dtucker@
+    
+    Upstream-ID: a61db7988db88d9dac3c4dd70e18876a8edf84aa
 
-commit a63cfa26864b93ab6afefad0b630e5358ed8edfa
+commit f00211e3c6d24d6ea2b64b4b1209f671f6c1d42e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Feb 25 19:54:02 2015 +0000
+Date:   Fri Jul 22 07:00:46 2016 +0000
 
     upstream commit
     
-    fix small memory leak when UpdateHostkeys=no
+    improve wording; suggested by jmc@
+    
+    Upstream-ID: 55cb0a24c8e0618b3ceec80998dc82c85db2d2f8
 
-commit e6b950341dd75baa8526f1862bca39e52f5b879b
-Author: Tim Rice <tim@multitalents.net>
-Date:   Wed Feb 25 09:56:48 2015 -0800
+commit 83cbca693c3b0719270e6a0f2efe3f9ee93a65b8
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jul 22 05:46:11 2016 +0000
 
-    Revert "Work around finicky USL linker so netcat will build."
+    upstream commit
+    
+    Lower loglevel for "Authenticated with partial success"
+    message similar to other similar level.  bz#2599, patch from cgallek at
+    gmail.com, ok markus@
     
-    This reverts commit d1db656021d0cd8c001a6692f772f1de29b67c8b.
+    Upstream-ID: 3faab814e947dc7b2e292edede23e94c608cb4dd
+
+commit 10358abd087ab228b7ce2048efc4f3854a9ab9a6
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Jul 22 14:06:36 2016 +1000
+
+    retry waitpid on EINTR failure
     
-    No longer needed with commit 678e473e2af2e4802f24dd913985864d9ead7fb3
+    patch from Jakub Jelen on bz#2581; ok dtucker@
 
-commit 6f621603f9cff2a5d6016a404c96cb2f8ac2dec0
+commit da88a70a89c800e74ea8e5661ffa127a3cc79a92
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Feb 25 17:29:38 2015 +0000
+Date:   Fri Jul 22 03:47:36 2016 +0000
 
     upstream commit
     
-    don't leak validity of user in "too many authentication
-     failures" disconnect message; reported by Sebastian Reitenbach
+    constify a few functions' arguments; patch from Jakub
+    Jelen bz#2581
+    
+    Upstream-ID: f2043f51454ea37830ff6ad60c8b32b4220f448d
 
-commit 6288e3a935494df12519164f52ca5c8c65fc3ca5
-Author: naddy@openbsd.org <naddy@openbsd.org>
-Date:   Tue Feb 24 15:24:05 2015 +0000
+commit c36d91bd4ebf767f310f7cea88d61d1c15f53ddf
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 22 03:39:13 2016 +0000
 
     upstream commit
     
-    add -v (show ASCII art) to -l's synopsis; ok djm@
+    move debug("%p", key) to before key is free'd; probable
+    undefined behaviour on strict compilers; reported by Jakub Jelen bz#2581
+    
+    Upstream-ID: 767f323e1f5819508a0e35e388ec241bac2f953a
 
-commit 678e473e2af2e4802f24dd913985864d9ead7fb3
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Feb 26 04:12:58 2015 +1100
+commit 286f5a77c3bfec1e8892ca268087ac885ac871bf
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 22 03:35:11 2016 +0000
 
-    Remove dependency on xmalloc.
+    upstream commit
     
-    Remove ssh_get_progname's dependency on xmalloc, which should reduce
-    link order problems.  ok djm@
+    reverse the order in which -J/JumpHost proxies are visited to
+    be more intuitive and document
+    
+    reported by and manpage bits naddy@
+    
+    Upstream-ID: 3a68fd6a841fd6cf8cedf6552a9607ba99df179a
 
-commit 5d5ec165c5b614b03678afdad881f10e25832e46
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Feb 25 15:32:49 2015 +1100
+commit fcd135c9df440bcd2d5870405ad3311743d78d97
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Jul 21 01:39:35 2016 +0000
 
-    Restrict ECDSA and ECDH tests.
+    upstream commit
+    
+    Skip passwords longer than 1k in length so clients can't
+    easily DoS sshd by sending very long passwords, causing it to spend CPU
+    hashing them. feedback djm@, ok markus@.
     
-    ifdef out some more ECDSA and ECDH tests when built against an OpenSSL
-    that does not have eliptic curve functionality.
+    Brought to our attention by tomas.kuthan at oracle.com, shilei-c at
+    360.cn and coredump at autistici.org
+    
+    Upstream-ID: d0af7d4a2190b63ba1d38eec502bc4be0be9e333
 
-commit 1734e276d99b17e92d4233fac7aef3a3180aaca7
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Feb 25 13:40:45 2015 +1100
+commit 324583e8fb3935690be58790425793df619c6d4d
+Author: naddy@openbsd.org <naddy@openbsd.org>
+Date:   Wed Jul 20 10:45:27 2016 +0000
 
-    Move definition of _NSIG.
+    upstream commit
     
-    _NSIG is only unsed in one file, so move it there prevent redefinition
-    warnings reported by Kevin Brott.
+    Do not clobber the global jump_host variables when
+    parsing an inactive configuration.  ok djm@
+    
+    Upstream-ID: 5362210944d91417d5976346d41ac0b244350d31
 
-commit a47ead7c95cfbeb72721066c4da2312e5b1b9f3d
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Feb 25 13:17:40 2015 +1100
+commit 32d921c323b989d28405e78d0a8923d12913d737
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Tue Jul 19 12:59:16 2016 +0000
 
-    Add includes.h for compatibility stuff.
+    upstream commit
+    
+    tweak previous;
+    
+    Upstream-ID: f3c1a5b3f05dff366f60c028728a2b43f15ff534
 
-commit 38806bda6d2e48ad32812b461eebe17672ada771
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 16:50:06 2015 -0800
+commit d7eabc86fa049a12ba2c3fb198bd1d51b37f7025
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Jul 19 11:38:53 2016 +0000
 
-    include netdb.h to look for MAXHOSTNAMELEN; ok tim
+    upstream commit
+    
+    Allow wildcard for PermitOpen hosts as well as ports.
+    bz#2582, patch from openssh at mzpqnxow.com and jjelen at redhat.com.  ok
+    markus@
+    
+    Upstream-ID: af0294e9b9394c4e16e991424ca0a47a7cc605f2
 
-commit d1db656021d0cd8c001a6692f772f1de29b67c8b
-Author: Tim Rice <tim@multitalents.net>
-Date:   Tue Feb 24 10:42:08 2015 -0800
+commit b98a2a8348e907b3d71caafd80f0be8fdd075943
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Mon Jul 18 11:35:33 2016 +0000
 
-    Work around finicky USL linker so netcat will build.
+    upstream commit
+    
+    Reduce timing attack against obsolete CBC modes by always
+    computing the MAC over a fixed size of data. Reported by Jean Paul
+    Degabriele, Kenny Paterson, Torben Hansen and Martin Albrecht. ok djm@
+    
+    Upstream-ID: f20a13279b00ba0afbacbcc1f04e62e9d41c2912
 
-commit cb030ce25f555737e8ba97bdd7883ac43f3ff2a3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 09:23:04 2015 -0800
+commit dbf788b4d9d9490a5fff08a7b09888272bb10fcc
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Jul 21 14:17:31 2016 +1000
 
-    include includes.h to avoid build failure on AIX
+    Search users for one with a valid salt.
+    
+    If the root account is locked (eg password "!!" or "*LK*") keep looking
+    until we find a user with a valid salt to use for crypting passwords of
+    invalid users.  ok djm@
 
-commit 13af342458f5064144abbb07e5ac9bbd4eb42567
-Author: Tim Rice <tim@multitalents.net>
-Date:   Tue Feb 24 07:56:47 2015 -0800
+commit e8b58f48fbb1b524fb4f0d4865fa0005d6a4b782
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jul 18 17:22:49 2016 +1000
 
-    Original portability patch from djm@ for platforms missing err.h.
-    Fix name space clash on Solaris 10. Still more to do for Solaris 10
-    to deal with msghdr structure differences. ok djm@
+    Explicitly specify source files for regress tools.
+    
+    Since adding $(REGRESSLIBS), $? is wrong because it includes only the
+    changed source files.  $< seems like it'd be right however it doesn't
+    seem to work on some non-GNU makes, so do what works everywhere.
 
-commit 910209203d0cd60c5083901cbcc0b7b44d9f48d2
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Feb 23 22:06:56 2015 -0800
+commit eac1bbd06872c273f16ac0f9976b0aef026b701b
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jul 18 17:12:22 2016 +1000
 
-    cleaner way fix dispatch.h portion of commit
-    a88dd1da119052870bb2654c1a32c51971eade16
-    (some systems have sig_atomic_t in signal.h, some in sys/signal.h)
-    Sounds good to me djm@
+    Conditionally include err.h.
 
-commit 676c38d7cbe65b76bbfff796861bb6615cc6a596
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Feb 23 21:51:33 2015 -0800
+commit 0a454147568746c503f669e1ba861f76a2e7a585
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jul 18 16:26:26 2016 +1000
 
-    portability fix: if we can't dind a better define for HOST_NAME_MAX, use 255
+    Remove local implementation of err, errx.
+    
+    We now have a shared implementation in libopenbsd-compat.
 
-commit 1221b22023dce38cbc90ba77eae4c5d78c77a5e6
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Feb 23 21:50:34 2015 -0800
+commit eb999a4590846ba4d56ddc90bd07c23abfbab7b1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jul 18 06:08:01 2016 +0000
+
+    upstream commit
+    
+    Add some unsigned overflow checks for extra_pad. None of
+    these are reachable with the amount of padding that we use internally.
+    bz#2566, pointed out by Torben Hansen. ok markus@
+    
+    Upstream-ID: 4d4be8450ab2fc1b852d5884339f8e8c31c3fd76
 
-    portablity fix: s/__inline__/inline/
+commit c71ba790c304545464bb494de974cdf0f4b5cf1e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jul 18 15:43:25 2016 +1000
+
+    Add dependency on libs for unit tests.
+    
+    Makes "./configure && make tests" work again.  ok djm@
 
-commit 4c356308a88d309c796325bb75dce90ca16591d5
+commit 8199d0311aea3e6fd0284c9025e7a83f4ece79e8
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 13:49:31 2015 +1100
+Date:   Mon Jul 18 13:47:39 2016 +1000
 
-    Wrap stdint.h includes in HAVE_STDINT_H.
+    Correct location for kexfuzz in clean target.
 
-commit c9c88355c6a27a908e7d1e5003a2b35ea99c1614
+commit 01558b7b07af43da774d3a11a5c51fa9c310849d
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 13:43:57 2015 +1100
+Date:   Mon Jul 18 09:33:25 2016 +1000
 
-    Add AI_NUMERICSERV to fake-rfc2553.
+    Handle PAM_MAXTRIES from modules.
+    
+    bz#2249: handle the case where PAM returns PAM_MAXTRIES by ceasing to offer
+    password and keyboard-interative authentication methods.  Should prevent
+    "sshd ignoring max retries" warnings in the log.  ok djm@
     
-    Our getaddrinfo implementation always returns numeric values already.
+    It probably won't trigger with keyboard-interactive in the default
+    configuration because the retry counter is stored in module-private
+    storage which goes away with the sshd PAM process (see bz#688).  On the
+    other hand, those cases probably won't log a warning either.
 
-commit ef342ab1ce6fb9a4b30186c89c309d0ae9d0eeb4
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 13:39:57 2015 +1100
+commit 65c6c6b567ab5ab12945a5ad8e0ab3a8c26119cc
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Jul 17 04:20:16 2016 +0000
 
-    Include OpenSSL's objects.h before bn.h.
+    upstream commit
+    
+    support UTF-8 characters in ssh(1) banners using
+    schwarze@'s safe fmprintf printer; bz#2058
     
-    Prevents compile errors on some platforms (at least old GCCs and AIX's
-    XLC compilers).
+    feedback schwarze@ ok dtucker@
+    
+    Upstream-ID: a72ce4e3644c957643c9524eea2959e41b91eea7
 
-commit dcc8997d116f615195aa7c9ec019fb36c28c6228
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Feb 24 12:30:59 2015 +1100
+commit e4eb7d910976fbfc7ce3e90c95c11b07b483d0d7
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Sat Jul 16 06:57:55 2016 +0000
 
-    Convert two macros into functions.
+    upstream commit
     
-    Convert packet_send_debug and packet_disconnect from macros to
-    functions.  Some older GCCs (2.7.x, 2.95.x) see to have problems with
-    variadic macros with only one argument so we convert these two into
-    functions.  ok djm@
+    - add proxyjump to the options list - formatting fixes -
+    update usage()
+    
+    ok djm
+    
+    Upstream-ID: 43d318e14ce677a2eec8f21ef5ba2f9f68a59457
 
-commit 2285c30d51b7e2052c6526445abe7e7cc7e170a1
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 22:21:21 2015 +0000
+commit af1f084857621f14bd9391aba8033d35886c2455
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jul 15 05:01:58 2016 +0000
 
     upstream commit
     
-    further silence spurious error message even when -v is
-     specified (e.g. to get visual host keys); reported by naddy@
+    Reduce the syslog level of some relatively common protocol
+    events from LOG_CRIT by replacing fatal() calls with logdie().  Part of
+    bz#2585, ok djm@
+    
+    Upstream-ID: 9005805227c94edf6ac02a160f0e199638d288e5
 
-commit 9af21979c00652029e160295e988dea40758ece2
+commit bd5f2b78b69cf38d6049a0de445a79c8595e4a1f
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 09:04:32 2015 +1100
+Date:   Fri Jul 15 19:14:48 2016 +1000
 
-    don't include stdint.h unless HAVE_STDINT_H set
+    missing openssl/dh.h
 
-commit 62f678dd51660d6f8aee1da33d3222c5de10a89e
+commit 4a984fd342effe5f0aad874a0d538c4322d973c0
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 09:02:54 2015 +1100
+Date:   Fri Jul 15 18:47:07 2016 +1000
+
+    cast to avoid type warning in error message
+
+commit 5abfb15ced985c340359ae7fb65a625ed3692b3e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jul 15 14:48:30 2016 +1000
 
-    nother sys/queue.h -> sys-queue.h fix
+    Move VA_COPY macro into compat header.
     
-    spotted by Tom Christensen
+    Some AIX compilers unconditionally undefine va_copy but don't set it back
+    to an internal function, causing link errors.  In some compat code we
+    already use VA_COPY instead so move the two existing instances into the
+    shared header and use for sshbuf-getput-basic.c too.  Should fix building
+    with at lease some versions of AIX's compiler.  bz#2589, ok djm@
 
-commit b3c19151cba2c0ed01b27f55de0d723ad07ca98f
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 20:32:15 2015 +0000
+commit 832b7443b7a8e181c95898bc5d73497b7190decd
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Jul 15 14:45:34 2016 +1000
 
-    upstream commit
+    disable ciphers not supported by OpenSSL
     
-    fix a race condition by using a mux socket rather than an
-     ineffectual wait statement
+    bz#2466 ok dtucker@
 
-commit a88dd1da119052870bb2654c1a32c51971eade16
+commit 5fbe93fc6fbb2fe211e035703dec759d095e3dd8
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 24 06:30:29 2015 +1100
+Date:   Fri Jul 15 13:54:31 2016 +1000
 
-    various include fixes for portable
+    add a --disable-pkcs11 knob
 
-commit 5248429b5ec524d0a65507cff0cdd6e0cb99effd
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 16:55:51 2015 +0000
+commit 679ce88ec2a8e2fe6515261c489e8c1449bb9da9
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Jul 15 13:44:38 2016 +1000
 
-    upstream commit
+    fix newline escaping for unsupported_algorithms
     
-    add an XXX to remind me to improve sshkey_load_public
+    The hmac-ripemd160 was incorrect and could lead to broken
+    Makefiles on systems that lacked support for it, but I made
+    all the others consistent too.
 
-commit e94e4b07ef2eaead38b085a60535df9981cdbcdb
+commit ed877ef653847d056bb433975d731b7a1132a979
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 16:55:31 2015 +0000
+Date:   Fri Jul 15 00:24:30 2016 +0000
 
     upstream commit
     
-    silence a spurious error message when listing
-     fingerprints for known_hosts; bz#2342
+    Add a ProxyJump ssh_config(5) option and corresponding -J
+    ssh(1) command-line flag to allow simplified indirection through a SSH
+    bastion or "jump host".
+    
+    These options construct a proxy command that connects to the
+    specified jump host(s) (more than one may be specified) and uses
+    port-forwarding to establish a connection to the next destination.
+    
+    This codifies the safest way of indirecting connections through SSH
+    servers and makes it easy to use.
+    
+    ok markus@
+    
+    Upstream-ID: fa899cb8b26d889da8f142eb9774c1ea36b04397
 
-commit f2293a65392b54ac721f66bc0b44462e8d1d81f8
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 23 16:33:25 2015 +0000
+commit 5c02dd126206a26785379e80f2d3848e4470b711
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jul 15 12:56:39 2016 +1000
 
-    upstream commit
+    Map umac_ctx struct name too.
     
-    fix setting/clearing of TTY raw mode around
-     UpdateHostKeys=ask confirmation question; reported by Herb Goldman
+    Prevents size mismatch linker warnings on Solaris 11.
 
-commit f2004cd1adf34492eae0a44b1ef84e0e31b06088
+commit 283b97ff33ea2c641161950849931bd578de6946
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Feb 23 05:04:21 2015 +1100
+Date:   Fri Jul 15 13:49:44 2016 +1000
 
-    Repair for non-ECC OpenSSL.
+    Mitigate timing of disallowed users PAM logins.
+    
+    When sshd decides to not allow a login (eg PermitRootLogin=no) and
+    it's using PAM, it sends a fake password to PAM so that the timing for
+    the failure is not noticeably different whether or not the password
+    is correct.  This behaviour can be detected by sending a very long
+    password string which is slower to hash than the fake password.
     
-    Ifdef out the ECC parts when building with an OpenSSL that doesn't have
-    it.
+    Mitigate by constructing an invalid password that is the same length
+    as the one from the client and thus takes the same time to hash.
+    Diff from djm@
 
-commit 37f9220db8d1a52c75894c3de1e5f2ae5bd71b6f
+commit 9286875a73b2de7736b5e50692739d314cd8d9dc
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Feb 23 03:07:24 2015 +1100
+Date:   Fri Jul 15 13:32:45 2016 +1000
 
-    Wrap stdint.h includes in ifdefs.
+    Determine appropriate salt for invalid users.
+    
+    When sshd is processing a non-PAM login for a non-existent user it uses
+    the string from the fakepw structure as the salt for crypt(3)ing the
+    password supplied by the client.  That string has a Blowfish prefix, so on
+    systems that don't understand that crypt will fail fast due to an invalid
+    salt, and even on those that do it may have significantly different timing
+    from the hash methods used for real accounts (eg sha512).  This allows
+    user enumeration by, eg, sending large password strings.  This was noted
+    by EddieEzra.Harari at verint.com (CVE-2016-6210).
+    
+    To mitigate, use the same hash algorithm that root uses for hashing
+    passwords for users that do not exist on the system.  ok djm@
 
-commit f81f1bbc5b892c8614ea740b1f92735652eb43f0
-Author: Tim Rice <tim@multitalents.net>
-Date:   Sat Feb 21 18:12:10 2015 -0800
+commit a162dd5e58ca5b224d7500abe35e1ef32b5de071
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Jul 14 21:19:59 2016 +1000
 
-    out of tree build fix
+    OpenSSL 1.1.x not currently supported.
 
-commit 2e13a1e4d22f3b503c3bfc878562cc7386a1d1ae
-Author: Tim Rice <tim@multitalents.net>
-Date:   Sat Feb 21 18:08:51 2015 -0800
+commit 7df91b01fc558a33941c5c5f31abbcdc53a729fb
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Jul 14 12:25:24 2016 +1000
 
-    mkdir kex unit test directory so testing out of tree builds works
+    Check for VIS_ALL.
+    
+    If we don't have it, set BROKEN_STRNVIS to activate the compat replacement.
 
-commit 1797f49b1ba31e8700231cd6b1d512d80bb50d2c
-Author: halex@openbsd.org <halex@openbsd.org>
-Date:   Sat Feb 21 21:46:57 2015 +0000
+commit ee67716f61f1042d5e67f91c23707cca5dcdd7d0
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Jul 14 01:24:21 2016 +0000
 
     upstream commit
     
-    make "ssh-add -d" properly remove a corresponding
-     certificate, and also not whine and fail if there is none
+    Correct equal in test.
     
-    ok djm@
+    Upstream-Regress-ID: 4e32f7a5c57a619c4e8766cb193be2a1327ec37a
 
-commit 7faaa32da83a609059d95dbfcb0649fdb04caaf6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Feb 22 07:57:27 2015 +1100
+commit 372807c2065c8572fdc6478b25cc5ac363743073
+Author: tb@openbsd.org <tb@openbsd.org>
+Date:   Mon Jul 11 21:38:13 2016 +0000
 
-    mkdir hostkey and bitmap unit test directories
+    upstream commit
+    
+    Add missing "recvfd" pledge promise: Raf Czlonka reported
+    ssh coredumps when Control* keywords were set in ssh_config. This patch also
+    fixes similar problems with scp and sftp.
+    
+    ok deraadt, looks good to millert
+    
+    Upstream-ID: ca2099eade1ef3e87a79614fefa26a0297ad8a3b
 
-commit bd49da2ef197efac5e38f5399263a8b47990c538
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Feb 20 23:46:01 2015 +0000
+commit e0453f3df64bf485c61c7eb6bd12893eee9fe2cd
+Author: tedu@openbsd.org <tedu@openbsd.org>
+Date:   Mon Jul 11 03:19:44 2016 +0000
 
     upstream commit
     
-    sort options useable under Match case-insensitively; prodded
-     jmc@
+    obsolete note about fascistloggin is obsolete. ok djm
+    dtucker
+    
+    Upstream-ID: dae60df23b2bb0e89f42661ddd96a7b0d1b7215a
 
-commit 1a779a0dd6cd8b4a1a40ea33b5415ab8408128ac
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Feb 21 20:51:02 2015 +0000
+commit a2333584170a565adf4f209586772ef8053b10b8
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Jul 14 10:59:09 2016 +1000
 
-    upstream commit
+    Add compat code for missing wcwidth.
     
-    correct paths to configuration files being written/updated;
-     they live in $OBJ not cwd; some by Roumen Petrov
+    If we don't have wcwidth force fallback implementations of nl_langinfo
+    and mbtowc.  Based on advice from Ingo Schwarze.
+
+commit 8aaec7050614494014c47510b7e94daf6e644c62
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jul 14 09:48:48 2016 +1000
+
+    fix missing include for systems with err.h
 
-commit 28ba006c1acddff992ae946d0bc0b500b531ba6b
+commit 6310ef27a2567cda66d6cf0c1ad290ee1167f243
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Feb 21 15:41:07 2015 +1100
+Date:   Wed Jul 13 14:42:35 2016 +1000
 
-    More correct checking of HAVE_DECL_AI_NUMERICSERV.
+    Move err.h replacements into compat lib.
+    
+    Move implementations of err.h replacement functions into their own file
+    in the libopenbsd-compat so we can use them in kexfuzz.c too.  ok djm@
 
-commit e50e8c97a9cecae1f28febccaa6ca5ab3bc10f54
+commit f3f2cc8386868f51440c45210098f65f9787449a
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Feb 21 15:10:33 2015 +1100
+Date:   Mon Jul 11 17:23:38 2016 +1000
 
-    Add null declaration of AI_NUMERICINFO.
+    Check for wchar.h and langinfo.h
     
-    Some platforms (older FreeBSD and DragonFly versions) do have
-    getaddrinfo() but do not have AI_NUMERICINFO. so define it to zero
-    in those cases.
+    Wrap includes in the appropriate #ifdefs.
 
-commit 18a208d6a460d707a45916db63a571e805f5db46
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Feb 20 22:40:32 2015 +0000
+commit b9c50614eba9d90939b2b119b6e1b7e03b462278
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Jul 8 13:59:13 2016 +1000
 
-    upstream commit
+    whitelist more architectures for seccomp-bpf
     
-    more options that are available under Match; bz#2353 reported
-     by calestyo AT scientia.net
+    bz#2590 - testing and patch from Jakub Jelen
 
-commit 44732de06884238049f285f1455b2181baa7dc82
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Feb 20 22:17:21 2015 +0000
+commit 18813a32b6fd964037e0f5e1893cb4468ac6a758
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Mon Jul 4 18:01:44 2016 +0000
 
     upstream commit
     
-    UpdateHostKeys fixes:
+    DEBUGLIBS has been broken since the gcc4 switch, so delete
+    it.  CFLAGS contains -g by default anyway
     
-    I accidentally changed the format of the hostkeys@openssh.com messages
-    last week without changing the extension name, and this has been causing
-    connection failures for people who are running -current. First reported
-    by sthen@
+    problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com)
+    ok millert@ kettenis@ deraadt@
     
-    s/hostkeys@openssh.com/hostkeys-00@openssh.com/
-    Change the name of the proof message too, and reorder it a little.
-    
-    Also, UpdateHostKeys=ask is incompatible with ControlPersist (no TTY
-    available to read the response) so disable UpdateHostKeys if it is in
-    ask mode and ControlPersist is active (and document this)
+    Upstream-Regress-ID: 4a0bb72f95c63f2ae9daa8a040ac23914bddb542
 
-commit 13a39414d25646f93e6d355521d832a03aaaffe2
+commit 6d31193d0baa3da339c196ac49625b7ba1c2ecc7
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Feb 17 00:14:05 2015 +0000
+Date:   Fri Jul 8 03:44:42 2016 +0000
 
     upstream commit
     
-    Regression: I broke logging of public key fingerprints in
-     1.46. Pointed out by Pontus Lundkvist
+    Improve crypto ordering for Encrypt-then-MAC (EtM) mode
+    MAC algorithms.
+    
+    Previously we were computing the MAC, decrypting the packet and then
+    checking the MAC. This gave rise to the possibility of creating a
+    side-channel oracle in the decryption step, though no such oracle has
+    been identified.
+    
+    This adds a mac_check() function that computes and checks the MAC in
+    one pass, and uses it to advance MAC checking for EtM algorithms to
+    before payload decryption.
+    
+    Reported by Jean Paul Degabriele, Kenny Paterson, Torben Hansen and
+    Martin Albrecht. feedback and ok markus@
+    
+    Upstream-ID: 1999bb67cab47dda5b10b80d8155fe83d4a1867b
 
-commit 773dda25e828c4c9a52f7bdce6e1e5924157beab
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 30 23:10:17 2015 +1100
+commit 71f5598f06941f645a451948c4a5125c83828e1c
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Mon Jul 4 18:01:44 2016 +0000
 
-    repair --without-openssl; broken in refactor
+    upstream commit
+    
+    DEBUGLIBS has been broken since the gcc4 switch, so
+    delete it.  CFLAGS contains -g by default anyway
+    
+    problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com)
+    ok millert@ kettenis@ deraadt@
+    
+    Upstream-ID: 96c5054e3e1f170c6276902d5bc65bb3b87a2603
 
-commit e89c780886b23600de1e1c8d74aabd1ff61f43f0
-Author: Damien Miller <djm@google.com>
-Date:   Tue Feb 17 10:04:55 2015 +1100
+commit e683fc6f1c8c7295648dbda679df8307786ec1ce
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Jun 30 05:17:05 2016 +0000
 
-    hook up hostkeys unittest to portable Makefiles
+    upstream commit
+    
+    Explicitly check for 100% completion to avoid potential
+    floating point rounding error, which could cause progressmeter to report 99%
+    on completion. While there invert the test so the 100% case is clearer.  with
+    & ok djm@
+    
+    Upstream-ID: a166870c5878e422f3c71ff802e2ccd7032f715d
 
-commit 0abf41f99aa16ff09b263bead242d6cb2dbbcf99
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 16 22:21:03 2015 +0000
+commit 772e6cec0ed740fc7db618dc30b4134f5a358b43
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Wed Jun 29 17:14:28 2016 +0000
 
     upstream commit
     
-    enable hostkeys unit tests
+    sort the -o list;
+    
+    Upstream-ID: 1a97465ede8790b4d47cb618269978e07f41f8ac
 
-commit 68a5d647ccf0fb6782b2f749433a1eee5bc9044b
+commit 46ecd19e554ccca15a7309cd1b6b44bc8e6b84af
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 16 22:20:50 2015 +0000
+Date:   Thu Jun 23 05:17:51 2016 +0000
 
     upstream commit
     
-    check string/memory compare arguments aren't NULL
+    fix AuthenticationMethods during configuration re-parse;
+    reported by Juan Francisco Cantero Hurtado
+    
+    Upstream-ID: 8ffa1dac25c7577eca8238e825317ab20848f9b4
 
-commit ef575ef20d09f20722e26b45dab80b3620469687
+commit 3147e7595d0f2f842a666c844ac53e6c7a253d7e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 16 22:18:34 2015 +0000
+Date:   Sun Jun 19 07:48:02 2016 +0000
 
     upstream commit
     
-    unit tests for hostfile.c code, just hostkeys_foreach so
-     far
+    revert 1.34; causes problems loading public keys
+    
+    reported by semarie@
+    
+    Upstream-ID: b393794f8935c8b15d98a407fe7721c62d2ed179
 
-commit 8ea3365e6aa2759ccf5c76eaea62cbc8a280b0e7
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Sat Feb 14 12:43:16 2015 +0000
+commit ad23a75509f4320d43f628c50f0817e3ad12bfa7
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Jun 17 06:33:30 2016 +0000
 
     upstream commit
     
-    test server rekey limit
+    grammar fix;
+    
+    Upstream-ID: 5d5b21c80f1e81db367333ce0bb3e5874fb3e463
 
-commit ce63c4b063c39b2b22d4ada449c9e3fbde788cb3
+commit 5e28b1a2a3757548b40018cc2493540a17c82e27
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 16 22:30:03 2015 +0000
+Date:   Fri Jun 17 05:06:23 2016 +0000
 
     upstream commit
     
-    partial backout of:
-    
-    revision 1.441
-    date: 2015/01/31 20:30:05;  author: djm;  state: Exp;  lines: +17 -10;  commitid
-    : x8klYPZMJSrVlt3O;
-    Let sshd load public host keys even when private keys are missing.
-    Allows sshd to advertise additional keys for future key rotation.
-    Also log fingerprint of hostkeys loaded; ok markus@
+    translate OpenSSL error codes to something more
+    meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@
     
-    hostkey updates now require access to the private key, so we can't
-    load public keys only. The improved log messages (fingerprints of keys
-    loaded) are kept.
+    Upstream-ID: 4cb0795a366381724314e6515d57790c5930ffe5
 
-commit 523463a3a2a9bfc6cfc5afa01bae9147f76a37cc
+commit b64faeb5eda7eff8210c754d00464f9fe9d23de5
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 16 22:13:32 2015 +0000
+Date:   Fri Jun 17 05:03:40 2016 +0000
 
     upstream commit
     
-    Revise hostkeys@openssh.com hostkey learning extension.
+    ban AuthenticationMethods="" and accept
+    AuthenticationMethods=any for the default behaviour of not requiring multiple
+    authentication
     
-    The client will not ask the server to prove ownership of the private
-    halves of any hitherto-unseen hostkeys it offers to the client.
+    bz#2398 from Jakub Jelen; ok dtucker@
     
-    Allow UpdateHostKeys option to take an 'ask' argument to let the
-    user manually review keys offered.
-    
-    ok markus@
+    Upstream-ID: fabd7f44d59e4518d241d0d01e226435cc23cf27
 
-commit 6c5c949782d86a6e7d58006599c7685bfcd01685
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 16 22:08:57 2015 +0000
+commit 9816fc5daee5ca924dd5c4781825afbaab728877
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Jun 16 11:00:17 2016 +0000
 
     upstream commit
     
-    Refactor hostkeys_foreach() and dependent code Deal with
-     IP addresses (i.e. CheckHostIP) Don't clobber known_hosts when nothing
-     changed ok markus@ as part of larger commit
+    Include stdarg.h for va_copy as per man page.
+    
+    Upstream-ID: 105d6b2f1af2fbd9d91c893c436ab121434470bd
 
-commit 51b082ccbe633dc970df1d1f4c9c0497115fe721
-Author: miod@openbsd.org <miod@openbsd.org>
-Date:   Mon Feb 16 18:26:26 2015 +0000
+commit b6cf84b51bc0f5889db48bf29a0c771954ade283
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Thu Jun 16 06:10:45 2016 +0000
 
     upstream commit
     
-    Declare ge25519_base as extern, to prevent it from
-     becoming a common. Gets us rid of ``lignment 4 of symbol
-     `crypto_sign_ed25519_ref_ge25519_base' in mod_ge25519.o is smaller than 16 in
-     mod_ed25519.o'' warnings at link time.
+    keys stored in openssh format can have comments too; diff
+    from yonas yanfa, tweaked a bit;
+    
+    ok djm
+    
+    Upstream-ID: 03d48536da6e51510d73ade6fcd44ace731ceb27
 
-commit 02db468bf7e3281a8e3c058ced571b38b6407c34
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Fri Feb 13 18:57:00 2015 +0000
+commit aa37768f17d01974b6bfa481e5e83841b6c76f86
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jun 20 15:55:34 2016 +1000
 
-    upstream commit
+    get_remote_name_or_ip inside LOGIN_NEEDS_UTMPX
     
-    make rekey_limit for sshd w/privsep work; ok djm@
-     dtucker@
+    Apply the same get_remote_name_or_ip -> session_get_remote_name_or_ip
+    change as commit 95767262 to the code inside #ifdef LOGIN_NEEDS_UTMPX.
+    Fixes build on AIX.
 
-commit 8ec67d505bd23c8bf9e17b7a364b563a07a58ec8
-Author: dtucker@openbsd.org <dtucker@openbsd.org>
-Date:   Thu Feb 12 20:34:19 2015 +0000
+commit 009891afc8df37bc2101e15d1e0b6433cfb90549
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jun 17 14:34:09 2016 +1000
 
-    upstream commit
-    
-    Prevent sshd spamming syslog with
-     "ssh_dispatch_run_fatal: disconnected". ok markus@
+    Remove duplicate code from PAM.  ok djm@
 
-commit d4c0295d1afc342057ba358237acad6be8af480b
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Feb 11 01:20:38 2015 +0000
+commit e690fe85750e93fca1fb7c7c8587d4130a4f7aba
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jun 15 00:40:40 2016 +0000
 
     upstream commit
     
-    Some packet error messages show the address of the peer,
-     but might be generated after the socket to the peer has suffered a TCP reset.
-     In these cases, getpeername() won't work so cache the address earlier.
+    Remove "POSSIBLE BREAK-IN ATTEMPT!" from log message
+    about forward and reverse DNS not matching.  We haven't supported IP-based
+    auth methods for a very long time so it's now misleading.  part of bz#2585,
+    ok markus@
     
-    spotted in the wild via deraadt@ and tedu@
+    Upstream-ID: 5565ef0ee0599b27f0bd1d3bb1f8a323d8274e29
 
-commit 4af1709cf774475ce5d1bc3ddcc165f6c222897d
-Author: jsg@openbsd.org <jsg@openbsd.org>
-Date:   Mon Feb 9 23:22:37 2015 +0000
+commit 57b4ee04cad0d3e0fec1194753b0c4d31e39a1cd
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Jun 15 11:22:38 2016 +1000
 
-    upstream commit
+    Move platform_disable_tracing into its own file.
     
-    fix some leaks in error paths ok markus@
+    Prevents link errors resolving the extern "options" when platform.o
+    gets linked into ssh-agent when building --with-pam.
 
-commit fd36834871d06a03e1ff8d69e41992efa1bbf85f
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Fri Feb 6 23:21:59 2015 +0000
+commit 78dc8e3724e30ee3e1983ce013e80277dc6ca070
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Jun 14 13:55:12 2016 +1000
 
-    upstream commit
+    Track skipped upstream commit IDs.
     
-    SIZE_MAX is standard, we should be using it in preference to
-     the obsolete SIZE_T_MAX.  OK miod@ beck@
-
-commit 1910a286d7771eab84c0b047f31c0a17505236fa
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Thu Feb 5 12:59:57 2015 +0000
-
-    upstream commit
+    There are a small number of "upstream" commits that do not correspond to
+    a file in -portable.  This file tracks those so that we can reconcile
+    OpenBSD and Portable to ensure that no commits are accidentally missed.
+    
+    If you add something to .skipped-commit-ids please also add an upstream
+    ID line in the following format when you commit it.
     
-    Include stdint.h, not limits.h to get SIZE_MAX.  OK guenther@
+        Upstream-ID: 321065a95a7ccebdd5fd08482a1e19afbf524e35
+        Upstream-ID: d4f699a421504df35254cf1c6f1a7c304fb907ca
+        Upstream-ID: aafe246655b53b52bc32c8a24002bc262f4230f7
+        Upstream-ID: 8fa9cd1dee3c3339ae329cf20fb591db6d605120
+        Upstream-ID: f31327a48dd4103333cc53315ec53fe65ed8a17a
+        Upstream-ID: edbfde98c40007b7752a4ac106095e060c25c1ef
+        Upstream-ID: 052fd565e3ff2d8cec3bc957d1788f50c827f8e2
+        Upstream-ID: 7cf73737f357492776223da1c09179fa6ba74660
+        Upstream-ID: 180d84674be1344e45a63990d60349988187c1ae
+        Upstream-ID: f6ae971186ba68d066cd102e57d5b0b2c211a5ee
 
-commit ce4f59b2405845584f45e0b3214760eb0008c06c
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Tue Feb 3 08:07:20 2015 +0000
+commit 9f919d1a3219d476d6a662d18df058e1c4f36a6f
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Jun 14 13:51:01 2016 +1000
 
-    upstream commit
-    
-    missing ; djm and mlarkin really having great
-     interactions recently
+    Remove now-defunct .cvsignore files. ok djm
 
-commit 5d34aa94938abb12b877a25be51862757f25d54b
-Author: halex@openbsd.org <halex@openbsd.org>
-Date:   Tue Feb 3 00:34:14 2015 +0000
+commit 68777faf271efb2713960605c748f6c8a4b26d55
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jun 8 02:13:01 2016 +0000
 
     upstream commit
     
-    slightly extend the passphrase prompt if running with -c
-     in order to give the user a chance to notice if unintentionally running
-     without it
+    Back out rev 1.28 "Check min and max sizes sent by the
+    client" change. It caused "key_verify failed for server_host_key" in clients
+    that send a DH-GEX min value less that DH_GRP_MIN, eg old OpenSSH and PuTTY.
+    ok djm@
     
-    wording tweak and ok djm@
+    Upstream-ID: 452979d3ca5c1e9dff063287ea0a5314dd091f65
 
-commit cb3bde373e80902c7d5d0db429f85068d19b2918
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 2 22:48:53 2015 +0000
+commit a86ec4d0737ac5879223e7cd9d68c448df46e169
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Jun 14 10:48:27 2016 +1000
 
-    upstream commit
+    Use Solaris setpflags(__PROC_PROTECT, ...).
     
-    handle PKCS#11 C_Login returning
-     CKR_USER_ALREADY_LOGGED_IN; based on patch from Yuri Samoilenko; ok markus@
+    Where possible, use Solaris setpflags to disable process tracing on
+    ssh-agent and sftp-server.  bz#2584, based on a patch from huieying.lee
+    at oracle.com, ok djm.
 
-commit 15ad750e5ec3cc69765b7eba1ce90060e7083399
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Feb 2 07:41:40 2015 +0000
+commit 0f916d39b039fdc0b5baf9b5ab0754c0f11ec573
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Jun 14 10:43:53 2016 +1000
 
-    upstream commit
-    
-    turn UpdateHostkeys off by default until I figure out
-     mlarkin@'s warning message; requested by deraadt@
+    Shorten prctl code a tiny bit.
 
-commit 3cd5103c1e1aaa59bd66f7f52f6ebbcd5deb12f9
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Mon Feb 2 01:57:44 2015 +0000
+commit 0fb7f5985351fbbcd2613d8485482c538e5123be
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Jun 9 16:23:07 2016 +1000
 
-    upstream commit
+    Move prctl PR_SET_DUMPABLE into platform.c.
     
-    increasing encounters with difficult DNS setups in
-     darknets has convinced me UseDNS off by default is better ok djm
+    This should make it easier to add additional platform support such as
+    Solaris (bz#2584).
 
-commit 6049a548a8a68ff0bbe581ab1748ea6a59ecdc38
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Jan 31 20:30:05 2015 +0000
+commit e6508898c3cd838324ecfe1abd0eb8cf802e7106
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jun 3 04:10:41 2016 +0000
 
     upstream commit
     
-    Let sshd load public host keys even when private keys are
-     missing. Allows sshd to advertise additional keys for future key rotation.
-     Also log fingerprint of hostkeys loaded; ok markus@
+    Add a test for ssh(1)'s config file parsing.
+    
+    Upstream-Regress-ID: 558b7f4dc45cc3761cc3d3e889b9f3c5bc91e601
 
-commit 46347ed5968f582661e8a70a45f448e0179ca0ab
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 30 11:43:14 2015 +0000
+commit ab0a536066dfa32def0bd7272c096ebb5eb25b11
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jun 3 03:47:59 2016 +0000
 
     upstream commit
     
-    Add a ssh_config HostbasedKeyType option to control which
-     host public key types are tried during hostbased authentication.
+    Add 'sshd' to the test ID as I'm about to add a similar
+     set for ssh.
     
-    This may be used to prevent too many keys being sent to the server,
-    and blowing past its MaxAuthTries limit.
-    
-    bz#2211 based on patch by Iain Morgan; ok markus@
+    Upstream-Regress-ID: aea7a9c3bac638530165c801ce836875b228ae7a
 
-commit 802660cb70453fa4d230cb0233bc1bbdf8328de1
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 30 10:44:49 2015 +0000
+commit a5577c1ed3ecdfe4b7b1107c526cae886fc91afb
+Author: schwarze@openbsd.org <schwarze@openbsd.org>
+Date:   Mon May 30 12:14:08 2016 +0000
 
     upstream commit
     
-    set a timeout to prevent hangs when talking to busted
-     servers; ok markus@
+    stricter malloc.conf(5) options for utf8 tests
+    
+    Upstream-Regress-ID: 111efe20a0fb692fa1a987f6e823310f9b25abf6
 
-commit 86936ec245a15c7abe71a0722610998b0a28b194
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 30 01:11:39 2015 +0000
+commit 75f0844b4f29d62ec3a5e166d2ee94b02df819fc
+Author: schwarze@openbsd.org <schwarze@openbsd.org>
+Date:   Mon May 30 12:05:56 2016 +0000
 
     upstream commit
     
-    regression test for 'wildcard CA' serial/key ID revocations
+    Fix two rare edge cases: 1. If vasprintf() returns < 0,
+     do not access a NULL pointer in snmprintf(), and do not free() the pointer
+     returned from vasprintf() because on some systems other than OpenBSD, it
+     might be a bogus pointer. 2. If vasprintf() returns == 0, return 0 and ""
+     rather than -1 and NULL.
+    
+    Besides, free(dst) is pointless after failure (not a bug).
+    
+    One half OK martijn@, the other half OK deraadt@;
+    committing quickly before people get hurt.
+    
+    Upstream-Regress-ID: b164f20923812c9bac69856dbc1385eb1522cba4
 
-commit 4509b5d4a4fa645a022635bfa7e86d09b285001f
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 30 01:13:33 2015 +0000
+commit 016881eb33a7948028848c90f4c7ac42e3af0e87
+Author: schwarze@openbsd.org <schwarze@openbsd.org>
+Date:   Thu May 26 19:14:25 2016 +0000
 
     upstream commit
     
-    avoid more fatal/exit in the packet.c paths that
-     ssh-keyscan uses; feedback and "looks good" markus@
+    test the new utf8 module
+    
+    Upstream-Regress-ID: c923d05a20e84e4ef152cbec947fdc4ce6eabbe3
 
-commit 669aee994348468af8b4b2ebd29b602cf2860b22
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 30 01:10:33 2015 +0000
+commit d4219028bdef448e089376f3afe81ef6079da264
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 3 15:30:46 2016 +0000
 
     upstream commit
     
-    permit KRLs that revoke certificates by serial number or
-     key ID without scoping to a particular CA; ok markus@
+    Set umask to prevent "Bad owner or permissions" errors.
+    
+    Upstream-Regress-ID: 8fdf2fc4eb595ccd80c443f474d639f851145417
 
-commit 7a2c368477e26575d0866247d3313da4256cb2b5
+commit 07d5608bb237e9b3fe86a2aeaa429392230faebf
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 30 00:59:19 2015 +0000
+Date:   Tue May 3 14:41:04 2016 +0000
 
     upstream commit
     
-    missing parentheses after if in do_convert_from() broke
-     private key conversion from other formats some time in 2010; bz#2345 reported
-     by jjelen AT redhat.com
+    support doas
+    
+    Upstream-Regress-ID: 8d5572b27ea810394eeda432d8b4e9e1064a7c38
 
-commit 25f5f78d8bf5c22d9cea8b49de24ebeee648a355
+commit 01cabf10adc7676cba5f40536a34d3b246edb73f
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 30 00:22:25 2015 +0000
+Date:   Tue May 3 13:48:33 2016 +0000
 
     upstream commit
     
-    fix ssh protocol 1, spotted by miod@
+    unit tests for sshbuf_dup_string()
+    
+    Upstream-Regress-ID: 7521ff150dc7f20511d1c2c48fd3318e5850a96d
 
-commit 9ce86c926dfa6e0635161b035e3944e611cbccf0
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 28 22:36:00 2015 +0000
+commit 6915f1698e3d1dd4e22eac20f435e1dfc1d46372
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Jun 3 06:44:12 2016 +0000
 
     upstream commit
     
-    update to new API (key_fingerprint => sshkey_fingerprint)
-     check sshkey_fingerprint return values; ok markus
+    tweak previous;
+    
+    Upstream-ID: 92979f1a0b63e041a0e5b08c9ed0ba9b683a3698
 
-commit 9125525c37bf73ad3ee4025520889d2ce9d10f29
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 28 22:05:31 2015 +0000
+commit 0cb2f4c2494b115d0f346ed2d8b603ab3ba643f4
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jun 3 04:09:38 2016 +0000
 
     upstream commit
     
-    avoid fatal() calls in packet code makes ssh-keyscan more
-     reliable against server failures ok dtucker@ markus@
+    Allow ExitOnForwardFailure and ClearAllForwardings to be
+     overridden when using ssh -W (but still default to yes in that case).
+     bz#2577, ok djm@.
+    
+    Upstream-ID: 4b20c419e93ca11a861c81c284090cfabc8c54d4
 
-commit fae7bbe544cba7a9e5e4ab47ff6faa3d978646eb
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 28 21:15:47 2015 +0000
+commit 8543ff3f5020fe659839b15f05b8c522bde6cee5
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jun 3 03:14:41 2016 +0000
 
     upstream commit
     
-    avoid fatal() calls in packet code makes ssh-keyscan more
-     reliable against server failures ok dtucker@ markus@
+    Move the host and port used by ssh -W into the Options
+     struct. This will make future changes a bit easier.  ok djm@
+    
+    Upstream-ID: 151bce5ecab2fbedf0d836250a27968d30389382
 
-commit 1a3d14f6b44a494037c7deab485abe6496bf2c60
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 28 11:07:25 2015 +0000
+commit 6b87311d3acdc460f926b2c40f4c4f3fd345f368
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jun 1 04:19:49 2016 +0000
 
     upstream commit
     
-    remove obsolete comment
+    Check min and max sizes sent by the client against what
+     we support before passing them to the monitor.  ok djm@
+    
+    Upstream-ID: 750627e8117084215412bff00a25b1586ab17ece
 
-commit 80c25b7bc0a71d75c43a4575d9a1336f589eb639
-Author: okan@openbsd.org <okan@openbsd.org>
-Date:   Tue Jan 27 12:54:06 2015 +0000
+commit 564cd2a8926ccb1dca43a535073540935b5e0373
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 31 23:46:14 2016 +0000
 
     upstream commit
     
-    Since r1.2 removed the use of PRI* macros, inttypes.h is
-     no longer required.
+    Ensure that the client's proposed DH-GEX max value is at
+     least as big as the minimum the server will accept.  ok djm@
     
-    ok djm@
+    Upstream-ID: b4b84fa04aab2de7e79a6fee4a6e1c189c0fe775
 
-commit 69ff64f69615c2a21c97cb5878a0996c21423257
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 27 23:07:43 2015 +1100
+commit df820722e40309c9b3f360ea4ed47a584ed74333
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jun 6 11:36:13 2016 +1000
 
-    compile on systems without TCP_MD5SIG (e.g. OSX)
+    Add compat bits to utf8.c.
 
-commit 358964f3082fb90b2ae15bcab07b6105cfad5a43
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 27 23:07:25 2015 +1100
+commit 05c6574652571becfe9d924226c967a3f4b3f879
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jun 6 11:33:43 2016 +1000
 
-    use ssh-keygen under test rather than system's
+    Fix utf->utf8 typo.
 
-commit a2c95c1bf33ea53038324d1fdd774bc953f98236
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 27 23:06:59 2015 +1100
+commit 6c1717190b4d5ddd729cd9e24e8ed71ed4f087ce
+Author: schwarze@openbsd.org <schwarze@openbsd.org>
+Date:   Mon May 30 18:34:41 2016 +0000
 
-    OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAX
+    upstream commit
+    
+    Backout rev. 1.43 for now.
+    
+    The function update_progress_meter() calls refresh_progress_meter()
+    which calls snmprintf() which calls malloc(); but update_progress_meter()
+    acts as the SIGALRM signal handler.
+    
+    "malloc(): error: recursive call" reported by sobrado@.
+    
+    Upstream-ID: aaae57989431e5239c101f8310f74ccc83aeb93e
 
-commit ade31d7b6f608a19b85bee29a7a00b1e636a2919
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 27 23:06:23 2015 +1100
+commit cd9e1eabeb4137182200035ab6fa4522f8d24044
+Author: schwarze@openbsd.org <schwarze@openbsd.org>
+Date:   Mon May 30 12:57:21 2016 +0000
 
-    these need active_state defined to link on OSX
+    upstream commit
     
-    temporary measure until active_state goes away entirely
-
-commit e56aa87502f22c5844918c10190e8b4f785f067b
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 27 12:01:36 2015 +0000
-
-    upstream commit
+    Even when only writing an unescaped character, the dst
+     buffer may need to grow, or it would be overrun; issue found by tb@ with
+     malloc.conf(5) 'C'.
     
-    use printf instead of echo -n to reduce diff against
-     -portable
-
-commit 9f7637f56eddfaf62ce3c0af89c25480f2cf1068
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Mon Jan 26 13:55:29 2015 +0000
-
-    upstream commit
+    While here, reserve an additional byte for the terminating NUL
+    up front such that we don't have to realloc() later just for that.
     
-    sort previous;
-
-commit 3076ee7d530d5b16842fac7a6229706c7e5acd26
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 26 13:36:53 2015 +0000
-
-    upstream commit
+    OK tb@
     
-    properly restore umask
+    Upstream-ID: 30ebcc0c097c4571b16f0a78b44969f170db0cff
 
-commit d411d395556b73ba1b9e451516a0bd6697c4b03d
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 26 06:12:18 2015 +0000
+commit ac284a355f8065eaef2a16f446f3c44cdd17371d
+Author: schwarze@openbsd.org <schwarze@openbsd.org>
+Date:   Mon May 30 12:05:56 2016 +0000
 
     upstream commit
     
-    regression test for host key rotation
-
-commit fe8a3a51699afbc6407a8fae59b73349d01e49f8
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 26 06:11:28 2015 +0000
-
-    upstream commit
+    Fix two rare edge cases: 1. If vasprintf() returns < 0,
+     do not access a NULL pointer in snmprintf(), and do not free() the pointer
+     returned from vasprintf() because on some systems other than OpenBSD, it
+     might be a bogus pointer. 2. If vasprintf() returns == 0, return 0 and ""
+     rather than -1 and NULL.
     
-    adapt to sshkey API tweaks
-
-commit 7dd355fb1f0038a3d5cdca57ebab4356c7a5b434
-Author: miod@openbsd.org <miod@openbsd.org>
-Date:   Sat Jan 24 10:39:21 2015 +0000
-
-    upstream commit
+    Besides, free(dst) is pointless after failure (not a bug).
     
-    Move -lz late in the linker commandline for things to
-     build on static arches.
-
-commit 0dad3b806fddb93c475b30853b9be1a25d673a33
-Author: miod@openbsd.org <miod@openbsd.org>
-Date:   Fri Jan 23 21:21:23 2015 +0000
-
-    upstream commit
+    One half OK martijn@, the other half OK deraadt@;
+    committing quickly before people get hurt.
     
-    -Wpointer-sign is supported by gcc 4 only.
+    Upstream-ID: b7bcd2e82fc168a8eff94e41f5db336ed986fed0
 
-commit 2b3b1c1e4bd9577b6e780c255c278542ea66c098
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 20 22:58:57 2015 +0000
+commit 0e059cdf5fd86297546c63fa8607c24059118832
+Author: schwarze@openbsd.org <schwarze@openbsd.org>
+Date:   Wed May 25 23:48:45 2016 +0000
 
     upstream commit
     
-    use SUBDIR to recuse into unit tests; makes "make obj"
-     actually work
-
-commit 1d1092bff8db27080155541212b420703f8b9c92
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 26 12:16:36 2015 +0000
-
-    upstream commit
+    To prevent screwing up terminal settings when printing to
+     the terminal, for ASCII and UTF-8, escape bytes not forming characters and
+     bytes forming non-printable characters with vis(3) VIS_OCTAL. For other
+     character sets, abort printing of the current string in these cases.  In
+     particular, * let scp(1) respect the local user's LC_CTYPE locale(1); *
+     sanitize data received from the remote host; * sanitize filenames, usernames,
+     and similar data even locally; * take character display widths into account
+     for the progressmeter.
     
-    correct description of UpdateHostKeys in ssh_config.5 and
-     add it to -o lists for ssh, scp and sftp; pointed out by jmc@
+    This is believed to be sufficient to keep the local terminal safe
+    on OpenBSD, but bad things can still happen on other systems with
+    state-dependent locales because many places in the code print
+    unencoded ASCII characters into the output stream.
+    
+    Using feedback from djm@ and martijn@,
+    various aspects discussed with many others.
+    
+    deraadt@ says it should go in now, i probably already hesitated too long
+    
+    Upstream-ID: e66afbc94ee396ddcaffd433b9a3b80f387647e0
 
-commit 5104db7cbd6cdd9c5971f4358e74414862fc1022
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 26 06:10:03 2015 +0000
+commit 8c02e3639acefe1e447e293dbe23a0917abd3734
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 24 04:43:45 2016 +0000
 
     upstream commit
     
-    correctly match ECDSA subtype (== curve) for
-     offered/recevied host keys. Fixes connection-killing host key mismatches when
-     a server offers multiple ECDSA keys with different curve type (an extremely
-     unlikely configuration).
+    KNF compression proposal and simplify the client side a
+     little.  ok djm@
     
-    ok markus, "looks mechanical" deraadt@
+    Upstream-ID: aa814b694efe9e5af8a26e4c80a05526ae6d6605
 
-commit 8d4f87258f31cb6def9b3b55b6a7321d84728ff2
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 26 03:04:45 2015 +0000
+commit 7ec4946fb686813eb5f8c57397e465f5485159f4
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 24 02:31:57 2016 +0000
 
     upstream commit
     
-    Host key rotation support.
-    
-    Add a hostkeys@openssh.com protocol extension (global request) for
-    a server to inform a client of all its available host key after
-    authentication has completed. The client may record the keys in
-    known_hosts, allowing it to upgrade to better host key algorithms
-    and a server to gracefully rotate its keys.
+    Back out 'plug memleak'.
     
-    The client side of this is controlled by a UpdateHostkeys config
-    option (default on).
-    
-    ok markus@
+    Upstream-ID: 4faacdde136c24a961e24538de373660f869dbc0
 
-commit 60b1825262b1f1e24fc72050b907189c92daf18e
+commit 82f24c3ddc52053aeb7beb3332fa94c92014b0c5
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 26 02:59:11 2015 +0000
+Date:   Mon May 23 23:30:50 2016 +0000
 
     upstream commit
     
-    small refactor and add some convenience functions; ok
-     markus
-
-commit a5a3e3328ddce91e76f71ff479022d53e35c60c9
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Thu Jan 22 21:00:42 2015 +0000
-
-    upstream commit
+    prefer agent-hosted keys to keys from PKCS#11; ok markus
     
-    heirarchy -> hierarchy;
+    Upstream-ID: 7417f7653d58d6306d9f8c08d0263d050e2fd8f4
 
-commit dcff5810a11195c57e1b3343c0d6b6f2b9974c11
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Thu Jan 22 20:24:41 2015 +0000
+commit a0cb7778fbc9b43458f7072eb68dd858766384d1
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon May 23 00:17:27 2016 +0000
 
     upstream commit
     
-    Provide a warning about chroot misuses (which sadly, seem
-     to have become quite popular because shiny).  sshd cannot detect/manage/do
-     anything about these cases, best we can do is warn in the right spot in the
-     man page. ok markus
+    Plug mem leak in filter_proposal.  ok djm@
+    
+    Upstream-ID: bf968da7cfcea2a41902832e7d548356a4e2af34
 
-commit 087266ec33c76fc8d54ac5a19efacf2f4a4ca076
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Tue Jan 20 23:14:00 2015 +0000
+commit ae9c0d4d5c581b3040d1f16b5c5f4b1cd1616743
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jun 3 16:03:44 2016 +1000
 
-    upstream commit
+    Update vis.h and vis.c from OpenBSD.
     
-    Reduce use of <sys/param.h> and transition to <limits.h>
-     throughout. ok djm markus
+    This will be needed for the upcoming utf8 changes.
 
-commit 57e783c8ba2c0797f93977e83b2a8644a03065d8
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Jan 20 20:16:21 2015 +0000
+commit e1d93705f8f48f519433d6ca9fc3d0abe92a1b77
+Author: Tim Rice <tim@multitalents.net>
+Date:   Tue May 31 11:13:22 2016 -0700
 
-    upstream commit
-    
-    kex_setup errors are fatal()
+    modified:   configure.ac
+    whitspace clean up. No code changes.
 
-commit 1d6424a6ff94633c221297ae8f42d54e12a20912
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 20 08:02:33 2015 +0000
+commit 604a037d84e41e31f0aec9075df0b8740c130200
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue May 31 16:45:28 2016 +1000
 
-    upstream commit
-    
-    this test would accidentally delete agent.sh if run without
-     obj/
+    whitespace at EOL
 
-commit 12b5f50777203e12575f1b08568281e447249ed3
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 20 07:56:44 2015 +0000
+commit 18424200160ff5c923113e0a37ebe21ab7bcd17c
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon May 30 19:35:28 2016 +1000
 
-    upstream commit
+    Add missing ssh-host-config --name option
     
-    make this compile with KERBEROS5 enabled
+    Patch from vinschen@redhat.com.
 
-commit e2cc6bef08941256817d44d146115b3478586ad4
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 20 07:55:33 2015 +0000
+commit 39c0cecaa188a37a2e134795caa68e03f3ced592
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri May 20 10:01:58 2016 +1000
 
-    upstream commit
+    Fix comment about sshpam_const and AIX.
     
-    fix hostkeys in agent; ok markus@
+    From mschwager via github.
 
-commit 1ca3e2155aa5d3801a7ae050f85c71f41fcb95b1
+commit f64062b1f74ad5ee20a8a49aab2732efd0f7ce30
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 20 10:11:31 2015 +1100
+Date:   Fri May 20 09:56:53 2016 +1000
 
-    fix kex test
+    Deny lstat syscalls in seccomp sandbox
+    
+    Avoids sandbox violations for some krb/gssapi libraries.
 
-commit c78a578107c7e6dcf5d30a2f34cb6581bef14029
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 20:45:25 2015 +0000
+commit 531c135409b8d8810795b1f3692a4ebfd5c9cae0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 19 07:45:32 2016 +0000
 
     upstream commit
     
-    finally enable the KEX tests I wrote some years ago...
+    fix type of ed25519 values
+    
+    Upstream-ID: b32d0cb372bbe918ca2de56906901eae225a59b0
 
-commit 31821d7217e686667d04935aeec99e1fc4a46e7e
+commit 75e21688f523799c9e0cc6601d76a9c5ca79f787
 Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 20:42:31 2015 +0000
+Date:   Wed May 4 14:32:26 2016 +0000
 
     upstream commit
     
-    adapt to new error message (SSH_ERR_MAC_INVALID)
-
-commit d3716ca19e510e95d956ae14d5b367e364bff7f1
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 19 17:31:13 2015 +0000
-
-    upstream commit
+    add IdentityAgent; noticed & ok jmc@
     
-    this test was broken in at least two ways, such that it
-     wasn't checking that a KRL was not excluding valid keys
+    Upstream-ID: 4ba9034b00a4cf1beae627f0728da897802df88a
 
-commit 3f797653748e7c2b037dacb57574c01d9ef3b4d3
+commit 1a75d14daf4b60db903e6103cf50e74e0cd0a76b
 Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 20:32:39 2015 +0000
+Date:   Wed May 4 14:29:58 2016 +0000
 
     upstream commit
     
-    switch ssh-keyscan from setjmp to multiple ssh transport
-     layer instances ok djm@
+    allow setting IdentityAgent to SSH_AUTH_SOCK; ok djm@
+    
+    Upstream-ID: 20c508480d8db3eef18942c0fc39b1fcf25652ac
 
-commit f582f0e917bb0017b00944783cd5f408bf4b0b5e
+commit 0516454151ae722fc8256c3c56115c6baf24c5b0
 Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 20:30:23 2015 +0000
+Date:   Wed May 4 14:22:33 2016 +0000
 
     upstream commit
     
-    add experimental api for packet layer; ok djm@
+    move SSH_MSG_NONE, so we don't have to include ssh1.h;
+     ok deraadt@
+    
+    Upstream-ID: c2f97502efc761a41b18c17ddf460e138ca7994e
 
-commit 48b3b2ba75181f11fca7f327058a591f4426cade
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 20:20:20 2015 +0000
+commit 332ff3d770631e7513fea38cf0d3689f673f0e3f
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue May 10 09:51:06 2016 +1000
 
-    upstream commit
+    initialise salen in binresvport_sa
+    
+    avoids failures with UsePrivilegedPort=yes
     
-    store compat flags in struct ssh; ok djm@
+    patch from Juan Gallego
 
-commit 57d10cbe861a235dd269c74fb2fe248469ecee9d
+commit c5c1d5d2f04ce00d2ddd6647e61b32f28be39804
 Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 20:16:15 2015 +0000
+Date:   Wed May 4 14:04:40 2016 +0000
 
     upstream commit
     
-    adapt kex to sshbuf and struct ssh; ok djm@
+    missing const in prototypes (ssh1)
+    
+    Upstream-ID: 789c6ad4928b5fa557369b88c3a6a34926082c05
 
-commit 3fdc88a0def4f86aa88a5846ac079dc964c0546a
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 20:07:45 2015 +0000
+commit 9faae50e2e82ba42eb0cb2726bf6830fe7948f28
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed May 4 14:00:09 2016 +0000
 
     upstream commit
     
-    move dispatch to struct ssh; ok djm@
+    Fix inverted logic for updating StreamLocalBindMask which
+     would cause the server to set an invalid mask. ok djm@
+    
+    Upstream-ID: 8a4404c8307a5ef9e07ee2169fc6d8106b527587
 
-commit 091c302829210c41e7f57c3f094c7b9c054306f0
+commit b02ad1ce9105bfa7394ac7590c0729dd52e26a81
 Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 19 19:52:16 2015 +0000
+Date:   Wed May 4 12:21:53 2016 +0000
 
     upstream commit
     
-    update packet.c & isolate, introduce struct ssh a) switch
-     packet.c to buffer api and isolate per-connection info into struct ssh b)
-     (de)serialization of the state is moved from monitor to packet.c c) the old
-     packet.c API is implemented in opacket.[ch] d) compress.c/h is removed and
-     integrated into packet.c with and ok djm@
+    IdentityAgent for specifying specific agent sockets; ok
+     djm@
+    
+    Upstream-ID: 3e6a15eb89ea0fd406f108826b7dc7dec4fbfac1
 
-commit 4e62cc68ce4ba20245d208b252e74e91d3785b74
+commit 910e59bba09ac309d78ce61e356da35292212935
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 19 17:35:48 2015 +0000
+Date:   Wed May 4 12:16:39 2016 +0000
 
     upstream commit
     
-    fix format strings in (disabled) debugging
+    fix junk characters after quotes
+    
+    Upstream-ID: cc4d0cd32cb6b55a2ef98975d2f7ae857d0dc578
 
-commit d85e06245907d49a2cd0cfa0abf59150ad616f42
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 19 06:01:32 2015 +0000
+commit 9283884e647b8be50ccd2997537af0065672107d
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Tue May 3 18:38:12 2016 +0000
 
     upstream commit
     
-    be a bit more careful in these tests to ensure that
-     known_hosts is clean
+    correct article;
+    
+    Upstream-ID: 1fbd5b7ab16d2d9834ec79c3cedd4738fa42a168
 
-commit 7947810eab5fe0ad311f32a48f4d4eb1f71be6cf
+commit cfefbcea1057c2623e76c579174a4107a0b6e6cd
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 22:00:18 2015 +0000
+Date:   Tue May 3 15:57:39 2016 +0000
 
     upstream commit
     
-    regression test for known_host file editing using
-     ssh-keygen (-H / -R / -F) after hostkeys_foreach() change; feedback and ok
-     markus@
+    fix overriding of StreamLocalBindMask and
+     StreamLocalBindUnlink in Match blocks; found the hard way Rogan Dawes
+    
+    Upstream-ID: 940bc69ec0249ab428d24ccd0722ce35cb932ee2
 
-commit 3a2b09d147a565d8a47edf37491e149a02c0d3a3
+commit 771c2f51ffc0c9a2877b7892fada0c77bd1f6549
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 19:54:46 2015 +0000
+Date:   Tue May 3 15:25:06 2016 +0000
 
     upstream commit
     
-    more and better key tests
+    don't forget to include StreamLocalBindUnlink in the
+     config dump output
     
-    test signatures and verification
-    test certificate generation
-    flesh out nested cert test
-    
-    removes most of the XXX todo markers
+    Upstream-ID: 14a6d970b3b45c8e94272e3c661e9a0b2a0ee7cb
 
-commit 589e69fd82724cfc9738f128e4771da2e6405d0d
+commit cdcd941994dc430f50d0a4e6a712d32b66e6199e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 19:53:58 2015 +0000
+Date:   Tue May 3 14:54:08 2016 +0000
 
     upstream commit
     
-    make the signature fuzzing test much more rigorous:
-     ensure that the fuzzed input cases do not match the original (using new
-     fuzz_matches_original() function) and check that the verification fails in
-     each case
+    make nethack^wrandomart fingerprint flag more readily
+     searchable pointed out by Matt Johnston
+    
+    Upstream-ID: cb40d0235dc153c478c1aad3bc60b195422a54fb
 
-commit 80603c0daa2538c349c1c152405580b164d5475f
+commit 05855bf2ce7d5cd0a6db18bc0b4214ed5ef7516d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 19:52:44 2015 +0000
+Date:   Tue May 3 13:10:24 2016 +0000
 
     upstream commit
     
-    add a fuzz_matches_original() function to the fuzzer to
-     detect fuzz cases that are identical to the original data. Hacky
-     implementation, but very useful when you need the fuzz to be different, e.g.
-     when verifying signature
+    clarify ordering of subkeys; pointed out by ietf-ssh AT
+     stbuehler.de
+    
+    Upstream-ID: 05ebe9f949449a555ebce8e0aad7c8c9acaf8463
 
-commit 87d5495bd337e358ad69c524fcb9495208c0750b
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 19:50:55 2015 +0000
+commit cca3b4395807bfb7aaeb83d2838f5c062ce30566
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 3 12:15:49 2016 +0000
 
     upstream commit
     
-    better dumps from the fuzzer (shown on errors) -
-     include the original data as well as the fuzzed copy.
+    Use a subshell for constructing key types to work around
+     different sed behaviours for -portable.
+    
+    Upstream-Regress-ID: 0f6eb673162df229eda9a134a0f10da16151552d
 
-commit d59ec478c453a3fff05badbbfd96aa856364f2c2
+commit fa58208c6502dcce3e0daac0ca991ee657daf1f5
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 19:47:55 2015 +0000
+Date:   Tue May 3 10:27:59 2016 +0000
 
     upstream commit
     
-    enable hostkey-agent.sh test
+    correct some typos and remove a long-stale XXX note.
+    
+    add specification for ed25519 certificates
+    
+    mention no host certificate options/extensions are currently defined
+    
+    pointed out by Simon Tatham
+    
+    Upstream-ID: 7b535ab7dba3340b7d8210ede6791fdaefdf839a
 
-commit 26b3425170bf840e4b095e1c10bf25a0a3e3a105
+commit b466f956c32cbaff4200bfcd5db6739fe4bc7d04
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Jan 17 18:54:30 2015 +0000
+Date:   Tue May 3 10:24:27 2016 +0000
 
     upstream commit
     
-    unit test for hostkeys in ssh-agent
+    add ed25519 keys that are supported but missing from this
+     documents; from Peter Moody
+    
+    Upstream-ID: 8caac2d8e8cfd2fca6dc304877346e0a064b014b
 
-commit 9e06a0fb23ec55d9223b26a45bb63c7649e2f2f2
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Thu Jan 15 23:41:29 2015 +0000
+commit 7f3d76319a69dab2efe3a520a8fef5b97e923636
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 3 09:03:49 2016 +0000
 
     upstream commit
     
-    add kex unit tests
+    Implement IUTF8 as per draft-sgtatham-secsh-iutf8-00.  Patch
+     from Simon Tatham, ok markus@
+    
+    Upstream-ID: 58268ebdf37d9d467f78216c681705a5e10c58e8
 
-commit d2099dec6da21ae627f6289aedae6bc1d41a22ce
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Mon Jan 19 00:32:54 2015 +0000
+commit 31bc01c05d9f51bee3ebe33dc57c4fafb059fb62
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon May 2 14:10:58 2016 +0000
 
     upstream commit
     
-    djm, your /usr/include tree is old
+    unbreak config parsing on reexec from previous commit
+    
+    Upstream-ID: bc69932638a291770955bd05ca55a32660a613ab
 
-commit 2b3c3c76c30dc5076fe09d590f5b26880f148a54
+commit 67f1459efd2e85bf03d032539283fa8107218936
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 21:51:19 2015 +0000
+Date:   Mon May 2 09:52:00 2016 +0000
 
     upstream commit
     
-    some feedback from markus@: comment hostkeys_foreach()
-     context and avoid a member in it.
+    unit and regress tests for SHA256/512; ok markus
+    
+    Upstream-Regress-ID: a0cd1a92dc824067076a5fcef83c18df9b0bf2c6
 
-commit cecb30bc2ba6d594366e657d664d5c494b6c8a7f
+commit 0e8eeec8e75f6d0eaf33317376f773160018a9c7
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 21:49:42 2015 +0000
+Date:   Mon May 2 10:26:04 2016 +0000
 
     upstream commit
     
-    make ssh-keygen use hostkeys_foreach(). Removes some
-     horrendous code; ok markus@
+    add support for additional fixed DH groups from
+     draft-ietf-curdle-ssh-kex-sha2-03
+    
+    diffie-hellman-group14-sha256 (2K group)
+    diffie-hellman-group16-sha512 (4K group)
+    diffie-hellman-group18-sha512 (8K group)
+    
+    based on patch from Mark D. Baushke and Darren Tucker
+    ok markus@
+    
+    Upstream-ID: ac00406ada4f0dfec41585ca0839f039545bc46f
 
-commit ec3d065df3a9557ea96b02d061fd821a18c1a0b9
+commit 57464e3934ba53ad8590ee3ccd840f693407fc1e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 21:48:09 2015 +0000
+Date:   Mon May 2 09:36:42 2016 +0000
 
     upstream commit
     
-    convert load_hostkeys() (hostkey ordering and
-     known_host matching) to use the new hostkey_foreach() iterator; ok markus
+    support SHA256 and SHA512 RSA signatures in certificates;
+     ok markus@
+    
+    Upstream-ID: b45be2f2ce8cacd794dc5730edaabc90e5eb434a
 
-commit c29811cc480a260e42fd88849fc86a80c1e91038
+commit 1a31d02b2411c4718de58ce796dbb7b5e14db93e
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 21:40:23 2015 +0000
+Date:   Mon May 2 08:49:03 2016 +0000
 
     upstream commit
     
-    introduce hostkeys_foreach() to allow iteration over a
-     known_hosts file or controlled subset thereof. This will allow us to pull out
-     some ugly and duplicated code, and will be used to implement hostkey rotation
-     later.
+    fix signed/unsigned errors reported by clang-3.7; add
+     sshbuf_dup_string() to replace a common idiom of strdup(sshbuf_ptr()) with
+     better safety checking; feedback and ok markus@
     
-    feedback and ok markus
+    Upstream-ID: 71f926d9bb3f1efed51319a6daf37e93d57c8820
 
-commit f101d8291da01bbbfd6fb8c569cfd0cc61c0d346
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Sun Jan 18 14:01:00 2015 +0000
+commit d2d6bf864e52af8491a60dd507f85b74361f5da3
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 29 08:07:53 2016 +0000
 
     upstream commit
     
-    string truncation due to sizeof(size) ok djm markus
+    close ControlPersist background process stderr when not
+     in debug mode or when logging to a file or syslog. bz#1988 ok dtucker
+    
+    Upstream-ID: 4fb726f0fdcb155ad419913cea10dc4afd409d24
 
-commit 35d6022b55b7969fc10c261cb6aa78cc4a5fcc41
+commit 9ee692fa1146e887e008a2b9a3d3ea81770c9fc8
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 13:33:34 2015 +0000
+Date:   Thu Apr 28 14:30:21 2016 +0000
 
     upstream commit
     
-    avoid trailing ',' in host key algorithms
+    fix comment
+    
+    Upstream-ID: 313a385bd7b69a82f8e28ecbaf5789c774457b15
 
-commit 7efb455789a0cb76bdcdee91c6060a3dc8f5c007
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Jan 18 13:22:28 2015 +0000
+commit ee1e0a16ff2ba41a4d203c7670b54644b6c57fa6
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Wed Apr 27 13:53:48 2016 +0000
 
     upstream commit
     
-    infer key length correctly when user specified a fully-
-     qualified key name instead of using the -b bits option; ok markus@
+    cidr permitted for {allow,deny}users; from lars nooden ok djm
+    
+    Upstream-ID: 13e7327fe85f6c63f3f7f069e0fdc8c351515d11
 
-commit 83f8ffa6a55ccd0ce9d8a205e3e7439ec18fedf5
+commit b6e0140a5aa883c27b98415bd8aa9f65fc04ee22
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sat Jan 17 18:53:34 2015 +0000
+Date:   Thu Apr 21 06:08:02 2016 +0000
 
     upstream commit
     
-    fix hostkeys on ssh agent; found by unit test I'm about
-     to commit
+    make argument == NULL tests more consistent
+    
+    Upstream-ID: dc4816678704aa5cbda3a702e0fa2033ff04581d
 
-commit 369d61f17657b814124268f99c033e4dc6e436c1
-Author: schwarze@openbsd.org <schwarze@openbsd.org>
-Date:   Fri Jan 16 16:20:23 2015 +0000
+commit 6aaabc2b610e44bae473457ad9556ffb43d90ee3
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Sun Apr 17 14:34:46 2016 +0000
 
     upstream commit
     
-    garbage collect empty .No macros mandoc warns about
+    tweak previous;
+    
+    Upstream-ID: 46c1bab91c164078edbccd5f7d06b9058edd814f
 
-commit bb8b442d32dbdb8521d610e10d8b248d938bd747
+commit 0f839e5969efa3bda615991be8a9d9311554c573
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 16 15:55:07 2015 +0000
+Date:   Fri Apr 15 02:57:10 2016 +0000
 
     upstream commit
     
-    regression: incorrect error message on
-     otherwise-successful ssh-keygen -A. Reported by Dmitry Orlov, via deraadt@
+    missing bit of Include regress
+    
+    Upstream-Regress-ID: 1063595f7f40f8489a1b7a27230b9e8acccea34f
 
-commit 9010902954a40b59d0bf3df3ccbc3140a653e2bc
+commit 12e4ac46aed681da55c2bba3cd11dfcab23591be
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Jan 16 07:19:48 2015 +0000
+Date:   Fri Apr 15 02:55:53 2016 +0000
 
     upstream commit
     
-    when hostname canonicalisation is enabled, try to parse
-     hostnames as addresses before looking them up for canonicalisation. fixes
-     bz#2074 and avoids needless DNS lookups in some cases; ok markus
+    remove redundant CLEANFILES section
+    
+    Upstream-Regress-ID: 29ef1b267fa56daa60a1463396635e7d53afb587
 
-commit 2ae4f337b2a5fb2841b6b0053b49496fef844d1c
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Fri Jan 16 06:40:12 2015 +0000
+commit b1d05aa653ae560c44baf8e8a9756e33f98ea75c
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 15 00:48:01 2016 +0000
 
     upstream commit
     
-    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)
+    sync CLEANFILES with portable, sort
+    
+    Upstream-Regress-ID: cb782f4f1ab3e079efbc335c6b64942f790766ed
 
-commit 3c4726f4c24118e8f1bb80bf75f1456c76df072c
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Thu Jan 15 21:38:50 2015 +0000
+commit 35f22dad263cce5c61d933ae439998cb965b8748
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 15 00:31:10 2016 +0000
 
     upstream commit
     
-    remove xmalloc, switch to sshbuf
+    regression test for ssh_config Include directive
+    
+    Upstream-Regress-ID: 46a38c8101f635461c506d1aac2d96af80f97f1e
 
-commit e17ac01f8b763e4b83976b9e521e90a280acc097
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Thu Jan 15 21:37:14 2015 +0000
+commit 6b8a1a87005818d4700ce8b42faef746e82c1f51
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Apr 14 23:57:17 2016 +0000
 
     upstream commit
     
-    switch to sshbuf
+    unbreak test for recent ssh de-duplicated forwarding
+     change
+    
+    Upstream-Regress-ID: 6b2b115d99acd7cff13986e6739ea214cf2a3da3
 
-commit ddef9995a1fa6c7a8ff3b38bfe6cf724bebf13d0
-Author: naddy@openbsd.org <naddy@openbsd.org>
-Date:   Thu Jan 15 18:32:54 2015 +0000
+commit 076787702418985a2cc6808212dc28ce7afc01f0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Apr 14 23:21:42 2016 +0000
 
     upstream commit
     
-    handle UMAC128 initialization like UMAC; ok djm@ markus@
+    add test knob and warning for StrictModes
+    
+    Upstream-Regress-ID: 8cd10952ce7898655ee58945904f2a0a3bdf7682
 
-commit f14564c1f7792446bca143580aef0e7ac25dcdae
+commit dc7990be865450574c7940c9880567f5d2555b37
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 15 11:04:36 2015 +0000
+Date:   Fri Apr 15 00:30:19 2016 +0000
 
     upstream commit
     
-    fix regression reported by brad@ for passworded keys without
-     agent present
+    Include directive for ssh_config(5); feedback & ok markus@
+    
+    Upstream-ID: ae3b76e2e343322b9f74acde6f1e1c5f027d5fff
 
-commit 45c0fd70bb2a88061319dfff20cb12ef7b1bc47e
+commit 85bdcd7c92fe7ff133bbc4e10a65c91810f88755
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 22:08:23 2015 +1100
+Date:   Wed Apr 13 10:39:57 2016 +1000
 
-    make bitmap test compile
+    ignore PAM environment vars when UseLogin=yes
+    
+    If PAM is configured to read user-specified environment variables
+    and UseLogin=yes in sshd_config, then a hostile local user may
+    attack /bin/login via LD_PRELOAD or similar environment variables
+    set via PAM.
+    
+    CVE-2015-8325, found by Shayan Sadigh, via Colin Watson
 
-commit d333f89abf7179021e5c3f28673f469abe032062
+commit dce19bf6e4a2a3d0b13a81224de63fc316461ab9
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 15 07:36:28 2015 +0000
+Date:   Sat Apr 9 12:39:30 2016 +0000
 
     upstream commit
     
-    unit tests for KRL bitmap
-
-commit 7613f828f49c55ff356007ae9645038ab6682556
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jan 14 09:58:21 2015 +0000
-
-    upstream commit
+    make private key loading functions consistently handle NULL
+     key pointer arguments; ok markus@
     
-    re-add comment about full path
+    Upstream-ID: 92038726ef4a338169c35dacc9c5a07fcc7fa761
 
-commit 6c43b48b307c41cd656b415621a644074579a578
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jan 14 09:54:38 2015 +0000
+commit 5f41f030e2feb5295657285aa8c6602c7810bc4b
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Apr 8 21:14:13 2016 +1000
 
-    upstream commit
+    Remove NO_IPPORT_RESERVED_CONCEPT
     
-    don't reset  to the installed sshd; connect before
-     reconfigure, too
+    Replace by defining IPPORT_RESERVED to zero on Cygwin, which should have
+    the same effect without causing problems syncing patches with OpenBSD.
+    Resync the two affected functions with OpenBSD.  ok djm, sanity checked
+    by Corinna.
 
-commit 771bb47a1df8b69061f09462e78aa0b66cd594bf
+commit 34a01b2cf737d946ddb140618e28c3048ab7a229
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 13 14:51:51 2015 +0000
+Date:   Fri Apr 8 08:19:17 2016 +0000
 
     upstream commit
     
-    implement a SIGINFO handler so we can discern a stuck
-     fuzz test from a merely glacial one; prompted by and ok markus
+    whitespace at EOL
+    
+    Upstream-ID: 5beffd4e001515da12851b974e2323ae4aa313b6
 
-commit cfaa57962f8536f3cf0fd7daf4d6a55d6f6de45f
+commit 90ee563fa6b54c59896c6c332c5188f866c5e75f
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 13 08:23:26 2015 +0000
+Date:   Fri Apr 8 06:35:54 2016 +0000
 
     upstream commit
     
-    use $SSH instead of installed ssh to allow override;
-     spotted by markus@
+    We accidentally send an empty string and a zero uint32 with
+     every direct-streamlocal@openssh.com channel open, in contravention of our
+     own spec.
+    
+    Fixing this is too hard wrt existing versions that expect these
+    fields to be present and fatal() if they aren't, so document them
+    as "reserved" fields in the PROTOCOL spec as though we always
+    intended this and let us never speak of it again.
+    
+    bz#2529, reported by Ron Frederick
+    
+    Upstream-ID: 34cd326a4d236ca6e39084c4ff796bd97ab833e7
 
-commit 0920553d0aee117a596b03ed5b49b280d34a32c5
+commit 0ccbd5eca0f0dd78e71a4b69c66f03a66908d558
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 13 07:49:49 2015 +0000
+Date:   Wed Apr 6 06:42:17 2016 +0000
 
     upstream commit
     
-    regress test for PubkeyAcceptedKeyTypes; ok markus@
+    don't record duplicate LocalForward and RemoteForward
+     entries; fixes failure with ExitOnForwardFailure+hostname canonicalisation
+     where the same forwards are added on the second pass through the
+     configuration file. bz#2562; ok dtucker@
+    
+    Upstream-ID: 40a51d68b6300f1cc61deecdb7d4847b8b7b0de1
 
-commit 27ca1a5c0095eda151934bca39a77e391f875d17
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 12 20:13:27 2015 +0000
+commit 574def0eb493cd6efeffd4ff2e9257abcffee0c8
+Author: krw@openbsd.org <krw@openbsd.org>
+Date:   Sat Apr 2 14:37:42 2016 +0000
 
     upstream commit
     
-    unbreak parsing of pubkey comments; with gerhard; ok
-     djm/deraadt
+    Another use for fcntl() and thus of the superfluous 3rd
+     parameter is when sanitising standard fd's before calling daemon().
+    
+    Use a tweaked version of the ssh(1) function in all three places
+    found using fcntl() this way.
+    
+    ok jca@ beck@
+    
+    Upstream-ID: f16811ffa19a1c5f4ef383c5f0fecb843c84e218
 
-commit 55358f0b4e0b83bc0df81c5f854c91b11e0bb4dc
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 12 11:46:32 2015 +0000
+commit b3413534aa9d71a941005df2760d1eec2c2b0854
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Apr 4 11:09:21 2016 +1000
 
-    upstream commit
-    
-    fatal if soft-PKCS11 library is missing rather (rather
-     than continue and fail with a more cryptic error)
+    Tidy up openssl header test.
+
+commit 815bcac0b94bb448de5acdd6ba925b8725240b4f
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Apr 4 11:07:59 2016 +1000
+
+    Fix configure-time warnings for openssl test.
 
-commit c3554cdd2a1a62434b8161017aa76fa09718a003
+commit 95687f5831ae680f7959446d8ae4b52452ee05dd
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 12 11:12:38 2015 +0000
+Date:   Fri Apr 1 02:34:10 2016 +0000
 
     upstream commit
     
-    let this test all supporte key types; pointed out/ok
-     markus@
+    whitespace at EOL
+    
+    Upstream-ID: 40ae2203d07cb14e0a89e1a0d4c6120ee8fd8c3a
 
-commit 1129dcfc5a3e508635004bcc05a3574cb7687167
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 15 09:40:00 2015 +0000
+commit fdfbf4580de09d84a974211715e14f88a5704b8e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Mar 31 05:24:06 2016 +0000
 
     upstream commit
     
-    sync ssh-keysign, ssh-keygen and some dependencies to the
-     new buffer/key API; mostly mechanical, ok markus@
+    Remove fallback from moduli to "primes" file that was
+     deprecated in 2001 and fix log messages referring to primes file.  Based on
+     patch from xnox at ubuntu.com via bz#2559.  "kill it" deraadt@
+    
+    Upstream-ID: 0d4f8c70e2fa7431a83b95f8ca81033147ba8713
 
-commit e4ebf5586452bf512da662ac277aaf6ecf0efe7c
+commit 0235a5fa67fcac51adb564cba69011a535f86f6b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 15 07:57:08 2015 +0000
+Date:   Thu Mar 17 17:19:43 2016 +0000
 
     upstream commit
     
-    remove commented-out test code now that it has moved to a
-     proper unit test
+    UseDNS affects ssh hostname processing in authorized_keys,
+     not known_hosts; bz#2554 reported by jjelen AT redhat.com
+    
+    Upstream-ID: c1c1bb895dde46095fc6d81d8653703928437591
 
-commit e81cba066c1e9eb70aba0f6e7c0ff220611b370f
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 14 20:54:29 2015 +0000
+commit 8c4739338f5e379d05b19d6e544540114965f07e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Mar 15 09:24:43 2016 +1100
 
-    upstream commit
+    Don't call Solaris setproject() with UsePAM=yes.
     
-    whitespace
+    When Solaris Projects are enabled along with PAM setting the project
+    is PAM's responsiblity.  bz#2425, based on patch from
+    brent.paulson at gmail.com.
+
+commit cff26f373c58457a32cb263e212cfff53fca987b
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Mar 15 04:30:21 2016 +1100
+
+    remove slogin from *.spec
 
-commit 141efe49542f7156cdbc2e4cd0a041d8b1aab622
+commit c38905ba391434834da86abfc988a2b8b9b62477
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 14 20:05:27 2015 +0000
+Date:   Mon Mar 14 16:20:54 2016 +0000
 
     upstream commit
     
-    move authfd.c and its tentacles to the new buffer/key
-     API; ok markus@
+    unbreak authentication using lone certificate keys in
+     ssh-agent: when attempting pubkey auth with a certificate, if no separate
+     private key is found among the keys then try with the certificate key itself.
+    
+    bz#2550 reported by Peter Moody
+    
+    Upstream-ID: f939cd76d68e6a9a3d1711b5a943d6ed1e623966
 
-commit 0088c57af302cda278bd26d8c3ae81d5b6f7c289
+commit 4b4bfb01cd40b9ddb948e6026ddd287cc303d871
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 14 19:33:41 2015 +0000
+Date:   Thu Mar 10 11:47:57 2016 +0000
 
     upstream commit
     
-    fix small regression: ssh-agent would return a success
-     message but an empty signature if asked to sign using an unknown key; ok
-     markus@
+    sanitise characters destined for xauth reported by
+     github.com/tintinweb feedback and ok deraadt and markus
+    
+    Upstream-ID: 18ad8d0d74cbd2ea3306a16595a306ee356aa261
 
-commit b03ebe2c22b8166e4f64c37737f4278676e3488d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 03:08:58 2015 +1100
+commit 732b463d37221722b1206f43aa59563766a6a968
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Mar 14 16:04:23 2016 +1100
 
-    more --without-openssl
+    Pass supported malloc options to connect-privsep.
     
-    fix some regressions caused by upstream merges
+    This allows us to activate only the supported options during the malloc
+    option portion of the connect-privsep test.
+
+commit d29c5b9b3e9f27394ca97a364ed4bb4a55a59744
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Mar 14 09:30:58 2016 +1100
+
+    Remove leftover roaming.h file.
     
-    enable KRLs now that they no longer require BIGNUMs
+    Pointed out by des at des.no.
 
-commit bc42cc6fe784f36df225c44c93b74830027cb5a2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 03:08:29 2015 +1100
+commit 8ff20ec95f4377021ed5e9b2331320f5c5a34cea
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Mar 14 09:24:03 2016 +1100
 
-    kludge around tun API mismatch betterer
+    Quote variables that may contain whitespace.
+    
+    The variable $L_TMP_ID_FILE needs to be surrounded by quotes in order to
+    survive paths containing whitespace.  bz#2551, from Corinna Vinschen via
+    Philip Hands.
 
-commit c332110291089b624fa0951fbf2d1ee6de525b9f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 02:59:51 2015 +1100
+commit 627824480c01f0b24541842c7206ab9009644d02
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Mar 11 14:47:41 2016 +1100
 
-    some systems lack SO_REUSEPORT
+    Include priv.h for priv_set_t.
+    
+    From alex at cooperi.net.
 
-commit 83b9678a62cbdc74eb2031cf1e1e4ffd58e233ae
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 02:35:50 2015 +1100
+commit e960051f9a264f682c4d2fefbeecffcfc66b0ddf
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Mar 9 13:14:18 2016 +1100
 
-    fix merge botch
+    Wrap stdint.h inside #ifdef HAVE_STDINT_H.
 
-commit 0cdc5a3eb6fb383569a4da2a30705d9b90428d6b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 02:35:33 2015 +1100
+commit 2c48bd344d2c4b5e08dae9aea5ff44fc19a5e363
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Mar 9 12:46:50 2016 +1100
 
-    unbreak across API change
+    Add compat to monotime_double().
+    
+    Apply all of the portability changes in monotime() to monotime() double.
+    Fixes build on at least older FreeBSD systems.
 
-commit 6e2549ac2b5e7f96cbc2d83a6e0784b120444b47
+commit 7b40ef6c2eef40c339f6ea8920cb8a44838e10c9
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 02:30:18 2015 +1100
+Date:   Tue Mar 8 14:12:58 2016 -0800
 
-    need includes.h for portable OpenSSH
+    make a regress-binaries target
+    
+    Easier to build all the regression/unit test binaries in one pass
+    than going through all of ${REGRESS_BINARIES}
 
-commit 72ef7c148c42db7d5632a29f137f8b87b579f2d9
+commit c425494d6b6181beb54a1b3763ef9e944fd3c214
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 02:21:31 2015 +1100
+Date:   Tue Mar 8 14:03:54 2016 -0800
 
-    support --without-openssl at configure time
-    
-    Disables and removes dependency on OpenSSL. Many features don't
-    work and the set of crypto options is greatly restricted. This
-    will only work on system with native arc4random or /dev/urandom.
-    
-    Considered highly experimental for now.
+    unbreak kexfuzz for -Werror without __bounded__
 
-commit 4f38c61c68ae7e3f9ee4b3c38bc86cd39f65ece9
+commit 3ed9218c336607846563daea5d5ab4f701f4e042
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 15 02:28:00 2015 +1100
+Date:   Tue Mar 8 14:01:29 2016 -0800
 
-    add files missed in last commit
+    unbreak PAM after canohost refactor
 
-commit a165bab605f7be55940bb8fae977398e8c96a46d
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 14 15:02:39 2015 +0000
+commit 885fb2a44ff694f01e4f6470f803629e11f62961
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Mar 8 11:58:43 2016 +1100
 
-    upstream commit
+    auth_get_canonical_hostname in portable code.
     
-    avoid BIGNUM in KRL code by using a simple bitmap;
-     feedback and ok markus
+    "refactor canohost.c" replaced get_canonical_hostname, this makes the
+    same change to some portable-specific code.
 
-commit 7d845f4a0b7ec97887be204c3760e44de8bf1f32
+commit 95767262caa6692eff1e1565be1f5cb297949a89
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 14 13:54:13 2015 +0000
+Date:   Mon Mar 7 19:02:43 2016 +0000
 
     upstream commit
     
-    update sftp client and server to new buffer API. pretty
-     much just mechanical changes; with & ok markus
-
-commit 139ca81866ec1b219c717d17061e5e7ad1059e2a
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jan 14 13:09:09 2015 +0000
-
-    upstream commit
+    refactor canohost.c: move functions that cache results closer
+     to the places that use them (authn and session code). After this, no state is
+     cached in canohost.c
     
-    switch to sshbuf/sshkey; with & ok djm@
+    feedback and ok markus@
+    
+    Upstream-ID: 5f2e4df88d4803fc8ec59ec53629105e23ce625e
 
-commit 81bfbd0bd35683de5d7f2238b985e5f8150a9180
+commit af0bb38ffd1f2c4f9f43b0029be2efe922815255
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jan 14 21:48:18 2015 +1100
+Date:   Fri Mar 4 15:11:55 2016 +1100
+
+    hook unittests/misc/kexfuzz into build
+
+commit 331b8e07ee5bcbdca12c11cc8f51a7e8de09b248
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Mar 4 02:48:06 2016 +0000
 
-    support --without-openssl at configure time
+    upstream commit
     
-    Disables and removes dependency on OpenSSL. Many features don't
-    work and the set of crypto options is greatly restricted. This
-    will only work on system with native arc4random or /dev/urandom.
+    Filter debug messages out of log before picking the last
+     two lines. Should prevent problems if any more debug output is added late in
+     the connection.
     
-    Considered highly experimental for now.
+    Upstream-Regress-ID: 345d0a9589c381e7d640a4ead06cfaadf4db1363
 
-commit 54924b53af15ccdcbb9f89984512b5efef641a31
+commit 0892edaa3ce623381d3a7635544cbc69b31cf9cb
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 14 10:46:28 2015 +0000
+Date:   Fri Mar 4 02:30:36 2016 +0000
 
     upstream commit
     
-    avoid an warning for the !OPENSSL case
+    add KEX fuzzer harness; ok deraadt@
+    
+    Upstream-Regress-ID: 3df5242d30551b12b828aa9ba4a4cec0846be8d1
 
-commit ae8b463217f7c9b66655bfc3945c050ffdaeb861
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jan 14 10:30:34 2015 +0000
+commit ae2562c47d41b68dbb00240fd6dd60bed205367a
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Mar 3 00:46:53 2016 +0000
 
     upstream commit
     
-    swith auth-options to new sshbuf/sshkey; ok djm@
+    Look back 3 lines for possible error messages.  Changes
+     to the code mean that "Bad packet length" errors are 3 lines back instead of
+     the previous two, which meant we didn't skip some offsets that we intended
+     to.
+    
+    Upstream-Regress-ID: 24f36912740a634d509a3144ebc8eb7c09b9c684
 
-commit 540e891191b98b89ee90aacf5b14a4a68635e763
+commit 988e429d903acfb298bfddfd75e7994327adfed0
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Jan 14 10:29:45 2015 +0000
+Date:   Fri Mar 4 03:35:44 2016 +0000
 
     upstream commit
     
-    make non-OpenSSL aes-ctr work on sshd w/ privsep; ok
-     markus@
+    fix ClientAliveInterval when a time-based RekeyLimit is
+     set; previously keepalive packets were not being sent. bz#2252 report and
+     analysis by Christian Wittenhorst and Garrett Lee feedback and ok dtucker@
+    
+    Upstream-ID: d48f9deadd35fdacdd5106b41bb07630ddd4aa81
 
-commit 60c2c4ea5e1ad0ddfe8b2877b78ed5143be79c53
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Wed Jan 14 10:24:42 2015 +0000
+commit 8ef04d7a94bcdb8b0085fdd2a79a844b7d40792d
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Mar 2 22:43:52 2016 +0000
 
     upstream commit
     
-    remove unneeded includes, sync my copyright across files
-     & whitespace; ok djm@
+    Improve accuracy of reported transfer speeds by waiting
+     for the ack from the other end.  Pointed out by mmcc@, ok deraadt@ markus@
+    
+    Upstream-ID: 99f1cf15c9a8f161086b814d414d862795ae153d
 
-commit 128343bcdb0b60fc826f2733df8cf979ec1627b4
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Tue Jan 13 19:31:40 2015 +0000
+commit b8d4eafe29684fe4f5bb587f7eab948e6ed62723
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Mar 2 22:42:40 2016 +0000
 
     upstream commit
     
-    adapt mac.c to ssherr.h return codes (de-fatal) and
-     simplify dependencies ok djm@
+    Improve precision of progressmeter for sftp and scp by
+     storing sub-second timestamps.  Pointed out by mmcc@, ok deraadt@ markus@
+    
+    Upstream-ID: 38fd83a3d83dbf81c8ff7b5d1302382fe54970ab
 
-commit e7fd952f4ea01f09ceb068721a5431ac2fd416ed
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 13 19:04:35 2015 +0000
+commit 18f64b969c70ed00e74b9d8e50359dbe698ce4c0
+Author: jca@openbsd.org <jca@openbsd.org>
+Date:   Mon Feb 29 20:22:36 2016 +0000
 
     upstream commit
     
-    sync changes from libopenssh; prepared by markus@ mostly
-     debug output tweaks, a couple of error return value changes and some other
-     minor stuff
-
-commit 76c0480a85675f03a1376167cb686abed01a3583
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 13 19:38:18 2015 +1100
-
-    add --without-ssh1 option to configure
+    Print ssize_t with %zd; ok deraadt@ mmcc@
     
-    Allows disabling support for SSH protocol 1.
+    Upstream-ID: 0590313bbb013ff6692298c98f7e0be349d124bd
 
-commit 1f729f0614d1376c3332fa1edb6a5e5cec7e9e03
+commit 6e7f68ce38130c794ec1fb8d2a6091fbe982628d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Jan 13 07:39:19 2015 +0000
+Date:   Sun Feb 28 22:27:00 2016 +0000
 
     upstream commit
     
-    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@
+    rearrange DH public value tests to be a little more clear
+    
+    rearrange DH private value generation to explain rationale more
+    clearly and include an extra sanity check.
+    
+    ok deraadt
+    
+    Upstream-ID: 9ad8a07e1a12684e1b329f9bd88941b249d4b2ad
 
-commit 816d1538c24209a93ba0560b27c4fda57c3fff65
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 12 20:13:27 2015 +0000
+commit 2ed17aa34008bdfc8db674315adc425a0712be11
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Mar 1 15:24:20 2016 +1100
 
-    upstream commit
+    Import updated moduli file from OpenBSD.
     
-    unbreak parsing of pubkey comments; with gerhard; ok
-     djm/deraadt
+    Note that 1.5k bit groups have been removed.
 
-commit 0097565f849851812df610b7b6b3c4bd414f6c62
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 12 19:22:46 2015 +0000
+commit 72b061d4ba0f909501c595d709ea76e06b01e5c9
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Feb 26 14:40:04 2016 +1100
 
-    upstream commit
-    
-    missing error assigment on sshbuf_put_string()
+    Add a note about using xlc on AIX.
 
-commit a7f49dcb527dd17877fcb8d5c3a9a6f550e0bba5
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Jan 12 15:18:07 2015 +0000
+commit fd4e4f2416baa2e6565ea49d52aade296bad3e28
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Feb 24 10:44:25 2016 +1100
 
-    upstream commit
+    Skip PrintLastLog in config dump mode.
     
-    apparently memcpy(x, NULL, 0) is undefined behaviour
-     according to C99 (cf. sections 7.21.1 and 7.1.4), so check skip memcpy calls
-     when length==0; ok markus@
+    When DISABLE_LASTLOG is set, do not try to include PrintLastLog in the
+    config dump since it'll be reported as UNKNOWN.
 
-commit 905fe30fca82f38213763616d0d26eb6790bde33
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 12 14:05:19 2015 +0000
+commit 99135c764fa250801da5ec3b8d06cbd0111caae8
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Feb 23 20:17:23 2016 +1100
 
-    upstream commit
-    
-    free->sshkey_free; ok djm@
+    update spec/README versions ahead of release
 
-commit f067cca2bc20c86b110174c3fef04086a7f57b13
-Author: markus@openbsd.org <markus@openbsd.org>
-Date:   Mon Jan 12 13:29:27 2015 +0000
+commit b86a334aaaa4d1e643eb1fd71f718573d6d948b5
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Feb 23 20:16:53 2016 +1100
 
-    upstream commit
-    
-    allow WITH_OPENSSL w/o WITH_SSH1; ok djm@
+    put back portable patchlevel to p1
 
-commit c4bfafcc2a9300d9cfb3c15e75572d3a7d74670d
+commit 555dd35ff176847e3c6bd068ba2e8db4022eb24f
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 8 13:10:58 2015 +0000
+Date:   Tue Feb 23 09:14:34 2016 +0000
 
     upstream commit
     
-    adjust for sshkey_load_file() API change
+    openssh-7.2
+    
+    Upstream-ID: 9db776b26014147fc907ece8460ef2bcb0f11e78
 
-commit e752c6d547036c602b89e9e704851463bd160e32
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 8 13:44:36 2015 +0000
+commit 1acc058d0a7913838c830ed998a1a1fb5b7864bf
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Feb 23 16:12:13 2016 +1100
 
-    upstream commit
+    Disable tests where fs perms are incorrect
     
-    fix ssh_config FingerprintHash evaluation order; from Petr
-     Lautrbach
+    Some tests have strict requirements on the filesystem permissions
+    for certain files and directories. This adds a regress/check-perm
+    tool that copies the relevant logic from sshd to exactly test
+    the paths in question. This lets us skip tests when the local
+    filesystem doesn't conform to our expectations rather than
+    continuing and failing the test run.
+    
+    ok dtucker@
 
-commit ab24ab847b0fc94c8d5e419feecff0bcb6d6d1bf
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 8 10:15:45 2015 +0000
+commit 39f303b1f36d934d8410b05625f25c7bcb75db4d
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Feb 23 12:56:59 2016 +1100
 
-    upstream commit
+    fix sandbox on OSX Lion
+    
+    sshd was failing with:
     
-    reorder hostbased key attempts to better match the
-     default hostkey algorithms order in myproposal.h; ok markus@
+    ssh_sandbox_child: sandbox_init: dlopen(/usr/lib/libsandbox.1.dylib, 261):cw
+      image not found [preauth]
+    
+    caused by chroot before sandboxing. Avoid by explicitly linking libsandbox
+    to sshd. Spotted by Darren.
 
-commit 1195f4cb07ef4b0405c839293c38600b3e9bdb46
+commit 0d1451a32c7436e6d3d482351e776bc5e7824ce4
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Jan 8 10:14:08 2015 +0000
+Date:   Tue Feb 23 01:34:14 2016 +0000
 
     upstream commit
     
-    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).
+    fix spurious error message when incorrect passphrase
+     entered for keys; reported by espie@ ok deraadt@
     
-    Fixes a few other things en passant:
+    Upstream-ID: 58b2e46e63ed6912ed1ee780bd3bd8560f9a5899
+
+commit 09d87d79741beb85768b5e788d7dfdf4bc3543dc
+Author: sobrado@openbsd.org <sobrado@openbsd.org>
+Date:   Sat Feb 20 23:06:23 2016 +0000
+
+    upstream commit
     
-    Makes ed25519 keys work for hostbased authentication (ssh-keysign
-    previously used the PEM-only routines).
+    set ssh(1) protocol version to 2 only.
     
-    Fixes key comment regression bz#2306: key pathnames were being lost as
-    comment fields.
+    ok djm@
     
-    ok markus@
+    Upstream-ID: e168daf9d27d7e392e3c9923826bd8e87b2b3a10
 
-commit febbe09e4e9aff579b0c5cc1623f756862e4757d
-Author: tedu@openbsd.org <tedu@openbsd.org>
-Date:   Wed Jan 7 18:15:07 2015 +0000
+commit 9262e07826ba5eebf8423f7ac9e47ec488c47869
+Author: sobrado@openbsd.org <sobrado@openbsd.org>
+Date:   Sat Feb 20 23:02:39 2016 +0000
 
     upstream commit
     
-    workaround for the Meyer, et al, Bleichenbacher Side
-     Channel Attack. fake up a bignum key before RSA decryption. discussed/ok djm
-     markus
+    add missing ~/.ssh/id_ecdsa and ~/.ssh/id_ed25519 to
+     IdentityFile.
+    
+    ok djm@
+    
+    Upstream-ID: 6ce99466312e4ae7708017c3665e3edb976f70cf
 
-commit 5191df927db282d3123ca2f34a04d8d96153911a
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Dec 23 22:42:48 2014 +0000
+commit c12f0fdce8f985fca8d71829fd64c5b89dc777f5
+Author: sobrado@openbsd.org <sobrado@openbsd.org>
+Date:   Sat Feb 20 23:01:46 2016 +0000
 
     upstream commit
     
-    KNF and add a little more debug()
+    AddressFamily defaults to any.
+    
+    ok djm@
+    
+    Upstream-ID: 0d94aa06a4b889bf57a7f631c45ba36d24c13e0c
 
-commit 8abd80315d3419b20e6938f74d37e2e2b547f0b7
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Mon Dec 22 09:26:31 2014 +0000
+commit 907091acb188b1057d50c2158f74c3ecf1c2302b
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Feb 19 09:05:39 2016 +1100
 
-    upstream commit
+    Make Solaris privs code build on older systems.
     
-    add fingerprinthash to the options list;
+    Not all systems with Solaris privs have priv_basicset so factor that
+    out and provide backward compatibility code.  Similarly, not all have
+    PRIV_NET_ACCESS so wrap that in #ifdef.  Based on code from
+    alex at cooperi.net and djm@ with help from carson at taltos.org and
+    wieland at purdue.edu.
 
-commit 296ef0560f60980da01d83b9f0e1a5257826536f
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Mon Dec 22 09:24:59 2014 +0000
+commit 292a8dee14e5e67dcd1b49ba5c7b9023e8420d59
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Feb 17 22:20:14 2016 +0000
 
     upstream commit
     
-    tweak previous;
+    rekey refactor broke SSH1; spotted by Tom G. Christensen
+    
+    Upstream-ID: 43f0d57928cc077c949af0bfa71ef574dcb58243
 
-commit 462082eacbd37778a173afb6b84c6f4d898a18b5
-Author: Damien Miller <djm@google.com>
-Date:   Tue Dec 30 08:16:11 2014 +1100
+commit 3a13cb543df9919aec2fc6b75f3dd3802facaeca
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Feb 17 08:57:34 2016 +0000
 
-    avoid uninitialised free of ldns_res
+    upstream commit
     
-    If an invalid rdclass was passed to getrrsetbyname() then
-    this would execute a free on an uninitialised pointer.
-    OpenSSH only ever calls this with a fixed and valid rdclass.
+    rsa-sha2-512,rsa-sha2-256 cannot be selected explicitly
+     in *KeyTypes options yet. Remove them from the lists of algorithms for now.
+     committing on behalf of markus@ ok djm@
     
-    Reported by Joshua Rogers
+    Upstream-ID: c6e8820eb8e610ac21551832c0c89684a9a51bb7
 
-commit 01b63498801053f131a0740eb9d13faf35d636c8
-Author: Damien Miller <djm@google.com>
-Date:   Mon Dec 29 18:10:18 2014 +1100
+commit a685ae8d1c24fb7c712c55a4f3280ee76f5f1e4b
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Wed Feb 17 07:38:19 2016 +0000
 
-    pull updated OpenBSD BCrypt PBKDF implementation
+    upstream commit
     
-    Includes fix for 1 byte output overflow for large key length
-    requests (not reachable in OpenSSH).
+    since these pages now clearly tell folks to avoid v1,
+     normalise the docs from a v2 perspective (i.e. stop pointing out which bits
+     are v2 only);
     
-    Pointed out by Joshua Rogers
-
-commit c528c1b4af2f06712177b3de9b30705752f7cbcb
-Author: Damien Miller <djm@google.com>
-Date:   Tue Dec 23 15:26:13 2014 +1100
-
-    fix variable name for IPv6 case in construct_utmpx
+    ok/tweaks djm ok markus
     
-    patch from writeonce AT midipix.org via bz#2296
+    Upstream-ID: eb474f8c36fb6a532dc05c282f7965e38dcfa129
 
-commit 293cac52dcda123244b2e594d15592e5e481c55e
-Author: Damien Miller <djm@google.com>
-Date:   Mon Dec 22 16:30:42 2014 +1100
-
-    include and use OpenBSD netcat in regress/
-
-commit 8f6784f0cb56dc4fd00af3e81a10050a5785228d
+commit c5c3f3279a0e4044b8de71b70d3570d692d0f29d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 09:05:17 2014 +0000
+Date:   Wed Feb 17 05:29:04 2016 +0000
 
     upstream commit
     
-    mention ssh -Q feature to list supported { MAC, cipher,
-     KEX, key } algorithms in more places and include the query string used to
-     list the relevant information; bz#2288
+    make sandboxed privilege separation the default, not just
+     for new installs; "absolutely" deraadt@
+    
+    Upstream-ID: 5221ef3b927d2df044e9aa3f5db74ae91743f69b
 
-commit 449e11b4d7847079bd0a2daa6e3e7ea03d8ef700
+commit eb3f7337a651aa01d5dec019025e6cdc124ed081
 Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Mon Dec 22 08:24:17 2014 +0000
+Date:   Tue Feb 16 07:47:54 2016 +0000
 
     upstream commit
     
-    tweak previous;
+    no need to state that protocol 2 is the default twice;
+    
+    Upstream-ID: b1e4c36b0c2e12e338e5b66e2978f2ac953b95eb
 
-commit 4bea0ab3290c0b9dd2aa199e932de8e7e18062d6
+commit e7901efa9b24e5b0c7e74f2c5520d47eead4d005
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 08:06:03 2014 +0000
+Date:   Tue Feb 16 05:11:04 2016 +0000
 
     upstream commit
     
-    regression test for multiple required pubkey authentication;
-     ok markus@
+    Replace list of ciphers and MACs adjacent to -1/-2 flag
+     descriptions in ssh(1) with a strong recommendation not to use protocol 1.
+     Add a similar warning to the Protocol option descriptions in ssh_config(5)
+     and sshd_config(5);
+    
+    prompted by and ok mmcc@
+    
+    Upstream-ID: 961f99e5437d50e636feca023978950a232ead5e
 
-commit f1c4d8ec52158b6f57834b8cd839605b0a33e7f2
+commit 5a0fcb77287342e2fc2ba1cee79b6af108973dc2
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 08:04:23 2014 +0000
+Date:   Tue Feb 16 03:37:48 2016 +0000
 
     upstream commit
     
-    correct description of what will happen when a
-     AuthorizedKeysCommand is specified but AuthorizedKeysCommandUser is not (sshd
-     will refuse to start)
+    add a "Close session" log entry (at loglevel=verbose) to
+     correspond to the existing "Starting session" one. Also include the session
+     id number to make multiplexed sessions more apparent.
+    
+    feedback and ok dtucker@
+    
+    Upstream-ID: e72d2ac080e02774376325136e532cb24c2e617c
 
-commit 161cf419f412446635013ac49e8c660cadc36080
+commit 624fd395b559820705171f460dd33d67743d13d6
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 07:55:51 2014 +0000
+Date:   Wed Feb 17 02:24:17 2016 +0000
 
     upstream commit
     
-    make internal handling of filename arguments of "none"
-     more consistent with ssh. "none" arguments are now replaced with NULL when
-     the configuration is finalised.
+    include bad $SSH_CONNECTION in failure output
     
-    Simplifies checking later on (just need to test not-NULL rather than
-    that + strcmp) and cleans up some inconsistencies. ok markus@
+    Upstream-Regress-ID: b22d72edfde78c403aaec2b9c9753ef633cc0529
 
-commit f69b69b8625be447b8826b21d87713874dac25a6
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 07:51:30 2014 +0000
+commit 60d860e54b4f199e5e89963b1c086981309753cb
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Feb 17 13:37:09 2016 +1100
 
-    upstream commit
+    Rollback addition of va_start.
     
-    remember which public keys have been used for
-     authentication and refuse to accept previously-used keys.
-    
-    This allows AuthenticationMethods=publickey,publickey to require
-    that users authenticate using two _different_ pubkeys.
+    va_start was added in 0f754e29dd3760fc0b172c1220f18b753fb0957e, however
+    it has the wrong number of args and it's not usable in non-variadic
+    functions anyway so it breaks things (for example Solaris 2.6 as
+    reported by Tom G. Christensen).i  ok djm@
+
+commit 2fee909c3cee2472a98b26eb82696297b81e0d38
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Wed Feb 17 09:48:15 2016 +1100
+
+    Look for gethostbyname in libresolv and libnsl.
     
-    ok markus@
+    Should fix build problem on Solaris 2.6 reported by Tom G. Christensen.
+
+commit 5ac712d81a84396aab441a272ec429af5b738302
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Feb 16 10:45:02 2016 +1100
+
+    make existing ssh_malloc_init only for __OpenBSD__
 
-commit 46ac2ed4677968224c4ca825bc98fc68dae183f0
+commit 24c9bded569d9f2449ded73f92fb6d12db7a9eec
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 07:24:11 2014 +0000
+Date:   Mon Feb 15 23:32:37 2016 +0000
 
     upstream commit
     
-    fix passing of wildcard forward bind addresses when
-     connection multiplexing is in use; patch from Sami Hartikainen via bz#2324;
-     ok dtucker@
+    memleak of algorithm name in mm_answer_sign; reported by
+     Jakub Jelen
+    
+    Upstream-ID: ccd742cd25952240ebd23d7d4d6b605862584d08
 
-commit 0d1b241a262e4d0a6bbfdd595489ab1b853c43a1
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 06:14:29 2014 +0000
+commit ffb1e7e896139a42ceb78676f637658f44612411
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Feb 15 09:47:49 2016 +0000
 
     upstream commit
     
-    make this slightly easier to diff against portable
+    Add a function to enable security-related malloc_options.
+      With and ok deraadt@, something similar has been in the snaps for a while.
+    
+    Upstream-ID: 43a95523b832b7f3b943d2908662191110c380ed
 
-commit 0715bcdddbf68953964058f17255bf54734b8737
+commit ef39e8c0497ff0564990a4f9e8b7338b3ba3507c
 Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Dec 22 13:47:07 2014 +1100
+Date:   Tue Feb 16 10:34:39 2016 +1100
 
-    add missing regress output file
+    sync ssh-copy-id with upstream 783ef08b0a75
 
-commit 1e30483c8ad2c2f39445d4a4b6ab20c241e40593
+commit d2d772f55b19bb0e8d03c2fe1b9bb176d9779efd
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 02:15:52 2014 +0000
+Date:   Fri Feb 12 00:20:30 2016 +0000
 
     upstream commit
     
-    adjust for new SHA256 key fingerprints and
-     slightly-different MD5 hex fingerprint format
+    avoid fatal() for PKCS11 tokens that present empty key IDs
+     bz#1773, ok markus@
+    
+    Upstream-ID: 044a764fee526f2c4a9d530bd10695422d01fc54
 
-commit 6b40567ed722df98593ad8e6a2d2448fc2b4b151
+commit e4c918a6c721410792b287c9fd21356a1bed5805
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Dec 22 01:14:49 2014 +0000
+Date:   Thu Feb 11 02:56:32 2016 +0000
 
     upstream commit
     
-    poll changes to netcat (usr.bin/netcat.c r1.125) broke
-     this test; fix it by ensuring more stdio fds are sent to devnull
-
-commit a5375ccb970f49dddf7d0ef63c9b713ede9e7260
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Sun Dec 21 23:35:14 2014 +0000
-
-    upstream commit
+    sync crypto algorithm lists in ssh_config(5) and
+     sshd_config(5) with current reality. bz#2527
     
-    tweak previous;
+    Upstream-ID: d7fd1b6c1ed848d866236bcb1d7049d2bb9b2ff6
 
-commit b79efde5c3badf5ce4312fe608d8307eade533c5
+commit e30cabfa4ab456a30b3224f7f545f1bdfc4a2517
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Dec 21 23:12:42 2014 +0000
+Date:   Thu Feb 11 02:21:34 2016 +0000
 
     upstream commit
     
-    document FingerprintHash here too
-
-commit d16bdd8027dd116afa01324bb071a4016cdc1a75
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Dec 22 10:18:09 2014 +1100
-
-    missing include for base64 encoding
+    fix regression in openssh-6.8 sftp client: existing
+     destination directories would incorrectly terminate recursive uploads;
+     bz#2528
+    
+    Upstream-ID: 3306be469f41f26758e3d447987ac6d662623e18
 
-commit 56d1c83cdd1ac76f1c6bd41e01e80dad834f3994
+commit 714e367226ded4dc3897078be48b961637350b05
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Sun Dec 21 22:27:55 2014 +0000
+Date:   Tue Feb 9 05:30:04 2016 +0000
 
     upstream commit
     
-    Add FingerprintHash option to control algorithm used for
-     key fingerprints. Default changes from MD5 to SHA256 and format from hex to
-     base64.
+    turn off more old crypto in the client: hmac-md5, ripemd,
+     truncated HMACs, RC4, blowfish. ok markus@ dtucker@
     
-    Feedback and ok naddy@ markus@
+    Upstream-ID: 96aa11c2c082be45267a690c12f1d2aae6acd46e
 
-commit 058f839fe15c51be8b3a844a76ab9a8db550be4f
+commit 5a622844ff7f78dcb75e223399f9ef0977e8d0a3
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 18 23:58:04 2014 +0000
+Date:   Mon Feb 8 23:40:12 2016 +0000
 
     upstream commit
     
-    don't count partial authentication success as a failure
-     against MaxAuthTries; ok deraadt@
+    don't attempt to percent_expand() already-canonicalised
+     addresses, avoiding unnecessary failures when attempting to connect to scoped
+     IPv6 addresses (that naturally contain '%' characters)
+    
+    Upstream-ID: f24569cffa1a7cbde5f08dc739a72f4d78aa5c6a
 
-commit c7219f4f54d64d6dde66dbcf7a2699daa782d2a1
+commit 19bcf2ea2d17413f2d9730dd2a19575ff86b9b6a
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Dec 12 00:02:17 2014 +0000
+Date:   Mon Feb 8 10:57:07 2016 +0000
 
     upstream commit
     
-    revert chunk I didn't mean to commit yet; via jmc@
-
-commit 7de5991aa3997e2981440f39c1ea01273a0a2c7b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 18 11:44:06 2014 +1100
-
-    upstream libc change
+    refactor activation of rekeying
     
-    revision 1.2
-    date: 2014/12/08 03:45:00;  author: bcook;  state: Exp;  lines: +2 -2;  commitid: 7zWEBgJJOCZ2hvTV;
-    avoid left shift overflow in reallocarray.
+    This makes automatic rekeying internal to the packet code (previously
+    the server and client loops needed to assist). In doing to it makes
+    application of rekey limits more accurate by accounting for packets
+    about to be sent as well as packets queued during rekeying events
+    themselves.
     
-    Some 64-bit platforms (e.g. Windows 64) have a 32-bit long. So, shifting
-    1UL 32-bits to the left causes an overflow. This replaces the constant 1UL with
-    (size_t)1 so that we get the correct constant size for the platform.
+    Based on a patch from dtucker@ which was in turn based on a patch
+    Aleksander Adamowski in bz#2521; ok markus@
     
-    discussed with tedu@ & deraadt@
+    Upstream-ID: a441227fd64f9739850ca97b4cf794202860fcd8
 
-commit 2048f85a5e6da8bc6e0532efe02ecfd4e63c978c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Dec 18 10:15:49 2014 +1100
+commit 603ba41179e4b53951c7b90ee95b6ef3faa3f15d
+Author: naddy@openbsd.org <naddy@openbsd.org>
+Date:   Fri Feb 5 13:28:19 2016 +0000
 
-    include CFLAGS in gnome askpass targets
+    upstream commit
     
-    from Fedora
+    Only check errno if read() has returned an error.  EOF is
+     not an error. This fixes a problem where the mux master would sporadically
+     fail to notice that the client had exited. ok mikeb@ djm@
+    
+    Upstream-ID: 3c2dadc21fac6ef64665688aac8a75fffd57ae53
 
-commit 48b68ce19ca42fa488960028048dec023f7899bb
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 11 08:20:09 2014 +0000
+commit 56d7dac790693ce420d225119283bc355cff9185
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Fri Feb 5 04:31:21 2016 +0000
 
     upstream commit
     
-    explicitly include sys/param.h in files that use the
-     howmany() macro; from portable
+    avoid an uninitialised value when NumberOfPasswordPrompts
+     is 0 ok markus@ djm@
+    
+    Upstream-ID: 11b068d83c2865343aeb46acf1e9eec00f829b6b
 
-commit d663bea30a294d440fef4398e5cd816317bd4518
+commit deae7d52d59c5019c528f977360d87fdda15d20b
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 11 05:25:06 2014 +0000
+Date:   Fri Feb 5 03:07:06 2016 +0000
 
     upstream commit
     
-    mention AuthorizedKeysCommandUser must be set for
-     AuthorizedKeysCommand to be run; bz#2287
+    mention internal DH-GEX fallback groups; bz#2302
+    
+    Upstream-ID: e7b395fcca3122cd825515f45a2e41c9a157e09e
 
-commit 17bf3d81e00f2abb414a4fd271118cf4913f049f
+commit cac3b6665f884d46192c0dc98a64112e8b11a766
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 11 05:13:28 2014 +0000
+Date:   Fri Feb 5 02:37:56 2016 +0000
 
     upstream commit
     
-    show in debug output which hostkeys are being tried when
-     attempting hostbased auth; patch from Iain Morgan
+    better description for MaxSessions; bz#2531
+    
+    Upstream-ID: e2c0d74ee185cd1a3e9d4ca1f1b939b745b354da
+
+commit 5ef4b0fdcc7a239577a754829b50022b91ab4712
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Jan 27 17:45:56 2016 +1100
+
+    avoid FreeBSD RCS Id in comment
+    
+    Change old $FreeBSD version string in comment so it doesn't
+    become an RCS ident downstream; requested by des AT des.no
 
-commit da0277e3717eadf5b15e03379fc29db133487e94
+commit 696d12683c90d20a0a9c5f4275fc916b7011fb04
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 11 04:16:14 2014 +0000
+Date:   Thu Feb 4 23:43:48 2016 +0000
 
     upstream commit
     
-    Make manual reflect reality: sftp-server's -d option
-     accepts a "%d" option, not a "%h" one.
+    printf argument casts to avoid warnings on strict
+     compilers
     
-    bz#2316; reported by Kirk Wolf
+    Upstream-ID: 7b9f6712cef01865ad29070262d366cf13587c9c
 
-commit 4cf87f4b81fa9380bce5fcff7b0f8382ae3ad996
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Dec 10 01:24:09 2014 +0000
+commit 5658ef2501e785fbbdf5de2dc33b1ff7a4dca73a
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Feb 1 21:18:17 2016 +0000
 
     upstream commit
     
-    better error value for invalid signature length
+    Avoid ugly "DISPLAY "(null)" invalid; disabling X11
+     forwarding" message when DISPLAY is not set.  This could also result in a
+     crash on systems with a printf that doesn't handle NULL.  OK djm@
+    
+    Upstream-ID: 20ee0cfbda678a247264c20ed75362042b90b412
 
-commit 4bfad14ca56f8ae04f418997816b4ba84e2cfc3c
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Dec 10 02:12:51 2014 +1100
+commit 537f88ec7bcf40bd444ac5584c707c5588c55c43
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jan 29 05:18:15 2016 +0000
 
-    Resync more with OpenBSD's rijndael.c, in particular "#if 0"-ing out some
-    unused code.  Should fix compile error reported by plautrba at redhat.
+    upstream commit
+    
+    Add regression test for RekeyLimit parsing of >32bit values
+     (4G and 8G).
+    
+    Upstream-Regress-ID: 548390350c62747b6234f522a99c319eee401328
 
-commit 642652d280499691c8212ec6b79724b50008ce09
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Dec 10 01:32:23 2014 +1100
+commit 4c6cb8330460f94e6c7ae28a364236d4188156a3
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jan 29 23:04:46 2016 +0000
 
-    Add reallocarray to compat library
+    upstream commit
+    
+    Remove leftover roaming dead code.  ok djm markus.
+    
+    Upstream-ID: 13d1f9c8b65a5109756bcfd3b74df949d53615be
 
-commit 3dfd8d93dfcc69261f5af99df56f3ff598581979
+commit 28136471809806d6246ef41e4341467a39fe2f91
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 4 22:31:50 2014 +0000
+Date:   Fri Jan 29 05:46:01 2016 +0000
 
     upstream commit
     
-    add tests for new client RevokedHostKeys option; refactor
-     to make it a bit more readable
+    include packet type of non-data packets in debug3 output;
+     ok markus dtucker
+    
+    Upstream-ID: 034eaf639acc96459b9c5ce782db9fcd8bd02d41
 
-commit a31046cad1aed16a0b55171192faa6d02665ccec
-Author: krw@openbsd.org <krw@openbsd.org>
-Date:   Wed Nov 19 13:35:37 2014 +0000
+commit 6fd6e28daccafaa35f02741036abe64534c361a1
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jan 29 03:31:03 2016 +0000
 
     upstream commit
     
-    Nuke yet more obvious #include duplications.
+    Revert "account for packets buffered but not yet
+     processed" change as it breaks for very small RekeyLimit values due to
+     continuous rekeying.  ok djm@
     
-    ok deraadt@
+    Upstream-ID: 7e03f636cb45ab60db18850236ccf19079182a19
 
-commit a7c762e5b2c1093542c0bc1df25ccec0b4cf479f
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 4 20:47:36 2014 +0000
+commit 921ff00b0ac429666fb361d2d6cb1c8fff0006cb
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jan 29 02:54:45 2016 +0000
 
     upstream commit
     
-    key_in_file() wrapper is no longer used
+    Allow RekeyLimits in excess of 4G up to 2**63 bits
+     (limited by the return type of scan_scaled).  Part of bz#2521, ok djm.
+    
+    Upstream-ID: 13bea82be566b9704821b1ea05bf7804335c7979
 
-commit 5e39a49930d885aac9c76af3129332b6e772cd75
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 4 02:24:32 2014 +0000
+commit c0060a65296f01d4634f274eee184c0e93ba0f23
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Jan 29 02:42:46 2016 +0000
 
     upstream commit
     
-    add RevokedHostKeys option for the client
+    Account for packets buffered but not yet processed when
+     computing whether or not it is time to perform rekeying.  bz#2521, based
+     loosely on a patch from olo at fb.com, ok djm@
     
-    Allow textfile or KRL-based revocation of hostkeys.
+    Upstream-ID: 67e268b547f990ed220f3cb70a5624d9bda12b8c
 
-commit 74de254bb92c684cf53461da97f52d5ba34ded80
+commit 44cf930e670488c85c9efeb373fa5f4b455692ac
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Thu Dec 4 01:49:59 2014 +0000
+Date:   Wed Jan 27 06:44:58 2016 +0000
 
     upstream commit
     
-    convert KRL code to new buffer API
+    change old $FreeBSD version string in comment so it doesn't
+     become an RCS ident downstream; requested by des AT des.no
     
-    ok markus@
+    Upstream-ID: 8ca558c01f184e596b45e4fc8885534b2c864722
 
-commit db995f2eed5fc432598626fa3e30654503bf7151
-Author: millert@openbsd.org <millert@openbsd.org>
-Date:   Wed Nov 26 18:34:51 2014 +0000
+commit ebacd377769ac07d1bf3c75169644336056b7060
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jan 27 00:53:12 2016 +0000
 
     upstream commit
     
-    Prefer setvbuf() to setlinebuf() for portability; ok
-     deraadt@
+    make the debug messages a bit more useful here
+    
+    Upstream-ID: 478ccd4e897e0af8486b294aa63aa3f90ab78d64
 
-commit 72bba3d179ced8b425272efe6956a309202a91f3
+commit 458abc2934e82034c5c281336d8dc0f910aecad3
 Author: jsg@openbsd.org <jsg@openbsd.org>
-Date:   Mon Nov 24 03:39:22 2014 +0000
+Date:   Sat Jan 23 05:31:35 2016 +0000
 
     upstream commit
     
-    Fix crashes in the handling of the sshd config file found
-     with the afl fuzzer.
+    Zero a stack buffer with explicit_bzero() instead of
+     memset() when returning from client_loop() for consistency with
+     buffer_free()/sshbuf_free().
+    
+    ok dtucker@ deraadt@ djm@
     
-    ok deraadt@ djm@
+    Upstream-ID: bc9975b2095339811c3b954694d7d15ea5c58f66
 
-commit 867f49c666adcfe92bf539d9c37c1accdea08bf6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Nov 26 13:22:41 2014 +1100
+commit 65a3c0dacbc7dbb75ddb6a70ebe22d8de084d0b0
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jan 20 09:22:39 2016 +0000
 
-    Avoid Cygwin ssh-host-config reading /etc/group
+    upstream commit
+    
+    Include sys/time.h for gettimeofday.  From sortie at
+     maxsi.org.
     
-    Patch from Corinna Vinschen
+    Upstream-ID: 6ed0c33b836d9de0a664cd091e86523ecaa2fb3b
 
-commit 8b66f36291a721b1ba7c44f24a07fdf39235593e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Nov 26 13:20:35 2014 +1100
+commit fc77ccdc2ce6d5d06628b8da5048a6a5f6ffca5a
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Thu Jan 14 22:56:56 2016 +0000
 
-    allow custom service name for sshd on Cygwin
+    upstream commit
     
-    Permits the use of multiple sshd running with different service names.
+    fd leaks; report Qualys Security Advisory team; ok
+     deraadt@
     
-    Patch by Florian Friesdorf via Corinna Vinschen
+    Upstream-ID: 4ec0f12b9d8fa202293c9effa115464185aa071d
 
-commit 08c0eebf55d70a9ae1964399e609288ae3186a0c
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Sat Nov 22 19:21:03 2014 +0000
+commit a306863831c57ec5fad918687cc5d289ee8e2635
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Thu Jan 14 16:17:39 2016 +0000
 
     upstream commit
     
-    restore word zapped in previous, and remove some useless
-     "No" macros;
+    remove roaming support; ok djm@
+    
+    Upstream-ID: 2cab8f4b197bc95776fb1c8dc2859dad0c64dc56
 
-commit a1418a0033fba43f061513e992e1cbcc3343e563
+commit 6ef49e83e30688504552ac10875feabd5521565f
 Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Sat Nov 22 18:15:41 2014 +0000
+Date:   Thu Jan 14 14:34:34 2016 +0000
 
     upstream commit
     
-    /dev/random has created the same effect as /dev/arandom
-     (and /dev/urandom) for quite some time.  Mop up the last few, by using
-     /dev/random where we actually want it, or not even mentioning arandom where
-     it is irrelevant.
+    Disable experimental client-side roaming support.  Server
+     side was disabled/gutted for years already, but this aspect was surprisingly
+     forgotten. Thanks for report from Qualys
+    
+    Upstream-ID: 2328004b58f431a554d4c1bf67f5407eae3389df
+
+commit 8d7b523b96d3be180572d9d338cedaafc0570f60
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:08:19 2016 +1100
+
+    bump version numbers
+
+commit 8c3d512a1fac8b9c83b4d0c9c3f2376290bd84ca
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jan 14 11:04:04 2016 +1100
+
+    openssh-7.1p2
 
-commit b6de5ac9ed421362f479d1ad4fa433d2e25dad5b
+commit e6c85f8889c5c9eb04796fdb76d2807636b9eef5
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Jan 15 01:30:36 2016 +1100
+
+    forcibly disable roaming support in the client
+
+commit ed4ce82dbfa8a3a3c8ea6fa0db113c71e234416c
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Fri Nov 21 01:00:38 2014 +0000
+Date:   Wed Jan 13 23:04:47 2016 +0000
 
     upstream commit
     
-    fix NULL pointer dereference crash on invalid timestamp
+    eliminate fallback from untrusted X11 forwarding to trusted
+     forwarding when the X server disables the SECURITY extension; Reported by
+     Thomas Hoger; ok deraadt@
     
-    found using Michal Zalewski's afl fuzzer
+    Upstream-ID: f76195bd2064615a63ef9674a0e4096b0713f938
 
-commit a1f8110cd5ed818d59b3a2964fab7de76e92c18e
-Author: mikeb@openbsd.org <mikeb@openbsd.org>
-Date:   Tue Nov 18 22:38:48 2014 +0000
+commit 9a728cc918fad67c8a9a71201088b1e150340ba4
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jan 12 23:42:54 2016 +0000
 
     upstream commit
     
-    Sync AES code to the one shipped in OpenSSL/LibreSSL.
-    
-    This includes a commit made by Andy Polyakov <appro at openssl ! org>
-    to the OpenSSL source tree on Wed, 28 Jun 2006 with the following
-    message: "Mitigate cache-collision timing attack on last round."
+    use explicit_bzero() more liberally in the buffer code; ok
+     deraadt
     
-    OK naddy, miod, djm
+    Upstream-ID: 0ece37069fd66bc6e4f55eb1321f93df372b65bf
 
-commit 335c83d5f35d8620e16b8aa26592d4f836e09ad2
-Author: krw@openbsd.org <krw@openbsd.org>
-Date:   Tue Nov 18 20:54:28 2014 +0000
+commit 4626cbaf78767fc8e9c86dd04785386c59ae0839
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri Jan 8 14:24:56 2016 +1100
 
-    upstream commit
+    Support Illumos/Solaris fine-grained privileges
     
-    Nuke more obvious #include duplications.
+    Includes a pre-auth privsep sandbox and several pledge()
+    emulations. bz#2511, patch by Alex Wilson.
     
-    ok deraadt@ millert@ tedu@
+    ok dtucker@
 
-commit 51b64e44121194ae4bf153dee391228dada2abcb
+commit 422d1b3ee977ff4c724b597fb2e437d38fc8de9d
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Nov 17 00:21:40 2014 +0000
+Date:   Thu Dec 31 00:33:52 2015 +0000
 
     upstream commit
     
-    fix KRL generation when multiple CAs are in use
-    
-    We would generate an invalid KRL when revoking certs by serial
-    number for multiple CA keys due to a section being written out
-    twice.
-    
-    Also extend the regress test to catch this case by having it
-    produce a multi-CA KRL.
+    fix three bugs in KRL code related to (unused) signature
+     support: verification length was being incorrectly calculated, multiple
+     signatures were being incorrectly processed and a NULL dereference that
+     occurred when signatures were verified. Reported by Carl Jackson
     
-    Reported by peter AT pean.org
+    Upstream-ID: e705e97ad3ccce84291eaa651708dd1b9692576b
 
-commit d2d51003a623e21fb2b25567c4878d915e90aa2a
+commit 6074c84bf95d00f29cc7d5d3cd3798737851aa1a
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Nov 18 01:02:25 2014 +0000
+Date:   Wed Dec 30 23:46:14 2015 +0000
 
     upstream commit
     
-    fix NULL pointer dereference crash in key loading
+    unused prototype
     
-    found by Michal Zalewski's AFL fuzzer
+    Upstream-ID: f3eef4389d53ed6c0d5c77dcdcca3060c745da97
 
-commit 9f9fad0191028edc43d100d0ded39419b6895fdf
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Nov 17 00:21:40 2014 +0000
+commit 6213f0e180e54122bb1ba928e11c784e2b4e5380
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Sat Dec 26 20:51:35 2015 +0000
 
     upstream commit
     
-    fix KRL generation when multiple CAs are in use
+    Use pread/pwrite instead separate lseek+read/write for
+     lastlog. Cast to off_t before multiplication to avoid truncation on ILP32
     
-    We would generate an invalid KRL when revoking certs by serial
-    number for multiple CA keys due to a section being written out
-    twice.
+    ok kettenis@ mmcc@
     
-    Also extend the regress test to catch this case by having it
-    produce a multi-CA KRL.
-    
-    Reported by peter AT pean.org
+    Upstream-ID: fc40092568cd195719ddf1a00aa0742340d616cf
 
-commit da8af83d3f7ec00099963e455010e0ed1d7d0140
-Author: bentley@openbsd.org <bentley@openbsd.org>
-Date:   Sat Nov 15 14:41:03 2014 +0000
+commit d7d2bc95045a43dd56ea696cc1d030ac9d77e81f
+Author: semarie@openbsd.org <semarie@openbsd.org>
+Date:   Sat Dec 26 07:46:03 2015 +0000
 
     upstream commit
     
-    Reduce instances of `` '' in manuals.
+    adjust pledge promises for ControlMaster: when using
+     "ask" or "autoask", the process will use ssh-askpass for asking confirmation.
     
-    troff displays these as typographic quotes, but nroff implementations
-    almost always print them literally, which rarely has the intended effect
-    with modern fonts, even in stock xterm.
+    problem found by halex@
     
-    These uses of `` '' can be replaced either with more semantic alternatives
-    or with Dq, which prints typographic quotes in a UTF-8 locale (but will
-    automatically fall back to `` '' in an ASCII locale).
+    ok halex@
     
-    improvements and ok schwarze@
+    Upstream-ID: 38a58b30ae3eef85051c74d3c247216ec0735f80
 
-commit fc302561369483bb755b17f671f70fb894aec01d
+commit 271df8185d9689b3fb0523f58514481b858f6843
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Nov 10 22:25:49 2014 +0000
+Date:   Sun Dec 13 22:42:23 2015 +0000
 
     upstream commit
     
-    mux-related manual tweaks
-    
-    mention ControlPersist=0 is the same as ControlPersist=yes
+    unbreak connections with peers that set
+     first_kex_follows; fix from Matt Johnston va bz#2515
     
-    recommend that ControlPath sockets be placed in a og-w directory
+    Upstream-ID: decc88ec4fc7515594fdb42b04aa03189a44184b
 
-commit 0e4cff5f35ed11102fe3783779960ef07e0cd381
-Author: Damien Miller <djm@google.com>
-Date:   Wed Nov 5 11:01:31 2014 +1100
+commit 43849a47c5f8687699eafbcb5604f6b9c395179f
+Author: doug@openbsd.org <doug@openbsd.org>
+Date:   Fri Dec 11 17:41:37 2015 +0000
 
-    Prepare scripts for next Cygwin release
+    upstream commit
     
-    Makes the Cygwin-specific ssh-user-config script independent of the
-    existence of /etc/passwd.  The next Cygwin release will allow to
-    generate passwd and group entries from the Windows account DBs, so the
-    scripts have to adapt.
+    Add "id" to ssh-agent pledge for subprocess support.
     
-    from Corinna Vinschen
-
-commit 7d0ba5336651731949762eb8877ce9e3b52df436
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Oct 30 10:45:41 2014 +1100
-
-    include version number in OpenSSL-too-old error
+    Found the hard way by Jan Johansson when using ssh-agent with X.  Also,
+    rearranged proc/exec and retval to match other pledge calls in the tree.
+    
+    ok djm@
+    
+    Upstream-ID: 914255f6850e5e7fa830a2de6c38605333b584db
 
-commit 3bcb92e04d9207e9f78d82f7918c6d3422054ce9
-Author: lteo@openbsd.org <lteo@openbsd.org>
-Date:   Fri Oct 24 02:01:20 2014 +0000
+commit 52d7078421844b2f88329f5be3de370b0a938636
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Fri Dec 11 04:21:11 2015 +0000
 
     upstream commit
     
-    Remove unnecessary include: netinet/in_systm.h is not needed
-     by these programs.
+    Remove NULL-checks before sshbuf_free().
     
-    NB. skipped for portable
+    ok djm@
     
-    ok deraadt@ millert@
+    Upstream-ID: 5ebed00ed5f9f03b119a345085e8774565466917
 
-commit 6fdcaeb99532e28a69f1a1599fbd540bb15b70a0
+commit a4b9e0f4e4a6980a0eb8072f76ea611cab5b77e7
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Oct 20 03:43:01 2014 +0000
+Date:   Fri Dec 11 03:24:25 2015 +0000
 
     upstream commit
     
-    whitespace
+    include remote port number in a few more messages; makes
+     tying log messages together into a session a bit easier; bz#2503 ok dtucker@
+    
+    Upstream-ID: 9300dc354015f7a7368d94a8ff4a4266a69d237e
 
-commit 165bc8786299e261706ed60342985f9de93a7461
-Author: daniel@openbsd.org <daniel@openbsd.org>
-Date:   Tue Oct 14 03:09:59 2014 +0000
+commit 6091c362e89079397e68744ae30df121b0a72c07
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Dec 11 03:20:09 2015 +0000
 
     upstream commit
     
-    plug a memory leak; from Maxime Villard.
+    don't try to load SSHv1 private key when compiled without
+     SSHv1 support. From Iain Morgan bz#2505
     
-    ok djm@
+    Upstream-ID: 8b8e7b02a448cf5e5635979df2d83028f58868a7
 
-commit b1ba15f3885947c245c2dbfaad0a04ba050abea0
-Author: jmc@openbsd.org <jmc@openbsd.org>
-Date:   Thu Oct 9 06:21:31 2014 +0000
+commit cce6a36bb95e81fa8bfb46daf22eabcf13afc352
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Dec 11 03:19:09 2015 +0000
 
     upstream commit
     
-    tweak previous;
+    use SSH_MAX_PUBKEY_BYTES consistently as buffer size when
+     reading key files. Increase it to match the size of the buffers already being
+     used.
+    
+    Upstream-ID: 1b60586b484b55a947d99a0b32bd25e0ced56fae
 
-commit 259a02ebdf74ad90b41d116ecf70aa823fa4c6e7
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Oct 13 00:38:35 2014 +0000
+commit 89540b6de025b80404a0cb8418c06377f3f98848
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Fri Dec 11 02:31:47 2015 +0000
 
     upstream commit
     
-    whitespace
+    Remove NULL-checks before sshkey_free().
+    
+    ok djm@
+    
+    Upstream-ID: 3e35afe8a25e021216696b5d6cde7f5d2e5e3f52
 
-commit 957fbceb0f3166e41b76fdb54075ab3b9cc84cba
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Oct 8 22:20:25 2014 +0000
+commit 79394ed6d74572c2d2643d73937dad33727fc240
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Dec 11 02:29:03 2015 +0000
 
     upstream commit
     
-    Tweak config reparsing with host canonicalisation
+    fflush stdout so that output is seen even when running in
+     debug mode when output may otherwise not be flushed.  Patch from dustin at
+     null-ptr.net.
     
-    Make the second pass through the config files always run when
-    hostname canonicalisation is enabled.
+    Upstream-ID: b0c6b4cd2cdb01d7e9eefbffdc522e35b5bc4acc
+
+commit ee607cccb6636eb543282ba90e0677b0604d8b7a
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 15 15:23:49 2015 +1100
+
+    Increase robustness of redhat/openssh.spec
     
-    Add a "Match canonical" criteria that allows ssh_config Match
-    blocks to trigger only in the second config pass.
+     - remove configure --with-rsh, because this option isn't supported anymore
+     - replace last occurrence of BuildPreReq by BuildRequires
+     - update grep statement to query the krb5 include directory
     
-    Add a -G option to ssh that causes it to parse its configuration
-    and dump the result to stdout, similar to "sshd -T"
+    Patch from CarstenGrohmann via github, ok djm.
+
+commit b5fa0cd73555b991a543145603658d7088ec6b60
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 15 15:10:32 2015 +1100
+
+    Allow --without-ssl-engine with --without-openssl
     
-    Allow ssh_config Port options set in the second config parse
-    phase to be applied (they were being ignored).
+    Patch from Mike Frysinger via github.
+
+commit c1d7e546f6029024f3257cc25c92f2bddf163125
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 15 14:27:09 2015 +1100
+
+    Include openssl crypto.h for SSLeay.
     
-    bz#2267 bz#2286; ok markus
+    Patch from doughdemon via github.
 
-commit 5c0dafd38bf66feeeb45fa0741a5baf5ad8039ba
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Oct 8 22:15:27 2014 +0000
+commit c6f5f01651526e88c00d988ce59d71f481ebac62
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Dec 15 13:59:12 2015 +1100
 
-    upstream commit
+    Add sys/time.h for gettimeofday.
     
-    another -Wpointer-sign from clang
+    Should allow it it compile with MUSL libc.  Based on patch from
+    doughdemon via github.
 
-commit bb005dc815ebda9af3ae4b39ca101c4da918f835
+commit 39736be06c7498ef57d6970f2d85cf066ae57c82
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Oct 8 22:15:06 2014 +0000
+Date:   Fri Dec 11 02:20:28 2015 +0000
 
     upstream commit
     
-    fix a few -Wpointer-sign warnings from clang
+    correct error messages; from Tomas Kuthan bz#2507
+    
+    Upstream-ID: 7454a0affeab772398052954c79300aa82077093
 
-commit 3cc1fbb4fb0e804bfb873fd363cea91b27fc8188
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Oct 8 21:45:48 2014 +0000
+commit 94141b7ade24afceeb6762a3f99e09e47a6c42b6
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Fri Dec 11 00:20:04 2015 +0000
 
     upstream commit
     
-    parse cert sections using nested buffers to reduce
-     copies; ok markus
+    Pass (char *)NULL rather than (char *)0 to execl and
+     execlp.
+    
+    ok dtucker@
+    
+    Upstream-ID: 56c955106cbddba86c3dd9bbf786ac0d1b361492
 
-commit 4a45922aebf99164e2fc83d34fe55b11ae1866ef
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Mon Oct 6 00:47:15 2014 +0000
+commit d59ce08811bf94111c2f442184cf7d1257ffae24
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Thu Dec 10 17:08:40 2015 +0000
 
     upstream commit
     
-    correct options in usage(); from mancha1 AT zoho.com
+    Remove NULL-checks before free().
+    
+    ok dtucker@
+    
+    Upstream-ID: e3d3cb1ce900179906af36517b5eea0fb15e6ef8
 
-commit 48dffd5bebae6fed0556dc5c36cece0370690618
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Sep 9 09:45:36 2014 +0000
+commit 8e56dd46cb37879c73bce2d6032cf5e7f82d5a71
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Thu Dec 10 07:01:35 2015 +0000
 
     upstream commit
     
-    mention permissions on tun(4) devices in PermitTunnel
-     documentation; bz#2273
+    Fix a couple "the the" typos. ok dtucker@
+    
+    Upstream-ID: ec364c5af32031f013001fd28d1bd3dfacfe9a72
 
-commit a5883d4eccb94b16c355987f58f86a7dee17a0c2
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Wed Sep 3 18:55:07 2014 +0000
+commit 6262a0522ddc2c0f2e9358dcb68d59b46e9c533e
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Mon Dec 7 20:04:09 2015 +0000
 
     upstream commit
     
-    tighten permissions on pty when the "tty" group does
-     not exist; pointed out by Corinna Vinschen; ok markus
+    stricter encoding type checks for ssh-rsa; ok djm@
+    
+    Upstream-ID: 8cca7c787599a5e8391e184d0b4f36fdc3665650
 
-commit 180bcb406b58bf30723c01a6b010e48ee626dda8
-Author: sobrado@openbsd.org <sobrado@openbsd.org>
-Date:   Sat Aug 30 16:32:25 2014 +0000
+commit d86a3ba7af160c13496102aed861ae48a4297072
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Dec 9 09:18:45 2015 +1100
 
-    upstream commit
+    Don't set IPV6_V6ONLY on OpenBSD
     
-    typo.
+    It isn't necessary and runs afoul of pledge(2) restrictions.
 
-commit f70b22bcdd52f6bf127047b3584371e6e5d45627
-Author: sobrado@openbsd.org <sobrado@openbsd.org>
-Date:   Sat Aug 30 15:33:50 2014 +0000
+commit da98c11d03d819a15429d8fff9688acd7505439f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Dec 7 02:20:46 2015 +0000
 
     upstream commit
     
-    improve capitalization for the Ed25519 public-key
-     signature system.
+    basic unit tests for rsa-sha2-* signature types
     
-    ok djm@
+    Upstream-Regress-ID: 7dc4b9db809d578ff104d591b4d86560c3598d3c
 
-commit 7df8818409c752cf3f0c3f8044fe9aebed8647bd
-Author: doug@openbsd.org <doug@openbsd.org>
-Date:   Thu Aug 21 01:08:52 2014 +0000
+commit 3da893fdec9936dd2c23739cdb3c0c9d4c59fca0
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Sat Dec 5 20:53:21 2015 +0000
 
     upstream commit
     
-    Free resources on error in mkstemp and fdopen
+    prefer rsa-sha2-512 over -256 for hostkeys, too; noticed
+     by naddy@
     
-    ok djm@
+    Upstream-ID: 685f55f7ec566a8caca587750672723a0faf3ffe
 
-commit 40ba4c9733aaed08304714faeb61529f18da144b
-Author: deraadt@openbsd.org <deraadt@openbsd.org>
-Date:   Wed Aug 20 01:28:55 2014 +0000
+commit 8b56e59714d87181505e4678f0d6d39955caf10e
+Author: tobias@openbsd.org <tobias@openbsd.org>
+Date:   Fri Dec 4 21:51:06 2015 +0000
 
     upstream commit
     
-    djm how did you make a typo like that...
+    Properly handle invalid %-format by calling fatal.
+    
+    ok deraadt, djm
+    
+    Upstream-ID: 5692bce7d9f6eaa9c488cb93d3b55e758bef1eac
 
-commit 57d378ec9278ba417a726f615daad67d157de666
-Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Aug 19 23:58:28 2014 +0000
+commit 76c9fbbe35aabc1db977fb78e827644345e9442e
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Fri Dec 4 16:41:28 2015 +0000
 
     upstream commit
     
-    When dumping the server configuration (sshd -T), print
-     correct KEX, MAC and cipher defaults. Spotted by Iain Morgan
+    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@
+    
+    Upstream-ID: cf82ce532b2733e5c4b34bb7b7c94835632db309
 
-commit 7ff880ede5195d0b17e7f1e3b6cfbc4cb6f85240
+commit 6064a8b8295cb5a17b5ebcfade53053377714f40
 Author: djm@openbsd.org <djm@openbsd.org>
-Date:   Tue Aug 19 23:57:18 2014 +0000
+Date:   Fri Dec 4 00:24:55 2015 +0000
 
     upstream commit
     
-    ~-expand lcd paths
+    clean up agent_fd handling; properly initialise it to -1
+     and make tests consistent
+    
+    ok markus@
+    
+    Upstream-ID: ac9554323d5065745caf17b5e37cb0f0d4825707
 
-commit 4460a7ad0c78d4cd67c467f6e9f4254d0404ed59
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Oct 12 12:35:48 2014 +1100
+commit b91926a97620f3e51761c271ba57aa5db790f48d
+Author: semarie@openbsd.org <semarie@openbsd.org>
+Date:   Thu Dec 3 17:00:18 2015 +0000
 
-    remove duplicated KEX_DH1 entry
+    upstream commit
+    
+    pledges ssh client:   - mux client: which is used when
+     ControlMaster is in use.     will end with "stdio proc tty" (proc is to
+     permit sending SIGWINCH to mux master on window resize)
+    
+      - client loop: several levels of pledging depending of your used options
+    
+    ok deraadt@
+    
+    Upstream-ID: 21676155a700e51f2ce911e33538e92a2cd1d94b
 
-commit c9b8426a616138d0d762176c94f51aff3faad5ff
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Oct 9 10:34:06 2014 +1100
+commit bcce47466bbc974636f588b5e4a9a18ae386f64a
+Author: doug@openbsd.org <doug@openbsd.org>
+Date:   Wed Dec 2 08:30:50 2015 +0000
 
-    remove ChangeLog file
+    upstream commit
     
-    Commit logs will be generated from git at release time.
+    Add "cpath" to the ssh-agent pledge so the cleanup
+     handler can unlink().
+    
+    ok djm@
+    
+    Upstream-ID: 9e632991d48241d56db645602d381253a3d8c29d
 
-commit 81d18ff7c93a04affbf3903e0963859763219aed
-Author: Damien Miller <djm@google.com>
-Date:   Tue Oct 7 21:24:25 2014 +1100
+commit a90d001543f46716b6590c6dcc681d5f5322f8cf
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Dec 2 08:00:58 2015 +0000
 
-    delete contrib/caldera directory
+    upstream commit
+    
+    ssh-agent pledge needs proc for askpass; spotted by todd@
+    
+    Upstream-ID: 349aa261b29cc0e7de47ef56167769c432630b2a
 
-commit 0ec9e87d3638206456968202f05bb5123670607a
-Author: Damien Miller <djm@google.com>
-Date:   Tue Oct 7 19:57:27 2014 +1100
+commit d952162b3c158a8f23220587bb6c8fcda75da551
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Dec 1 23:29:24 2015 +0000
 
-    test commit
+    upstream commit
+    
+    basic pledge() for ssh-agent, more refinement needed
+    
+    Upstream-ID: 5b5b03c88162fce549e45e1b6dd833f20bbb5e13
 
-commit 8fb65a44568701b779f3d77326bceae63412d28d
+commit f0191d7c8e76e30551084b79341886d9bb38e453
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Oct 7 09:21:49 2014 +1100
+Date:   Mon Nov 30 10:53:25 2015 +1100
 
-     - (djm) Release OpenSSH-6.7
+    Revert "stub for pledge(2) for systems that lack it"
+    
+    This reverts commit 14c887c8393adde2d9fd437d498be30f8c98535c.
+    
+    dtucker beat me to it :/
 
-commit e8c9f2602c46f6781df5e52e6cd8413dab4602a3
+commit 6283cc72eb0e49a3470d30e07ca99a1ba9e89676
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Oct 3 09:24:56 2014 +1000
+Date:   Mon Nov 30 10:37:03 2015 +1100
 
-     - (djm) [sshd_config.5] typo; from Iain Morgan
+    revert 7d4c7513: bring back S/Key prototypes
+    
+    (but leave RCSID changes)
 
-commit 703b98a26706f5083801d11059486d77491342ae
+commit 14c887c8393adde2d9fd437d498be30f8c98535c
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Oct 1 09:43:07 2014 +1000
+Date:   Mon Nov 30 09:45:29 2015 +1100
 
-     - (djm) [openbsd-compat/Makefile.in openbsd-compat/kludge-fd_set.c]
-       [openbsd-compat/openbsd-compat.h] Kludge around bad glibc
-       _FORTIFY_SOURCE check that doesn't grok heap-allocated fd_sets;
-       ok dtucker@
+    stub for pledge(2) for systems that lack it
 
-commit 0fa0ed061bbfedb0daa705e220748154a84c3413
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Sep 10 08:15:34 2014 +1000
+commit 452c0b6af5d14c37553e30059bf74456012493f3
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Nov 29 22:18:37 2015 +0000
 
-     - (djm) [sandbox-seccomp-filter.c] Allow mremap and exit for DietLibc;
-       patch from Felix von Leitner; ok dtucker
+    upstream commit
+    
+    pledge, better fatal() messages; feedback deraadt@
+    
+    Upstream-ID: 3e00f6ccfe2b9a7a2d1dbba5409586180801488f
 
-commit ad7d23d461c3b7e1dcb15db13aee5f4b94dc1a95
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Sep 9 12:23:10 2014 +1000
+commit 6da413c085dba37127687b2617a415602505729b
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Sat Nov 28 06:50:52 2015 +0000
 
-    20140908
-     - (dtucker) [INSTALL] Update info about egd.  ok djm@
+    upstream commit
+    
+    do not leak temp file if there is no known_hosts file
+     from craig leres, ok djm
+    
+    Upstream-ID: c820497fd5574844c782e79405c55860f170e426
 
-commit 2a8699f37cc2515e3bc60e0c677ba060f4d48191
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Sep 4 03:46:05 2014 +1000
+commit 3ddd15e1b63a4d4f06c8ab16fbdd8a5a61764f16
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Nov 30 07:23:53 2015 +1100
 
-     - (djm) [openbsd-compat/arc4random.c] Zero seed after keying PRNG
+    Add a null implementation of pledge.
+    
+    Fixes builds on almost everything.
 
-commit 44988defb1f5e3afe576d86000365e1f07a1b494
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Sep 3 05:35:32 2014 +1000
+commit b1d6b3971ef256a08692efc409fc9ada719111cc
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Nov 28 06:41:03 2015 +0000
 
-     - (djm) [contrib/cygwin/ssh-host-config] Fix old code leading to
-       permissions/ACLs; from Corinna Vinschen
+    upstream commit
+    
+    don't include port number in tcpip-forward replies for
+     requests that don't allocate a port; bz#2509 diagnosed by Ron Frederick ok
+     markus
+    
+    Upstream-ID: 77efad818addb61ec638b5a2362f1554e21a970a
 
-commit 23f269562b7537b2f6f5014e50a25e5dcc55a837
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Sep 3 05:33:25 2014 +1000
+commit 9080bd0b9cf10d0f13b1f642f20cb84285cb8d65
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Nov 27 00:49:31 2015 +0000
 
-     - (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h and
-       conditionalise to avoid duplicate definition.
+    upstream commit
+    
+    pledge "stdio rpath wpath cpath fattr tty proc exec"
+     except for the -p option (which sadly has insane semantics...) ok semarie
+     dtucker
+    
+    Upstream-ID: 8854bbd58279abe00f6c33f8094bdc02c8c65059
 
-commit 41c8de2c0031cf59e7cf0c06b5bcfbf4852c1fda
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Aug 30 16:23:06 2014 +1000
+commit 4d90625b229cf6b3551d81550a9861897509a65f
+Author: halex@openbsd.org <halex@openbsd.org>
+Date:   Fri Nov 20 23:04:01 2015 +0000
 
-     - (djm) [Makefile.in] Make TEST_SHELL a variable; "good idea" tim@
+    upstream commit
+    
+    allow comment change for all supported formats
+    
+    ok djm@
+    
+    Upstream-ID: 5fc477cf2f119b2d44aa9c683af16cb00bb3744b
 
-commit d7c81e216a7bd9eed6e239c970d9261bb1651947
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Aug 30 04:18:28 2014 +1000
+commit 8ca915fc761519dd1f7766a550ec597a81db5646
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Nov 20 01:45:29 2015 +0000
 
-     - (djm) [openbsd-compat/openssl-compat.h] add include guard
+    upstream commit
+    
+    add cast to make -Werror clean
+    
+    Upstream-ID: 288db4f8f810bd475be01320c198250a04ff064d
 
-commit 4687802dda57365b984b897fc3c8e2867ea09b22
+commit ac9473580dcd401f8281305af98635cdaae9bf96
 Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Aug 30 03:29:19 2014 +1000
+Date:   Fri Nov 20 12:35:41 2015 +1100
 
-     - (djm) [misc.c] Missing newline between functions
+    fix multiple authentication using S/Key w/ privsep
+    
+    bz#2502, patch from Kevin Korb and feandil_
 
-commit 51c77e29220dee87c53be2dc47092934acab26fe
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Aug 30 02:30:30 2014 +1000
+commit 88b6fcdeb87a2fb76767854d9eb15006662dca57
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Nov 19 08:23:27 2015 +0000
 
-     - (djm) [openbsd-compat/openssl-compat.h] add
-       OPENSSL_[RD]SA_MAX_MODULUS_BITS defines for OpenSSL that lacks them
+    upstream commit
+    
+    ban ConnectionAttempts=0, it makes no sense and would cause
+     ssh_connect_direct() to print an uninitialised stack variable; bz#2500
+     reported by dvw AT phas.ubc.ca
+    
+    Upstream-ID: 32b5134c608270583a90b93a07b3feb3cbd5f7d5
 
-commit 3d673d103bad35afaec6e7ef73e5277216ce33a3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Aug 27 06:32:01 2014 +1000
+commit 964ab3ee7a8f96bdbc963d5b5a91933d6045ebe7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Nov 19 01:12:32 2015 +0000
 
-     - (djm) [openbsd-compat/explicit_bzero.c] implement explicit_bzero()
-       using memset_s() where possible; improve fallback to indirect bzero
-       via a volatile pointer to give it more of a chance to avoid being
-       optimised away.
+    upstream commit
+    
+    trailing whitespace
+    
+    Upstream-ID: 31fe0ad7c4d08e87f1d69c79372f5e3c5cd79051
 
-commit 146218ac11a1eb0dcade6f793d7acdef163b5ddc
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Aug 27 04:11:55 2014 +1000
+commit f96516d052dbe38561f6b92b0e4365d8e24bb686
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Nov 19 01:09:38 2015 +0000
 
-     - (djm) [monitor.c sshd.c] SIGXFSZ needs to be ignored in postauth
-       monitor, not preauth; bz#2263
+    upstream commit
+    
+    print host certificate contents at debug level
+    
+    Upstream-ID: 39354cdd8a2b32b308fd03f98645f877f540f00d
 
-commit 1b215c098b3b37e38aa4e4c91bb908eee41183b1
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Aug 27 04:04:40 2014 +1000
+commit 499cf36fecd6040e30e2912dd25655bc574739a7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Nov 19 01:08:55 2015 +0000
 
-     - (djm) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
-       [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
-       [regress/unittests/sshkey/common.c]
-       [regress/unittests/sshkey/test_file.c]
-       [regress/unittests/sshkey/test_fuzz.c]
-       [regress/unittests/sshkey/test_sshkey.c] Don't include openssl/ec.h
-       on !ECC OpenSSL systems
+    upstream commit
+    
+    move the certificate validity formatting code to
+     sshkey.[ch]
+    
+    Upstream-ID: f05f7c78fab20d02ff1d5ceeda533ef52e8fe523
 
-commit ad013944af0a19e3f612089d0099bb397cf6502d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 26 09:27:28 2014 +1000
+commit bcb7bc77bbb1535d1008c7714085556f3065d99d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Nov 18 08:37:28 2015 +0000
 
-     - (djm) [INSTALL] Recommend libcrypto be built -fPIC, mention LibreSSL,
-       update OpenSSL version requirement.
+    upstream commit
+    
+    fix "ssh-keygen -l" of private key, broken in support for
+     multiple plain keys on stdin
+    
+    Upstream-ID: 6b3132d2c62d03d0bad6f2bcd7e2d8b7dab5cd9d
 
-commit ed126de8ee04c66640a0ea2697c4aaf36801f100
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 26 08:37:47 2014 +1000
+commit 259adb6179e23195c8f6913635ea71040d1ccd63
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Nov 16 23:47:52 2015 +0000
 
-     - (djm) [bufec.c] Skip this file on !ECC OpenSSL
+    upstream commit
+    
+    Replace remaining calls to index(3) with strchr(3).  OK
+     jca@ krw@
+    
+    Upstream-ID: 33837d767a0cf1db1489b96055f9e330bc0bab6d
 
-commit 9c1dede005746864a4fdb36a7cdf6c51296ca909
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Aug 24 03:01:06 2014 +1000
+commit c56a255162c2166884539c0a1f7511575325b477
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Nov 16 22:53:07 2015 +0000
 
-     - (djm) [sftp-server.c] Some systems (e.g. Irix) have prctl() but not
-       PR_SET_DUMPABLE, so adjust ifdef; reported by Tom Christensen
+    upstream commit
+    
+    Allow fingerprinting from standard input "ssh-keygen -lf
+     -"
+    
+    Support fingerprinting multiple plain keys in a file and authorized_keys
+    files too (bz#1319)
+    
+    ok markus@
+    
+    Upstream-ID: 903f8b4502929d6ccf53509e4e07eae084574b77
 
-commit d244a5816fd1312a33404b436e4dd83594f1119e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Aug 23 17:06:49 2014 +1000
+commit 5b4010d9b923cf1b46c9c7b1887c013c2967e204
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Nov 16 22:51:05 2015 +0000
 
-     - (djm) [configure.ac] We now require a working vsnprintf everywhere (not
-       just for systems that lack asprintf); check for it always and extend
-       test to catch more brokenness. Fixes builds on Solaris <= 9
+    upstream commit
+    
+    always call privsep_preauth_child() regardless of whether
+     sshd was started by root; it does important priming before sandboxing and
+     failing to call it could result in sandbox violations later; ok markus@
+    
+    Upstream-ID: c8a6d0d56c42f3faab38460dc917ca0d1705d383
 
-commit 4cec036362a358e398e6a2e6d19d8e5780558634
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Aug 23 03:11:09 2014 +1000
+commit 3a9f84b58b0534bbb485f1eeab75665e2d03371f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Nov 16 22:50:01 2015 +0000
 
-     - (djm) [sshd.c] Ignore SIGXFSZ in preauth monitor child; can explode on
-       lastlog writing on platforms with high UIDs; bz#2263
+    upstream commit
+    
+    improve sshkey_read() semantics; only update *cpp when a
+     key is successfully read; ok markus@
+    
+    Upstream-ID: f371e78e8f4fab366cf69a42bdecedaed5d1b089
 
-commit 394a60f2598d28b670d934b93942a3370b779b39
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 22 18:06:20 2014 +1000
+commit db6f8dc5dd5655b59368efd074994d4568bc3556
+Author: logan@openbsd.org <logan@openbsd.org>
+Date:   Mon Nov 16 06:13:04 2015 +0000
 
-     - (djm) [configure.ac] double braces to appease autoconf
+    upstream commit
+    
+    1) Use xcalloc() instead of xmalloc() to check for
+     potential overflow.    (Feedback from both mmcc@ and djm@) 2) move set_size
+     just before the for loop. (suggested by djm@)
+    
+    OK djm@
+    
+    Upstream-ID: 013534c308187284756c3141f11d2c0f33c47213
 
-commit 4d69aeabd6e60afcdc7cca177ca751708ab79a9d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 22 17:48:27 2014 +1000
+commit 383f10fb84a0fee3c01f9d97594f3e22aa3cd5e0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Nov 16 00:30:02 2015 +0000
 
-     - (djm) [openbsd-compat/bsd-snprintf.c] Fix compilation failure (prototype/
-       definition mismatch) and warning for broken/missing snprintf case.
+    upstream commit
+    
+    Add a new authorized_keys option "restrict" that
+     includes all current and future key restrictions (no-*-forwarding, etc). Also
+     add permissive versions of the existing restrictions, e.g. "no-pty" -> "pty".
+     This simplifies the task of setting up restricted keys and ensures they are
+     maximally-restricted, regardless of any permissions we might implement in the
+     future.
+    
+    Example:
+    
+    restrict,pty,command="nethack" ssh-ed25519 AAAAC3NzaC1lZDI1...
+    
+    Idea from Jann Horn; ok markus@
+    
+    Upstream-ID: 04ceb9d448e46e67e13887a7ae5ea45b4f1719d0
 
-commit 0c11f1ac369d2c0aeb0ab0458a7cd04c72fe5e9e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 22 17:36:56 2014 +1000
+commit e41a071f7bda6af1fb3f081bed0151235fa61f15
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Sun Nov 15 23:58:04 2015 +0000
 
-     - (djm) [sshbuf-getput-crypto.c] Fix compilation when OpenSSL lacks ECC
+    upstream commit
+    
+    correct section number for ssh-agent;
+    
+    Upstream-ID: 44be72fd8bcc167635c49b357b1beea8d5674bd6
 
-commit 6d62784b8973340b251fea6b04890f471adf28db
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 22 17:36:19 2014 +1000
+commit 1a11670286acddcc19f5eff0966c380831fc4638
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Sun Nov 15 23:54:15 2015 +0000
 
-     - (djm) [configure.ac] include leading zero characters in OpenSSL version
-       number; fixes test for unsupported versions
+    upstream commit
+    
+    do not confuse mandoc by presenting "Dd";
+    
+    Upstream-ID: 1470fce171c47b60bbc7ecd0fc717a442c2cfe65
 
-commit 4f1ff1ed782117f5d5204d4e91156ed5da07cbb7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Aug 21 15:54:50 2014 +1000
+commit f361df474c49a097bfcf16d1b7b5c36fcd844b4b
+Author: jcs@openbsd.org <jcs@openbsd.org>
+Date:   Sun Nov 15 22:26:49 2015 +0000
 
-     - (djm) [regress/unittests/test_helper/test_helper.c] Fix for systems that
-       don't set __progname. Diagnosed by Tom Christensen.
+    upstream commit
+    
+    Add an AddKeysToAgent client option which can be set to
+     'yes', 'no', 'ask', or 'confirm', and defaults to 'no'.  When enabled, a
+     private key that is used during authentication will be added to ssh-agent if
+     it is running (with confirmation enabled if set to 'confirm').
+    
+    Initial version from Joachim Schipper many years ago.
+    
+    ok markus@
+    
+    Upstream-ID: a680db2248e8064ec55f8be72d539458c987d5f4
 
-commit 005a64da0f457410045ef0bfa93c863c2450447d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Aug 21 10:48:41 2014 +1000
+commit d87063d9baf5479b6e813d47dfb694a97df6f6f5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Nov 13 04:39:35 2015 +0000
 
-     - (djm) [key.h] Fix ifdefs for no-ECC OpenSSL
+    upstream commit
+    
+    send SSH2_MSG_UNIMPLEMENTED replies to unexpected
+     messages during KEX; bz#2949, ok dtucker@
+    
+    Upstream-ID: 2b3abdff344d53c8d505f45c83a7b12e84935786
 
-commit aa6598ebb3343c7380e918388e10e8ca5852b613
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Aug 21 10:47:54 2014 +1000
+commit 9fd04681a1e9b0af21e08ff82eb674cf0a499bfc
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Nov 13 04:38:06 2015 +0000
 
-     - (djm) [Makefile.in] fix reference to libtest_helper.a in sshkey test too.
+    upstream commit
+    
+    Support "none" as an argument for sshd_config
+     ForceCommand and ChrootDirectory. Useful inside Match blocks to override a
+     global default. bz#2486 ok dtucker@
+    
+    Upstream-ID: 7ef478d6592bc7db5c7376fc33b4443e63dccfa5
 
-commit 54703e3cf63f0c80d4157e5ad7dbc2b363ee2c56
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Aug 20 11:10:51 2014 +1000
+commit 94bc0b72c29e511cbbc5772190d43282e5acfdfe
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Nov 13 04:34:15 2015 +0000
 
-     - (djm) [contrib/cygwin/README] Correct build instructions; from Corinna
+    upstream commit
+    
+    support multiple certificates (one per line) and
+     reading from standard input (using "-f -") for "ssh-keygen -L"; ok dtucker@
+    
+    Upstream-ID: ecbadeeef3926e5be6281689b7250a32a80e88db
 
-commit f0935698f0461f24d8d1f1107b476ee5fd4db1cb
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Aug 20 11:06:50 2014 +1000
+commit b6b9108f5b561c83612cb97ece4134eb59fde071
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Nov 13 02:57:46 2015 +0000
 
-     - (djm) [sshkey.h] Fix compilation when OpenSSL lacks ECC
+    upstream commit
+    
+    list a couple more options usable in Match blocks;
+     bz#2489
+    
+    Upstream-ID: e4d03f39d254db4c0cc54101921bb89fbda19879
 
-commit c5089ecaec3b2c02f014f4e67518390702a4ba14
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Aug 20 11:06:20 2014 +1000
+commit a7994b3f5a5a5a33b52b0a6065d08e888f0a99fb
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Nov 11 04:56:39 2015 +0000
 
-     - (djm) [Makefile.in] refer to libtest_helper.a by explicit path rather than
-       -L/-l; fixes linking problems on some platforms
+    upstream commit
+    
+    improve PEEK/POKE macros: better casts, don't multiply
+     evaluate arguments; ok deraadt@
+    
+    Upstream-ID: 9a1889e19647615ededbbabab89064843ba92d3e
 
-commit 2195847e503a382f83ee969b0a8bd3dfe0e55c18
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Aug 20 11:05:03 2014 +1000
+commit 7d4c7513a7f209cb303a608ac6e46b3f1dfc11ec
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Nov 11 01:48:01 2015 +0000
 
-     - (djm) [configure.ac] Check OpenSSL version is supported at configure time;
-       suggested by Kevin Brott
+    upstream commit
+    
+    remove prototypes for long-gone s/key support; ok
+     dtucker@
+    
+    Upstream-ID: db5bed3c57118af986490ab23d399df807359a79
 
-commit a75aca1bbc989aa9f8b1b08489d37855f3d24d1a
+commit 07889c75926c040b8e095949c724e66af26441cb
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 19 11:36:07 2014 +1000
+Date:   Sat Nov 14 18:44:49 2015 +1100
 
-     - (djm) [INSTALL contrib/caldera/openssh.spec contrib/cygwin/README]
-       [contrib/redhat/openssh.spec contrib/suse/openssh.spec] Remove mentions
-       of TCP wrappers.
+    read back from libcrypto RAND when privdropping
+    
+    makes certain libcrypto implementations cache a /dev/urandom fd
+    in preparation of sandboxing. Based on patch by Greg Hartman.
 
-commit 3f022b5a9477abceeb1bbeab04b055f3cc7ca8f6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 19 11:32:34 2014 +1000
+commit 1560596f44c01bb0cef977816410950ed17b8ecd
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Nov 10 11:14:47 2015 +1100
 
-     - (djm) [ssh-dss.c] Include openssl/dsa.h for DSA_SIG
+    Fix compiler warnings in the openssl header check.
+    
+    Noted by Austin English.
 
-commit 88137902632aceb923990e98cf5dc923bb3ef2f5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 19 11:28:11 2014 +1000
+commit e72a8575ffe1d8adff42c9abe9ca36938acc036b
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Sun Nov 8 23:24:03 2015 +0000
 
-     - (djm) [sshbuf.h] Fix compilation on systems without OPENSSL_HAS_ECC.
+    upstream commit
+    
+    -c before -H, in SYNOPSIS and usage();
+    
+    Upstream-ID: 25e8c58a69e1f37fcd54ac2cd1699370acb5e404
 
-commit 2f3d1e7fb2eabd3cfbfd8d0f7bdd2f9a1888690b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 19 11:14:36 2014 +1000
+commit 3a424cdd21db08c7b0ded902f97b8f02af5aa485
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Nov 8 22:30:20 2015 +0000
 
-     - (djm) [myproposal.h] Make curve25519 KEX dependent on
-       HAVE_EVP_SHA256 instead of OPENSSL_HAS_ECC.
+    upstream commit
+    
+    Add "ssh-keyscan -c ..." flag to allow fetching
+     certificates instead of plain keys; ok markus@
+    
+    Upstream-ID: 0947e2177dba92339eced9e49d3c5bf7dda69f82
 
-commit d4e7d59d01a6c7f59e8c1f94a83c086e9a33d8aa
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Aug 19 11:14:17 2014 +1000
+commit 69fead5d7cdaa73bdece9fcba80f8e8e70b90346
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Sun Nov 8 22:08:38 2015 +0000
 
-     - (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen
+    upstream commit
+    
+    remove slogin links; ok deraadt markus djm
+    
+    Upstream-ID: 39ba08548acde4c54f2d4520c202c2a863a3c730
 
-commit 9eaeea2cf2b6af5f166cfa9ad3c7a90711a147a9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Aug 10 11:35:05 2014 +1000
+commit 2fecfd486bdba9f51b3a789277bb0733ca36e1c0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Nov 8 21:59:11 2015 +0000
 
-     - (djm) [README contrib/caldera/openssh.spec]
-       [contrib/redhat/openssh.spec contrib/suse/openssh.spec] Update versions
+    upstream commit
+    
+    fix OOB read in packet code caused by missing return
+     statement found by Ben Hawkes; ok markus@ deraadt@
+    
+    Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62
 
-commit f8988fbef0c9801d19fa2f8f4f041690412bec37
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 1 13:31:52 2014 +1000
+commit 5e288923a303ca672b686908320bc5368ebec6e6
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Fri Nov 6 00:31:41 2015 +0000
 
-     - (djm) [regress/multiplex.sh] Use -d (detach stdin) flag to disassociate
-       nc from stdin, it's more portable
+    upstream commit
+    
+    1. rlogin and rsh are long gone 2. protocol version isn't
+     of core relevance here, and v1 is going away
+    
+    ok markus@, deraadt@
+    
+    Upstream-ID: 8b46bc94cf1ca7c8c1a75b1c958b2bb38d7579c8
 
-commit 5b3879fd4b7a4e3d43bab8f40addda39bc1169d0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 1 12:28:31 2014 +1000
+commit 8b29008bbe97f33381d9b4b93fcfa304168d0286
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Thu Nov 5 09:48:05 2015 +0000
 
-     - (djm) [regress/multiplex.sh] Instruct nc not to quit as soon as stdin
-       is closed; avoid regress failures when stdin is /dev/null
+    upstream commit
+    
+    "commandline" -> "command line", since there are so few
+     examples of the former in the pages, so many of the latter, and in some of
+     these pages we had multiple spellings;
+    
+    prompted by tj
+    
+    Upstream-ID: 78459d59bff74223f8139d9001ccd56fc4310659
 
-commit a9c46746d266f8a1b092a72b2150682d1af8ebfc
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Aug 1 12:26:49 2014 +1000
+commit 996b24cebf20077fbe5db07b3a2c20c2d9db736e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Oct 29 20:57:34 2015 +1100
 
-     - (djm) [regress/multiplex.sh] Skip test for non-OpenBSD netcat. We need
-       a better solution, but this will have to do for now.
+    (re)wrap SYS_sendsyslog in ifdef.
+    
+    Replace ifdef that went missing in commit
+    c61b42f2678f21f05653ac2d3d241b48ab5d59ac.  Fixes build on older
+    OpenBSDs.
 
-commit 426117b2e965e43f47015942b5be8dd88fe74b88
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 30 12:33:20 2014 +1000
+commit b67e2e76fcf1ae7c802eb27ca927e16c91a513ff
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Oct 29 08:05:17 2015 +0000
 
-       - schwarze@cvs.openbsd.org 2014/07/28 15:40:08
-         [sftp-server.8 sshd_config.5]
-         some systems no longer need /dev/log;
-         issue noticed by jirib;
-         ok deraadt
+    upstream commit
+    
+    regress test for "PubkeyAcceptedKeyTypes +..." inside a
+     Match block
+    
+    Upstream-Regress-ID: 246c37ed64a2e5704d4c158ccdca1ff700e10647
 
-commit f497794b6962eaf802ab4ac2a7b22ae591cca1d5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 30 12:32:46 2014 +1000
+commit abd9dbc3c0d8c8c7561347cfa22166156e78c077
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Oct 26 02:50:58 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/07/25 21:22:03
-         [ssh-agent.c]
-         Clear buffer used for handling messages.  This prevents keys being
-         left in memory after they have been expired or deleted in some cases
-         (but note that ssh-agent is setgid so you would still need root to
-         access them).  Pointed out by Kevin Burns, ok deraadt
+    upstream commit
+    
+    Fix typo certopt->certopts in shell variable.  This would
+     cause the test to hang at a host key prompt if you have an A or CNAME for
+     "proxy" in your local domain.
+    
+    Upstream-Regress-ID: 6ea03bcd39443a83c89e2c5606392ceb9585836a
 
-commit a8a0f65c57c8ecba94d65948e9090da54014dfef
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 30 12:32:28 2014 +1000
+commit ed08510d38aef930a061ae30d10f2a9cf233bafa
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Oct 29 08:05:01 2015 +0000
 
-     - OpenBSD CVS Sync
-       - millert@cvs.openbsd.org 2014/07/24 22:57:10
-         [ssh.1]
-         Mention UNIX-domain socket forwarding too.  OK jmc@ deraadt@
+    upstream commit
+    
+    Fix "PubkeyAcceptedKeyTypes +..." inside a Match block;
+     ok dtucker@
+    
+    Upstream-ID: 853662c4036730b966aab77684390c47b9738c69
 
-commit 56b840f2b81e14a2f95c203403633a72566736f8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 25 08:11:30 2014 +1000
+commit a4aef3ed29071719b2af82fdf1ac3c2514f82bc5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 27 08:54:52 2015 +0000
 
-     - (djm) [regress/multiplex.sh] restore incorrectly deleted line;
-       pointed out by Christian Hesse
+    upstream commit
+    
+    fix execv arguments in a way less likely to cause grief
+     for -portable; ok dtucker@
+    
+    Upstream-ID: 5902bf0ea0371f39f1300698dc3b8e4105fc0fc5
 
-commit dd417b60d5ca220565d1014e92b7f8f43dc081eb
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jul 23 10:41:21 2014 +1000
+commit 63d188175accea83305e89fafa011136ff3d96ad
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 27 01:44:45 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/07/22 23:35:38
-         [regress/unittests/sshkey/testdata/*]
-         Regenerate test keys with certs signed with ed25519 instead of ecdsa.
-         These can be used in -portable on platforms that don't support ECDSA.
+    upstream commit
+    
+    log certificate serial in verbose() messages to match the
+     main auth success/fail message; ok dtucker@
+    
+    Upstream-ID: dfc48b417c320b97c36ff351d303c142f2186288
 
-commit 40e50211896369dba8f64f3b5e5fd58b76f5ac3f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jul 23 10:35:45 2014 +1000
+commit 2aaba0cfd560ecfe92aa50c00750e6143842cf1f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 27 00:49:53 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/07/22 23:57:40
-         [regress/unittests/sshkey/mktestdata.sh]
-         Add $OpenBSD tag to make syncs easier
+    upstream commit
+    
+    avoid de-const warning & shrink; ok dtucker@
+    
+    Upstream-ID: 69a85ef94832378952a22c172009cbf52aaa11db
 
-commit 07e644251e809b1d4c062cf85bd1146a7e3f5a8a
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jul 23 10:34:26 2014 +1000
+commit 03239c18312b9bab7d1c3b03062c61e8bbc1ca6e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Sun Oct 25 23:42:00 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/07/22 23:23:22
-         [regress/unittests/sshkey/mktestdata.sh]
-         Sign test certs with ed25519 instead of ecdsa so that they'll work in
-         -portable on platforms that don't have ECDSA in their OpenSSL.  ok djm
+    upstream commit
+    
+    Expand tildes in filenames passed to -i before checking
+     whether or not the identity file exists.  This means that if the shell
+     doesn't do the expansion (eg because the option and filename were given as a
+     single argument) then we'll still add the key.  bz#2481, ok markus@
+    
+    Upstream-ID: db1757178a14ac519e9a3e1a2dbd21113cb3bfc6
 
-commit cea099a7c4eaecb01b001e5453bb4e5c25006c22
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jul 23 10:04:02 2014 +1000
+commit 97e184e508dd33c37860c732c0eca3fc57698b40
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Sun Oct 25 23:14:03 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/22 01:32:12
-         [regress/multiplex.sh]
-         change the test for still-open Unix domain sockets to be robust against
-         nc implementations that produce error messages. from -portable
-         (Id sync only)
+    upstream commit
+    
+    Do not prepend "exec" to the shell command run by "Match
+     exec" in a config file.  It's an unnecessary optimization from repurposed
+     ProxyCommand code and prevents some things working with some shells.
+     bz#2471, pointed out by res at qoxp.net.  ok markus@
+    
+    Upstream-ID: a1ead25ae336bfa15fb58d8c6b5589f85b4c33a3
 
-commit 31eb78078d349b32ea41952ecc944b3ad6cb0d45
+commit 8db134e7f457bcb069ec72bc4ee722e2af557c69
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jul 23 09:43:42 2014 +1000
+Date:   Thu Oct 29 10:48:23 2015 +1100
 
-       - guenther@cvs.openbsd.org 2014/07/22 07:13:42
-         [umac.c]
-         Convert from <sys/endian.h> to the shiney new <endian.h>
-         ok dtucker@, who also confirmed that -portable handles this already
-         (ID sync only, includes.h pulls in endian.h if available.)
+    Prevent name collisions with system glob (bz#2463)
+    
+    Move glob.h from includes.h to the only caller (sftp) and override the
+    names for the symbols.  This prevents name collisions with the system glob
+    in the case where something other than ssh uses it (eg kerberos).  With
+    jjelen at redhat.com, ok djm@
 
-commit 820763efef2d19d965602533036c2b4badc9d465
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jul 23 09:40:46 2014 +1000
+commit 86c10dbbef6a5800d2431a66cf7f41a954bb62b5
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Oct 23 02:22:01 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/07/22 01:18:50
-         [key.c]
-         Prevent spam from key_load_private_pem during hostbased auth.  ok djm@
+    upstream commit
+    
+    Update expected group sizes to match recent code changes.
+    
+    Upstream-Regress-ID: 0004f0ea93428969fe75bcfff0d521c553977794
 
-commit c4ee219a66f3190fa96cbd45b4d11015685c6306
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jul 23 04:27:50 2014 +1000
+commit 9ada37d36003a77902e90a3214981e417457cf13
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Oct 24 22:56:19 2015 +0000
 
-     - (dtucker) [regress/unittests/sshkey/test_{file,fuzz,sshkey}.c] Wrap ecdsa-
-       specific tests inside OPENSSL_HAS_ECC.
+    upstream commit
+    
+    fix keyscan output for multiple hosts/addrs on one line
+     when host hashing or a non standard port is in use; bz#2479 ok dtucker@
+    
+    Upstream-ID: 5321dabfaeceba343da3c8a8b5754c6f4a0a307b
 
-commit 04f4824940ea3edd60835416ececbae16438968a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jul 22 11:31:47 2014 +1000
+commit 44fc7cd7dcef6c52c6b7e9ff830dfa32879bd319
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Oct 24 22:52:22 2015 +0000
 
-     - (djm) [regress/multiplex.sh] change the test for still-open Unix
-        domain sockets to be robust against nc implementations that produce
-        error messages.
+    upstream commit
+    
+    skip "Could not chdir to home directory" message when
+     chrooted
+    
+    patch from Christian Hesse in bz#2485 ok dtucker@
+    
+    Upstream-ID: 86783c1953da426dff5b03b03ce46e699d9e5431
 
-commit 5ea4fe00d55453aaa44007330bb4c3181bd9b796
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jul 22 09:39:19 2014 +1000
+commit a820a8618ec44735dabc688fab96fba38ad66bb2
+Author: sthen@openbsd.org <sthen@openbsd.org>
+Date:   Sat Oct 24 08:34:09 2015 +0000
 
-     - (djm) [regress/multiplex.sh] ssh mux master lost -N somehow;
-       put it back
+    upstream commit
+    
+    Handle the split of tun(4) "link0" into tap(4) in ssh
+     tun-forwarding. Adapted from portable (using separate devices for this is the
+     normal case in most OS). ok djm@
+    
+    Upstream-ID: 90facf4c59ce73d6741db1bc926e578ef465cd39
 
-commit 948a1774a79a85f9deba6d74db95f402dee32c69
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Jul 22 01:07:11 2014 +1000
+commit 66d2e229baa9fe57b868c373b05f7ff3bb20055b
+Author: gsoares@openbsd.org <gsoares@openbsd.org>
+Date:   Wed Oct 21 11:33:03 2015 +0000
 
-     - (dtucker) [sshkey.c] ifdef out unused variable when compiling without
-       OPENSSL_HAS_ECC.
+    upstream commit
+    
+    fix memory leak in error path ok djm@
+    
+    Upstream-ID: dd2f402b0a0029b755df029fc7f0679e1365ce35
 
-commit c8f610f6cc57ae129758052439d9baf13699097b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Jul 21 10:23:27 2014 +1000
+commit 7d6c0362039ceacdc1366b5df29ad5d2693c13e5
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Tue Oct 20 23:24:25 2015 +0000
 
-     - (djm) [regress/multiplex.sh] Not all netcat accept the -N option.
+    upstream commit
+    
+    Compare pointers to NULL rather than 0.
+    
+    ok djm@
+    
+    Upstream-ID: 21616cfea27eda65a06e772cc887530b9a1a27f8
 
-commit 0e4e95566cd95c887f69272499b8f3880b3ec0f5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Jul 21 09:52:54 2014 +1000
+commit f98a09cacff7baad8748c9aa217afd155a4d493f
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Tue Oct 20 03:36:35 2015 +0000
 
-       - millert@cvs.openbsd.org 2014/07/15 15:54:15
-         [forwarding.sh multiplex.sh]
-         Add support for Unix domain socket forwarding.  A remote TCP port
-         may be forwarded to a local Unix domain socket and vice versa or
-         both ends may be a Unix domain socket.  This is a reimplementation
-         of the streamlocal patches by William Ahern from:
-             http://www.25thandclement.com/~william/projects/streamlocal.html
-         OK djm@ markus@
+    upstream commit
+    
+    Replace a function-local allocation with stack memory.
+    
+    ok djm@
+    
+    Upstream-ID: c09fbbab637053a2ab9f33ca142b4e20a4c5a17e
 
-commit 93a87ab27ecdc709169fb24411133998f81e2761
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Jul 21 06:30:25 2014 +1000
+commit ac908c1eeacccfa85659594d92428659320fd57e
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Oct 22 09:35:24 2015 +1100
 
-     - (dtucker) [regress/unittests/sshkey/
-       {common,test_file,test_fuzz,test_sshkey}.c] Wrap stdint.h includes in
-       ifdefs.
+    turn off PrintLastLog when --disable-lastlog
+    
+    bz#2278 from Brent Paulson
 
-commit 5573171352ea23df2dc6d2fe0324d023b7ba697c
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Jul 21 02:24:59 2014 +1000
+commit b56deb847f4a0115a8bf488bf6ee8524658162fd
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Oct 16 22:32:22 2015 +0000
 
-    - (dtucker) [cipher.c openbsd-compat/openssl-compat.h] Restore the bits
-       needed to build AES CTR mode against OpenSSL 0.9.8f and above.  ok djm
+    upstream commit
+    
+    increase the minimum modulus that we will send or accept in
+     diffie-hellman-group-exchange to 2048 bits; ok markus@
+    
+    Upstream-ID: 06dce7a24c17b999a0f5fadfe95de1ed6a1a9b6a
 
-commit 74e28682711d005026c7c8f15f96aea9d3c8b5a3
-Author: Tim Rice <tim@multitalents.net>
-Date:   Fri Jul 18 20:00:11 2014 -0700
+commit 5ee0063f024bf5b3f3ffb275b8cd20055d62b4b9
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Oct 16 18:40:49 2015 +0000
 
-     - (tim) [openbsd-compat/port-uw.c] Include misc.h for fwd_opts, used
-       in servconf.h.
+    upstream commit
+    
+    better handle anchored FQDNs (e.g. 'cvs.openbsd.org.') in
+     hostname canonicalisation - treat them as already canonical and remove the
+     trailing '.' before matching ssh_config; ok markus@
+    
+    Upstream-ID: f7619652e074ac3febe8363f19622aa4853b679a
 
-commit d1a0421f8e5e933fee6fb58ee6b9a22c63c8a613
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jul 19 07:23:55 2014 +1000
+commit e92c499a75477ecfe94dd7b4aed89f20b1fac5a7
+Author: mmcc@openbsd.org <mmcc@openbsd.org>
+Date:   Fri Oct 16 17:07:24 2015 +0000
 
-     - (dtucker) [key.c sshkey.c] Put new ecdsa bits inside ifdef OPENSSL_HAS_ECC.
+    upstream commit
+    
+    0 -> NULL when comparing with a char*.
+    
+    ok dtucker@, djm@.
+    
+    Upstream-ID: a928e9c21c0a9020727d99738ff64027c1272300
 
-commit f0fe9ea1be62227c130b317769de3d1e736b6dc1
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jul 19 06:33:12 2014 +1000
+commit b1d38a3cc6fe349feb8d16a5f520ef12d1de7cb2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Oct 15 23:51:40 2015 +0000
 
-     - (dtucker) [Makefile.in] Add a t-exec target to run just the executable
-       tests.
+    upstream commit
+    
+    fix some signed/unsigned integer type mismatches in
+     format strings; reported by Nicholas Lemonias
+    
+    Upstream-ID: 78cd55420a0eef68c4095bdfddd1af84afe5f95c
 
-commit 450bc1180d4b061434a4b733c5c8814fa30b022b
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jul 19 06:23:18 2014 +1000
+commit 1a2663a15d356bb188196b6414b4c50dc12fd42b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Oct 15 23:08:23 2015 +0000
 
-     - (dtucker) [auth2-gss.c gss-serv-krb5.c] Include misc.h for fwd_opts, used
-       in servconf.h.
+    upstream commit
+    
+    argument to sshkey_from_private() and sshkey_demote()
+     can't be NULL
+    
+    Upstream-ID: 0111245b1641d387977a9b38da15916820a5fd1f
 
-commit ab2ec586baad122ed169285c31927ccf58bc7b28
+commit 0f754e29dd3760fc0b172c1220f18b753fb0957e
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 18 15:04:47 2014 +1000
+Date:   Fri Oct 16 10:53:14 2015 +1100
 
-       - djm@cvs.openbsd.org 2014/07/18 02:46:01
-         [ssh-agent.c]
-         restore umask around listener socket creation (dropped in streamlocal patch
-         merge)
+    need va_copy before va_start
+    
+    reported by Nicholas Lemonias
 
-commit 357610d15946381ae90c271837dcdd0cdce7145f
+commit eb6c50d82aa1f0d3fc95f5630ea69761e918bfcd
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 18 15:04:10 2014 +1000
+Date:   Thu Oct 15 15:48:28 2015 -0700
 
-       - djm@cvs.openbsd.org 2014/07/17 07:22:19
-         [mux.c ssh.c]
-         reflect stdio-forward ("ssh -W host:port ...") failures in exit status.
-         previously we were always returning 0. bz#2255 reported by Brendan
-         Germain; ok dtucker
+    fix compilation on systems without SYMLOOP_MAX
 
-commit dad9a4a0b7c2b5d78605f8df28718f116524134e
+commit fafe1d84a210fb3dae7744f268059cc583db8c12
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 18 15:03:49 2014 +1000
+Date:   Wed Oct 14 09:22:15 2015 -0700
 
-       - djm@cvs.openbsd.org 2014/07/17 00:12:03
-         [key.c]
-         silence "incorrect passphrase" error spam; reported and ok dtucker@
+    s/SANDBOX_TAME/SANDBOX_PLEDGE/g
 
-commit f42f7684ecbeec6ce50e0310f80b3d6da2aaf533
+commit 8f22911027ff6c17d7226d232ccd20727f389310
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 18 15:03:27 2014 +1000
+Date:   Wed Oct 14 08:28:19 2015 +1100
 
-       - djm@cvs.openbsd.org 2014/07/17 00:10:18
-         [mux.c]
-         preserve errno across syscall
+    upstream commit
+    
+    revision 1.20
+    date: 2015/10/13 20:55:37;  author: millert;  state: Exp;  lines: +2 -2;  commitid: X39sl5ay1czgFIgp;
+    In rev 1.15 the sizeof argument was fixed in a strlcat() call but
+    the truncation check immediately following it was not updated to
+    match.  Not an issue in practice since the buffers are the same
+    size.  OK deraadt@
 
-commit 1b83320628cb0733e3688b85bfe4d388a7c51909
+commit 23fa695bb735f54f04d46123662609edb6c76767
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 18 15:03:02 2014 +1000
+Date:   Wed Oct 14 08:27:51 2015 +1100
 
-       - djm@cvs.openbsd.org 2014/07/17 00:10:56
-         [sandbox-systrace.c]
-         ifdef SYS_sendsyslog so this will compile without patching on -stable
+    upstream commit
+    
+    revision 1.19
+    date: 2015/01/16 16:48:51;  author: deraadt;  state: Exp;  lines: +3 -3;  commitid: 0DYulI8hhujBHMcR;
+    Move to the <limits.h> universe.
+    review by millert, binary checking process with doug, concept with guenther
 
-commit 6d57656331bcd754d912950e4a18ad259d596e61
+commit c71be375a69af00c2d0a0c24d8752bec12d8fd1b
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 18 15:02:06 2014 +1000
+Date:   Wed Oct 14 08:27:08 2015 +1100
 
-       - jmc@cvs.openbsd.org 2014/07/16 14:48:57
-         [ssh.1]
-         add the streamlocal* options to ssh's -o list; millert says they're
-         irrelevant for scp/sftp;
+    upstream commit
     
-         ok markus millert
+    revision 1.18
+    date: 2014/10/19 03:56:28;  author: doug;  state: Exp;  lines: +9 -9;  commitid: U6QxmtbXrGoc02S5;
+    Revert last commit due to changed semantics found by make release.
 
-commit 7acefbbcbeab725420ea07397ae35992f505f702
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 18 14:11:24 2014 +1000
-
-       - millert@cvs.openbsd.org 2014/07/15 15:54:14
-         [PROTOCOL auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
-         [auth-rsa.c auth.c auth1.c auth2-hostbased.c auth2-kbdint.c auth2-none.c]
-         [auth2-passwd.c auth2-pubkey.c auth2.c canohost.c channels.c channels.h]
-         [clientloop.c misc.c misc.h monitor.c mux.c packet.c readconf.c]
-         [readconf.h servconf.c servconf.h serverloop.c session.c ssh-agent.c]
-         [ssh.c ssh_config.5 sshconnect.c sshconnect1.c sshconnect2.c sshd.c]
-         [sshd_config.5 sshlogin.c]
-         Add support for Unix domain socket forwarding.  A remote TCP port
-         may be forwarded to a local Unix domain socket and vice versa or
-         both ends may be a Unix domain socket.  This is a reimplementation
-         of the streamlocal patches by William Ahern from:
-             http://www.25thandclement.com/~william/projects/streamlocal.html
-         OK djm@ markus@
-
-commit 6262d760e00714523633bd989d62e273a3dca99a
+commit c39ad23b06e9aecc3ff788e92f787a08472905b1
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 17 09:52:07 2014 +1000
+Date:   Wed Oct 14 08:26:24 2015 +1100
 
-       - tedu@cvs.openbsd.org 2014/07/11 13:54:34
-         [myproposal.h]
-         by popular demand, add back hamc-sha1 to server proposal for better compat
-         with many clients still in use. ok deraadt
+    upstream commit
+    
+    revision 1.17
+    date: 2014/10/18 20:43:52;  author: doug;  state: Exp;  lines: +10 -10;  commitid: I74hI1tVZtsspKEt;
+    Better POSIX compliance in realpath(3).
+    
+    millert@ made changes to realpath.c based on FreeBSD's version.  I merged
+    Todd's changes into dl_realpath.c.
+    
+    ok millert@, guenther@
 
-commit 9d69d937b46ecba17f16d923e538ceda7b705c7a
+commit e929a43f957dbd1254aca2aaf85c8c00cbfc25f4
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 17 09:49:37 2014 +1000
+Date:   Wed Oct 14 08:25:55 2015 +1100
 
-       - deraadt@cvs.openbsd.org 2014/07/11 08:09:54
-         [sandbox-systrace.c]
-         Permit use of SYS_sendsyslog from inside the sandbox.  Clock is ticking,
-         update your kernels and sshd soon.. libc will start using sendsyslog()
-         in about 4 days.
+    upstream commit
+    
+    revision 1.16
+    date: 2013/04/05 12:59:54;  author: kurt;  state: Exp;  lines: +3 -1;
+    - Add comments regarding copies of these files also in libexec/ld.so
+    okay guenther@
 
-commit f6293a0b4129826fc2e37e4062f96825df43c326
+commit 5225db68e58a1048cb17f0e36e0d33bc4a8fc410
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 17 09:01:25 2014 +1000
+Date:   Wed Oct 14 08:25:32 2015 +1100
 
-     - (djm) [digest-openssl.c] Preserve array order when disabling digests.
-       Reported by Petr Lautrbach.
+    upstream commit
+    
+    revision 1.15
+    date: 2012/09/13 15:39:05;  author: deraadt;  state: Exp;  lines: +2 -2;
+    specify the bounds of the dst to strlcat (both values were static and
+    equal, but it is more correct)
+    from Michal Mazurek
 
-commit 00f9cd230709c04399ef5ff80492d70a55230694
+commit 7365fe5b4859de2305e40ea132da3823830fa710
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jul 15 10:41:38 2014 +1000
+Date:   Wed Oct 14 08:25:09 2015 +1100
 
-     - (djm) [configure.ac] Delay checks for arc4random* until after libcrypto
-       has been located; fixes builds agains libressl-portable
+    upstream commit
+    
+    revision 1.14
+    date: 2011/07/24 21:03:00;  author: miod;  state: Exp;  lines: +35 -13;
+    Recent Single Unix will malloc memory if the second argument of realpath()
+    is NULL, and third-party software is starting to rely upon this.
+    Adapted from FreeBSD via Jona Joachim (jaj ; hcl-club , .lu), with minor
+    tweaks from nicm@ and yours truly.
 
-commit 1d0df3249c87019556b83306c28d4769375c2edc
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 11 09:19:04 2014 +1000
+commit e679c09cd1951f963793aa3d9748d1c3fdcf808f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 13 16:15:21 2015 +0000
 
-     - OpenBSD CVS Sync
-       - benno@cvs.openbsd.org 2014/07/09 14:15:56
-         [ssh-add.c]
-         fix ssh-add crash while loading more than one key
-         ok markus@
+    upstream commit
+    
+    apply PubkeyAcceptedKeyTypes filtering earlier, so all
+     skipped keys are noted before pubkey authentication starts. ok dtucker@
+    
+    Upstream-ID: ba4f52f54268a421a2a5f98bb375403f4cb044b8
 
-commit 7a57eb3d105aa4ced15fb47001092c58811e6d9d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 9 13:22:31 2014 +1000
+commit 179c353f564ec7ada64b87730b25fb41107babd7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 13 00:21:27 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/07 08:15:26
-         [multiplex.sh]
-         remove forced-fatal that I stuck in there to test the new cleanup
-         logic and forgot to remove...
+    upstream commit
+    
+    free the correct IV length, don't assume it's always the
+     cipher blocksize; ok dtucker@
+    
+    Upstream-ID: c260d9e5ec73628d9ff4b067fbb060eff5a7d298
 
-commit 612f965239a30fe536b11ece1834d9f470aeb029
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 9 13:22:03 2014 +1000
+commit 2539dce2a049a8f6bb0d44cac51f07ad48e691d3
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Oct 9 01:37:08 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/06 07:42:03
-         [multiplex.sh test-exec.sh]
-         add a hook to the cleanup() function to kill $SSH_PID if it is set
+    upstream commit
+    
+    Change all tame callers to namechange to pledge(2).
     
-         use it to kill the mux master started in multiplex.sh (it was being left
-         around on fatal failures)
+    Upstream-ID: 17e654fc27ceaf523c60f4ffd9ec7ae4e7efc7f2
 
-commit d0bb950485ba121e43a77caf434115ed6417b46f
+commit 9846a2f4067383bb76b4e31a9d2303e0a9c13a73
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 9 13:07:28 2014 +1000
+Date:   Thu Oct 8 04:30:48 2015 +1100
 
-       - djm@cvs.openbsd.org 2014/07/09 03:02:15
-         [key.c]
-         downgrade more error() to debug() to better match what old authfile.c
-         did; suppresses spurious errors with hostbased authentication enabled
+    hook tame(2) sandbox up to build
+    
+    OpenBSD only for now
 
-commit 0070776a038655c57f57e70cd05e4c38a5de9d84
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 9 13:07:06 2014 +1000
+commit 0c46bbe68b70bdf0d6d20588e5847e71f3739fe6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Oct 7 15:59:12 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/09 01:45:10
-         [sftp.c]
-         more useful error message when GLOB_NOSPACE occurs;
-         bz#2254, patch from Orion Poplawski
+    upstream commit
+    
+    include PubkeyAcceptedKeyTypes in ssh -G config dump
+    
+    Upstream-ID: 6c097ce6ffebf6fe393fb7988b5d152a5d6b36bb
 
-commit 079bac2a43c74ef7cf56850afbab3b1932534c50
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 9 13:06:25 2014 +1000
+commit bdcb73fb7641b1cf73c0065d1a0dd57b1e8b778e
+Author: sobrado@openbsd.org <sobrado@openbsd.org>
+Date:   Wed Oct 7 14:45:30 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/07 08:19:12
-         [ssh_config.5]
-         mention that ProxyCommand is executed using shell "exec" to avoid
-         a lingering process; bz#1977
+    upstream commit
+    
+    UsePrivilegeSeparation defaults to sandbox now.
+    
+    ok djm@
+    
+    Upstream-ID: bff136c38bcae89df82e044d2f42de21e1ad914f
 
-commit 3a48cc090096cf99b9de592deb5f90e444edebfb
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jul 6 09:32:49 2014 +1000
+commit 2905d6f99c837bb699b6ebc61711b19acd030709
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Oct 7 00:54:06 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/05 23:11:48
-         [channels.c]
-         fix remote-forward cancel regression; ok markus@
+    upstream commit
+    
+    don't try to change tun device flags if they are already
+     what we need; makes it possible to use tun/tap networking as non- root user
+     if device permissions and interface flags are pre-established; based on patch
+     by Ossi Herrala
+    
+    Upstream-ID: 89099ac4634cd477b066865acf54cb230780fd21
 
-commit 48bae3a38cb578713e676708164f6e7151cc64fa
+commit 0dc74512bdb105b048883f07de538b37e5e024d4
 Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jul 6 09:27:06 2014 +1000
+Date:   Mon Oct 5 18:33:05 2015 -0700
 
-       - djm@cvs.openbsd.org 2014/07/03 23:18:35
-         [authfile.h]
-         remove leakmalloc droppings
+    unbreak merge botch
 
-commit 72e6b5c9ed5e72ca3a6ccc3177941b7c487a0826
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 4 09:00:04 2014 +1000
+commit fdd020e86439afa7f537e2429d29d4b744c94331
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Oct 6 01:20:59 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 22:40:43
-         [servconf.c servconf.h session.c sshd.8 sshd_config.5]
-         Add a sshd_config PermitUserRC option to control whether ~/.ssh/rc is
-         executed, mirroring the no-user-rc authorized_keys option;
-         bz#2160; ok markus@
+    upstream commit
+    
+    adapt to recent sshkey_parse_private_fileblob() API
+     change
+    
+    Upstream-Regress-ID: 5c0d818da511e33e0abf6a92a31bd7163b7ad988
 
-commit 602943d1179a08dfa70af94f62296ea5e3d6ebb8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 4 08:59:41 2014 +1000
+commit 21ae8ee3b630b0925f973db647a1b9aa5fcdd4c5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Sep 24 07:15:39 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 22:33:41
-         [channels.c]
-         allow explicit ::1 and 127.0.0.1 forwarding bind addresses when
-         GatewayPorts=no; allows client to choose address family;
-         bz#2222 ok markus@
+    upstream commit
+    
+    fix command-line option to match what was actually
+     committed
+    
+    Upstream-Regress-ID: 3e8c24a2044e8afd37e7ce17b69002ca817ac699
 
-commit 6b37fbb7921d156b31e2c8f39d9e1b6746c34983
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 4 08:59:24 2014 +1000
+commit e14ac43b75e68f1ffbd3e1a5e44143c8ae578dcd
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Sep 24 06:16:53 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 22:23:46
-         [sshconnect.c]
-         when rekeying, skip file/DNS lookup if it is the same as the key sent
-         during initial key exchange. bz#2154 patch from Iain Morgan; ok markus@
+    upstream commit
+    
+    regress test for CertificateFile; patch from Meghana Bhat
+     via bz#2436
+    
+    Upstream-Regress-ID: e7a6e980cbe0f8081ba2e83de40d06c17be8bd25
 
-commit d2c3cd5f2e47ee24cf7093ce8e948c2e79dfc3fd
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jul 4 08:59:01 2014 +1000
+commit 905b054ed24e0d5b4ef226ebf2c8bfc02ae6d4ad
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Oct 5 17:11:21 2015 +0000
 
-       - jsing@cvs.openbsd.org 2014/07/03 12:42:16
-         [cipher-chachapoly.c]
-         Call chacha_ivsetup() immediately before chacha_encrypt_bytes() - this
-         makes it easier to verify that chacha_encrypt_bytes() is only called once
-         per chacha_ivsetup() call.
-         ok djm@
+    upstream commit
+    
+    some more bzero->explicit_bzero, from Michael McConville
+    
+    Upstream-ID: 17f19545685c33327db2efdc357c1c9225ff00d0
 
-commit 686feb560ec43a06ba04da82b50f3c183c947309
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:29:38 2014 +1000
+commit b007159a0acdbcf65814b3ee05dbe2cf4ea46011
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Oct 2 15:52:55 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 11:16:55
-         [auth.c auth.h auth1.c auth2.c]
-         make the "Too many authentication failures" message include the
-         user, source address, port and protocol in a format similar to the
-         authentication success / failure messages; bz#2199, ok dtucker
+    upstream commit
+    
+    fix email
+    
+    Upstream-ID: 72150f2d54b94de14ebef1ea054ef974281bf834
 
-commit 0f12341402e18fd9996ec23189b9418d2722453f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:28:09 2014 +1000
+commit b19e1b4ab11884c4f62aee9f8ab53127a4732658
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Oct 2 01:39:52 2015 +0000
 
-       - jmc@cvs.openbsd.org 2014/07/03 07:45:27
-         [ssh_config.5]
-         escape %C since groff thinks it part of an Rs/Re block;
+    upstream commit
+    
+    a sandbox using tame ok djm
+    
+    Upstream-ID: 4ca24e47895e72f5daaa02f3e3d3e5ca2d820fa3
 
-commit 9c38643c5cd47a19db2cc28279dcc28abadc22b3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:27:46 2014 +1000
+commit c61b42f2678f21f05653ac2d3d241b48ab5d59ac
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Oct 2 01:39:26 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 06:39:19
-         [ssh.c ssh_config.5]
-         Add a %C escape sequence for LocalCommand and ControlPath that expands
-         to a unique identifer based on a has of the tuple of (local host,
-         remote user, hostname, port).
+    upstream commit
     
-         Helps avoid exceeding sockaddr_un's miserly pathname limits for mux
-         control paths.
+    re-order system calls in order of risk, ok i'll be
+     honest, ordered this way they look like tame... ok djm
     
-         bz#2220, based on patch from mancha1 AT zoho.com; ok markus@
+    Upstream-ID: 42a1e6d251fd8be13c8262bee026059ae6328813
 
-commit 49d9bfe2b2f3e90cc158a215dffa7675e57e7830
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:26:42 2014 +1000
+commit c5f7c0843cb6e6074a93c8ac34e49ce33a6f5546
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Sep 25 18:19:54 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 05:38:17
-         [ssh.1]
-         document that -g will only work in the multiplexed case if applied to
-         the mux master
+    upstream commit
+    
+    some certificatefile tweaks; ok djm
+    
+    Upstream-ID: 0e5a7852c28c05fc193419cc7e50e64c1c535af0
 
-commit ef9f13ba4c58057b2166d1f2e790535da402fbe5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:26:21 2014 +1000
+commit 4e44a79a07d4b88b6a4e5e8c1bed5f58c841b1b8
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Sep 24 06:15:11 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 05:32:36
-         [ssh_config.5]
-         mention '%%' escape sequence in HostName directives and how it may
-         be used to specify IPv6 link-local addresses
+    upstream commit
+    
+    add ssh_config CertificateFile option to explicitly list
+     a certificate; patch from Meghana Bhat on bz#2436; ok markus@
+    
+    Upstream-ID: 58648ec53c510b41c1f46d8fe293aadc87229ab8
 
-commit e6a407789e5432dd2e53336fb73476cc69048c54
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:25:03 2014 +1000
+commit e3cbb06ade83c72b640a53728d362bbefa0008e2
+Author: sobrado@openbsd.org <sobrado@openbsd.org>
+Date:   Tue Sep 22 08:33:23 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 04:36:45
-         [digest.h]
-         forward-declare struct sshbuf so consumers don't need to include sshbuf.h
+    upstream commit
+    
+    fix two typos.
+    
+    Upstream-ID: 424402c0d8863a11b51749bacd7f8d932083b709
 
-commit 4a1d3d50f02d0a8a4ef95ea4749293cbfb89f919
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:24:40 2014 +1000
+commit 8408218c1ca88cb17d15278174a24a94a6f65fe1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Sep 21 04:31:00 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 03:47:27
-         [ssh-keygen.c]
-         When hashing or removing hosts using ssh-keygen, don't choke on
-         @revoked markers and don't remove @cert-authority markers;
-         bz#2241, reported by mlindgren AT runelind.net
+    upstream commit
+    
+    fix possible hang on closed output; bz#2469 reported by Tomas
+     Kuthan ok markus@
+    
+    Upstream-ID: f7afd41810f8540f524284f1be6b970859f94fe3
 
-commit e5c0d52ceb575c3db8c313e0b1aa3845943d7ba8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:24:19 2014 +1000
+commit 0097248f90a00865082e8c146b905a6555cc146f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 11 04:55:01 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 03:34:09
-         [gss-serv.c session.c ssh-keygen.c]
-         standardise on NI_MAXHOST for gethostname() string lengths; about
-         1/2 the cases were using it already. Fixes bz#2239 en passant
+    upstream commit
+    
+    skip if running as root; many systems (inc OpenBSD) allow
+     root to ptrace arbitrary processes
+    
+    Upstream-Regress-ID: be2b925df89360dff36f972951fa0fa793769038
 
-commit c174a3b7c14e0d178c61219de2aa1110e209950c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:23:24 2014 +1000
+commit 9c06c814aff925e11a5cc592c06929c258a014f6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 11 03:44:21 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 03:26:43
-         [digest-openssl.c]
-         use EVP_Digest() for one-shot hash instead of creating, updating,
-         finalising and destroying a context.
-         bz#2231, based on patch from Timo Teras
+    upstream commit
+    
+    try all supported key types here; bz#2455 reported by
+     Jakub Jelen
+    
+    Upstream-Regress-ID: 188cb7d9031cdbac3a0fa58b428b8fa2b2482bba
 
-commit d7ca2cd31ecc4d63a055e2dcc4bf35c13f2db4c5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:23:01 2014 +1000
+commit 3c019a936b43f3e2773f3edbde7c114d73caaa4c
+Author: tim@openbsd.org <tim@openbsd.org>
+Date:   Sun Sep 13 14:39:16 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 03:15:01
-         [ssh-add.c]
-         make stdout line-buffered; saves partial output getting lost when
-         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
+    upstream commit
+    
+    - Fix error message: passphrase needs to be at least 5
+     characters, not 4. - Remove unused function argument. - Remove two
+     unnecessary variables.
+    
+    OK djm@
+    
+    Upstream-ID: 13010c05bfa8b523da1c0dc19e81dd180662bc30
 
-commit b1e967c8d7c7578dd0c172d85b3046cf54ea42ba
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:22:40 2014 +1000
+commit 2681cdb6e0de7c1af549dac37a9531af202b4434
+Author: tim@openbsd.org <tim@openbsd.org>
+Date:   Sun Sep 13 13:48:19 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 03:11:03
-         [ssh-agent.c]
-         Only cleanup agent socket in the main agent process and not in any
-         subprocesses it may have started (e.g. forked askpass). Fixes
-         agent sockets being zapped when askpass processes fatal();
-         bz#2236 patch from Dmitry V. Levin
+    upstream commit
+    
+    When adding keys to the agent, don't ignore the comment
+     of keys for which the user is prompted for a passphrase.
+    
+    Tweak and OK djm@
+    
+    Upstream-ID: dc737c620a5a8d282cc4f66e3b9b624e9abefbec
 
-commit 61e28e55c3438d796b02ef878bcd28620d452670
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 21:22:22 2014 +1000
+commit 14692f7b8251cdda847e648a82735eef8a4d2a33
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Fri Sep 11 08:50:04 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/07/03 01:45:38
-         [sshkey.c]
-         make Ed25519 keys' title fit properly in the randomart border; bz#2247
-         based on patch from Christian Hesse
+    upstream commit
+    
+    Use explicit_bzero() when zeroing before free()
+    
+    from Michael McConville (mmcconv1 (at) sccs.swarthmore.edu)
+    ok millert@ djm@
+    
+    Upstream-ID: 2e3337db046c3fe70c7369ee31515ac73ec00f50
 
-commit 9eb4cd9a32c32d40d36450b68ed93badc6a94c68
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 13:29:50 2014 +1000
+commit 846f6fa4cfa8483a9195971dbdd162220f199d85
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Sep 11 06:55:46 2015 +0000
 
-     - (djm) [monitor_fdpass.c] Use sys/poll.h if poll.h doesn't exist;
-       bz#2237
+    upstream commit
+    
+    sync -Q in usage() to SYNOPSIS; since it's drastically
+     shorter, i've reformatted the block to sync with the man (80 cols) and saved
+     a line;
+    
+    Upstream-ID: 86e2c65c3989a0777a6258a77e589b9f6f354abd
 
-commit 8da0fa24934501909408327298097b1629b89eaa
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jul 3 11:54:19 2014 +1000
+commit 95923e0520a8647417ee6dcdff44694703dfeef0
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Sep 11 06:51:39 2015 +0000
 
-     - (djm) [digest-openssl.c configure.ac] Disable RIPEMD160 if libcrypto
-       doesn't support it.
+    upstream commit
+    
+    tweak previous;
+    
+    Upstream-ID: f29b3cfcfd9aa31fa140c393e7bd48c1c74139d6
 
-commit 81309c857dd0dbc0a1245a16d621c490ad48cfbb
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 17:45:55 2014 +1000
+commit 86ac462f833b05d8ed9de9c50ccb295d7faa79ff
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Sep 11 05:27:02 2015 +0000
 
-     - (djm) [regress/Makefile] fix execution of sshkey unit/fuzz test
+    upstream commit
+    
+    Update usage to match man page.
+    
+    Upstream-ID: 9e85aefaecfb6aaf34c7cfd0700cd21783a35675
 
-commit 82b2482ce68654815ee049b9bf021bb362a35ff2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 17:43:41 2014 +1000
+commit 674b3b68c1d36b2562324927cd03857b565e05e8
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 11 03:47:28 2015 +0000
 
-     - (djm) [sshkey.c] Conditionalise inclusion of util.h
+    upstream commit
+    
+    expand %i in ControlPath to UID; bz#2449
+    
+    patch from Christian Hesse w/ feedback from dtucker@
+    
+    Upstream-ID: 2ba8d303e555a84e2f2165ab4b324b41e80ab925
 
-commit dd8b1dd7933eb6f5652641b0cdced34a387f2e80
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 17:38:31 2014 +1000
-
-       - djm@cvs.openbsd.org 2014/06/24 01:14:17
-         [Makefile.in regress/Makefile regress/unittests/Makefile]
-         [regress/unittests/sshkey/Makefile]
-         [regress/unittests/sshkey/common.c]
-         [regress/unittests/sshkey/common.h]
-         [regress/unittests/sshkey/mktestdata.sh]
-         [regress/unittests/sshkey/test_file.c]
-         [regress/unittests/sshkey/test_fuzz.c]
-         [regress/unittests/sshkey/test_sshkey.c]
-         [regress/unittests/sshkey/tests.c]
-         [regress/unittests/sshkey/testdata/dsa_1]
-         [regress/unittests/sshkey/testdata/dsa_1-cert.fp]
-         [regress/unittests/sshkey/testdata/dsa_1-cert.pub]
-         [regress/unittests/sshkey/testdata/dsa_1.fp]
-         [regress/unittests/sshkey/testdata/dsa_1.fp.bb]
-         [regress/unittests/sshkey/testdata/dsa_1.param.g]
-         [regress/unittests/sshkey/testdata/dsa_1.param.priv]
-         [regress/unittests/sshkey/testdata/dsa_1.param.pub]
-         [regress/unittests/sshkey/testdata/dsa_1.pub]
-         [regress/unittests/sshkey/testdata/dsa_1_pw]
-         [regress/unittests/sshkey/testdata/dsa_2]
-         [regress/unittests/sshkey/testdata/dsa_2.fp]
-         [regress/unittests/sshkey/testdata/dsa_2.fp.bb]
-         [regress/unittests/sshkey/testdata/dsa_2.pub]
-         [regress/unittests/sshkey/testdata/dsa_n]
-         [regress/unittests/sshkey/testdata/dsa_n_pw]
-         [regress/unittests/sshkey/testdata/ecdsa_1]
-         [regress/unittests/sshkey/testdata/ecdsa_1-cert.fp]
-         [regress/unittests/sshkey/testdata/ecdsa_1-cert.pub]
-         [regress/unittests/sshkey/testdata/ecdsa_1.fp]
-         [regress/unittests/sshkey/testdata/ecdsa_1.fp.bb]
-         [regress/unittests/sshkey/testdata/ecdsa_1.param.curve]
-         [regress/unittests/sshkey/testdata/ecdsa_1.param.priv]
-         [regress/unittests/sshkey/testdata/ecdsa_1.param.pub]
-         [regress/unittests/sshkey/testdata/ecdsa_1.pub]
-         [regress/unittests/sshkey/testdata/ecdsa_1_pw]
-         [regress/unittests/sshkey/testdata/ecdsa_2]
-         [regress/unittests/sshkey/testdata/ecdsa_2.fp]
-         [regress/unittests/sshkey/testdata/ecdsa_2.fp.bb]
-         [regress/unittests/sshkey/testdata/ecdsa_2.param.curve]
-         [regress/unittests/sshkey/testdata/ecdsa_2.param.priv]
-         [regress/unittests/sshkey/testdata/ecdsa_2.param.pub]
-         [regress/unittests/sshkey/testdata/ecdsa_2.pub]
-         [regress/unittests/sshkey/testdata/ecdsa_n]
-         [regress/unittests/sshkey/testdata/ecdsa_n_pw]
-         [regress/unittests/sshkey/testdata/ed25519_1]
-         [regress/unittests/sshkey/testdata/ed25519_1-cert.fp]
-         [regress/unittests/sshkey/testdata/ed25519_1-cert.pub]
-         [regress/unittests/sshkey/testdata/ed25519_1.fp]
-         [regress/unittests/sshkey/testdata/ed25519_1.fp.bb]
-         [regress/unittests/sshkey/testdata/ed25519_1.pub]
-         [regress/unittests/sshkey/testdata/ed25519_1_pw]
-         [regress/unittests/sshkey/testdata/ed25519_2]
-         [regress/unittests/sshkey/testdata/ed25519_2.fp]
-         [regress/unittests/sshkey/testdata/ed25519_2.fp.bb]
-         [regress/unittests/sshkey/testdata/ed25519_2.pub]
-         [regress/unittests/sshkey/testdata/pw]
-         [regress/unittests/sshkey/testdata/rsa1_1]
-         [regress/unittests/sshkey/testdata/rsa1_1.fp]
-         [regress/unittests/sshkey/testdata/rsa1_1.fp.bb]
-         [regress/unittests/sshkey/testdata/rsa1_1.param.n]
-         [regress/unittests/sshkey/testdata/rsa1_1.pub]
-         [regress/unittests/sshkey/testdata/rsa1_1_pw]
-         [regress/unittests/sshkey/testdata/rsa1_2]
-         [regress/unittests/sshkey/testdata/rsa1_2.fp]
-         [regress/unittests/sshkey/testdata/rsa1_2.fp.bb]
-         [regress/unittests/sshkey/testdata/rsa1_2.param.n]
-         [regress/unittests/sshkey/testdata/rsa1_2.pub]
-         [regress/unittests/sshkey/testdata/rsa_1]
-         [regress/unittests/sshkey/testdata/rsa_1-cert.fp]
-         [regress/unittests/sshkey/testdata/rsa_1-cert.pub]
-         [regress/unittests/sshkey/testdata/rsa_1.fp]
-         [regress/unittests/sshkey/testdata/rsa_1.fp.bb]
-         [regress/unittests/sshkey/testdata/rsa_1.param.n]
-         [regress/unittests/sshkey/testdata/rsa_1.param.p]
-         [regress/unittests/sshkey/testdata/rsa_1.param.q]
-         [regress/unittests/sshkey/testdata/rsa_1.pub]
-         [regress/unittests/sshkey/testdata/rsa_1_pw]
-         [regress/unittests/sshkey/testdata/rsa_2]
-         [regress/unittests/sshkey/testdata/rsa_2.fp]
-         [regress/unittests/sshkey/testdata/rsa_2.fp.bb]
-         [regress/unittests/sshkey/testdata/rsa_2.param.n]
-         [regress/unittests/sshkey/testdata/rsa_2.param.p]
-         [regress/unittests/sshkey/testdata/rsa_2.param.q]
-         [regress/unittests/sshkey/testdata/rsa_2.pub]
-         [regress/unittests/sshkey/testdata/rsa_n]
-         [regress/unittests/sshkey/testdata/rsa_n_pw]
-         unit and fuzz tests for new key API
-
-commit c1dc24b71f087f385b92652b9673f52af64e0428
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 17:02:03 2014 +1000
+commit c0f55db7ee00c8202b05cb4b9ad4ce72cc45df41
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 11 03:42:32 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/06/24 01:04:43
-         [regress/krl.sh]
-         regress test for broken consecutive revoked serial number ranges
+    upstream commit
+    
+    mention -Q key-plain and -Q key-cert; bz#2455 pointed out
+     by Jakub Jelen
+    
+    Upstream-ID: c8f1f8169332e4fa73ac96b0043e3b84e01d4896
 
-commit 43d3ed2dd3feca6d0326c7dc82588d2faa115e92
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 17:01:08 2014 +1000
+commit cfffbdb10fdf0f02d3f4232232eef7ec3876c383
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Sep 14 16:24:21 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/05/21 07:04:21
-         [regress/integrity.sh]
-         when failing because of unexpected output, show the offending output
+    Use ssh-keygen -A when generating host keys.
+    
+    Use ssh-keygen -A instead of per-keytype invocations when generating host
+    keys.  Add tests when doing host-key-force since we can't use ssh-keygen -A
+    since it can't specify alternate locations.  bz#2459, ok djm@
 
-commit 5a96707ffc8d227c2e7d94fa6b0317f8a152cf4e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:38:05 2014 +1000
+commit 366bada1e9e124654aac55b72b6ccf878755b0dc
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Sep 11 13:29:22 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/04/30 05:32:00
-         [regress/Makefile]
-         unit tests for new buffer API; including basic fuzz testing
-         NB. Id sync only.
+    Correct default value for --with-ssh1.
+    
+    bz#2457, from konto-mindrot.org at walimnieto.com.
 
-commit 3ff92ba756aee48e4ae3e0aeff7293517b3dd185
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:33:09 2014 +1000
-
-       - djm@cvs.openbsd.org 2014/06/30 12:54:39
-         [key.c]
-         suppress spurious error message when loading key with a passphrase;
-         reported by kettenis@ ok markus@
-       - djm@cvs.openbsd.org 2014/07/02 04:59:06
-         [cipher-3des1.c]
-         fix ssh protocol 1 on the server that regressed with the sshkey change
-         (sometimes fatal() after auth completed), make file return useful status
-         codes.
-         NB. Id sync only for these two. They were bundled into the sshkey merge
-         above, since it was easier to sync the entire file and then apply
-         portable-specific changed atop it.
-
-commit ec3d0e24a1e46873d80507f5cd8ee6d0d03ac5dc
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:30:00 2014 +1000
+commit 2bca8a43e7dd9b04d7070824ffebb823c72587b2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 11 03:13:36 2015 +0000
 
-       - markus@cvs.openbsd.org 2014/06/27 18:50:39
-         [ssh-add.c]
-         fix loading of private keys
+    upstream commit
+    
+    more clarity on what AuthorizedKeysFile=none does; based
+     on diff by Thiebaud Weksteen
+    
+    Upstream-ID: 78ab87f069080f0cc3bc353bb04eddd9e8ad3704
 
-commit 4b3ed647d5b328cf68e6a8ffbee490d8e0683e82
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:29:40 2014 +1000
+commit 61942ea4a01e6db4fdf37ad61de81312ffe310e9
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Sep 9 00:52:44 2015 +0000
 
-       - markus@cvs.openbsd.org 2014/06/27 16:41:56
-         [channels.c channels.h clientloop.c ssh.c]
-         fix remote fwding with same listen port but different listen address
-         with gerhard@, ok djm@
+    upstream commit
+    
+    openssh_RSA_verify return type is int, so don't make it
+     size_t within the function itself with only negative numbers or zero assigned
+     to it. bz#2460
+    
+    Upstream-ID: b6e794b0c7fc4f9f329509263c8668d35f83ea55
 
-commit 9e01ff28664921ce9b6500681333e42fb133b4d0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:29:21 2014 +1000
+commit 4f7cc2f8cc861a21e6dbd7f6c25652afb38b9b96
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Sep 4 08:21:47 2015 +0000
 
-       - deraadt@cvs.openbsd.org 2014/06/25 14:16:09
-         [sshbuf.c]
-         unblock SIGSEGV before raising it
-         ok djm
+    upstream commit
+    
+    Plug minor memory leaks when options are used more than
+     once.  bz#2182, patch from Tiago Cunha, ok deraadt djm
+    
+    Upstream-ID: 5b84d0401e27fe1614c10997010cc55933adb48e
 
-commit 1845fe6bda0729e52f4c645137f4fc3070b5438a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:29:01 2014 +1000
+commit 7ad8b287c8453a3e61dbc0d34d467632b8b06fc8
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Sep 11 13:11:02 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/06/24 02:21:01
-         [scp.c]
-         when copying local->remote fails during read, don't send uninitialised
-         heap to the remote end. Reported by Jann Horn
+    Force resolution of _res for correct detection.
+    
+    bz#2259, from sconeu at yahoo.com.
 
-commit 19439e9a2a0ac0b4b3b1210e89695418beb1c883
+commit 26ad18247213ff72b4438abe7fc660c958810fa2
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:28:40 2014 +1000
+Date:   Thu Sep 10 10:57:41 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/06/24 02:19:48
-         [ssh.c]
-         don't fatal() when hostname canonicalisation fails with a
-         ProxyCommand in use; continue and allow the ProxyCommand to
-         connect anyway (e.g. to a host with a name outside the DNS
-         behind a bastion)
+    allow getrandom syscall; from Felix von Leitner
 
-commit 8668706d0f52654fe64c0ca41a96113aeab8d2b8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 15:28:02 2014 +1000
-
-       - djm@cvs.openbsd.org 2014/06/24 01:13:21
-         [Makefile.in auth-bsdauth.c auth-chall.c auth-options.c auth-rsa.c
-         [auth2-none.c auth2-pubkey.c authfile.c authfile.h cipher-3des1.c
-         [cipher-chachapoly.c cipher-chachapoly.h cipher.c cipher.h
-         [digest-libc.c digest-openssl.c digest.h dns.c entropy.c hmac.h
-         [hostfile.c key.c key.h krl.c monitor.c packet.c rsa.c rsa.h
-         [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c
-         [ssh-keygen.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c
-         [ssh-rsa.c sshbuf-misc.c sshbuf.h sshconnect.c sshconnect1.c
-         [sshconnect2.c sshd.c sshkey.c sshkey.h
-         [openbsd-compat/openssl-compat.c openbsd-compat/openssl-compat.h]
-         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.
-    
-         NB. This commit also removes portable OpenSSH support for OpenSSL
-         <0.9.8e.
-
-commit 2cd7929250cf9e9f658d70dcd452f529ba08c942
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 12:48:30 2014 +1000
+commit 5245bc1e6b129a10a928f73f11c3aa32656c44b4
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Sep 4 06:40:45 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/06/24 00:52:02
-         [krl.c]
-         fix bug in KRL generation: multiple consecutive revoked certificate
-         serial number ranges could be serialised to an invalid format.
+    upstream commit
     
-         Readers of a broken KRL caused by this bug will fail closed, so no
-         should-have-been-revoked key will be accepted.
-
-commit 99db840ee8dbbd2b3fbc6c45d0ee2f6a65e96898
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 12:48:04 2014 +1000
+    full stop belongs outside the brackets, not inside;
+    
+    Upstream-ID: 99d098287767799ac33d2442a05b5053fa5a551a
 
-       - naddy@cvs.openbsd.org 2014/06/18 15:42:09
-         [sshbuf-getput-crypto.c]
-         The ssh_get_bignum functions must accept the same range of bignums
-         the corresponding ssh_put_bignum functions create.  This fixes the
-         use of 16384-bit RSA keys (bug reported by Eivind Evensen).
-         ok djm@
+commit a85768a9321d74b41219eeb3c9be9f1702cbf6a5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 4 04:56:09 2015 +0000
 
-commit 84a89161a9629239b64171ef3e22ef6a3e462d51
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 12:47:48 2014 +1000
-
-       - matthew@cvs.openbsd.org 2014/06/18 02:59:13
-         [sandbox-systrace.c]
-         Now that we have a dedicated getentropy(2) system call for
-         arc4random(3), we can disallow __sysctl(2) in OpenSSH's systrace
-         sandbox.
+    upstream commit
     
-         ok djm
-
-commit 51504ceec627c0ad57b9f75585c7b3d277f326be
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jul 2 12:47:25 2014 +1000
-
-       - deraadt@cvs.openbsd.org 2014/06/13 08:26:29
-         [sandbox-systrace.c]
-         permit SYS_getentropy
-         from matthew
-
-commit a261b8df59117f7dc52abb3a34b35a40c2c9fa88
-Author: Tim Rice <tim@multitalents.net>
-Date:   Wed Jun 18 16:17:28 2014 -0700
-
-     - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare
-
-commit 316fac6f18f87262a315c79bcf68b9f92c9337e4
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Jun 17 23:06:07 2014 +1000
-
-     - (dtucker) [entropy.c openbsd-compat/openssl-compat.{c,h}
-       openbsd-compat/regress/{.cvsignore,Makefile.in,opensslvertest.c}]
-       Move the OpenSSL header/library version test into its own function and add
-       tests for it. Fix it to allow fix version upgrades (but not downgrades).
-       Prompted by chl@ via OpenSMTPD (issue #462) and Debian (bug #748150).
-       ok djm@ chl@
-
-commit af665bb7b092a59104db1e65577851cf35b86e32
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Jun 16 22:50:55 2014 +1000
-
-     - (dtucker) [defines.h] Fix undef of _PATH_MAILDIR.  From rak at debian via
-       OpenSMTPD and chl@
-
-commit f9696566fb41320820f3b257ab564fa321bb3751
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jun 13 11:06:04 2014 +1000
-
-     - (dtucker) [configure.ac] Remove tcpwrappers support, support has already
-       been removed from sshd.c.
-
-commit 5e2b8894b0b24af4ad0a2f7aa33ebf255df7a8bc
-Author: Tim Rice <tim@multitalents.net>
-Date:   Wed Jun 11 18:31:10 2014 -0700
-
-     - (tim) [regress/unittests/test_helper/test_helper.h] Add includes.h for
-       u_intXX_t types.
-
-commit 985ee2cbc3e43bc65827c3c0d4df3faa99160c37
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Jun 12 05:32:29 2014 +1000
-
-     - (dtucker) [regress/unittests/sshbuf/*.c regress/unittests/test_helper/*]
-       Wrap stdlib.h include an ifdef for platforms that don't have it.
-
-commit cf5392c2db2bb1dbef9818511d34056404436109
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Jun 12 05:22:49 2014 +1000
-
-     - (dtucker) [defines.h] Add va_copy if we don't already have it, taken from
-       openbsd-compat/bsd-asprintf.c.
-
-commit 58538d795e0b662f2f4e5a7193f1204bbe992ddd
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 13:39:24 2014 +1000
-
-     - (dtucker) [bufaux.c bufbn.c bufec.c buffer.c] Pull in includes.h for
-       compat stuff, specifically whether or not OpenSSL has ECC.
-
-commit eb012ac581fd0abc16ee86ee3a68cf07c8ce4d08
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 13:10:00 2014 +1000
-
-     - (dtucker) [openbsd-compat/arc4random.c] Use explicit_bzero instead of an
-       assigment that might get optimized out.  ok djm@
-
-commit b9609fd86c623d6d440e630f5f9a63295f7aea20
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 08:04:02 2014 +1000
-
-     - (dtucker) [sshbuf.h] Only declare ECC functions if building without
-       OpenSSL or if OpenSSL has ECC.
+    add a debug2() right before DNS resolution; it's a place
+     where ssh could previously silently hang for a while. bz#2433
+    
+    Upstream-ID: 52a1a3e0748db66518e7598352c427145692a6a0
 
-commit a54a040f66944c6e8913df8635a01a2327219be9
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 07:58:35 2014 +1000
+commit 46152af8d27aa34d5d26ed1c371dc8aa142d4730
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 4 04:55:24 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/06/10 21:46:11
-         [sshbuf.h]
-         Group ECC functions together to make things a little easier in -portable.
-         "doesn't bother me" deraadt@
+    upstream commit
+    
+    correct function name in error messages
+    
+    Upstream-ID: 92fb2798617ad9561370897f4ab60adef2ff4c0e
 
-commit 9f92c53bad04a89067756be8198d4ec2d8a08875
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 07:57:58 2014 +1000
+commit a954cdb799a4d83c2d40fbf3e7b9f187fbfd72fc
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 4 04:47:50 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/06/05 22:17:50
-         [sshconnect2.c]
-         fix inverted test that caused PKCS#11 keys that were explicitly listed
-         not to be preferred. Reported by Dirk-Willem van Gulik
+    upstream commit
+    
+    better document ExitOnForwardFailure; bz#2444, ok
+     dtucker@
+    
+    Upstream-ID: a126209b5a6d9cb3117ac7ab5bc63d284538bfc2
 
-commit 15c254a25394f96643da2ad0f674acdc51e89856
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 07:38:49 2014 +1000
+commit f54d8ac2474b6fc3afa081cf759b48a6c89d3319
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 4 04:44:08 2015 +0000
 
-     - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] ifdef
-       ECC variable too.
+    upstream commit
+    
+    don't record hostbased authentication hostkeys as user
+     keys in test for multiple authentication with the same key
+    
+    Upstream-ID: 26b368fa2cff481f47f37e01b8da1ae5b57b1adc
 
-commit d7af0cc5bf273eeed0897a99420bc26841d07d8f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 07:37:25 2014 +1000
+commit ac3451dd65f27ecf85dc045c46d49e2bbcb8dddd
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 4 03:57:38 2015 +0000
 
-     - (dtucker) [myprosal.h] Don't include curve25519-sha256@libssh.org in
-       the proposal if the version of OpenSSL we're using doesn't support ECC.
+    upstream commit
+    
+    remove extra newline in nethack-mode hostkey; from
+     Christian Hesse bz#2686
+    
+    Upstream-ID: 4f56368b1cc47baeea0531912186f66007fd5b92
 
-commit 67508ac2563c33d582be181a3e777c65f549d22f
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Wed Jun 11 06:27:16 2014 +1000
+commit 9e3ed9ebb1a7e47c155c28399ddf09b306ea05df
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Sep 4 04:23:10 2015 +0000
 
-     - (dtucker) [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
-       regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c] Only do NISTP256
-       curve tests if OpenSSL has them.
+    upstream commit
+    
+    trim junk from end of file; bz#2455 from Jakub Jelen
+    
+    Upstream-Regress-ID: a4e64e8931e40d23874b047074444eff919cdfe6
 
-commit 6482d90a65459a88c18c925368525855832272b3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue May 27 14:34:42 2014 +1000
+commit f3a3ea180afff080bab82087ee0b60db9fd84f6c
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Wed Sep 2 07:51:12 2015 +0000
 
-     - (djm) [configure.ac openbsd-compat/bsd-cygwin_util.c]
-          [openbsd-compat/bsd-cygwin_util.h] On Cygwin, determine privilege
-             separation user at runtime, since it may need to be a domain account.
-                Patch from Corinna Vinschen.
+    upstream commit
+    
+    Fix occurrences of "r = func() != 0" which result in the
+     wrong error codes being returned due to != having higher precedence than =.
+    
+    ok deraadt@ markus@
+    
+    Upstream-ID: 5fc35c9fc0319cc6fca243632662d2f06b5fd840
 
-commit f9eb5e0734f7a7f6e975809eb54684d2a06a7ffc
+commit f498a98cf83feeb7ea01c15cd1c98b3111361f3a
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue May 27 14:31:58 2014 +1000
+Date:   Thu Sep 3 09:11:22 2015 +1000
 
-     - (djm) [contrib/cygwin/ssh-host-config] Updated Cygwin ssh-host-config
-       from Corinna Vinschen, fixing a number of bugs and preparing for
-       Cygwin 1.7.30.
+    don't check for yp_match; ok tim@
 
-commit eae88744662e6b149f43ef071657727f1a157d95
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue May 27 14:27:02 2014 +1000
+commit 9690b78b7848b0b376980a61d51b1613e187ddb5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Aug 21 23:57:48 2015 +0000
 
-     - (djm) [cipher.c] Fix merge botch.
+    upstream commit
+    
+    Improve printing of KEX offers and decisions
+    
+    The debug output now labels the client and server offers and the
+    negotiated options. ok markus@
+    
+    Upstream-ID: 8db921b3f92a4565271b1c1fbce6e7f508e1a2cb
 
-commit 564b5e253c1d95c26a00e8288f0089a2571661c3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 22 08:23:59 2014 +1000
+commit 60a92470e21340e1a3fc10f9c7140d8e1519dc55
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Aug 21 23:53:08 2015 +0000
 
-     - (djm) [Makefile.in] typo in path
+    upstream commit
+    
+    Fix printing (ssh -G ...) of HostKeyAlgorithms=+...
+     Reported by Bryan Drewery
+    
+    Upstream-ID: 19ad20c41bd5971e006289b6f9af829dd46c1293
 
-commit e84d10302aeaf7a1acb05c451f8718143656856a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed May 21 17:13:36 2014 +1000
+commit 6310f60fffca2d1e464168e7d1f7e3b6b0268897
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Aug 21 23:52:30 2015 +0000
 
-    revert a diff I didn't mean to commit
+    upstream commit
+    
+    Fix expansion of HostkeyAlgorithms=+...
+    
+    Reported by Bryan Drewery
+    
+    Upstream-ID: 70ca1deea39d758ba36d36428ae832e28566f78d
 
-commit 795b86313f1f1aab9691666c4f2d5dae6e4acd50
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed May 21 17:12:53 2014 +1000
+commit e774e5ea56237fd626a8161f9005023dff3e76c9
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Aug 21 23:29:31 2015 +0000
 
-     - (djm) [misc.c] Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC
-       when it is available. It takes into account time spent suspended,
-       thereby ensuring timeouts (e.g. for expiring agent keys) fire
-       correctly. bz#2228 reported by John Haxby
+    upstream commit
+    
+    Improve size == 0, count == 0 checking in mm_zalloc,
+     which is "array" like. Discussed with tedu, millert, otto.... and ok djm
+    
+    Upstream-ID: 899b021be43b913fad3eca1aef44efe710c53e29
 
-commit 18912775cb97c0b1e75e838d3c7d4b56648137b5
+commit 189de02d9ad6f3645417c0ddf359b923aae5f926
 Author: Damien Miller <djm@mindrot.org>
-Date:   Wed May 21 17:06:46 2014 +1000
+Date:   Fri Aug 21 15:45:02 2015 +1000
 
-     - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use
-       vhangup on Linux. It doens't work for non-root users, and for them
-       it just messes up the tty settings.
+    expose POLLHUP and POLLNVAL for netcat.c
 
-commit 7f1c264d3049cd95234e91970ccb5406e1d15b27
+commit e91346dc2bbf460246df2ab591b7613908c1b0ad
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 18:01:52 2014 +1000
+Date:   Fri Aug 21 14:49:03 2015 +1000
 
-     - (djm) [sshbuf.c] need __predict_false
+    we don't use Github for issues/pull-requests
 
-commit e7429f2be8643e1100380a8a7389d85cc286c8fe
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 18:01:01 2014 +1000
-
-     - (djm) [regress/Makefile Makefile.in]
-       [regress/unittests/sshbuf/test_sshbuf.c
-       [regress/unittests/sshbuf/test_sshbuf_fixed.c]
-       [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
-       [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
-       [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
-       [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
-       [regress/unittests/sshbuf/test_sshbuf_misc.c]
-       [regress/unittests/sshbuf/tests.c]
-       [regress/unittests/test_helper/fuzz.c]
-       [regress/unittests/test_helper/test_helper.c]
-       Hook new unit tests into the build and "make tests"
-
-commit def1de086707b0e6b046fe7e115c60aca0227a99
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 15:17:15 2014 +1000
-
-     - (djm) [regress/unittests/Makefile]
-       [regress/unittests/Makefile.inc]
-       [regress/unittests/sshbuf/Makefile]
-       [regress/unittests/sshbuf/test_sshbuf.c]
-       [regress/unittests/sshbuf/test_sshbuf_fixed.c]
-       [regress/unittests/sshbuf/test_sshbuf_fuzz.c]
-       [regress/unittests/sshbuf/test_sshbuf_getput_basic.c]
-       [regress/unittests/sshbuf/test_sshbuf_getput_crypto.c]
-       [regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c]
-       [regress/unittests/sshbuf/test_sshbuf_misc.c]
-       [regress/unittests/sshbuf/tests.c]
-       [regress/unittests/test_helper/Makefile]
-       [regress/unittests/test_helper/fuzz.c]
-       [regress/unittests/test_helper/test_helper.c]
-       [regress/unittests/test_helper/test_helper.h]
-       Import new unit tests from OpenBSD; not yet hooked up to build.
-
-commit 167685756fde8bc213a8df2c8e1848e312db0f46
+commit a4f5b507c708cc3dc2c8dd2d02e4416d7514dc23
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 15:08:40 2014 +1000
+Date:   Fri Aug 21 14:43:55 2015 +1000
 
-       - logan@cvs.openbsd.org 2014/05/04 10:40:59
-         [connect-privsep.sh]
-         Remove the Z flag from the list of malloc options as it
-         was removed from malloc.c 10 days ago.
-    
-         OK from miod@
+    fix URL for connect.c
 
-commit d0b69fe90466920d69c96069312e24b581771bd7
+commit d026a8d3da0f8186598442997c7d0a28e7275414
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 15:08:19 2014 +1000
+Date:   Fri Aug 21 13:47:10 2015 +1000
 
-       - dtucker@cvs.openbsd.org 2014/05/03 18:46:14
-         [proxy-connect.sh]
-         Add tests for with and without compression, with and without privsep.
+    update version numbers for 7.1
 
-commit edb1af50441d19fb2dd9ccb4d75bf14473fca584
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 15:07:53 2014 +1000
+commit 78f8f589f0ca1c9f41e5a9bae3cda5ce8a6b42ed
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Aug 21 03:45:26 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/21 22:15:37
-         [dhgex.sh integrity.sh kextype.sh rekey.sh try-ciphers.sh]
-         repair regress tests broken by server-side default cipher/kex/mac changes
-         by ensuring that the option under test is included in the server's
-         algorithm list
+    upstream commit
+    
+    openssh-7.1
+    
+    Upstream-ID: ff7b1ef4b06caddfb45e08ba998128c88be3d73f
 
-commit 54343e95c70994695f8842fb22836321350198d3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 15:07:33 2014 +1000
+commit 32a181980c62fce94f7f9ffaf6a79d90f0c309cf
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Aug 21 03:42:19 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/03/13 20:44:49
-         [login-timeout.sh]
-         this test is a sorry mess of race conditions; add another sleep
-         to avoid a failure on slow machines (at least until I find a
-         better way)
+    upstream commit
+    
+    fix inverted logic that broke PermitRootLogin; reported
+     by Mantas Mikulenas; ok markus@
+    
+    Upstream-ID: 260dd6a904c1bb7e43267e394b1c9cf70bdd5ea5
 
-commit e5b9f0f2ee6e133894307e44e862b66426990733
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:58:07 2014 +1000
+commit ce445b0ed927e45bd5bdce8f836eb353998dd65c
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Thu Aug 20 22:32:42 2015 +0000
 
-     - (djm) [Makefile.in configure.ac sshbuf-getput-basic.c]
-       [sshbuf-getput-crypto.c sshbuf.c] compilation and portability fixes
+    upstream commit
+    
+    Do not cast result of malloc/calloc/realloc* if stdlib.h
+     is in scope ok krw millert
+    
+    Upstream-ID: 5e50ded78cadf3841556649a16cc4b1cb6c58667
 
-commit b9c566788a9ebd6a9d466f47a532124f111f0542
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:43:37 2014 +1000
+commit 05291e5288704d1a98bacda269eb5a0153599146
+Author: naddy@openbsd.org <naddy@openbsd.org>
+Date:   Thu Aug 20 19:20:06 2015 +0000
 
-     - (djm) [configure.ac] Unconditionally define WITH_OPENSSL until we write
-       portability glue to support building without libcrypto
+    upstream commit
+    
+    In the certificates section, be consistent about using
+     "host_key" and "user_key" for the respective key types.  ok sthen@ deraadt@
+    
+    Upstream-ID: 9e037ea3b15577b238604c5533e082a3947f13cb
 
-commit 3dc27178b42234b653a32f7a87292d7994045ee3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:37:59 2014 +1000
+commit 8543d4ef6f2e9f98c3e6b77c894ceec30c5e4ae4
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:21:42 2015 +0000
 
-       - logan@cvs.openbsd.org 2014/05/05 07:02:30
-         [sftp.c]
-         Zap extra whitespace.
+    upstream commit
+    
+    Better compat matching for WinSCP, add compat matching
+     for FuTTY (fork of PuTTY); ok markus@ deraadt@
     
-         OK from djm@ and dtucker@
+    Upstream-ID: 24001d1ac115fa3260fbdc329a4b9aeb283c5389
 
-commit c31a0cd5b31961f01c5b731f62a6cb9d4f767472
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:37:39 2014 +1000
+commit ec6eda16ebab771aa3dfc90629b41953b999cb1e
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:19:01 2015 +0000
 
-       - markus@cvs.openbsd.org 2014/05/03 17:20:34
-         [monitor.c packet.c packet.h]
-         unbreak compression, by re-init-ing the compression code in the
-         post-auth child. the new buffer code is more strict, and requires
-         buffer_init() while the old code was happy after a bzero();
-         originally from djm@
+    upstream commit
+    
+    fix double-free() in error path of DSA key generation
+     reported by Mateusz Kocielski; ok markus@
+    
+    Upstream-ID: 4735d8f888b10599a935fa1b374787089116713c
 
-commit 686c7d9ee6f44b2be4128d7860b6b37adaeba733
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:37:03 2014 +1000
+commit 45b0eb752c94954a6de046bfaaf129e518ad4b5b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:18:26 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/05/02 03:27:54
-         [chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c]
-         [misc.h poly1305.h ssh-pkcs11.c defines.h]
-         revert __bounded change; it causes way more problems for portable than
-         it solves; pointed out by dtucker@
+    upstream commit
+    
+    fix free() of uninitialised pointer reported by Mateusz
+     Kocielski; ok markus@
+    
+    Upstream-ID: 519552b050618501a06b7b023de5cb104e2c5663
 
-commit 294c58a007cfb2f3bddc4fc3217e255857ffb9bf
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:35:03 2014 +1000
+commit c837643b93509a3ef538cb6624b678c5fe32ff79
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 19 23:17:51 2015 +0000
 
-       - naddy@cvs.openbsd.org 2014/04/30 19:07:48
-         [mac.c myproposal.h umac.c]
-         UMAC can use our local fallback implementation of AES when OpenSSL isn't
-         available.  Glue code straight from Ted Krovetz's original umac.c.
-         ok markus@
+    upstream commit
+    
+    fixed unlink([uninitialised memory]) reported by Mateusz
+     Kocielski; ok markus@
+    
+    Upstream-ID: 14a0c4e7d891f5a8dabc4b89d4f6b7c0d5a20109
 
-commit 05e82c3b963c33048128baf72a6f6b3a1c10b4c1
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:33:43 2014 +1000
+commit 1f8d3d629cd553031021068eb9c646a5f1e50994
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Aug 14 15:32:41 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/30 05:29:56
-         [bufaux.c bufbn.c bufec.c buffer.c buffer.h sshbuf-getput-basic.c]
-         [sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c sshbuf.h ssherr.c]
-         [ssherr.h]
-         New buffer API; the first installment of the conversion/replacement
-         of OpenSSH's internals to make them usable as a standalone library.
+    upstream commit
     
-         This includes a set of wrappers to make it compatible with the
-         existing buffer API so replacement can occur incrementally.
+    match myproposal.h order; from brian conway (i snuck in a
+     tweak while here)
     
-         With and ok markus@
+    ok dtucker
     
-         Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew
-         Dempsky and Ron Bowes for a detailed review.
+    Upstream-ID: 35174a19b5237ea36aa3798f042bf5933b772c67
 
-commit 380948180f847a26f2d0c85b4dad3dca2ed2fd8b
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:25:18 2014 +1000
+commit 1dc8d93ce69d6565747eb44446ed117187621b26
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Thu Aug 6 14:53:21 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/04/29 20:36:51
-         [sftp.c]
-         Don't attempt to append a nul quote char to the filename.  Should prevent
-         fatal'ing with "el_insertstr failed" when there's a single quote char
-         somewhere in the string.  bz#2238, ok markus@
+    upstream commit
+    
+    add prohibit-password as a synonymn for without-password,
+     since the without-password is causing too many questions.  Harden it to ban
+     all but pubkey, hostbased, and GSSAPI auth (when the latter is enabled) from
+     djm, ok markus
+    
+    Upstream-ID: d53317d7b28942153e6236d3fd6e12ceb482db7a
 
-commit d7fd8bedd4619a2ec7fd02aae4c4e1db4431ad9f
+commit 90a95a4745a531b62b81ce3b025e892bdc434de5
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:24:59 2014 +1000
+Date:   Tue Aug 11 13:53:41 2015 +1000
 
-       - dtucker@cvs.openbsd.org 2014/04/29 19:58:50
-         [sftp.c]
-         Move nulling of variable next to where it's freed.  ok markus@
+    update version in README
 
-commit 1f0311c7c7d10c94ff7f823de9c5b2ed79368b14
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 14:24:09 2014 +1000
-
-       - markus@cvs.openbsd.org 2014/04/29 18:01:49
-         [auth.c authfd.c authfile.c bufaux.c cipher.c cipher.h hostfile.c]
-         [kex.c key.c mac.c monitor.c monitor_wrap.c myproposal.h packet.c]
-         [roaming_client.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c]
-         [ssh-pkcs11.h ssh.c sshconnect.c sshconnect2.c sshd.c]
-         make compiling against OpenSSL optional (make OPENSSL=no);
-         reduces algorithms to curve25519, aes-ctr, chacha, ed25519;
-         allows us to explore further options; with and ok djm
-
-commit c5893785564498cea73cb60d2cf199490483e080
+commit 318c37743534b58124f1bab37a8a0087a3a9bd2f
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:48:49 2014 +1000
+Date:   Tue Aug 11 13:53:09 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/04/29 13:10:30
-         [clientloop.c serverloop.c]
-         bz#1818 - don't send channel success/failre replies on channels that
-         have sent a close already; analysis and patch from Simon Tatham;
-         ok markus@
+    update versions in *.spec
 
-commit 633de33b192d808d87537834c316dc8b75fe1880
+commit 5e75f5198769056089fb06c4d738ab0e5abc66f7
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:48:26 2014 +1000
+Date:   Tue Aug 11 13:34:12 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/04/28 03:09:18
-         [authfile.c bufaux.c buffer.h channels.c krl.c mux.c packet.c packet.h]
-         [ssh-keygen.c]
-         buffer_get_string_ptr's return should be const to remind
-         callers that futzing with it will futz with the actual buffer
-         contents
+    set sshpam_ctxt to NULL after free
+    
+    Avoids use-after-free in monitor when privsep child is compromised.
+    Reported by Moritz Jodeit; ok dtucker@
 
-commit 15271907843e4ae50dcfc83b3594014cf5e9607b
+commit d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:47:56 2014 +1000
+Date:   Tue Aug 11 13:33:24 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/04/23 12:42:34
-         [readconf.c]
-         don't record duplicate IdentityFiles
+    Don't resend username to PAM; it already has it.
+    
+    Pointed out by Moritz Jodeit; ok dtucker@
 
-commit 798a02568b13a2e46efebd81f08c8f4bb33a6dc7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:47:37 2014 +1000
+commit 88763a6c893bf3dfe951ba9271bf09715e8d91ca
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Mon Jul 27 12:14:25 2015 +1000
 
-       - jmc@cvs.openbsd.org 2014/04/22 14:16:30
-         [sftp.1]
-         zap eol whitespace;
+    Import updated moduli file from OpenBSD.
 
-commit d875ff78d2b8436807381051de112f0ebf9b9ae1
+commit 55b263fb7cfeacb81aaf1c2036e0394c881637da
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:47:15 2014 +1000
+Date:   Mon Aug 10 11:13:44 2015 +1000
 
-       - logan@cvs.openbsd.org 2014/04/22 12:42:04
-         [sftp.1]
-         Document sftp upload resume.
-         OK from djm@, with feedback from okan@.
+    let principals-command.sh work for noexec /var/run
 
-commit b15cd7bb097fd80dc99520f45290ef775da1ef19
+commit 2651e34cd11b1aac3a0fe23b86d8c2ff35c07897
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:46:52 2014 +1000
-
-       - logan@cvs.openbsd.org 2014/04/22 10:07:12
-         [sftp.c]
-         Sort the sftp command list.
-         OK from djm@
+Date:   Thu Aug 6 11:43:42 2015 +1000
 
-commit d8accc0aa72656ba63d50937165c5ae49db1dcd6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:46:25 2014 +1000
+    work around echo -n / sed behaviour in tests
 
-       - logan@cvs.openbsd.org 2014/04/21 14:36:16
-         [sftp-client.c sftp-client.h sftp.c]
-         Implement sftp upload resume support.
-         OK from djm@, with input from guenther@, mlarkin@ and
-         okan@
+commit d85dad81778c1aa8106acd46930b25fdf0d15b2a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Aug 5 05:27:33 2015 +0000
 
-commit 16cd3928a87d20c77b13592a74b60b08621d3ce6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:45:58 2014 +1000
+    upstream commit
+    
+    adjust for RSA minimum modulus switch; ok deraadt@
+    
+    Upstream-Regress-ID: 5a72c83431b96224d583c573ca281cd3a3ebfdae
 
-       - logan@cvs.openbsd.org 2014/04/20 09:24:26
-         [dns.c dns.h ssh-keygen.c]
-         Add support for SSHFP DNS records for ED25519 key types.
-         OK from djm@
+commit 57e8e229bad5fe6056b5f1199665f5f7008192c6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Aug 4 05:23:06 2015 +0000
 
-commit ec0b67eb3b4e12f296ced1fafa01860c374f7eea
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu May 15 13:45:26 2014 +1000
+    upstream commit
+    
+    backout SSH_RSA_MINIMUM_MODULUS_SIZE increase for this
+     release; problems spotted by sthen@ ok deraadt@ markus@
+    
+    Upstream-ID: d0bd60dde9e8c3cd7030007680371894c1499822
 
-     - (djm) [rijndael.c rijndael.h] Sync with newly-ressurected versions ine
-       OpenBSD
+commit f097d0ea1e0889ca0fa2e53a00214e43ab7fa22a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun Aug 2 09:56:42 2015 +0000
 
-commit f028460d0b2e5a584355321015cde69bf6fd933e
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu May 1 02:24:35 2014 +1000
-
-     - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already
-       have it.  Only attempt to use __attribute__(__bounded__) for gcc.
+    upstream commit
+    
+    openssh 7.0; ok deraadt@
+    
+    Upstream-ID: c63afdef537f57f28ae84145c5a8e29e9250221f
 
-commit b628cc4c3e4a842bab5e4584d18c2bc5fa4d0edf
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:33:58 2014 +1000
+commit 3d5728a0f6874ce4efb16913a12963595070f3a9
+Author: chris@openbsd.org <chris@openbsd.org>
+Date:   Fri Jul 31 15:38:09 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/20 02:49:32
-         [compat.c]
-         add a canonical 6.6 + curve25519 bignum fix fake version that I can
-         recommend people use ahead of the openssh-6.7 release
+    upstream commit
+    
+    Allow PermitRootLogin to be overridden by config
+    
+    ok markus@ deeradt@
+    
+    Upstream-ID: 5cf3e26ed702888de84e2dc9d0054ccf4d9125b4
 
-commit 888566913933a802f3a329ace123ebcb7154cf78
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:33:19 2014 +1000
+commit 6f941396b6835ad18018845f515b0c4fe20be21a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Jul 30 23:09:15 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/20 02:30:25
-         [misc.c misc.h umac.c]
-         use get/put_u32 to load values rather than *((UINT32 *)p) that breaks on
-         strict-alignment architectures; reported by and ok stsp@
+    upstream commit
+    
+    fix pty permissions; patch from Nikolay Edigaryev; ok
+     deraadt
+    
+    Upstream-ID: 40ff076d2878b916fbfd8e4f45dbe5bec019e550
 
-commit 16f85cbc7e5139950e6a38317e7c8b368beafa5d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:29:28 2014 +1000
+commit f4373ed1e8fbc7c8ce3fc4ea97d0ba2e0c1d7ef0
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Thu Jul 30 19:23:02 2015 +0000
 
-       - tedu@cvs.openbsd.org 2014/04/19 18:42:19
-         [ssh.1]
-         delete .xr to hosts.equiv. there's still an unfortunate amount of
-         documentation referring to rhosts equivalency in here.
+    upstream commit
+    
+    change default: PermitRootLogin without-password matching
+     install script changes coming as well ok djm markus
+    
+    Upstream-ID: 0e2a6c4441daf5498b47a61767382bead5eb8ea6
 
-commit 69cb24b7356ec3f0fc5ff04a68f98f2c55c766f4
+commit 0c30ba91f87fcda7e975e6ff8a057f624e87ea1c
 Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:29:06 2014 +1000
+Date:   Thu Jul 30 12:31:39 2015 +1000
 
-       - tedu@cvs.openbsd.org 2014/04/19 18:15:16
-         [sshd.8]
-         remove some really old rsh references
+    downgrade OOM adjustment logging: verbose -> debug
 
-commit 84c1e7bca8c4ceaccf4d5557e39a833585a3c77e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:27:53 2014 +1000
+commit f9eca249d4961f28ae4b09186d7dc91de74b5895
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Jul 30 00:01:34 2015 +0000
 
-       - tedu@cvs.openbsd.org 2014/04/19 14:53:48
-         [ssh-keysign.c sshd.c]
-         Delete futile calls to RAND_seed. ok djm
-         NB. Id sync only. This only applies to OpenBSD's libcrypto slashathon
+    upstream commit
+    
+    Allow ssh_config and sshd_config kex parameters options be
+     prefixed by a '+' to indicate that the specified items be appended to the
+     default rather than replacing it.
+    
+    approach suggested by dtucker@, feedback dlg@, ok markus@
+    
+    Upstream-ID: 0f901137298fc17095d5756ff1561a7028e8882a
 
-commit 0e6b67423b8662f9ca4c92750309e144fd637ef1
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:27:01 2014 +1000
+commit 5cefe769105a2a2e3ca7479d28d9a325d5ef0163
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 29 08:34:54 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/19 05:54:59
-         [compat.c]
-         missing wildcard; pointed out by naddy@
+    upstream commit
+    
+    fix bug in previous; was printing incorrect string for
+     failed host key algorithms negotiation
+    
+    Upstream-ID: 22c0dc6bc61930513065d92e11f0753adc4c6e6e
 
-commit 9395b28223334826837c15e8c1bb4dfb3b0d2ca5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:25:30 2014 +1000
+commit f319912b0d0e1675b8bb051ed8213792c788bcb2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 29 04:43:06 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/18 23:52:25
-         [compat.c compat.h sshconnect2.c sshd.c version.h]
-         OpenSSH 6.5 and 6.6 have a bug that causes ~0.2% of connections
-         using the curve25519-sha256@libssh.org KEX exchange method to fail
-         when connecting with something that implements the spec properly.
+    upstream commit
     
-         Disable this KEX method when speaking to one of the affected
-         versions.
+    include the peer's offer when logging a failure to
+     negotiate a mutual set of algorithms (kex, pubkey, ciphers, etc.) ok markus@
     
-         reported by Aris Adamantiadis; ok markus@
+    Upstream-ID: bbb8caabf5c01790bb845f5ce135565248d7c796
 
-commit 8c492da58f8ceb85cf5f7066f23e26fb813a963d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:25:09 2014 +1000
+commit b6ea0e573042eb85d84defb19227c89eb74cf05a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jul 28 23:20:42 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/16 23:28:12
-         [ssh-agent.1]
-         remove the identity files from this manpage - ssh-agent doesn't deal
-         with them at all and the same information is duplicated in ssh-add.1
-         (which does deal with them); prodded by deraadt@
+    upstream commit
+    
+    add Cisco to the list of clients that choke on the
+     hostkeys update extension. Pointed out by Howard Kash
+    
+    Upstream-ID: c9eadde28ecec056c73d09ee10ba4570dfba7e84
 
-commit adbfdbbdccc70c9bd70d81ae096db115445c6e26
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:24:49 2014 +1000
+commit 3f628c7b537291c1019ce86af90756fb4e66d0fd
+Author: guenther@openbsd.org <guenther@openbsd.org>
+Date:   Mon Jul 27 16:29:23 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/16 23:22:45
-         [bufaux.c]
-         skip leading zero bytes in buffer_put_bignum2_from_string();
-         reported by jan AT mojzis.com; ok markus@
+    upstream commit
+    
+    Permit kbind(2) use in the sandbox now, to ease testing
+     of ld.so work using it
+    
+    reminded by miod@, ok deraadt@
+    
+    Upstream-ID: 523922e4d1ba7a091e3824e77a8a3c818ee97413
 
-commit 75c62728dc87af6805696eeb520b9748faa136c8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:24:31 2014 +1000
+commit ebe27ebe520098bbc0fe58945a87ce8490121edb
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Jul 20 18:44:12 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/12 04:55:53
-         [sshd.c]
-         avoid crash at exit: check that pmonitor!=NULL before dereferencing;
-         bz#2225, patch from kavi AT juniper.net
+    upstream commit
+    
+    Move .Pp before .Bl, not after to quiet mandoc -Tlint.
+     Noticed by jmc@
+    
+    Upstream-ID: 59fadbf8407cec4e6931e50c53cfa0214a848e23
 
-commit 2a328437fb1b0976f2f4522d8645803d5a5d0967
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:24:01 2014 +1000
+commit d5d91d0da819611167782c66ab629159169d94d4
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Jul 20 18:42:35 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/01 05:32:57
-         [packet.c]
-         demote a debug3 to PACKET_DEBUG; ok markus@
+    upstream commit
+    
+    Sync usage with SYNOPSIS
+    
+    Upstream-ID: 7a321a170181a54f6450deabaccb6ef60cf3f0b7
 
-commit 7d6a9fb660c808882d064e152d6070ffc3844c3f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:23:43 2014 +1000
+commit 79ec2142fbc68dd2ed9688608da355fc0b1ed743
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Mon Jul 20 15:39:52 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/04/01 03:34:10
-         [sshconnect.c]
-         When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any
-         certificate keys to plain keys and attempt SSHFP resolution.
+    upstream commit
     
-         Prevents a server from skipping SSHFP lookup and forcing a new-hostkey
-         dialog by offering only certificate keys.
+    Better desciption of Unix domain socket forwarding.
+     bz#2423; ok jmc@
     
-         Reported by mcv21 AT cam.ac.uk
+    Upstream-ID: 85e28874726897e3f26ae50dfa2e8d2de683805d
 
-commit fcd62c0b66b8415405ed0af29c236329eb88cc0f
+commit d56fd1828074a4031b18b8faa0bf949669eb18a0
 Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:23:21 2014 +1000
+Date:   Mon Jul 20 11:19:51 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/04/01 02:05:27
-         [ssh-keysign.c]
-         include fingerprint of key not found
-         use arc4random_buf() instead of loop+arc4random()
+    make realpath.c compile -Wsign-compare clean
 
-commit 43b156cf72f900f88065b0a1c1ebd09ab733ca46
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:23:03 2014 +1000
+commit c63c9a691dca26bb7648827f5a13668832948929
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jul 20 00:30:01 2015 +0000
 
-       - jmc@cvs.openbsd.org 2014/03/31 13:39:34
-         [ssh-keygen.1]
-         the text for the -K option was inserted in the wrong place in -r1.108;
-         fix From: Matthew Clarke
+    upstream commit
+    
+    mention that the default of UseDNS=no implies that
+     hostnames cannot be used for host matching in sshd_config and
+     authorized_keys; bz#2045, ok dtucker@
+    
+    Upstream-ID: 0812705d5f2dfa59aab01f2764ee800b1741c4e1
 
-commit c1621c84f2dc1279065ab9fde2aa9327af418900
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:22:46 2014 +1000
+commit 63ebcd0005e9894fcd6871b7b80aeea1fec0ff76
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Jul 18 08:02:17 2015 +0000
 
-       - naddy@cvs.openbsd.org 2014/03/28 05:17:11
-         [ssh_config.5 sshd_config.5]
-         sync available and default algorithms, improve algorithm list formatting
-         help from jmc@ and schwarze@, ok deraadt@
+    upstream commit
+    
+    don't ignore PKCS#11 hosted keys that return empty
+     CKA_ID; patch by Jakub Jelen via bz#2429; ok markus
+    
+    Upstream-ID: 2f7c94744eb0342f8ee8bf97b2351d4e00116485
 
-commit f2719b7c2b8a3b14d778d8a6d8dc729b5174b054
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:22:18 2014 +1000
+commit b15fd989c8c62074397160147a8d5bc34b3f3c63
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Jul 18 08:00:21 2015 +0000
 
-       - tedu@cvs.openbsd.org 2014/03/26 19:58:37
-         [sshd.8 sshd.c]
-         remove libwrap support. ok deraadt djm mfriedl
+    upstream commit
+    
+    skip uninitialised PKCS#11 slots; patch from Jakub Jelen
+     in bz#2427 ok markus@
+    
+    Upstream-ID: 744c1e7796e237ad32992d0d02148e8a18f27d29
 
-commit 4f40209aa4060b9c066a2f0d9332ace7b8dfb391
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:21:22 2014 +1000
+commit 5b64f85bb811246c59ebab70aed331f26ba37b18
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sat Jul 18 07:57:14 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/03/26 04:55:35
-         [chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c
-         [misc.h poly1305.h ssh-pkcs11.c]
-         use __bounded(...) attribute recently added to sys/cdefs.h instead of
-         longform __attribute__(__bounded(...));
+    upstream commit
     
-         for brevity and a warning free compilation with llvm/clang
-
-commit 9235a030ad1b16903fb495d81544e0f7c7449523
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:17:20 2014 +1000
-
-    Three commits in one (since they touch the same heavily-diverged file
-    repeatedly):
-    
-       - markus@cvs.openbsd.org 2014/03/25 09:40:03
-         [myproposal.h]
-         trimm default proposals.
-    
-         This commit removes the weaker pre-SHA2 hashes, the broken ciphers
-         (arcfour), and the broken modes (CBC) from the default configuration
-         (the patch only changes the default, all the modes are still available
-         for the config files).
-    
-         ok djm@, reminded by tedu@ & naddy@ and discussed with many
-       - deraadt@cvs.openbsd.org 2014/03/26 17:16:26
-         [myproposal.h]
-         The current sharing of myproposal[] between both client and server code
-         makes the previous diff highly unpallatable.  We want to go in that
-         direction for the server, but not for the client.  Sigh.
-         Brought up by naddy.
-       - markus@cvs.openbsd.org 2014/03/27 23:01:27
-         [myproposal.h ssh-keyscan.c sshconnect2.c sshd.c]
-         disable weak proposals in sshd, but keep them in ssh; ok djm@
-
-commit 6e1777f592f15f4559728c78204617537b1ac076
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:02:58 2014 +1000
+    only query each keyboard-interactive device once per
+     authentication request regardless of how many times it is listed; ok markus@
+    
+    Upstream-ID: d73fafba6e86030436ff673656ec1f33d9ffeda1
 
-       - tedu@cvs.openbsd.org 2014/03/19 14:42:44
-         [scp.1]
-         there is no need for rcp anymore
-         ok deraadt millert
+commit cd7324d0667794eb5c236d8a4e0f236251babc2d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 03:34:27 2015 +0000
 
-commit eb1b7c514d2a7b1802ccee8cd50e565a4d419887
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:02:26 2014 +1000
+    upstream commit
+    
+    remove -u flag to diff (only used for error output) to make
+     things easier for -portable
+    
+    Upstream-Regress-ID: a5d6777d2909540d87afec3039d9bb2414ade548
 
-       - tedu@cvs.openbsd.org 2014/03/17 19:44:10
-         [ssh.1]
-         old descriptions of des and blowfish are old. maybe ok deraadt
+commit deb8d99ecba70b67f4af7880b11ca8768df9ec3a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 03:09:19 2015 +0000
 
-commit f0858de6e1324ec730752387074b111b8551081e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:01:30 2014 +1000
+    upstream commit
+    
+    direct-streamlocal@openssh.com Unix domain foward
+     messages do not contain a "reserved for future use" field and in fact,
+     serverloop.c checks that there isn't one. Remove erroneous mention from
+     PROTOCOL description. bz#2421 from Daniel Black
+    
+    Upstream-ID: 3d51a19e64f72f764682f1b08f35a8aa810a43ac
 
-       - deraadt@cvs.openbsd.org 2014/03/15 17:28:26
-         [ssh-agent.c ssh-keygen.1 ssh-keygen.c]
-         Improve usage() and documentation towards the standard form.
-         In particular, this line saves a lot of man page reading time.
-           usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]
-                             [-N new_passphrase] [-C comment] [-f output_keyfile]
-         ok schwarze jmc
+commit 356b61f365405b5257f5b2ab446e5d7bd33a7b52
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 03:04:27 2015 +0000
 
-commit 94bfe0fbd6e91a56b5b0ab94ac955d2a67d101aa
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:00:51 2014 +1000
+    upstream commit
+    
+    describe magic for setting up Unix domain socket fowards
+     via the mux channel; bz#2422 patch from Daniel Black
+    
+    Upstream-ID: 943080fe3864715c423bdeb7c920bb30c4eee861
 
-       - naddy@cvs.openbsd.org 2014/03/12 13:06:59
-         [ssh-keyscan.1]
-         scan for Ed25519 keys by default too
+commit d3e2aee41487d55b8d7d40f538b84ff1db7989bc
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jul 17 12:52:34 2015 +1000
 
-commit 3819519288b2b3928c6882f5883b0f55148f4fc0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:00:28 2014 +1000
+    Check if realpath works on nonexistent files.
+    
+    On some platforms the native realpath doesn't work with non-existent
+    files (this is actually specified in some versions of POSIX), however
+    the sftp spec says its realpath with "canonicalize any given path name".
+    On those platforms, use realpath from the compat library.
+    
+    In addition, when compiling with -DFORTIFY_SOURCE, glibc redefines
+    the realpath symbol to the checked version, so redefine ours to
+    something else so we pick up the compat version we want.
+    
+    bz#2428, ok djm@
 
-       - djm@cvs.openbsd.org 2014/03/12 04:51:12
-         [authfile.c]
-         correct test that kdf name is not "none" or "bcrypt"
+commit 25b14610dab655646a109db5ef8cb4c4bf2a48a0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 17 02:47:45 2015 +0000
 
-commit 8f9cd709c7cf0655d414306a0ed28306b33802be
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 13:00:11 2014 +1000
+    upstream commit
+    
+    fix incorrect test for SSH1 keys when compiled without SSH1
+     support
+    
+    Upstream-ID: 6004d720345b8e481c405e8ad05ce2271726e451
 
-       - djm@cvs.openbsd.org 2014/03/12 04:50:32
-         [auth-bsdauth.c ssh-keygen.c]
-         don't count on things that accept arguments by reference to clear
-         things for us on error; most things do, but it's unsafe form.
+commit df56a8035d429b2184ee94aaa7e580c1ff67f73a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 15 08:00:11 2015 +0000
 
-commit 1c7ef4be83f6dec84509a312518b9df00ab491d9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 12:59:46 2014 +1000
+    upstream commit
+    
+    fix NULL-deref when SSH1 reenabled
+    
+    Upstream-ID: f22fd805288c92b3e9646782d15b48894b2d5295
 
-       - djm@cvs.openbsd.org 2014/03/12 04:44:58
-         [ssh-keyscan.c]
-         scan for Ed25519 keys by default too
+commit 41e38c4d49dd60908484e6703316651333f16b93
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 15 07:19:50 2015 +0000
 
-commit c10bf4d051c97939b30a1616c0499310057d07da
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Apr 20 12:58:04 2014 +1000
+    upstream commit
+    
+    regen RSA1 test keys; the last batch was missing their
+     private parts
+    
+    Upstream-Regress-ID: 7ccf437305dd63ff0b48dd50c5fd0f4d4230c10a
 
-       - djm@cvs.openbsd.org 2014/03/03 22:22:30
-         [session.c]
-         ignore enviornment variables with embedded '=' or '\0' characters;
-         spotted by Jann Horn; ok deraadt@
-         Id sync only - portable already has this.
+commit 5bf0933184cb622ca3f96d224bf3299fd2285acc
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Fri Jul 10 06:23:25 2015 +0000
 
-commit c2e49062faccbcd7135c40d1c78c5c329c58fc2e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Apr 1 14:42:46 2014 +1100
+    upstream commit
+    
+    Adapt tests, now that DSA if off by default; use
+     PubkeyAcceptedKeyTypes and PubkeyAcceptedKeyTypes to test DSA.
+    
+    Upstream-Regress-ID: 0ff2a3ff5ac1ce5f92321d27aa07b98656efcc5c
 
-     - (djm) Use full release (e.g. 6.5p1) in debug output rather than just
-        version. From des@des.no
+commit 7a6e3fd7b41dbd3756b6bf9acd67954c0b1564cc
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Jul 7 14:54:16 2015 +0000
 
-commit 14928b7492abec82afa4c2b778fc03f78cd419b6
+    upstream commit
+    
+    regen test data after mktestdata.sh changes
+    
+    Upstream-Regress-ID: 3495ecb082b9a7c048a2d7c5c845d3bf181d25a4
+
+commit 7c8c174c69f681d4910fa41c37646763692b28e2
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Jul 7 14:53:30 2015 +0000
+
+    upstream commit
+    
+    adapt tests to new minimum RSA size and default FP format
+    
+    Upstream-Regress-ID: a4b30afd174ce82b96df14eb49fb0b81398ffd0e
+
+commit 6a977a4b68747ade189e43d302f33403fd4a47ac
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 04:39:23 2015 +0000
+
+    upstream commit
+    
+    legacy v00 certificates are gone; adapt and don't try to
+     test them; "sure" markus@ dtucker@
+    
+    Upstream-Regress-ID: c57321e69b3cd4a3b3396dfcc43f0803d047da12
+
+commit 0c4123ad5e93fb90fee9c6635b13a6cdabaac385
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 23:11:18 2015 +0000
+
+    upstream commit
+    
+    don't expect SSH v.1 in unittests
+    
+    Upstream-Regress-ID: f8812b16668ba78e6a698646b2a652b90b653397
+
+commit 3c099845798a817cdde513c39074ec2063781f18
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jun 15 06:38:50 2015 +0000
+
+    upstream commit
+    
+    turn SSH1 back on to match src/usr.bin/ssh being tested
+    
+    Upstream-Regress-ID: 6c4f763a2f0cc6893bf33983919e9030ae638333
+
+commit b1dc2b33689668c75e95f873a42d5aea1f4af1db
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Jul 13 04:57:14 2015 +0000
+
+    upstream commit
+    
+    Add "PuTTY_Local:" to the clients to which we do not
+     offer DH-GEX. This was the string that was used for development versions
+     prior to September 2014 and they don't do RFC4419 DH-GEX, but unfortunately
+     there are some extant products based on those versions.  bx2424 from Jay
+     Rouman, ok markus@ djm@
+    
+    Upstream-ID: be34d41e18b966832fe09ca243d275b81882e1d5
+
+commit 3a1638dda19bbc73d0ae02b4c251ce08e564b4b9
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Fri Jul 10 06:21:53 2015 +0000
+
+    upstream commit
+    
+    Turn off DSA by default; add HostKeyAlgorithms to the
+     server and PubkeyAcceptedKeyTypes to the client side, so it still can be
+     tested or turned back on; feedback and ok djm@
+    
+    Upstream-ID: 8450a9e6d83f80c9bfed864ff061dfc9323cec21
+
+commit 16db0a7ee9a87945cc594d13863cfcb86038db59
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Thu Jul 9 09:49:46 2015 +0000
+
+    upstream commit
+    
+    re-enable ed25519-certs if compiled w/o openssl; ok djm
+    
+    Upstream-ID: e10c90808b001fd2c7a93778418e9b318f5c4c49
+
+commit c355bf306ac33de6545ce9dac22b84a194601e2f
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 20:24:02 2015 +0000
+
+    upstream commit
+    
+    no need to include the old buffer/key API
+    
+    Upstream-ID: fb13c9f7c0bba2545f3eb0a0e69cb0030819f52b
+
+commit a3cc48cdf9853f1e832d78cb29bedfab7adce1ee
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 19:09:25 2015 +0000
+
+    upstream commit
+    
+    typedefs for Cipher&CipherContext are unused
+    
+    Upstream-ID: 50e6a18ee92221d23ad173a96d5b6c42207cf9a7
+
+commit a635bd06b5c427a57c3ae760d3a2730bb2c863c0
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 19:04:21 2015 +0000
+
+    upstream commit
+    
+    xmalloc.h is unused
+    
+    Upstream-ID: afb532355b7fa7135a60d944ca1e644d1d63cb58
+
+commit 2521cf0e36c7f3f6b19f206da0af134f535e4a31
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Jul 8 19:01:15 2015 +0000
+
+    upstream commit
+    
+    compress.c is gone
+    
+    Upstream-ID: 174fa7faa9b9643cba06164b5e498591356fbced
+
+commit c65a7aa6c43aa7a308ee1ab8a96f216169ae9615
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 04:05:54 2015 +0000
+
+    upstream commit
+    
+    another SSH_RSA_MINIMUM_MODULUS_SIZE that needed
+     cranking
+    
+    Upstream-ID: 9d8826cafe96aab4ae8e2f6fd22800874b7ffef1
+
+commit b1f383da5cd3cb921fc7776f17a14f44b8a31757
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:56:25 2015 +0000
+
+    upstream commit
+    
+    add an XXX reminder for getting correct key paths from
+     sshd_config
+    
+    Upstream-ID: feae52b209d7782ad742df04a4260e9fe41741db
+
+commit 933935ce8d093996c34d7efa4d59113163080680
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:49:45 2015 +0000
+
+    upstream commit
+    
+    refuse to generate or accept RSA keys smaller than 1024
+     bits; feedback and ok dtucker@
+    
+    Upstream-ID: 7ea3d31271366ba264f06e34a3539bf1ac30f0ba
+
+commit bdfd29f60b74f3e678297269dc6247a5699583c1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:47:00 2015 +0000
+
+    upstream commit
+    
+    turn off 1024 bit diffie-hellman-group1-sha1 key
+     exchange method (already off in server, this turns it off in the client by
+     default too) ok dtucker@
+    
+    Upstream-ID: f59b88f449210ab7acf7d9d88f20f1daee97a4fa
+
+commit c28fc62d789d860c75e23a9fa9fb250eb2beca57
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jul 3 03:43:18 2015 +0000
+
+    upstream commit
+    
+    delete support for legacy v00 certificates; "sure"
+     markus@ dtucker@
+    
+    Upstream-ID: b5b9bb5f9202d09e88f912989d74928601b6636f
+
+commit 564d63e1b4a9637a209d42a9d49646781fc9caef
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 23:10:47 2015 +0000
+
+    upstream commit
+    
+    Compile-time disable SSH v.1 again
+    
+    Upstream-ID: 1d4b513a3a06232f02650b73bad25100d1b800af
+
+commit 868109b650504dd9bcccdb1f51d0906f967c20ff
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 02:39:06 2015 +0000
+
+    upstream commit
+    
+    twiddle PermitRootLogin back
+    
+    Upstream-ID: 2bd23976305d0512e9f84d054e1fc23cd70b89f2
+
+commit 7de4b03a6e4071d454b72927ffaf52949fa34545
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 02:32:17 2015 +0000
+
+    upstream commit
+    
+    twiddle; (this commit marks the openssh-6.9 release)
+    
+    Upstream-ID: 78500582819f61dd8adee36ec5cc9b9ac9351234
+
+commit 1bf477d3cdf1a864646d59820878783d42357a1d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 02:26:31 2015 +0000
+
+    upstream commit
+    
+    better refuse ForwardX11Trusted=no connections attempted
+     after ForwardX11Timeout expires; reported by Jann Horn
+    
+    Upstream-ID: bf0fddadc1b46a0334e26c080038313b4b6dea21
+
+commit 47aa7a0f8551b471fcae0447c1d78464f6dba869
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 01:56:13 2015 +0000
+
+    upstream commit
+    
+    put back default PermitRootLogin=no
+    
+    Upstream-ID: 7bdedd5cead99c57ed5571f3b6b7840922d5f728
+
+commit 984b064fe2a23733733262f88d2e1b2a1a501662
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 01:55:13 2015 +0000
+
+    upstream commit
+    
+    openssh-6.9
+    
+    Upstream-ID: 6cfe8e1904812531080e6ab6e752d7001b5b2d45
+
+commit d921082ed670f516652eeba50705e1e9f6325346
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jul 1 01:55:00 2015 +0000
+
+    upstream commit
+    
+    reset default PermitRootLogin to 'yes' (momentarily, for
+     release)
+    
+    Upstream-ID: cad8513527066e65dd7a1c16363d6903e8cefa24
+
+commit 66295e0e1ba860e527f191b6325d2d77dec4dbce
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Jul 1 11:49:12 2015 +1000
+
+    crank version numbers for release
+
+commit 37035c07d4f26bb1fbe000d2acf78efdb008681d
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Jul 1 10:49:37 2015 +1000
+
+    s/--with-ssh1/--without-ssh1/
+
+commit 629df770dbadc2accfbe1c81b3f31f876d0acd84
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jun 30 05:25:07 2015 +0000
+
+    upstream commit
+    
+    fatal() when a remote window update causes the window
+     value to overflow. Reported by Georg Wicherski, ok markus@
+    
+    Upstream-ID: ead397a9aceb3bf74ebfa5fcaf259d72e569f351
+
+commit f715afebe735d61df3fd30ad72d9ac1c8bd3b5f2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jun 30 05:23:25 2015 +0000
+
+    upstream commit
+    
+    Fix math error in remote window calculations that causes
+     eventual stalls for datagram channels. Reported by Georg Wicherski, ok
+     markus@
+    
+    Upstream-ID: be54059d11bf64e0d85061f7257f53067842e2ab
+
+commit 52fb6b9b034fcfd24bf88cc7be313e9c31de9889
+Author: Damien Miller <djm@mindrot.org>
+Date:   Tue Jun 30 16:05:40 2015 +1000
+
+    skip IPv6-related portions on hosts without IPv6
+    
+    with Tim Rice
+
+commit 512caddf590857af6aa12218461b5c0441028cf5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jun 29 22:35:12 2015 +0000
+
+    upstream commit
+    
+    add getpid to sandbox, reachable by grace_alarm_handler
+    
+    reported by Jakub Jelen; bz#2419
+    
+    Upstream-ID: d0da1117c16d4c223954995d35b0f47c8f684cd8
+
+commit 78c2a4f883ea9aba866358e2acd9793a7f42ca93
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jun 26 05:13:20 2015 +0000
+
+    upstream commit
+    
+    Fix \-escaping bug that caused forward path parsing to skip
+     two characters and skip past the end of the string.
+    
+    Based on patch by Salvador Fandino; ok dtucker@
+    
+    Upstream-ID: 7b879dc446335677cbe4cb549495636a0535f3bd
+
+commit bc20205c91c9920361d12b15d253d4997dba494a
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jun 25 09:51:39 2015 +1000
+
+    add missing pselect6
+    
+    patch from Jakub Jelen
+
+commit 9d27fb73b4a4e5e99cb880af790d5b1ce44f720a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Jun 24 23:47:23 2015 +0000
+
+    upstream commit
+    
+    correct test to sshkey_sign(); spotted by Albert S.
+    
+    Upstream-ID: 5f7347f40f0ca6abdaca2edb3bd62f4776518933
+
+commit 7ed01a96a1911d8b4a9ef4f3d064e1923bfad7e3
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jun 24 01:49:19 2015 +0000
+
+    upstream commit
+    
+    Revert previous commit.  We still want to call setgroups
+     in the case where there are zero groups to remove any that we might otherwise
+     inherit (as pointed out by grawity at gmail.com) and since the 2nd argument
+     to setgroups is always a static global it's always valid to dereference in
+     this case.  ok deraadt@ djm@
+    
+    Upstream-ID: 895b5ac560a10befc6b82afa778641315725fd01
+
+commit 882f8bf94f79528caa65b0ba71c185d705bb7195
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Jun 24 01:49:19 2015 +0000
+
+    upstream commit
+    
+    Revert previous commit.  We still want to call setgroups in
+     the case where there are zero groups to remove any that we might otherwise
+     inherit (as pointed out by grawity at gmail.com) and since the 2nd argument
+     to setgroups is always a static global it's always valid to dereference in
+     this case.  ok deraadt@ djm@
+    
+    Upstream-ID: 895b5ac560a10befc6b82afa778641315725fd01
+
+commit 9488538a726951e82b3a4374f3c558d72c80a89b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jun 22 23:42:16 2015 +0000
+
+    upstream commit
+    
+    Don't count successful partial authentication as failures
+     in monitor; this may have caused the monitor to refuse multiple
+     authentications that would otherwise have successfully completed; ok markus@
+    
+    Upstream-ID: eb74b8e506714d0f649bd5c300f762a527af04a3
+
+commit 63b78d003bd8ca111a736e6cea6333da50f5f09b
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Jun 22 12:29:57 2015 +0000
+
+    upstream commit
+    
+    Don't call setgroups if we have zero groups; there's no
+     guarantee that it won't try to deref the pointer.  Based on a patch from mail
+     at quitesimple.org, ok djm deraadt
+    
+    Upstream-ID: 2fff85e11d7a9a387ef7fddf41fbfaf566708ab1
+
+commit 5c15e22c691c79a47747bcf5490126656f97cecd
+Author: Damien Miller <djm@mindrot.org>
+Date:   Thu Jun 18 15:07:56 2015 +1000
+
+    fix syntax error
+
+commit 596dbca82f3f567fb3d2d69af4b4e1d3ba1e6403
+Author: jsing@openbsd.org <jsing@openbsd.org>
+Date:   Mon Jun 15 18:44:22 2015 +0000
+
+    upstream commit
+    
+    If AuthorizedPrincipalsCommand is specified, however
+     AuthorizedPrincipalsFile is not (or is set to "none"), authentication will
+     potentially fail due to key_cert_check_authority() failing to locate a
+     principal that matches the username, even though an authorized principal has
+     already been matched in the output of the subprocess. Fix this by using the
+     same logic to determine if pw->pw_name should be passed, as is used to
+     determine if a authorized principal must be matched earlier on.
+    
+    ok djm@
+    
+    Upstream-ID: 43b42302ec846b0ea68aceb40677245391b9409d
+
+commit aff3e94c0d75d0d0fa84ea392b50ab04f8c57905
+Author: jsing@openbsd.org <jsing@openbsd.org>
+Date:   Mon Jun 15 18:42:19 2015 +0000
+
+    upstream commit
+    
+    Make the arguments to match_principals_command() similar
+     to match_principals_file(), by changing the last argument a struct
+     sshkey_cert * and dereferencing key->cert in the caller.
+    
+    No functional change.
+    
+    ok djm@
+    
+    Upstream-ID: 533f99b844b21b47342b32b62e198dfffcf8651c
+
+commit 97e2e1596c202a4693468378b16b2353fd2d6c5e
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Jun 17 14:36:54 2015 +1000
+
+    trivial optimisation for seccomp-bpf
+    
+    When doing arg inspection and the syscall doesn't match, skip
+    past the instruction that reloads the syscall into the accumulator,
+    since the accumulator hasn't been modified at this point.
+
+commit 99f33d7304893bd9fa04d227cb6e870171cded19
+Author: Damien Miller <djm@mindrot.org>
+Date:   Wed Jun 17 10:50:51 2015 +1000
+
+    aarch64 support for seccomp-bpf sandbox
+    
+    Also resort and tidy syscall list. Based on patches by Jakub Jelen
+    bz#2361; ok dtucker@
+
+commit 4ef702e1244633c1025ec7cfe044b9ab267097bf
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Jun 15 01:32:50 2015 +0000
+
+    upstream commit
+    
+    return failure on RSA signature error; reported by Albert S
+    
+    Upstream-ID: e61bb93dbe0349625807b0810bc213a6822121fa
+
+commit a170f22baf18af0b1acf2788b8b715605f41a1f9
+Author: Tim Rice <tim@multitalents.net>
+Date:   Tue Jun 9 22:41:13 2015 -0700
+
+    Fix t12 rules for out of tree builds.
+
+commit ec04dc4a5515c913121bc04ed261857e68fa5c18
+Author: millert@openbsd.org <millert@openbsd.org>
+Date:   Fri Jun 5 15:13:13 2015 +0000
+
+    upstream commit
+    
+    For "ssh -L 12345:/tmp/sock" don't fail with "No forward host
+     name." (we have a path, not a host name).  Based on a diff from Jared
+     Yanovich. OK djm@
+    
+    Upstream-ID: 2846b0a8c7de037e33657f95afbd282837fc213f
+
+commit 732d61f417a6aea0aa5308b59cb0f563bcd6edd6
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Jun 5 03:44:14 2015 +0000
+
+    upstream commit
+    
+    typo: accidental repetition; bz#2386
+    
+    Upstream-ID: 45e620d99f6bc301e5949d34a54027374991c88b
+
+commit adfb24c69d1b6f5e758db200866c711e25a2ba73
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Jun 5 14:51:40 2015 +1000
+
+    Add Linux powerpc64le and powerpcle entries.
+    
+    Stopgap to resolve bz#2409 because we are so close to release and will
+    update config.guess and friends shortly after the release.  ok djm@
+
+commit a1195a0fdc9eddddb04d3e9e44c4775431cb77da
+Merge: 6397eed d2480bc
+Author: Tim Rice <tim@multitalents.net>
+Date:   Wed Jun 3 21:43:13 2015 -0700
+
+    Merge branch 'master' of git.mindrot.org:/var/git/openssh
+
+commit 6397eedf953b2b973d2d7cbb504ab501a07f8ddc
+Author: Tim Rice <tim@multitalents.net>
+Date:   Wed Jun 3 21:41:11 2015 -0700
+
+    Remove unneeded backslashes. Patch from Ángel González
+
+commit d2480bcac1caf31b03068de877a47d6e1027bf6d
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Jun 4 14:10:55 2015 +1000
+
+    Remove redundant include of stdarg.h.  bz#2410
+
+commit 5e67859a623826ccdf2df284cbb37e2d8e2787eb
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Jun 2 09:10:40 2015 +0000
+
+    upstream commit
+    
+    mention CheckHostIP adding addresses to known_hosts;
+     bz#1993; ok dtucker@
+    
+    Upstream-ID: fd44b68440fd0dc29abf9f2d3f703d74a2396cb7
+
+commit d7a58bbac6583e33fd5eca8e2c2cc70c57617818
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Tue Jun 2 20:15:26 2015 +1000
+
+    Replace strcpy with strlcpy.
+    
+    ok djm, sanity check by Corinna Vinschen.
+
+commit 51a1c2115265c6e80ede8a5c9dccada9aeed7143
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri May 29 18:27:21 2015 +1000
+
+    skip, rather than fatal when run without SUDO set
+
+commit 599f01142a376645b15cbc9349d7e8975e1cf245
+Author: Damien Miller <djm@mindrot.org>
+Date:   Fri May 29 18:03:15 2015 +1000
+
+    fix merge botch that left ",," in KEX algs
+
+commit 0c2a81dfc21822f2423edd30751e5ec53467b347
 Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Apr 1 14:38:07 2014 +1100
+Date:   Fri May 29 17:08:28 2015 +1000
+
+    re-enable SSH protocol 1 at compile time
+
+commit db438f9285d64282d3ac9e8c0944f59f037c0151
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 29 03:05:13 2015 +0000
+
+    upstream commit
+    
+    make this work without SUDO set; ok dtucker@
+    
+    Upstream-Regress-ID: bca88217b70bce2fe52b23b8e06bdeb82d98c715
+
+commit 1d9a2e2849c9864fe75daabf433436341c968e14
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 28 07:37:31 2015 +0000
+
+    upstream commit
+    
+    wrap all moduli-related code in #ifdef WITH_OPENSSL.
+     based on patch from Reuben Hawkins; bz#2388 feedback and ok dtucker@
+    
+    Upstream-ID: d80cfc8be3e6ec65b3fac9e87c4466533b31b7cf
 
-     - (djm) On platforms that support it, use prctl() to prevent sftp-server
-        from accessing /proc/self/{mem,maps}; patch from jann AT thejh.net
+commit 496aeb25bc2d6c434171292e4714771b594bd00e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu May 28 05:41:29 2015 +0000
 
-commit 48abc47e60048461fe9117e108a7e99ea1ac2bb8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Mar 17 14:45:56 2014 +1100
+    upstream commit
+    
+    Increase the allowed length of the known host file name
+     in the log message to be consistent with other cases.  Part of bz#1993, ok
+     deraadt.
+    
+    Upstream-ID: a9e97567be49f25daf286721450968251ff78397
 
-     - (djm) [sandbox-seccomp-filter.c] Soft-fail stat() syscalls. Add XXX to
-       remind myself to add sandbox violation logging via the log socket.
+commit dd2cfeb586c646ff8d70eb93567b2e559ace5b14
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu May 28 05:09:45 2015 +0000
 
-commit 9c36698ca2f554ec221dc7ef29c7a89e97c88705
-Author: Tim Rice <tim@multitalents.net>
-Date:   Fri Mar 14 12:45:01 2014 -0700
+    upstream commit
+    
+    Fix typo (keywork->keyword)
+    
+    Upstream-ID: 8aacd0f4089c0a244cf43417f4f9045dfaeab534
 
-    20140314
-     - (tim) [opensshd.init.in] Add support for ed25519
+commit 9cc6842493fbf23025ccc1edab064869640d3bec
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 28 04:50:53 2015 +0000
 
-commit 19158b2447e35838d69b2b735fb640d1e86061ea
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Mar 13 13:14:21 2014 +1100
+    upstream commit
+    
+    add error message on ftruncate failure; bz#2176
+    
+    Upstream-ID: cbcc606e0b748520c74a210d8f3cc9718d3148cf
 
-     - (djm) Release OpenSSH 6.6
+commit d1958793a0072c22be26d136dbda5ae263e717a0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 28 04:40:13 2015 +0000
 
-commit 8569eba5d7f7348ce3955eeeb399f66f25c52ece
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Mar 4 09:35:17 2014 +1100
+    upstream commit
+    
+    make ssh-keygen default to ed25519 keys when compiled
+     without OpenSSL; bz#2388, ok dtucker@
+    
+    Upstream-ID: 85a471fa6d3fa57a7b8e882d22cfbfc1d84cdc71
 
-       - djm@cvs.openbsd.org 2014/03/03 22:22:30
-         [session.c]
-         ignore enviornment variables with embedded '=' or '\0' characters;
-         spotted by Jann Horn; ok deraadt@
+commit 3ecde664c9fc5fb3667aedf9e6671462600f6496
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed May 27 23:51:10 2015 +0000
 
-commit 2476c31b96e89aec7d4e73cb6fbfb9a4290de3a7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Mar 2 04:01:00 2014 +1100
+    upstream commit
+    
+    Reorder client proposal to prefer
+     diffie-hellman-group-exchange-sha1 over diffie-hellman-group14-sha1.  ok djm@
+    
+    Upstream-ID: 552c08d47347c3ee1a9a57d88441ab50abe17058
 
-     - (djm) [regress/Makefile] Disable dhgex regress test; it breaks when
-       no moduli file exists at the expected location.
+commit 40f64292b907afd0a674fdbf3e4c2356d17a7d68
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed May 27 23:39:18 2015 +0000
 
-commit c83fdf30e9db865575b2521b1fe46315cf4c70ae
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:34:03 2014 +1100
+    upstream commit
+    
+    Add a stronger (4k bit) fallback group that sshd can use
+     when the moduli file is missing or broken, sourced from RFC3526.  bz#2302, ok
+     markus@ (earlier version), djm@
+    
+    Upstream-ID: b635215746a25a829d117673d5e5a76d4baee7f4
 
-     - (djm) [regress/host-expand.sh] Add RCS Id
+commit 5ab7d5fa03ad55bc438fab45dfb3aeb30a3c237a
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu May 28 10:03:40 2015 +1000
 
-commit 834aeac3555e53f7d29a6fcf3db010dfb99681c7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:25:16 2014 +1100
+    New moduli file from OpenBSD, removing 1k groups.
+    
+    Remove 1k bit groups.  ok deraadt@, markus@
 
-       - djm@cvs.openbsd.org 2014/02/27 21:21:25
-         [agent-ptrace.sh agent.sh]
-         keep return values that are printed in error messages;
-         from portable
-         (Id sync only)
+commit a71ba58adf34e599f30cdda6e9b93ae6e3937eea
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed May 27 05:15:02 2015 +0000
 
-commit 4f7f1a9a0de24410c30952c7e16d433240422182
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:24:11 2014 +1100
+    upstream commit
+    
+    support PKCS#11 devices with external PIN entry devices
+     bz#2240, based on patch from Dirk-Willem van Gulik; feedback and ok dtucker@
+    
+    Upstream-ID: 504568992b55a8fc984375242b1bd505ced61b0d
 
-       - djm@cvs.openbsd.org 2014/02/27 20:04:16
-         [login-timeout.sh]
-         remove any existing LoginGraceTime from sshd_config before adding
-         a specific one for the test back in
+commit b282fec1aa05246ed3482270eb70fc3ec5f39a00
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 26 23:23:40 2015 +0000
 
-commit d705d987c27f68080c8798eeb5262adbdd6b4ffd
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:23:26 2014 +1100
+    upstream commit
+    
+    Cap DH-GEX group size at 4kbits for Cisco implementations.
+     Some of them will choke when asked for preferred sizes >4k instead of
+     returning the 4k group that they do have.  bz#2209, ok djm@
+    
+    Upstream-ID: 54b863a19713446b7431f9d06ad0532b4fcfef8d
 
-       - djm@cvs.openbsd.org 2014/01/26 10:49:17
-         [scp-ssh-wrapper.sh scp.sh]
-         make sure $SCP is tested on the remote end rather than whichever one
-         happens to be in $PATH; from portable
-         (Id sync only)
+commit 3e91b4e8b0dc2b4b7e7d42cf6e8994a32e4cb55e
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Sun May 24 23:39:16 2015 +0000
 
-commit 624a3ca376e3955a4b9d936c9e899e241b65d357
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:22:37 2014 +1100
+    upstream commit
+    
+    add missing 'c' option to getopt(), case statement was
+     already there; from Felix Bolte
+    
+    Upstream-ID: 9b19b4e2e0b54d6fefa0dfac707c51cf4bae3081
 
-       - djm@cvs.openbsd.org 2014/01/26 10:22:10
-         [regress/cert-hostkey.sh]
-         automatically generate revoked keys from listed keys rather than
-         manually specifying each type; from portable
-         (Id sync only)
+commit 64a89ec07660abba4d0da7c0095b7371c98bab62
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Sat May 23 14:28:37 2015 +0000
 
-commit b84392328425e4b9a71f8bde5fe6a4a4c48d3ec4
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:21:26 2014 +1100
+    upstream commit
+    
+    fix a memory leak in an error path ok markus@ dtucker@
+    
+    Upstream-ID: bc1da0f205494944918533d8780fde65dff6c598
 
-       - dtucker@cvs.openbsd.org 2014/01/25 04:35:32
-         [regress/Makefile regress/dhgex.sh]
-         Add a test for DH GEX sizes
+commit f948737449257d2cb83ffcfe7275eb79b677fd4a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 22 05:28:45 2015 +0000
 
-commit 1e2aa3d90472293ea19008f02336d6d68aa05793
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:19:51 2014 +1100
+    upstream commit
+    
+    mention ssh-keygen -E for comparing legacy MD5
+     fingerprints; bz#2332
+    
+    Upstream-ID: 079a3669549041dbf10dbc072d9563f0dc3b2859
 
-       - dtucker@cvs.openbsd.org 2014/01/20 00:00:30
-         [sftp-chroot.sh]
-         append to rather than truncating the log file
+commit 0882332616e4f0272c31cc47bf2018f9cb258a4e
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 22 04:45:52 2015 +0000
 
-commit f483cc16fe7314e24a37aa3a4422b03c013c3213
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:19:11 2014 +1100
+    upstream commit
+    
+    Reorder EscapeChar option parsing to avoid a single-byte
+     out- of-bounds read. bz#2396 from Jaak Ristioja; ok dtucker@
+    
+    Upstream-ID: 1dc6b5b63d1c8d9a88619da0b27ade461d79b060
 
-       - dtucker@cvs.openbsd.org 2014/01/19 23:43:02
-         [regress/sftp-chroot.sh]
-         Don't use -q on sftp as it suppresses logging, instead redirect the
-         output to the regress logfile.
+commit d7c31da4d42c115843edee2074d7d501f8804420
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 22 03:50:02 2015 +0000
 
-commit 6486f16f1c0ebd6f39286f6ab5e08286d90a994a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:03:52 2014 +1100
+    upstream commit
+    
+    add knob to relax GSSAPI host credential check for
+     multihomed hosts bz#928, patch by Simon Wilkinson; ok dtucker
+     (kerberos/GSSAPI is not compiled by default on OpenBSD)
+    
+    Upstream-ID: 15ddf1c6f7fd9d98eea9962f480079ae3637285d
 
-     - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
-       [contrib/suse/openssh.spec] Crank version numbers
+commit aa72196a00be6e0b666215edcffbc10af234cb0e
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri May 22 17:49:46 2015 +1000
 
-commit 92cf5adea194140380e6af6ec32751f9ad540794
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:01:53 2014 +1100
+    Include signal.h for sig_atomic_t, used by kex.h.
+    
+    bz#2402, from tomas.kuthan at oracle com.
+
+commit 8b02481143d75e91c49d1bfae0876ac1fbf9511a
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri May 22 12:47:24 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/02/27 22:57:40
-         [version.h]
-         openssh-6.6
+    Import updated moduli file from OpenBSD.
 
-commit fc5d6759aba71eb205b296b5f148010ffc828583
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:01:28 2014 +1100
+commit 4739e8d5e1c0be49624082bd9f6b077e9e758db9
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 12:01:19 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/27 22:47:07
-         [sshd_config.5]
-         bz#2184 clarify behaviour of a keyword that appears in multiple
-         matching Match blocks; ok dtucker@
+    upstream commit
+    
+    Support "ssh-keygen -lF hostname" to find search known_hosts
+     and print key hashes. Already advertised by ssh-keygen(1), but not delivered
+     by code; ok dtucker@
+    
+    Upstream-ID: 459e0e2bf39825e41b0811c336db2d56a1c23387
 
-commit 172ec7e0af1a5f1d682f6a2dca335c6c186153d5
+commit e97201feca10b5196da35819ae516d0b87cf3a50
 Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:00:57 2014 +1100
+Date:   Thu May 21 17:55:15 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/02/27 08:25:09
-         [bufbn.c]
-         off by one in range check
+    conditionalise util.h inclusion
 
-commit f9a9aaba437c2787e40cf7cc928281950e161678
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 28 10:00:27 2014 +1100
+commit 13640798c7dd011ece0a7d02841fe48e94cfa0e0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 06:44:25 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/27 00:41:49
-         [bufbn.c]
-         fix unsigned overflow that could lead to reading a short ssh protocol
-         1 bignum value; found by Ben Hawkes; ok deraadt@
+    upstream commit
+    
+    regress test for AuthorizedPrincipalsCommand
+    
+    Upstream-Regress-ID: c658fbf1ab6b6011dc83b73402322e396f1e1219
 
-commit fb3423b612713d9cde67c8a75f6f51188d6a3de3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 27 10:20:07 2014 +1100
+commit 84452c5d03c21f9bfb28c234e0dc1dc67dd817b1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 06:40:02 2015 +0000
+
+    upstream commit
+    
+    regress test for AuthorizedKeysCommand arguments
+    
+    Upstream-Regress-ID: bbd65c13c6b3be9a442ec115800bff9625898f12
+
+commit bcc50d816187fa9a03907ac1f3a52f04a52e10d1
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 06:43:30 2015 +0000
+
+    upstream commit
+    
+    add AuthorizedPrincipalsCommand that allows getting
+     authorized_principals from a subprocess rather than a file, which is quite
+     useful in deployments with large userbases
+    
+    feedback and ok markus@
+    
+    Upstream-ID: aa1bdac7b16fc6d2fa3524ef08f04c7258d247f6
+
+commit 24232a3e5ab467678a86aa67968bbb915caffed4
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 06:38:35 2015 +0000
+
+    upstream commit
+    
+    support arguments to AuthorizedKeysCommand
+    
+    bz#2081 loosely based on patch by Sami Hartikainen
+    feedback and ok markus@
+    
+    Upstream-ID: b080387a14aa67dddd8ece67c00f268d626541f7
+
+commit d80fbe41a57c72420c87a628444da16d09d66ca7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu May 21 04:55:51 2015 +0000
+
+    upstream commit
+    
+    refactor: split base64 encoding of pubkey into its own
+     sshkey_to_base64() function and out of sshkey_write(); ok markus@
+    
+    Upstream-ID: 54fc38f5832e9b91028900819bda46c3959a0c1a
+
+commit 7cc44ef74133a473734bbcbd3484f24d6a7328c5
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Mon May 18 15:06:05 2015 +0000
+
+    upstream commit
+    
+    getentropy() and sendsyslog() have been around long
+     enough. openssh-portable may want the #ifdef's but not base. discussed with
+     djm few weeks back
+    
+    Upstream-ID: 0506a4334de108e3fb6c66f8d6e0f9c112866926
+
+commit 9173d0fbe44de7ebcad8a15618e13a8b8d78902e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri May 15 05:44:21 2015 +0000
 
-       - markus@cvs.openbsd.org 2014/02/26 21:53:37
-         [sshd.c]
-         ssh_gssapi_prepare_supported_oids needs GSSAPI
+    upstream commit
+    
+    Use a salted hash of the lock passphrase instead of plain
+     text and do constant-time comparisons of it. Should prevent leaking any
+     information about it via timing, pointed out by Ryan Castellucci.  Add a 0.1s
+     incrementing delay for each failed unlock attempt up to 10s.  ok markus@
+     (earlier version), djm@
+    
+    Upstream-ID: c599fcc325aa1cc65496b25220b622d22208c85f
 
-commit 1348129a34f0f7728c34d86c100a32dcc8d1f922
+commit d028d5d3a697c71b21e4066d8672cacab3caa0a8
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 27 10:18:32 2014 +1100
+Date:   Tue May 5 19:10:58 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/02/26 20:29:29
-         [channels.c]
-         don't assume that the socks4 username is \0 terminated;
-         spotted by Ben Hawkes; ok markus@
+    upstream commit
+    
+       - tedu@cvs.openbsd.org 2015/01/12 03:20:04
+         [bcrypt_pbkdf.c]
+         rename blocks to words. bcrypt "blocks" are unrelated to blowfish blocks,
+         nor are they the same size.
 
-commit e6a74aeeacd01d885262ff8e50eb28faee8c8039
+commit f6391d4e59b058984163ab28f4e317e7a72478f1
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 27 10:17:49 2014 +1100
+Date:   Tue May 5 19:10:23 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/02/26 20:28:44
-         [auth2-gss.c gss-serv.c ssh-gss.h sshd.c]
-         bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
-         sandboxing, as running this code in the sandbox can cause violations;
-         ok markus@
+    upstream commit
+    
+       - deraadt@cvs.openbsd.org 2015/01/08 00:30:07
+         [bcrypt_pbkdf.c]
+         declare a local version of MIN(), call it MINIMUM()
 
-commit 08b57c67f3609340ff703fe2782d7058acf2529e
+commit 8ac6b13cc9113eb47cd9e86c97d7b26b4b71b77f
 Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 27 10:17:13 2014 +1100
+Date:   Tue May 5 19:09:46 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/02/26 20:18:37
-         [ssh.c]
-         bz#2205: avoid early hostname lookups unless canonicalisation is enabled;
-         ok dtucker@ markus@
+    upstream commit
+    
+       - djm@cvs.openbsd.org 2014/12/30 01:41:43
+         [bcrypt_pbkdf.c]
+         typo in comment: ouput => output
 
-commit 13f97b2286142fd0b8eab94e4ce84fe124eeb752
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Feb 24 15:57:55 2014 +1100
+commit 1f792489d5cf86a4f4e3003e6e9177654033f0f2
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon May 4 06:10:48 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/23 20:11:36
-         [readconf.c readconf.h ssh.c ssh_config.5]
-         reparse ssh_config and ~/.ssh/config if hostname canonicalisation changes
-         the hostname. This allows users to write configurations that always
-         refer to canonical hostnames, e.g.
+    upstream commit
     
-         CanonicalizeHostname yes
-         CanonicalDomains int.example.org example.org
-         CanonicalizeFallbackLocal no
+    Remove pattern length argument from match_pattern_list(), we
+     only ever use it for strlen(pattern).
     
-         Host *.int.example.org
-             Compression off
-         Host *.example.org
-             User djm
+    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@
-
-commit bee3a234f3d1ad4244952bcff1b4b7c525330dc2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Feb 24 15:57:22 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/02/23 20:03:42
-         [ssh-ed25519.c]
-         check for unsigned overflow; not reachable in OpenSSH but others might
-         copy our code...
-
-commit 0628780abe61e7e50cba48cdafb1837f49ff23b2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Feb 24 15:56:45 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/02/22 01:32:19
-         [readconf.c]
-         when processing Match blocks, skip 'exec' clauses if previous predicates
-         failed to match; ok markus@
+    ok markus@
 
-commit 0890dc8191bb201eb01c3429feec0300a9d3a930
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Feb 24 15:56:07 2014 +1100
+commit 639d6bc57b1942393ed12fb48f00bc05d4e093e4
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 07:10:01 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/15 23:05:36
-         [channels.c]
-         avoid spurious "getsockname failed: Bad file descriptor" errors in ssh -W;
-         bz#2200, debian#738692 via Colin Watson; ok dtucker@
+    upstream commit
+    
+    refactor ssh_dispatch_run_fatal() to use sshpkt_fatal()
+     to better report error conditions. Teach sshpkt_fatal() about ECONNRESET.
+    
+    Improves error messages on TCP connection resets. bz#2257
+    
+    ok dtucker@
 
-commit d3cf67e1117c25d151d0f86396e77ee3a827045a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Feb 24 15:55:36 2014 +1100
+commit 9559d7de34c572d4d3fd990ca211f8ec99f62c4d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 07:08:08 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/07 06:55:54
-         [cipher.c mac.c]
-         remove some logging that makes ssh debugging output very verbose;
-         ok markus
+    upstream commit
+    
+    a couple of parse targets were missing activep checks,
+     causing them to be misapplied in match context; bz#2272 diagnosis and
+     original patch from Sami Hartikainen ok dtucker@
 
-commit 03ae081aeaa118361c81ece76eb7cc1aaa2b40c5
-Author: Tim Rice <tim@multitalents.net>
-Date:   Fri Feb 21 09:09:34 2014 -0800
+commit 7e8528cad04b2775c3b7db08abf8fb42e47e6b2a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 04:17:51 2015 +0000
 
-    20140221
-     - (tim) [configure.ac]  Fix cut-and-paste error. Patch from Bryan Drewery.
+    upstream commit
+    
+    make handling of AuthorizedPrincipalsFile=none more
+     consistent with other =none options; bz#2288 from Jakub Jelen; ok dtucker@
 
-commit 4a20959d2e3c90e9d66897c0b4032c785672d815
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Feb 13 16:38:32 2014 +1100
+commit ca430d4d9cc0f62eca3b1fb1e2928395b7ce80f7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 04:03:20 2015 +0000
 
-     - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}]  Add compat
-       code for older OpenSSL versions that don't have EVP_MD_CTX_copy_ex.
+    upstream commit
+    
+    remove failed remote forwards established by muliplexing
+     from the list of active forwards; bz#2363, patch mostly by Yoann Ricordel; ok
+     dtucker@
 
-commit d1a7a9c0fd1ac2e3314cceb2891959fd2cd9eabb
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 7 09:24:33 2014 +1100
+commit 8312cfb8ad88657517b3e23ac8c56c8e38eb9792
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 04:01:58 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/06 22:21:01
-         [sshconnect.c]
-         in ssh_create_socket(), only do the getaddrinfo for BindAddress when
-         BindAddress is actually specified. Fixes regression in 6.5 for
-         UsePrivilegedPort=yes; patch from Corinna Vinschen
+    upstream commit
+    
+    reduce stderr spam when using ssh -S /path/mux -O forward
+     -R 0:... ok dtucker@
 
-commit 6ce35b6cc4ead1bf98abec34cb2e2d6ca0abb15e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Feb 7 09:24:14 2014 +1100
+commit 179be0f5e62f1f492462571944e45a3da660d82b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 03:23:51 2015 +0000
 
-       - naddy@cvs.openbsd.org 2014/02/05 20:13:25
-         [ssh-keygen.1 ssh-keygen.c]
-         tweak synopsis: calling ssh-keygen without any arguments is fine; ok jmc@
-         while here, fix ordering in usage(); requested by jmc@
+    upstream commit
+    
+    prevent authorized_keys options picked up on public key
+     tests without a corresponding private key authentication being applied to
+     other authentication methods. Reported by halex@, ok markus@
 
-commit 6434cb2cfbbf0a46375d2d22f2ff9927feb5e478
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Feb 6 11:17:50 2014 +1100
+commit a42d67be65b719a430b7fcaba2a4e4118382723a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 03:20:54 2015 +0000
 
-     - (djm) [sandbox-seccomp-filter.c] Not all Linux architectures define
-        __NR_shutdown; some go via the socketcall(2) multiplexer.
+    upstream commit
+    
+    Don't make parsing of authorized_keys' environment=
+     option conditional on PermitUserEnv - always parse it, but only use the
+     result if the option is enabled. This prevents the syntax of authorized_keys
+     changing depending on which sshd_config options were enabled.
+    
+    bz#2329; based on patch from coladict AT gmail.com, ok dtucker@
 
-commit 8d36f9ac71eff2e9f5770c0518b73d875f270647
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Feb 6 10:44:13 2014 +1100
+commit e661a86353e11592c7ed6a847e19a83609f49e77
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon May 4 06:10:48 2015 +0000
 
-     - (dtucker) [openbsd-compat/bsd-poll.c] Don't bother checking for non-NULL
-       before freeing since free(NULL) is a no-op.  ok djm.
+    upstream commit
+    
+    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@
 
-commit a0959da3680b4ce8cf911caf3293a6d90f88eeb7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Feb 5 10:33:45 2014 +1100
+commit 0ef1de742be2ee4b10381193fe90730925b7f027
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Apr 23 05:01:19 2015 +0000
 
-     - (djm) [sandbox-capsicum.c] Don't fatal if Capsicum is offered by
-       headers/libc but not supported by the kernel. Patch from Loganaden
-       Velvindron @ AfriNIC
+    upstream commit
+    
+    Add a simple regression test for sshd's configuration
+     parser.  Right now, all it does is run the output of sshd -T back through
+     itself and ensure the output is valid and invariant.
 
-commit 9c449bc183b256c84d8f740727b0bc54d247b15e
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:38:28 2014 +1100
+commit 368f83c793275faa2c52f60eaa9bdac155c4254b
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Apr 22 01:38:36 2015 +0000
 
-     - (djm) [regress/setuid-allowed.c] Missing string.h for strerror()
+    upstream commit
+    
+    use correct key for nested certificate test
 
-commit bf7e0f03be661b6f5b3bfe325135ce19391f9c4d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:37:50 2014 +1100
+commit 8d4d1bfddbbd7d21f545dc6997081d1ea1fbc99a
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 1 07:11:47 2015 +0000
 
-     - (djm) [openbsd-compat/Makefile.in] Add missing explicit_bzero.o
+    upstream commit
+    
+    mention that the user's shell from /etc/passwd is used
+     for commands too; bz#1459 ok dtucker@
 
-commit eb6d870a0ea8661299bb2ea8f013d3ace04e2024
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:26:34 2014 +1100
+commit 5ab283d0016bbc9d4d71e8e5284d011bc5a930cf
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 8 07:29:00 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/04 00:24:29
-         [ssh.c]
-         delay lowercasing of hostname until right before hostname
-         canonicalisation to unbreak case-sensitive matching of ssh_config;
-         reported by Ike Devolder; ok markus@
+    upstream commit
+    
+    whitespace
+    
+    Upstream-Regress-ID: 6b708a3e709d5b7fd37890f874bafdff1f597519
 
-commit d56b44d2dfa093883a5c4e91be3f72d99946b170
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:26:04 2014 +1100
+commit 8377d5008ad260048192e1e56ad7d15a56d103dd
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 8 07:26:13 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/04 00:24:29
-         [ssh.c]
-         delay lowercasing of hostname until right before hostname
-         canonicalisation to unbreak case-sensitive matching of ssh_config;
-         reported by Ike Devolder; ok markus@
+    upstream commit
+    
+    whitespace at EOL
+    
+    Upstream-Regress-ID: 9c48911643d5b05173b36a012041bed4080b8554
 
-commit db3c595ea74ea9ccd5aa644d7e1f8dc675710731
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:25:45 2014 +1100
+commit c28a3436fa8737709ea88e4437f8f23a6ab50359
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 8 06:45:13 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/02 03:44:31
-         [digest-libc.c digest-openssl.c]
-         convert memset of potentially-private data to explicit_bzero()
+    upstream commit
+    
+    moar whitespace at eol
+    
+    Upstream-ID: 64eaf872a3ba52ed41e494287e80d40aaba4b515
 
-commit aae07e2e2000dd318418fd7fd4597760904cae32
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:20:40 2014 +1100
+commit 2b64c490468fd4ca35ac8d5cc31c0520dc1508bb
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 8 06:41:56 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/02/03 23:28:00
-         [ssh-ecdsa.c]
-         fix memory leak; ECDSA_SIG_new() allocates 'r' and 's' for us, unlike
-         DSA_SIG_new. Reported by Batz Spear; ok markus@
+    upstream commit
+    
+    whitespace at EOL
+    
+    Upstream-ID: 57bcf67d666c6fc1ad798aee448fdc3f70f7ec2c
 
-commit a5103f413bde6f31bff85d6e1fd29799c647d765
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:20:14 2014 +1100
-
-       - djm@cvs.openbsd.org 2014/02/02 03:44:32
-         [auth1.c auth2-chall.c auth2-passwd.c authfile.c bufaux.c bufbn.c]
-         [buffer.c cipher-3des1.c cipher.c clientloop.c gss-serv.c kex.c]
-         [kexdhc.c kexdhs.c kexecdhc.c kexgexc.c kexecdhs.c kexgexs.c key.c]
-         [monitor.c monitor_wrap.c packet.c readpass.c rsa.c serverloop.c]
-         [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c]
-         [ssh-keygen.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c]
-         [sshd.c]
-         convert memset of potentially-private data to explicit_bzero()
-
-commit 1d2c4564265ee827147af246a16f3777741411ed
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:18:20 2014 +1100
-
-       - tedu@cvs.openbsd.org 2014/01/31 16:39:19
-         [auth2-chall.c authfd.c authfile.c bufaux.c bufec.c canohost.c]
-         [channels.c cipher-chachapoly.c clientloop.c configure.ac hostfile.c]
-         [kexc25519.c krl.c monitor.c sandbox-systrace.c session.c]
-         [sftp-client.c ssh-keygen.c ssh.c sshconnect2.c sshd.c sshlogin.c]
-         [openbsd-compat/explicit_bzero.c openbsd-compat/openbsd-compat.h]
-         replace most bzero with explicit_bzero, except a few that cna be memset
-         ok djm dtucker
-
-commit 3928de067c286683a95fbdbdb5fdb3c78a0e5efd
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:13:54 2014 +1100
+commit 4e636cf201ce6e7e3b9088568218f9d4e2c51712
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 8 03:56:51 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/01/30 22:26:14
-         [sandbox-systrace.c]
-         allow shutdown(2) syscall in sandbox - it may be called by packet_close()
-         from portable
-         (Id sync only; change is already in portable)
+    upstream commit
+    
+    whitespace at EOL
 
-commit e1e480aee8a9af6cfbe7188667b7b940d6b57f9f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:13:17 2014 +1100
+commit 38b8272f823dc1dd4e29dbcee83943ed48bb12fa
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon May 4 01:47:53 2015 +0000
 
-       - jmc@cvs.openbsd.org 2014/01/29 14:04:51
-         [sshd_config.5]
-         document kbdinteractiveauthentication;
-         requested From: Ross L Richardson
+    upstream commit
     
-         dtucker/markus helped explain its workings;
+    Use diff w/out -u for better portability
 
-commit 7cc194f70d4a5ec9a82d19422eaf18db4a6624c6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:12:56 2014 +1100
+commit 297060f42d5189a4065ea1b6f0afdf6371fb0507
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri May 8 03:25:07 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/01/29 06:18:35
-         [Makefile.in auth.h auth2-jpake.c auth2.c jpake.c jpake.h monitor.c]
-         [monitor.h monitor_wrap.c monitor_wrap.h readconf.c readconf.h]
-         [schnorr.c schnorr.h servconf.c servconf.h ssh2.h sshconnect2.c]
-         remove experimental, never-enabled JPAKE code; ok markus@
+    upstream commit
+    
+    Use xcalloc for permitted_adm_opens instead of xmalloc to
+     ensure it's zeroed. Fixes post-auth crash with permitopen=none.  bz#2355, ok
+     djm@
 
-commit b0f26544cf6f4feeb1a4f6db09fca834f5c9867d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:10:01 2014 +1100
+commit 63ebf019be863b2d90492a85e248cf55a6e87403
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri May 8 03:17:49 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/01/29 00:19:26
-         [sshd.c]
-         use kill(0, ...) instead of killpg(0, ...); on most operating systems
-         they are equivalent, but SUSv2 describes the latter as having undefined
-         behaviour; from portable; ok dtucker
-         (Id sync only; change is already in portable)
+    upstream commit
+    
+    don't choke on new-format private keys encrypted with an
+     AEAD cipher; bz#2366, patch from Ron Frederick; ok markus@
 
-commit f8f35bc471500348bb262039fb1fc43175d251b0
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:09:12 2014 +1100
+commit f8484dac678ab3098ae522a5f03bb2530f822987
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed May 6 05:45:17 2015 +0000
 
-       - jmc@cvs.openbsd.org 2014/01/28 14:13:39
-         [ssh-keyscan.1]
-         kill some bad Pa;
-         From: Jan Stary
+    upstream commit
+    
+    Clarify pseudo-terminal request behaviour and use
+     "pseudo-terminal" consistently.  bz#1716, ok jmc@ "I like it" deraadt@.
 
-commit 0ba85d696ae9daf66002c2e4ab0d6bb111e1a787
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:08:38 2014 +1100
+commit ea139507bef8bad26e86ed99a42c7233ad115c38
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed May 6 04:07:18 2015 +0000
 
-    ignore a few more regress droppings
+    upstream commit
+    
+    Blacklist DH-GEX for specific PuTTY versions known to
+     send non-RFC4419 DH-GEX messages rather than all versions of PuTTY.
+     According to Simon Tatham, 0.65 and newer versions will send RFC4419 DH-GEX
+     messages.  ok djm@
 
-commit ec93d15170b7a6ddf63fd654bd0f6a752acc19dd
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:07:13 2014 +1100
+commit b58234f00ee3872eb84f6e9e572a9a34e902e36e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue May 5 10:17:49 2015 +0000
 
-       - markus@cvs.openbsd.org 2014/01/27 20:13:46
-         [digest.c digest-openssl.c digest-libc.c Makefile.in]
-         rename digest.c to digest-openssl.c and add libc variant; ok djm@
+    upstream commit
+    
+    WinSCP doesn't implement RFC4419 DH-GEX so flag it so we
+     don't offer that KEX method.  ok markus@
 
-commit 4a1c7aa640fb97d3472d51b215b6a0ec0fd025c7
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:03:36 2014 +1100
+commit d5b1507a207253b39e810e91e68f9598691b7a29
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Tue May 5 02:48:17 2015 +0000
 
-       - markus@cvs.openbsd.org 2014/01/27 19:18:54
-         [auth-rsa.c cipher.c ssh-agent.c sshconnect1.c sshd.c]
-         replace openssl MD5 with our ssh_digest_*; ok djm@
+    upstream commit
+    
+    use the sizeof the struct not the sizeof a pointer to the
+     struct in ssh_digest_start()
+    
+    This file is only used if ssh is built with OPENSSL=no
+    
+    ok markus@
 
-commit 4e8d937af79ce4e253f77ec93489d098b25becc3
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Feb 4 11:02:42 2014 +1100
+commit a647b9b8e616c231594b2710c925d31b1b8afea3
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri May 8 11:07:27 2015 +1000
 
-       - markus@cvs.openbsd.org 2014/01/27 18:58:14
-         [Makefile.in digest.c digest.h hostfile.c kex.h mac.c hmac.c hmac.h]
-         replace openssl HMAC with an implementation based on our ssh_digest_*
-         ok and feedback djm@
+    Put brackets around mblen() compat constant.
+    
+    This might help with the reported problem cross compiling for Android
+    ("error: expected identifier or '(' before numeric constant") but
+    shouldn't hurt in any case.
 
-commit 69d0d09f76bab5aec86fbf78489169f63bd16475
-Author: Tim Rice <tim@multitalents.net>
-Date:   Fri Jan 31 14:25:18 2014 -0800
+commit d1680d36e17244d9af3843aeb5025cb8e40d6c07
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Thu Apr 30 09:18:11 2015 +1000
 
-     - (tim) [Makefile.in] build regress/setuid-allow.
+    xrealloc -> xreallocarray in portable code too.
 
-commit 0eeafcd76b972a3d159f3118227c149a4d7817fe
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 31 14:18:51 2014 +1100
+commit 531a57a3893f9fcd4aaaba8c312b612bbbcc021e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Apr 29 03:48:56 2015 +0000
 
-     - (dtucker) [readconf.c] Include <arpa/inet.h> for the hton macros.  Fixes
-       build with HP-UX's compiler.  Patch from Kevin Brott.
+    upstream commit
+    
+    Allow ListenAddress, Port and AddressFamily in any
+     order.  bz#68, ok djm@, jmc@ (for the man page bit).
 
-commit 7e5cec6070673e9f9785ffc749837ada22fbe99f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 31 09:25:34 2014 +1100
+commit c1d5bcf1aaf1209af02f79e48ba1cbc76a87b56f
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Tue Apr 28 13:47:38 2015 +0000
 
-     - (djm) [sandbox-seccomp-filter.c sandbox-systrace.c] Allow shutdown(2)
-       syscall from sandboxes; it may be called by packet_close.
+    upstream commit
+    
+    enviroment -> environment: apologies to darren for not
+     spotting that first time round...
 
-commit cdb6c90811caa5df2df856be9b0b16db020fe31d
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 30 12:50:17 2014 +1100
+commit 43beea053db191cac47c2cd8d3dc1930158aff1a
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Apr 28 10:25:15 2015 +0000
 
-     - (djm) Release openssh-6.5p1
+    upstream commit
+    
+    Fix typo in previous
 
-commit 996ea80b1884b676a901439f1f2681eb6ff68501
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 30 12:49:55 2014 +1100
+commit 85b96ef41374f3ddc9139581f87da09b2cd9199e
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Apr 28 10:17:58 2015 +0000
 
-    trim entries prior to openssh-6.0p1
+    upstream commit
+    
+    Document that the TERM environment variable is not
+     subject to SendEnv and AcceptEnv.  bz#2386, based loosely on a patch from
+     jjelen at redhat, help and ok jmc@
 
-commit f5bbd3b657b6340551c8a95f74a70857ff8fac79
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 30 11:26:46 2014 +1100
+commit 88a7c598a94ff53f76df228eeaae238d2d467565
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Apr 27 21:42:48 2015 +0000
 
-     - (djm) [configure.ac atomicio.c] Kludge around NetBSD offering
-       different symbols for 'read' when various compiler flags are
-       in use, causing atomicio.c comparisons against it to break and
-       read/write operations to hang; ok dtucker
+    upstream commit
+    
+    Make sshd default to PermitRootLogin=no; ok deraadt@
+     rpe@
 
-commit c2868192ddc4e1420a50389e18c05db20b0b1f32
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 30 10:21:19 2014 +1100
+commit 734226b4480a6c736096c729fcf6f391400599c7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Apr 27 01:52:30 2015 +0000
 
-     - (djm) [configure.ac] Only check for width-specified integer types
-       in headers that actually exist. patch from Tom G. Christensen;
-       ok dtucker@
+    upstream commit
+    
+    fix compilation with OPENSSL=no; ok dtucker@
 
-commit c161fc90fc86e2035710570238a9e1ca7a68d2a5
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jan 29 21:01:33 2014 +1100
+commit a4b9d2ce1eb7703eaf0809b0c8a82ded8aa4f1c6
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Mon Apr 27 00:37:53 2015 +0000
 
-     - (djm) [configure.ac] Fix broken shell test '==' vs '='; patch from
-       Tom G. Christensen
+    upstream commit
+    
+    Include stdio.h for FILE (used in sshkey.h) so it
+     compiles with OPENSSL=no.
 
-commit 6f917ad376481995ab7d29fb53b08ec8d507eb9e
-Author: Tim Rice <tim@multitalents.net>
-Date:   Tue Jan 28 10:26:25 2014 -0800
+commit dbcc652f4ca11fe04e5930c7ef18a219318c6cda
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Apr 27 00:21:21 2015 +0000
 
-     - (tim) [regress/agent.sh regress/agent-ptrace.sh] Assign $? to a variable
-       when used as an error message inside an if statement so we display the
-       correct into. agent.sh patch from Petr Lautrbach.
+    upstream commit
+    
+    allow "sshd -f none" to skip reading the config file,
+     much like "ssh -F none" does. ok dtucker
 
-commit ab16ef4152914d44ce6f76e48167d26d22f66a06
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 28 15:08:12 2014 +1100
+commit b7ca276fca316c952f0b90f5adb1448c8481eedc
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Fri Apr 24 06:26:49 2015 +0000
 
-     - (djm) [sshd.c] Use kill(0, ...) instead of killpg(0, ...); the
-       latter being specified to have undefined behaviour in SUSv3;
-       ok dtucker
+    upstream commit
+    
+    combine -Dd onto one line and update usage();
 
-commit ab0394905884dc6e58c3721211c6b38fb8fc2ca8
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 28 15:07:10 2014 +1100
+commit 2ea974630d7017e4c7666d14d9dc939707613e96
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 24 05:26:44 2015 +0000
 
-     - (djm) [configure.ac] Search for inet_ntop in libnsl and libresovl;
-       ok dtucker
+    upstream commit
+    
+    add ssh-agent -D to leave ssh-agent in foreground
+     without enabling debug mode; bz#2381 ok dtucker@
 
-commit 4ab20a82d4d4168d62318923f62382f6ef242fcd
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Jan 27 17:35:04 2014 +1100
+commit 8ac2ffd7aa06042f6b924c87139f2fea5c5682f7
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Apr 24 01:36:24 2015 +0000
 
-     - (dtucker) [Makefile.in] Remove trailing backslash which some make
-       implementations (eg older Solaris) do not cope with.
+    upstream commit
+    
+    2*len -> use xreallocarray() ok djm
 
-commit e7e8b3cfe9f8665faaf0e68b33df5bbb431bd129
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Jan 27 17:32:50 2014 +1100
+commit 657a5fbc0d0aff309079ff8fb386f17e964963c2
+Author: deraadt@openbsd.org <deraadt@openbsd.org>
+Date:   Fri Apr 24 01:36:00 2015 +0000
 
-    Welcome to 2014
+    upstream commit
+    
+    rename xrealloc() to xreallocarray() since it follows
+     that form. ok djm
 
-commit 5b447c0aac0dd444251e276f6bb3bbbe1c05331c
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 26 09:46:53 2014 +1100
+commit 1108ae242fdd2c304307b68ddf46aebe43ebffaa
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Apr 23 04:59:10 2015 +0000
 
-     - (djm) [configure.ac] correct AC_DEFINE for previous.
+    upstream commit
+    
+    Two small fixes for sshd -T: ListenAddress'es are added
+     to a list head so reverse the order when printing them to ensure the
+     behaviour remains the same, and print StreamLocalBindMask as octal with
+     leading zero.  ok deraadt@
 
-commit 2035b2236d3b1f76c749c642a43e03c85eae76e6
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 26 09:39:53 2014 +1100
+commit bd902b8473e1168f19378d5d0ae68d0c203525df
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Apr 23 04:53:53 2015 +0000
 
-      - (djm) [configure.ac sandbox-capsicum.c sandbox-rlimit.c] Disable
-        RLIMIT_NOFILE pseudo-sandbox on FreeBSD. In some configurations,
-        libc will attempt to open additional file descriptors for crypto
-        offload and crash if they cannot be opened.
+    upstream commit
+    
+    Check for and reject missing arguments for
+     VersionAddendum and ForceCommand. bz#2281, patch from plautrba at redhat com,
+     ok djm@
 
-commit a92ac7410475fbb00383c7402aa954dc0a75ae19
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 26 09:38:03 2014 +1100
+commit ca42c1758575e592239de1d5755140e054b91a0d
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Apr 22 01:24:01 2015 +0000
 
-       - markus@cvs.openbsd.org 2014/01/25 20:35:37
-         [kex.c]
-         dh_need needs to be set to max(seclen, blocksize, ivlen, mac_len)
-         ok dtucker@, noted by mancha
+    upstream commit
+    
+    unknown certificate extensions are non-fatal, so don't
+     fatal when they are encountered; bz#2387 reported by Bob Van Zant; ok
+     dtucker@
 
-commit 76eea4ab4e658670ca6e76dd1e6d17f262208b57
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sun Jan 26 09:37:25 2014 +1100
-
-       - dtucker@cvs.openbsd.org 2014/01/25 10:12:50
-         [cipher.c cipher.h kex.c kex.h kexgexc.c]
-         Add a special case for the DH group size for 3des-cbc, which has an
-         effective strength much lower than the key size.  This causes problems
-         with some cryptlib implementations, which don't support group sizes larger
-         than 4k but also don't use the largest group size it does support as
-         specified in the RFC.  Based on a patch from Petr Lautrbach at Redhat,
-         reduced by me with input from Markus.  ok djm@ markus@
-
-commit 603b8f47f1cd9ed95a2017447db8e60ca6704594
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jan 25 13:16:59 2014 +1100
+commit 39bfbf7caad231cc4bda6909fb1af0705bca04d8
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Tue Apr 21 07:01:00 2015 +0000
 
-     - (djm) [configure.ac] autoconf sets finds to 'yes' not '1', so test
-       against the correct thing.
+    upstream commit
+    
+    Add back a backslash removed in rev 1.42 so
+     KEX_SERVER_ENCRYPT will include aes again.
+    
+    ok deraadt@
 
-commit c96d85376d779b6ac61525b5440010d344d2f23f
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jan 25 13:12:28 2014 +1100
+commit 6b0d576bb87eca3efd2b309fcfe4edfefc289f9c
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 17 13:32:09 2015 +0000
 
-     - (djm) [configure.ac] Do not attempt to use capsicum sandbox unless
-       sys/capability.h exists and cap_rights_limit is in libc. Fixes
-       build on FreeBSD9x which provides the header but not the libc
-       support.
+    upstream commit
+    
+    s/recommended/required/ that private keys be og-r this
+     wording change was made a while ago but got accidentally reverted
 
-commit f62ecef9939cb3dbeb10602fd705d4db3976d822
-Author: Damien Miller <djm@mindrot.org>
-Date:   Sat Jan 25 12:34:38 2014 +1100
+commit 44a8e7ce6f3ab4c2eb1ae49115c210b98e53c4df
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 17 13:25:52 2015 +0000
 
-     - (djm) [configure.ac] Fix detection of capsicum sandbox on FreeBSD
+    upstream commit
+    
+    don't try to cleanup NULL KEX proposals in
+     kex_prop_free(); found by Jukka Taimisto and Markus Hietava
 
-commit b0e0f760b861676a3fe5c40133b270713d5321a9
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 24 14:27:04 2014 +1100
+commit 3038a191872d2882052306098c1810d14835e704
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 17 13:19:22 2015 +0000
 
-     - (djm) [Makefile.in regress/scp-ssh-wrapper.sh regress/scp.sh] Make
-       the scp regress test actually test the built scp rather than the one
-       in $PATH. ok dtucker@
+    upstream commit
+    
+    use error/logit/fatal instead of fprintf(stderr, ...)
+     and exit(0), fix a few errors that were being printed to stdout instead of
+     stderr and a few non-errors that were going to stderr instead of stdout
+     bz#2325; ok dtucker
 
-commit 42a092530159637da9cb7f9e1b5f4679e34a85e6
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Thu Jan 23 23:14:39 2014 +1100
+commit a58be33cb6cd24441fa7e634db0e5babdd56f07f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 17 13:16:48 2015 +0000
 
-     - (dtucker) [configure.ac] NetBSD's (and FreeBSD's) strnvis is gratuitously
-       incompatible with OpenBSD's despite post-dating it by more than a decade.
-       Declare it as broken, and document FreeBSD's as the same.  ok djm@
+    upstream commit
+    
+    debug log missing DISPLAY environment when X11
+     forwarding requested; bz#1682 ok dtucker@
 
-commit 617da33c20cb59f9ea6c99c881d92493371ef7b8
-Author: Tim Rice <tim@multitalents.net>
-Date:   Wed Jan 22 19:16:10 2014 -0800
+commit 17d4d9d9fbc8fb80e322f94d95eecc604588a474
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 17 04:32:31 2015 +0000
 
-     - (tim) [session.c] Improve error reporting on set_id().
+    upstream commit
+    
+    don't call record_login() in monitor when UseLogin is
+     enabled; bz#278 reported by drk AT sgi.com; ok dtucker
 
-commit 5c2ff5e31f57d303ebb414d84a934c02728fa568
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jan 22 21:30:12 2014 +1100
+commit 40132ff87b6cbc3dc05fb5df2e9d8e3afa06aafd
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Apr 17 04:12:35 2015 +0000
 
-     - (djm) [configure.ac aclocal.m4] More tests to detect fallout from
-       platform hardening options: include some long long int arithmatic
-       to detect missing support functions for -ftrapv in libgcc and
-       equivalents, actually test linking when -ftrapv is supplied and
-       set either both -pie/-fPIE or neither. feedback and ok dtucker@
+    upstream commit
+    
+    Add some missing options to sshd -T and fix the output
+     of VersionAddendum HostCertificate.  bz#2346, patch from jjelen at redhat
+     com, ok djm.
 
-commit 852472a54b8a0dc3e53786b313baaa86850a4273
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jan 22 16:31:18 2014 +1100
+commit 6cc7cfa936afde2d829e56ee6528c7ea47a42441
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Thu Apr 16 23:25:50 2015 +0000
 
-     - (djm) [configure.ac] Unless specifically requested, only attempt
-       to build Position Independent Executables on gcc >= 4.x; ok dtucker
+    upstream commit
+    
+    Document "none" for PidFile XAuthLocation
+     TrustedUserCAKeys and RevokedKeys. bz#2382, feedback from jmc@, ok djm@
 
-commit ee87838786cef0194db36ae0675b3e7c4e8ec661
-Author: Damien Miller <djm@mindrot.org>
-Date:   Wed Jan 22 16:30:15 2014 +1100
+commit 15fdfc9b1c6808b26bc54d4d61a38b54541763ed
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Wed Apr 15 23:23:25 2015 +0000
 
-     - (djm) [openbsd-compat/setproctitle.c] Don't fail to compile if a
-       platform that is expected to use the reuse-argv style setproctitle
-       hack surprises us by providing a setproctitle in libc; ok dtucker
+    upstream commit
+    
+    Plug leak of address passed to logging.  bz#2373, patch
+     from jjelen at redhat, ok markus@
 
-commit 5c96a154c7940fa67b1f11c421e390dbbc159f27
-Author: Damien Miller <djm@mindrot.org>
-Date:   Tue Jan 21 13:10:26 2014 +1100
+commit bb2289e2a47d465eaaaeff3dee2a6b7777b4c291
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Tue Apr 14 04:17:03 2015 +0000
 
-     - (djm) [aclocal.m4] Flesh out the code run in the OSSH_CHECK_CFLAG_COMPILE
-       and OSSH_CHECK_LDFLAG_LINK tests to give them a better chance of
-       detecting toolchain-related problems; ok dtucker
+    upstream commit
+    
+    Output remote username in debug output since with Host
+     and Match it's not always obvious what it will be.  bz#2368, ok djm@
 
-commit 9464ba6fb34bb42eb3501ec3c5143662e75674bf
-Author: Tim Rice <tim@multitalents.net>
-Date:   Mon Jan 20 17:59:28 2014 -0800
+commit 70860b6d07461906730632f9758ff1b7c98c695a
+Author: Darren Tucker <dtucker@zip.com.au>
+Date:   Fri Apr 17 10:56:13 2015 +1000
 
-     - (tim) [platform.c session.c] Fix bug affecting SVR5 platforms introduced
-       with sftp chroot support. Move set_id call after chroot.
+    Format UsePAM setting when using sshd -T.
+    
+    Part of bz#2346, patch from jjelen at redhat com.
 
-commit a6d573caa14d490e6c42fb991bcb5c6860ec704b
+commit ee15d9c9f0720f5a8b0b34e4b10ecf21f9824814
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Jan 21 12:50:46 2014 +1100
+Date:   Fri Apr 17 10:40:23 2015 +1000
 
-     - (dtucker) [aclocal.m4] Differentiate between compile-time and link-time
-       tests in the configure output.  ok djm.
+    Wrap endian.h include inside ifdef (bz#2370).
 
-commit 096118dc73ab14810b3c12785c0b5acb01ad6123
+commit 408f4c2ad4a4c41baa7b9b2b7423d875abbfa70b
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Tue Jan 21 12:48:51 2014 +1100
+Date:   Fri Apr 17 09:39:58 2015 +1000
 
-     - (dtucker) [configure.ac] Make PIE a configure-time option which defaults
-       to on platforms where it's known to be reliably detected and off elsewhere.
-       Works around platforms such as FreeBSD 9.1 where it does not interop with
-       -ftrapv (it seems to work but fails when trying to link ssh).  ok djm@
+    Look for '${host}-ar' before 'ar'.
+    
+    This changes configure.ac to look for '${host}-ar' as set by
+    AC_CANONICAL_HOST before looking for the unprefixed 'ar'.
+    Useful when cross-compiling when all your binutils are prefixed.
+    
+    Patch from moben at exherbo org via astrand at lysator liu se and
+    bz#2352.
 
-commit f9df7f6f477792254eab33cdef71a6d66488cb88
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Jan 20 20:07:15 2014 +1100
+commit 673a1c16ad078d41558247ce739fe812c960acc8
+Author: Damien Miller <djm@google.com>
+Date:   Thu Apr 16 11:40:20 2015 +1000
 
-     - (djm) [regress/cert-hostkey.sh] Fix regress failure on platforms that
-        skip one or more key types (e.g. RHEL/CentOS 6.5); ok dtucker@
+    remove dependency on arpa/telnet.h
 
-commit c74e70eb52ccc0082bd5a70b5798bb01c114d138
+commit 202d443eeda1829d336595a3cfc07827e49f45ed
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Mon Jan 20 13:18:09 2014 +1100
+Date:   Wed Apr 15 15:59:49 2015 +1000
 
-    - (dtucker) [gss-serv-krb5.c] Fall back to krb5_cc_gen_new if the Kerberos
-       implementation does not have krb5_cc_new_unique, similar to what we do
-       in auth-krb5.c.
+    Remove duplicate include of pwd.h.  bz#2337, patch from Mordy Ovits.
 
-commit 3510979e83b6a18ec8773c64c3fa04aa08b2e783
-Author: Damien Miller <djm@mindrot.org>
-Date:   Mon Jan 20 12:41:53 2014 +1100
+commit 597986493412c499f2bc2209420cb195f97b3668
+Author: Damien Miller <djm@google.com>
+Date:   Thu Apr 9 10:14:48 2015 +1000
 
-       - djm@cvs.openbsd.org 2014/01/20 00:08:48
-         [digest.c]
-         memleak; found by Loganaden Velvindron @ AfriNIC; ok markus@
+    platform's with openpty don't need pty_release
 
-commit 7eee358d7a6580479bee5cd7e52810ebfd03e5b2
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Jan 19 22:37:02 2014 +1100
+commit 318be28cda1fd9108f2e6f2f86b0b7589ba2aed0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Apr 13 02:04:08 2015 +0000
+
+    upstream commit
+    
+    deprecate ancient, pre-RFC4419 and undocumented
+     SSH2_MSG_KEX_DH_GEX_REQUEST_OLD message; ok markus@ deraadt@ "seems
+     reasonable" dtucker@
+
+commit d8f391caef62378463a0e6b36f940170dadfe605
+Author: dtucker@openbsd.org <dtucker@openbsd.org>
+Date:   Fri Apr 10 05:16:50 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/01/19 11:21:51
-         [addrmatch.c]
-         Cast the sizeof to socklen_t so it'll work even if the supplied len is
-         negative.  Suggested by and ok djm, ok deraadt.
+    upstream commit
+    
+    Don't send hostkey advertisments
+     (hostkeys-00@openssh.com) to current versions of Tera Term as they can't
+     handle them.  Newer versions should be OK.  Patch from Bryan Drewery and
+     IWAMOTO Kouichi, ok djm@
 
-commit b7e01c09b56ab26e8fac56bbce0fd25e36d12bb0
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Jan 19 22:36:13 2014 +1100
+commit 2c2cfe1a1c97eb9a08cc9817fd0678209680c636
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 10 00:08:55 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/01/19 04:48:08
-         [ssh_config.5]
-         fix inverted meaning of 'no' and 'yes' for CanonicalizeFallbackLocal
+    upstream commit
+    
+    include port number if a non-default one has been
+     specified; based on patch from Michael Handler
 
-commit 7b1ded04adce42efa25ada7c3a39818d3109b724
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Jan 19 15:30:02 2014 +1100
+commit 4492a4f222da4cf1e8eab12689196322e27b08c4
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Apr 7 23:00:42 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/01/19 04:17:29
-         [canohost.c addrmatch.c]
-         Cast socklen_t when comparing to size_t and use socklen_t to iterate over
-         the ip options, both to prevent signed/unsigned comparison warnings.
-         Patch from vinschen at redhat via portable openssh, begrudging ok deraadt.
+    upstream commit
+    
+    treat Protocol=1,2|2,1 as Protocol=2 when compiled
+     without SSH1 support; ok dtucker@ millert@
 
-commit 293ee3c9f0796d99ebb033735f0e315f2e0180bf
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Jan 19 15:28:01 2014 +1100
+commit c265e2e6e932efc6d86f6cc885dea33637a67564
+Author: miod@openbsd.org <miod@openbsd.org>
+Date:   Sun Apr 5 15:43:43 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/01/18 09:36:26
-         [session.c]
-         explicitly define USE_PIPES to 1 to prevent redefinition warnings in
-         portable on platforms that use pipes for everything.  From redhat @
-         redhat.
+    upstream commit
+    
+    Do not use int for sig_atomic_t; spotted by
+     christos@netbsd; ok markus@
 
-commit 2aca159d05f9e7880d1d8f1ce49a218840057f53
+commit e7bf3a5eda6a1b02bef6096fed78527ee11e54cc
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sun Jan 19 15:25:34 2014 +1100
+Date:   Tue Apr 7 10:48:04 2015 +1000
 
-       - dtucker@cvs.openbsd.org 2014/01/17 06:23:24
-         [sftp-server.c]
-         fix log message statvfs.  ok djm
+    Use do{}while(0) for no-op functions.
+    
+    From FreeBSD.
 
-commit 841f7da89ae8b367bb502d61c5c41916c6e7ae4c
+commit bb99844abae2b6447272f79e7fa84134802eb4df
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jan 18 22:12:15 2014 +1100
+Date:   Tue Apr 7 10:47:15 2015 +1000
 
-     - (dtucker) [sandbox-capsicum.c] Correct some error messages and make the
-       return value check for cap_enter() consistent with the other uses in
-       FreeBSD.  From by Loganaden Velvindron @ AfriNIC via bz#2140.
+    Wrap blf.h include in ifdef.  From FreeBSD.
 
-commit fdce3731660699b2429e93e822f2ccbaccd163ae
+commit d9b9b43656091cf0ad55c122f08fadb07dad0abd
 Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jan 18 21:12:42 2014 +1100
+Date:   Tue Apr 7 09:10:00 2015 +1000
 
-     - (dtucker) [configure.ac] On Cygwin the getopt variables (like optargs,
-       optind) are defined in getopt.h already.  Unfortunately they are defined as
-       "declspec(dllimport)" for historical reasons, because the GNU linker didn't
-       allow auto-import on PE/COFF targets way back when.  The problem is the
-       dllexport attributes collide with the definitions in the various source
-       files in OpenSSH, which obviousy define the variables without
-       declspec(dllimport).  The least intrusive way to get rid of these warnings
-       is to disable warnings for GCC compiler attributes when building on Cygwin.
-       Patch from vinschen at redhat.com.
+    Fix misspellings of regress CONFOPTS env variables.
+    
+    Patch from Bryan Drewery.
 
-commit 1411c9263f46e1ee49d0d302bf7258ebe69ce827
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jan 18 21:03:59 2014 +1100
+commit 3f4ea3c9ab1d32d43c9222c4351f58ca11144156
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Fri Apr 3 22:17:27 2015 +0000
 
-     - (dtucker) [openbsd-compat/bsd-cygwin_util.h] Add missing function
-       declarations that stopped being included when we stopped including
-       <windows.h> from openbsd-compat/bsd-cygwin_util.h.  Patch from vinschen at
-       redhat.com.
+    upstream commit
+    
+    correct return value in pubkey parsing, spotted by Ben Hawkes
+     ok markus@
 
-commit 89c532d843c95a085777c66365067d64d1937eb9
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jan 18 20:43:49 2014 +1100
+commit 7da2be0cb9601ed25460c83aa4d44052b967ba0f
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 31 22:59:01 2015 +0000
 
-     - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin.  Patch
-       from vinschen at redhat.com
+    upstream commit
+    
+    adapt to recent hostfile.c change: when parsing
+     known_hosts without fully parsing the keys therein, hostkeys_foreach() will
+     now correctly identify KEY_RSA1 keys; ok markus@ miod@
 
-commit 355f861022be7b23d3009fae8f3c9f6f7fc685f7
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jan 18 00:12:38 2014 +1100
+commit 9e1777a0d1c706714b055811c12ab8cc21033e4a
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Mar 24 20:19:15 2015 +0000
 
-     - (dtucker) [defines.h] Move our definitions of uintXX_t types down to after
-       they're defined if we have to define them ourselves.  Fixes builds on old
-       AIX.
+    upstream commit
+    
+    use ${SSH} for -Q instead of installed ssh
 
-commit a3357661ee1d5d553294f36e4940e8285c7f1332
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Sat Jan 18 00:03:57 2014 +1100
+commit ce1b358ea414a2cc88e4430cd5a2ea7fecd9de57
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Mar 16 22:46:14 2015 +0000
 
-     - (dtucker) [readconf.c] Wrap paths.h inside an ifdef.  Allows building on
-       Solaris.
+    upstream commit
+    
+    make CLEANFILES clean up more of the tests' droppings
 
-commit 9edcbff46ff01c8d5dee9c1aa843f09e9ad8a80e
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 21:54:32 2014 +1100
+commit 398f9ef192d820b67beba01ec234d66faca65775
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 31 22:57:06 2015 +0000
 
-     - (dtucker) [configure.ac] Have --without-toolchain-hardening not turn off
-       stack-protector since that has a separate flag that's been around a while.
+    upstream commit
+    
+    downgrade error() for known_hosts parse errors to debug()
+     to quiet warnings from ssh1 keys present when compiled !ssh1.
+    
+    also identify ssh1 keys when scanning, even when compiled !ssh1
+    
+    ok markus@ miod@
 
-commit 6d725687c490d4ba957a1bbc0ba0a2956c09fa69
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 19:17:34 2014 +1100
+commit 9a47ab80030a31f2d122b8fd95bd48c408b9fcd9
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 31 22:55:50 2015 +0000
 
-     - (dtucker) [configure.ac] Also look in inttypes.h for uintXX_t types.
+    upstream commit
+    
+    fd leak for !ssh1 case; found by unittests; ok markus@
 
-commit 5055699c7f7c7ef21703a443ec73117da392f6ae
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 18:48:22 2014 +1100
+commit c9a0805a6280681901c270755a7cd630d7c5280e
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 31 22:55:24 2015 +0000
 
-     - (dtucker) [openbsd-compat/bsd-statvfs.h] Only start including headers if we
-       need them to cut down on the name collisions.
+    upstream commit
+    
+    don't fatal when a !ssh1 sshd is reexeced from a w/ssh1
+     listener; reported by miod@; ok miod@ markus@
 
-commit a5cf1e220def07290260e4125e74f41ac75cf88d
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 18:10:58 2014 +1100
+commit 704d8c88988cae38fb755a6243b119731d223222
+Author: tobias@openbsd.org <tobias@openbsd.org>
+Date:   Tue Mar 31 11:06:49 2015 +0000
 
-     - (dtucker) [configure.ac openbsd-compat/bsd-statvfs.c
-       openbsd-compat/bsd-statvfs.h] Implement enough of statvfs on top of statfs
-       to be useful (and for the regression tests to pass) on platforms that
-       have statfs and fstatfs.  ok djm@
+    upstream commit
+    
+    Comments are only supported for RSA1 keys. If a user
+     tried to add one and entered his passphrase, explicitly clear it before exit.
+     This is done in all other error paths, too.
+    
+    ok djm
 
-commit 1357d71d7b6d269969520aaa3e84d312ec971d5b
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 18:00:40 2014 +1100
+commit 78de1673c05ea2c33e0d4a4b64ecb5186b6ea2e9
+Author: jmc@openbsd.org <jmc@openbsd.org>
+Date:   Mon Mar 30 18:28:37 2015 +0000
 
-     - (dtucker) Fix typo in #ifndef.
+    upstream commit
+    
+    ssh-askpass(1) is the default, overridden by SSH_ASKPASS;
+     diff originally from jiri b;
 
-commit d23a91ffb289d3553a58b7a60cec39fba9f0f506
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 17:32:30 2014 +1100
+commit 26e0bcf766fadb4a44fb6199386fb1dcab65ad00
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Mar 30 00:00:29 2015 +0000
 
-     - (dtucker) [configure.ac digest.c openbsd-compat/openssl-compat.c
-       openbsd-compat/openssl-compat.h]  Add compatibility layer for older
-       openssl versions.  ok djm@
+    upstream commit
+    
+    fix uninitialised memory read when parsing a config file
+     consisting of a single nul byte. Found by hanno AT hboeck.de using AFL; ok
+     dtucker
 
-commit 868ea1ea1c1bfdbee5dbad78f81999c5983ecf31
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 17 16:47:04 2014 +1100
+commit fecede00a76fbb33a349f5121c0b2f9fbc04a777
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Thu Mar 26 19:32:19 2015 +0000
 
-     - (djm) [Makefile.in configure.ac sandbox-capsicum.c sandbox-darwin.c]
-       [sandbox-null.c sandbox-rlimit.c sandbox-seccomp-filter.c]
-       [sandbox-systrace.c ssh-sandbox.h sshd.c] Support preauth sandboxing
-       using the Capsicum API introduced in FreeBSD 10. Patch by Dag-Erling
-       Smorgrav, updated by Loganaden Velvindron @ AfriNIC; ok dtucker@
+    upstream commit
+    
+    sigp and lenp are not optional in ssh_agent_sign(); ok
+     djm@
 
-commit a9d186a8b50d18869a10e9203abf71c83ddb1f79
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 16:30:49 2014 +1100
+commit 1b0ef3813244c78669e6d4d54c624f600945327d
+Author: naddy@openbsd.org <naddy@openbsd.org>
+Date:   Thu Mar 26 12:32:38 2015 +0000
 
-       - dtucker@cvs.openbsd.org 2014/01/17 05:26:41
-         [digest.c]
-         remove unused includes.  ok djm@
+    upstream commit
+    
+    don't try to load .ssh/identity by default if SSH1 is
+     disabled; ok markus@
 
-commit 5f1c57a7a7eb39c0e4fee3367712337dbcaef024
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 16:29:45 2014 +1100
+commit f9b78852379b74a2d14e6fc94fe52af30b7e9c31
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Mar 26 07:00:04 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/01/17 00:21:06
-         [sftp-client.c]
-         signed/unsigned comparison warning fix; from portable (Id sync only)
+    upstream commit
+    
+    ban all-zero curve25519 keys as recommended by latest
+     CFRG curves draft; ok markus
 
-commit c548722361d89fb12c108528f96b306a26477b18
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 15:12:16 2014 +1100
+commit b8afbe2c1aaf573565e4da775261dfafc8b1ba9c
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Thu Mar 26 06:59:28 2015 +0000
 
-     - (dtucker) [configure.ac] Split AC_CHECK_FUNCS for OpenSSL functions into
-       separate lines and alphabetize for easier diffing of changes.
+    upstream commit
+    
+    relax bits needed check to allow
+     diffie-hellman-group1-sha1 key exchange to complete for chacha20-poly1305 was
+     selected as symmetric cipher; ok markus
 
-commit acad351a5b1c37de9130c9c1710445cc45a7f6b9
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 14:20:05 2014 +1100
+commit 47842f71e31da130555353c1d57a1e5a8937f1c0
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Mar 25 19:29:58 2015 +0000
 
-     - (dtucker) [defines.h] Add typedefs for uintXX_t types for platforms that
-       don't have them.
+    upstream commit
+    
+    ignore v1 errors on ssh-add -D; only try v2 keys on
+     -l/-L (unless WITH_SSH1) ok djm@
 
-commit c3ed065ce8417aaa46490836648c173a5010f226
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 14:18:45 2014 +1100
+commit 5f57e77f91bf2230c09eca96eb5ecec39e5f2da6
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Wed Mar 25 19:21:48 2015 +0000
 
-     - (dtucker) [openbsd-compat/bcrypt_pbkdf.c] Wrap stdlib.h include inside
-       #ifdef HAVE_STDINT_H.
+    upstream commit
+    
+    unbreak ssh_agent_sign (lenp vs *lenp)
 
-commit f45f78ae437062c7d9506c5f475b7215f486be44
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 12:43:43 2014 +1100
+commit 4daeb67181054f2a377677fac919ee8f9ed3490e
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Mar 24 20:10:08 2015 +0000
 
-     - (dtucker) [blocks.c fe25519.c ge25519.c hash.c sc25519.c verify.c] Include
-       includes.h to pull in all of the compatibility stuff.
+    upstream commit
+    
+    don't leak 'setp' on error; noted by Nicholas Lemonias;
+     ok djm@
 
-commit 99df369d0340caac145d57f700d830147ff18b87
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 12:42:17 2014 +1100
+commit 7d4f96f9de2a18af0d9fa75ea89a4990de0344f5
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Mar 24 20:09:11 2015 +0000
 
-     - (dtucker) [poly1305.c] Wrap stdlib.h include inside #ifdef HAVE_STDINT_H.
+    upstream commit
+    
+    consistent check for NULL as noted by Nicholas
+     Lemonias; ok djm@
 
-commit ac413b62ea1957e80c711acbe0c11b908273fc01
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 12:31:33 2014 +1100
+commit df100be51354e447d9345cf1ec22e6013c0eed50
+Author: markus@openbsd.org <markus@openbsd.org>
+Date:   Tue Mar 24 20:03:44 2015 +0000
 
-     - (dtucker) [crypto_api.h] Wrap stdlib.h include inside #ifdef HAVE_STDINT_H.
+    upstream commit
+    
+    correct fmt-string for size_t as noted by Nicholas
+     Lemonias; ok djm@
 
-commit 1c4a011e9c939e74815346a560843e1862c300b8
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 12:23:23 2014 +1100
+commit a22b9ef21285e81775732436f7c84a27bd3f71e0
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 24 09:17:21 2015 +0000
 
-     - (dtucker) [loginrec.c] Cast to the types specfied in the format
-        specification to prevent warnings.
+    upstream commit
+    
+    promote chacha20-poly1305@openssh.com to be the default
+     cipher; ok markus
 
-commit c3d483f9a8275be1113535a1e0d0e384f605f3c4
-Author: Damien Miller <djm@mindrot.org>
-Date:   Fri Jan 17 11:20:26 2014 +1100
+commit 2aa9da1a3b360cf7b13e96fe1521534b91501fb5
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 24 01:29:19 2015 +0000
 
-     - (djm) [sftp-client.c] signed/unsigned comparison fix
+    upstream commit
+    
+    Compile-time disable SSH protocol 1. You can turn it
+     back on using the Makefile.inc knob if you need it to talk to ancient
+     devices.
 
-commit fd994379dd972417d0491767f7cd9b5bf23f4975
-Author: Darren Tucker <dtucker@zip.com.au>
-Date:   Fri Jan 17 09:53:24 2014 +1100
+commit 53097b2022154edf96b4e8526af5666f979503f7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Tue Mar 24 01:11:12 2015 +0000
 
-     - (dtucker) [aclocal.m4 configure.ac] Add some additional compiler/toolchain
-       hardening flags including -fstack-protector-strong.  These default to on
-       if the toolchain supports them, but there is a configure-time knob
-       (--without-hardening) to disable them if necessary.  ok djm@
+    upstream commit
+    
+    fix double-negative error message "ssh1 is not
+     unsupported"
 
-commit 366224d21768ee8ec28cfbcc5fbade1b32582d58
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 16 18:51:44 2014 +1100
+commit 5c27e3b6ec2db711dfcd40e6359c0bcdd0b62ea9
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Mar 23 06:06:38 2015 +0000
 
-     - (djm) [README] update release notes URL.
+    upstream commit
+    
+    for ssh-keygen -A, don't try (and fail) to generate ssh
+     v.1 keys when compiled without SSH1 support RSA/DSA/ECDSA keys when compiled
+     without OpenSSL based on patch by Mike Frysinger; bz#2369
 
-commit 2ae77e64f8fa82cbf25c9755e8e847709b978b40
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 16 18:51:07 2014 +1100
+commit 725fd22a8c41db7de73a638539a5157b7e4424ae
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Wed Mar 18 01:44:21 2015 +0000
 
-     - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
-       [contrib/suse/openssh.spec] Crank RPM spec version numbers.
+    upstream commit
+    
+    KRL support doesn't need OpenSSL anymore, remove #ifdefs
+     from around call
 
-commit 0fa29e6d777c73a1b4ddd3b996b06ee20022ae8a
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 16 18:42:31 2014 +1100
+commit b07011c18e0b2e172c5fd09d21fb159a0bf5fcc7
+Author: djm@openbsd.org <djm@openbsd.org>
+Date:   Mon Mar 16 11:09:52 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/01/16 07:32:00
-         [version.h]
-         openssh-6.5
+    upstream commit
+    
+    #if 0 some more arrays used only for decrypting (we don't
+     use since we only need encrypt for AES-CTR)
 
-commit 52c371cd6d2598cc73d4e633811b3012119c47e2
-Author: Damien Miller <djm@mindrot.org>
-Date:   Thu Jan 16 18:42:10 2014 +1100
+commit 1cb3016635898d287e9d58b50c430995652d5358
+Author: jsg@openbsd.org <jsg@openbsd.org>
+Date:   Wed Mar 11 00:48:39 2015 +0000
 
-       - djm@cvs.openbsd.org 2014/01/16 07:31:09
-         [sftp-client.c]
-         needless and incorrect cast to size_t can break resumption of
-         large download; patch from tobias@
+    upstream commit
+    
+    add back the changes from rev 1.206, djm reverted this by
+     mistake in rev 1.207
diff --git a/INSTALL b/INSTALL
index cbbb2df..92106bf 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,20 +1,27 @@
 1. Prerequisites
 ----------------
 
+A C compiler.  Any C89 or better compiler should work.  Where supported,
+configure will attempt to enable the compiler's run-time integrity checking
+options.  Some notes about specific compilers:
+ - clang: -ftrapv and -sanitize=integer require the compiler-rt runtime
+  (CC=clang LDFLAGS=--rtlib=compiler-rt ./configure)
+
 You will need working installations of Zlib and libcrypto (LibreSSL /
 OpenSSL)
 
-Zlib 1.1.4 or 1.2.1.2 or greater (ealier 1.2.x versions have problems):
+Zlib 1.1.4 or 1.2.1.2 or greater (earlier 1.2.x versions have problems):
 http://www.gzip.org/zlib/
 
-libcrypto (LibreSSL or OpenSSL >= 0.9.8f)
+libcrypto (LibreSSL or OpenSSL >= 0.9.8f < 1.1.0)
 LibreSSL http://www.libressl.org/ ; or
 OpenSSL http://www.openssl.org/
 
 LibreSSL/OpenSSL should be compiled as a position-independent library
 (i.e. with -fPIC) otherwise OpenSSH will not be able to link with it.
 If you must use a non-position-independent libcrypto, then you may need
-to configure OpenSSH --without-pie.
+to configure OpenSSH --without-pie.  Note that because of API changes,
+OpenSSL 1.1.x is not currently supported.
 
 The remaining items are optional.
 
@@ -84,7 +91,7 @@ http://nlnetlabs.nl/projects/ldns/
 Autoconf:
 
 If you modify configure.ac or configure doesn't exist (eg if you checked
-the code out of CVS yourself) then you will need autoconf-2.68 to rebuild
+the code out of CVS yourself) then you will need autoconf-2.69 to rebuild
 the automatically generated files by running "autoreconf".  Earlier
 versions may also work but this is not guaranteed.
 
@@ -223,9 +230,13 @@ review it to ensure that it matches your security requirements.
 To generate a host key, run "make host-key". Alternately you can do so
 manually using the following commands:
 
-    ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
-    ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
-    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
+    ssh-keygen -t [type] -f /etc/ssh/ssh_host_key -N ""
+
+for each of the types you wish to generate (rsa, dsa or ecdsa) or
+
+    ssh-keygen -A
+
+to generate keys for all supported types.
 
 Replacing /etc/ssh with the correct path to the configuration directory.
 (${prefix}/etc or whatever you specified with --sysconfdir during
@@ -256,7 +267,4 @@ summary data may be published.
 
 If you experience problems compiling, installing or running OpenSSH.
 Please refer to the "reporting bugs" section of the webpage at
-http://www.openssh.com/
-
-
-$Id: INSTALL,v 1.91 2014/09/09 02:23:11 dtucker Exp $
+https://www.openssh.com/
index 40cc7aa..5870e9e 100644 (file)
@@ -82,7 +82,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
        compat.o crc32.o deattack.o fatal.o hostfile.o \
        log.o match.o md-sha256.o moduli.o nchan.o packet.o opacket.o \
        readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \
-       atomicio.o key.o dispatch.o mac.o uidswap.o uuencode.o misc.o \
+       atomicio.o key.o dispatch.o mac.o uidswap.o uuencode.o misc.o utf8.o \
        monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \
        msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \
        ssh-pkcs11.o smult_curve25519_ref.o \
@@ -91,26 +91,26 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
        sc25519.o ge25519.o fe25519.o ed25519.o verify.o hash.o blocks.o \
        kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
        kexdhc.o kexgexc.o kexecdhc.o kexc25519c.o \
-       kexdhs.o kexgexs.o kexecdhs.o kexc25519s.o
+       kexdhs.o kexgexs.o kexecdhs.o kexc25519s.o \
+       platform-pledge.o platform-tracing.o
 
 SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
-       sshconnect.o sshconnect1.o sshconnect2.o mux.o \
-       roaming_common.o roaming_client.o
+       sshconnect.o sshconnect1.o sshconnect2.o mux.o
 
-SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
+SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o \
        audit.o audit-bsm.o audit-linux.o platform.o \
        sshpty.o sshlogin.o servconf.o serverloop.o \
-       auth.o auth1.o auth2.o auth-options.o session.o \
-       auth-chall.o auth2-chall.o groupaccess.o \
+       auth.o auth2.o auth-options.o session.o \
+       auth2-chall.o groupaccess.o \
        auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
        auth2-none.o auth2-passwd.o auth2-pubkey.o \
-       monitor_mm.o monitor.o monitor_wrap.o auth-krb5.o \
+       monitor.o monitor_wrap.o auth-krb5.o \
        auth2-gss.o gss-serv.o gss-serv-krb5.o \
        loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
        sftp-server.o sftp-common.o \
-       roaming_common.o roaming_serv.o \
        sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \
-       sandbox-seccomp-filter.o sandbox-capsicum.o
+       sandbox-seccomp-filter.o sandbox-capsicum.o sandbox-pledge.o \
+       sandbox-solaris.o
 
 MANPAGES       = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out
 MANPAGES_IN    = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5
@@ -178,14 +178,14 @@ ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o
 ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
        $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
 
-ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o
-       $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
+ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o readconf.o
+       $(LD) -o $@ ssh-keysign.o readconf.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
 
 ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o
        $(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
-ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o
-       $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
+ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o
+       $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
 
 sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o sftp-server-main.o
        $(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
@@ -223,7 +223,7 @@ umac128.o:  umac.c
        $(CC) $(CFLAGS) $(CPPFLAGS) -o umac128.o -c $(srcdir)/umac.c \
            -DUMAC_OUTPUT_LEN=16 -Dumac_new=umac128_new \
            -Dumac_update=umac128_update -Dumac_final=umac128_final \
-           -Dumac_delete=umac128_delete
+           -Dumac_delete=umac128_delete -Dumac_ctx=umac128_ctx
 
 clean: regressclean
        rm -f *.o *.a $(TARGETS) logintest config.cache config.log
@@ -236,10 +236,18 @@ clean:    regressclean
        rm -f regress/unittests/sshkey/test_sshkey
        rm -f regress/unittests/bitmap/*.o
        rm -f regress/unittests/bitmap/test_bitmap
+       rm -f regress/unittests/conversion/*.o
+       rm -f regress/unittests/conversion/test_conversion
        rm -f regress/unittests/hostkeys/*.o
        rm -f regress/unittests/hostkeys/test_hostkeys
        rm -f regress/unittests/kex/*.o
        rm -f regress/unittests/kex/test_kex
+       rm -f regress/unittests/match/*.o
+       rm -f regress/unittests/match/test_match
+       rm -f regress/unittests/utf8/*.o
+       rm -f regress/unittests/utf8/test_utf8
+       rm -f regress/misc/kexfuzz/*.o
+       rm -f regress/misc/kexfuzz/kexfuzz
        (cd openbsd-compat && $(MAKE) clean)
 
 distclean:     regressclean
@@ -256,10 +264,17 @@ distclean:        regressclean
        rm -f regress/unittests/sshkey/test_sshkey
        rm -f regress/unittests/bitmap/*.o
        rm -f regress/unittests/bitmap/test_bitmap
+       rm -f regress/unittests/conversion/*.o
+       rm -f regress/unittests/conversion/test_conversion
        rm -f regress/unittests/hostkeys/*.o
        rm -f regress/unittests/hostkeys/test_hostkeys
        rm -f regress/unittests/kex/*.o
        rm -f regress/unittests/kex/test_kex
+       rm -f regress/unittests/match/*.o
+       rm -f regress/unittests/match/test_match
+       rm -f regress/unittests/utf8/*.o
+       rm -f regress/unittests/utf8/test_utf8
+       rm -f regress/unittests/misc/kexfuzz
        (cd openbsd-compat && $(MAKE) distclean)
        if test -d pkg ; then \
                rm -fr pkg ; \
@@ -327,10 +342,6 @@ install-files:
        $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
        $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
        $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
-       -rm -f $(DESTDIR)$(bindir)/slogin
-       ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
-       -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
-       ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
 
 install-sysconf:
        if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
@@ -359,41 +370,19 @@ install-sysconf:
 
 host-key: ssh-keygen$(EXEEXT)
        @if [ -z "$(DESTDIR)" ] ; then \
-               if [ -f "$(sysconfdir)/ssh_host_key" ] ; then \
-                       echo "$(sysconfdir)/ssh_host_key already exists, skipping." ; \
-               else \
-                       ./ssh-keygen -t rsa1 -f $(sysconfdir)/ssh_host_key -N "" ; \
-               fi ; \
-               if [ -f $(sysconfdir)/ssh_host_dsa_key ] ; then \
-                       echo "$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
-               else \
-                       ./ssh-keygen -t dsa -f $(sysconfdir)/ssh_host_dsa_key -N "" ; \
-               fi ; \
-               if [ -f $(sysconfdir)/ssh_host_rsa_key ] ; then \
-                       echo "$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \
-               else \
-                       ./ssh-keygen -t rsa -f $(sysconfdir)/ssh_host_rsa_key -N "" ; \
-               fi ; \
-               if [ -f $(sysconfdir)/ssh_host_ed25519_key ] ; then \
-                       echo "$(sysconfdir)/ssh_host_ed25519_key already exists, skipping." ; \
-               else \
-                       ./ssh-keygen -t ed25519 -f $(sysconfdir)/ssh_host_ed25519_key -N "" ; \
-               fi ; \
-               if [ -z "@COMMENT_OUT_ECC@" ] ; then \
-                   if [ -f $(sysconfdir)/ssh_host_ecdsa_key ] ; then \
-                       echo "$(sysconfdir)/ssh_host_ecdsa_key already exists, skipping." ; \
-                   else \
-                       ./ssh-keygen -t ecdsa -f $(sysconfdir)/ssh_host_ecdsa_key -N "" ; \
-                   fi ; \
-               fi ; \
-       fi ;
+               ./ssh-keygen -A; \
+       fi
 
-host-key-force: ssh-keygen$(EXEEXT)
-       ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""
+host-key-force: ssh-keygen$(EXEEXT) ssh$(EXEEXT)
+       if ./ssh -Q protocol-version | grep '^1$$' >/dev/null; then \
+               ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""; \
+       fi
        ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
        ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""
        ./ssh-keygen -t ed25519 -f $(DESTDIR)$(sysconfdir)/ssh_host_ed25519_key -N ""
-       test -z "@COMMENT_OUT_ECC@" && ./ssh-keygen -t ecdsa -f $(DESTDIR)$(sysconfdir)/ssh_host_ecdsa_key -N ""
+       if ./ssh -Q key | grep ecdsa >/dev/null ; then \
+               ./ssh-keygen -t ecdsa -f $(DESTDIR)$(sysconfdir)/ssh_host_ecdsa_key -N ""; \
+       fi
 
 uninstallall:  uninstall
        -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
@@ -407,7 +396,6 @@ uninstallall:       uninstall
        -rmdir $(DESTDIR)$(libexecdir)
 
 uninstall:
-       -rm -f $(DESTDIR)$(bindir)/slogin
        -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT)
        -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT)
        -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
@@ -430,7 +418,6 @@ uninstall:
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
-       -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
 
 regress-prep:
        [ -d `pwd`/regress ] || mkdir -p `pwd`/regress
@@ -443,23 +430,37 @@ regress-prep:
                mkdir -p `pwd`/regress/unittests/sshkey
        [ -d `pwd`/regress/unittests/bitmap ] || \
                mkdir -p `pwd`/regress/unittests/bitmap
+       [ -d `pwd`/regress/unittests/conversion ] || \
+               mkdir -p `pwd`/regress/unittests/conversion
        [ -d `pwd`/regress/unittests/hostkeys ] || \
                mkdir -p `pwd`/regress/unittests/hostkeys
        [ -d `pwd`/regress/unittests/kex ] || \
                mkdir -p `pwd`/regress/unittests/kex
+       [ -d `pwd`/regress/unittests/match ] || \
+               mkdir -p `pwd`/regress/unittests/match
+       [ -d `pwd`/regress/unittests/utf8 ] || \
+               mkdir -p `pwd`/regress/unittests/utf8
+       [ -d `pwd`/regress/misc/kexfuzz ] || \
+               mkdir -p `pwd`/regress/misc/kexfuzz
        [ -f `pwd`/regress/Makefile ] || \
            ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
 
-regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c
-       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
+REGRESSLIBS=libssh.a $(LIBCOMPAT)
+
+regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c $(REGRESSLIBS)
+       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/modpipe.c \
        $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
-regress/setuid-allowed$(EXEEXT): $(srcdir)/regress/setuid-allowed.c
-       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
+regress/setuid-allowed$(EXEEXT): $(srcdir)/regress/setuid-allowed.c $(REGRESSLIBS)
+       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/setuid-allowed.c \
        $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
-regress/netcat$(EXEEXT): $(srcdir)/regress/netcat.c
-       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
+regress/netcat$(EXEEXT): $(srcdir)/regress/netcat.c $(REGRESSLIBS)
+       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/netcat.c \
+       $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
+regress/check-perm$(EXEEXT): $(srcdir)/regress/check-perm.c $(REGRESSLIBS)
+       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/check-perm.c \
        $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
 UNITTESTS_TEST_HELPER_OBJS=\
@@ -508,10 +509,19 @@ regress/unittests/bitmap/test_bitmap$(EXEEXT): ${UNITTESTS_TEST_BITMAP_OBJS} \
            regress/unittests/test_helper/libtest_helper.a \
            -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
+UNITTESTS_TEST_CONVERSION_OBJS=\
+       regress/unittests/conversion/tests.o
+
+regress/unittests/conversion/test_conversion$(EXEEXT): \
+    ${UNITTESTS_TEST_CONVERSION_OBJS} \
+    regress/unittests/test_helper/libtest_helper.a libssh.a
+       $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_CONVERSION_OBJS) \
+           regress/unittests/test_helper/libtest_helper.a \
+           -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
 UNITTESTS_TEST_KEX_OBJS=\
        regress/unittests/kex/tests.o \
-       regress/unittests/kex/test_kex.o \
-       roaming_dummy.o
+       regress/unittests/kex/test_kex.o
 
 regress/unittests/kex/test_kex$(EXEEXT): ${UNITTESTS_TEST_KEX_OBJS} \
     regress/unittests/test_helper/libtest_helper.a libssh.a
@@ -530,17 +540,48 @@ regress/unittests/hostkeys/test_hostkeys$(EXEEXT): \
            regress/unittests/test_helper/libtest_helper.a \
            -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
 
-REGRESS_BINARIES=\
-       regress/modpipe$(EXEEXT) \
+UNITTESTS_TEST_MATCH_OBJS=\
+       regress/unittests/match/tests.o
+
+regress/unittests/match/test_match$(EXEEXT): \
+    ${UNITTESTS_TEST_MATCH_OBJS} \
+    regress/unittests/test_helper/libtest_helper.a libssh.a
+       $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_MATCH_OBJS) \
+           regress/unittests/test_helper/libtest_helper.a \
+           -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
+UNITTESTS_TEST_UTF8_OBJS=\
+       regress/unittests/utf8/tests.o
+
+regress/unittests/utf8/test_utf8$(EXEEXT): \
+    ${UNITTESTS_TEST_UTF8_OBJS} \
+    regress/unittests/test_helper/libtest_helper.a libssh.a
+       $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_UTF8_OBJS) \
+           regress/unittests/test_helper/libtest_helper.a \
+           -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
+MISC_KEX_FUZZ_OBJS=\
+       regress/misc/kexfuzz/kexfuzz.o
+
+regress/misc/kexfuzz/kexfuzz$(EXEEXT): ${MISC_KEX_FUZZ_OBJS} libssh.a
+       $(LD) -o $@ $(LDFLAGS) $(MISC_KEX_FUZZ_OBJS) \
+           -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
+
+regress-binaries: regress/modpipe$(EXEEXT) \
        regress/setuid-allowed$(EXEEXT) \
        regress/netcat$(EXEEXT) \
+       regress/check-perm$(EXEEXT) \
        regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \
        regress/unittests/sshkey/test_sshkey$(EXEEXT) \
        regress/unittests/bitmap/test_bitmap$(EXEEXT) \
+       regress/unittests/conversion/test_conversion$(EXEEXT) \
        regress/unittests/hostkeys/test_hostkeys$(EXEEXT) \
-       regress/unittests/kex/test_kex$(EXEEXT)
+       regress/unittests/kex/test_kex$(EXEEXT) \
+       regress/unittests/match/test_match$(EXEEXT) \
+       regress/unittests/utf8/test_utf8$(EXEEXT) \
+       regress/misc/kexfuzz/kexfuzz$(EXEEXT)
 
-tests interop-tests t-exec: regress-prep $(TARGETS) $(REGRESS_BINARIES)
+tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS)
        BUILDDIR=`pwd`; \
        TEST_SSH_SCP="$${BUILDDIR}/scp"; \
        TEST_SSH_SSH="$${BUILDDIR}/ssh"; \
@@ -556,6 +597,7 @@ tests interop-tests t-exec: regress-prep $(TARGETS) $(REGRESS_BINARIES)
        TEST_SSH_PUTTYGEN="puttygen"; \
        TEST_SSH_CONCH="conch"; \
        TEST_SSH_IPV6="@TEST_SSH_IPV6@" ; \
+       TEST_SSH_UTF8="@TEST_SSH_UTF8@" ; \
        TEST_SSH_ECC="@TEST_SSH_ECC@" ; \
        cd $(srcdir)/regress || exit $$?; \
        $(MAKE) \
@@ -565,6 +607,7 @@ tests interop-tests t-exec: regress-prep $(TARGETS) $(REGRESS_BINARIES)
                OBJ="$${BUILDDIR}/regress/" \
                PATH="$${BUILDDIR}:$${PATH}" \
                TEST_ENV=MALLOC_OPTIONS="@TEST_MALLOC_OPTIONS@" \
+               TEST_MALLOC_OPTIONS="@TEST_MALLOC_OPTIONS@" \
                TEST_SSH_SCP="$${TEST_SSH_SCP}" \
                TEST_SSH_SSH="$${TEST_SSH_SSH}" \
                TEST_SSH_SSHD="$${TEST_SSH_SSHD}" \
@@ -579,6 +622,7 @@ tests interop-tests t-exec: regress-prep $(TARGETS) $(REGRESS_BINARIES)
                TEST_SSH_PUTTYGEN="$${TEST_SSH_PUTTYGEN}" \
                TEST_SSH_CONCH="$${TEST_SSH_CONCH}" \
                TEST_SSH_IPV6="$${TEST_SSH_IPV6}" \
+               TEST_SSH_UTF8="$${TEST_SSH_UTF8}" \
                TEST_SSH_ECC="$${TEST_SSH_ECC}" \
                TEST_SHELL="${TEST_SHELL}" \
                EXEEXT="$(EXEEXT)" \
index 131adfe..192da55 100644 (file)
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -4,7 +4,7 @@ protocol.
 Note that OpenSSH's sftp and sftp-server implement revision 3 of the SSH
 filexfer protocol described in:
 
-http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt
+https://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt
 
 Newer versions of the draft will not be supported, though some features
 are individually implemented as extensions described below.
@@ -20,7 +20,7 @@ This is a new transport-layer MAC method using the UMAC algorithm
 (rfc4418). This method is identical to the "umac-64" method documented
 in:
 
-http://www.openssh.com/txt/draft-miller-secsh-umac-01.txt
+https://www.openssh.com/txt/draft-miller-secsh-umac-01.txt
 
 1.2. transport: Protocol 2 compression algorithm "zlib@openssh.com"
 
@@ -31,7 +31,7 @@ avoids exposing compression code to attacks from unauthenticated users.
 
 The method is documented in:
 
-http://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt
+https://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt
 
 1.3. transport: New public key algorithms "ssh-rsa-cert-v00@openssh.com",
      "ssh-dsa-cert-v00@openssh.com",
@@ -247,6 +247,8 @@ to request that the server make a connection to a Unix domain socket.
        uint32          initial window size
        uint32          maximum packet size
        string          socket path
+       string          reserved
+       uint32          reserved
 
 Similar to forwarded-tcpip, forwarded-streamlocal is sent by the
 server when the client has previously send the server a streamlocal-forward
@@ -452,4 +454,4 @@ respond with a SSH_FXP_STATUS message.
 This extension is advertised in the SSH_FXP_VERSION hello with version
 "1".
 
-$OpenBSD: PROTOCOL,v 1.29 2015/07/17 03:09:19 djm Exp $
+$OpenBSD: PROTOCOL,v 1.30 2016/04/08 06:35:54 djm Exp $
index 27ec0c1..60d36f9 100644 (file)
@@ -206,6 +206,28 @@ ECDSA certificates may be added with:
        string                  key_comment
        constraint[]            key_constraints
 
+ED25519 keys may be added using the following request
+       byte                    SSH2_AGENTC_ADD_IDENTITY or
+                               SSH2_AGENTC_ADD_ID_CONSTRAINED
+       string                  "ssh-ed25519"
+       string                  ed25519_public_key
+       string                  ed25519_private_key || ed25519_public_key
+       string                  key_comment
+       constraint[]            key_constraints
+
+ED25519 certificates may be added with:
+       byte                    SSH2_AGENTC_ADD_IDENTITY or
+                               SSH2_AGENTC_ADD_ID_CONSTRAINED
+       string                  "ssh-ed25519-cert-v01@openssh.com"
+       string                  certificate
+       string                  ed25519_public_key
+       string                  ed25519_private_key || ed25519_public_key
+       string                  key_comment
+       constraint[]            key_constraints
+
+For both ssh-ed25519 and ssh-ed25519-cert-v01@openssh.com keys, the private
+key has the public key appended (for historical reasons).
+
 RSA keys may be added with this request:
 
        byte                    SSH2_AGENTC_ADD_IDENTITY or
@@ -557,4 +579,4 @@ Locking and unlocking affects both protocol 1 and protocol 2 keys.
        SSH_AGENT_CONSTRAIN_LIFETIME                    1
        SSH_AGENT_CONSTRAIN_CONFIRM                     2
 
-$OpenBSD: PROTOCOL.agent,v 1.8 2015/05/08 03:56:51 djm Exp $
+$OpenBSD: PROTOCOL.agent,v 1.11 2016/05/19 07:45:32 djm Exp $
index c985910..aa6f5ae 100644 (file)
@@ -100,9 +100,9 @@ DSA certificate
 
 ECDSA certificate
 
-    string    "ecdsa-sha2-nistp256@openssh.com" |
-              "ecdsa-sha2-nistp384@openssh.com" |
-              "ecdsa-sha2-nistp521@openssh.com"
+    string    "ecdsa-sha2-nistp256-v01@openssh.com" |
+              "ecdsa-sha2-nistp384-v01@openssh.com" |
+              "ecdsa-sha2-nistp521-v01@openssh.com"
     string    nonce
     string    curve
     string    public_key
@@ -118,6 +118,23 @@ ECDSA certificate
     string    signature key
     string    signature
 
+ED25519 certificate
+
+    string    "ssh-ed25519-cert-v01@openssh.com"
+    string    nonce
+    string    pk
+    uint64    serial
+    uint32    type
+    string    key id
+    string    valid principals
+    uint64    valid after
+    uint64    valid before
+    string    critical options
+    string    extensions
+    string    reserved
+    string    signature key
+    string    signature
+
 The nonce field is a CA-provided random bitstring of arbitrary length
 (but typically 16 or 32 bytes) included to make attacks that depend on
 inducing collisions in the signature hash infeasible.
@@ -129,6 +146,9 @@ p, q, g, y are the DSA parameters as described in FIPS-186-2.
 curve and public key are respectively the ECDSA "[identifier]" and "Q"
 defined in section 3.1 of RFC5656.
 
+pk is the encoded Ed25519 public key as defined by
+draft-josefsson-eddsa-ed25519-03.
+
 serial is an optional certificate serial number set by the CA to
 provide an abbreviated way to refer to certificates from that CA.
 If a CA does not wish to number its certificates it must set this
@@ -146,7 +166,7 @@ strings packed inside it. These principals list the names for which this
 certificate is valid; hostnames for SSH_CERT_TYPE_HOST certificates and
 usernames for SSH_CERT_TYPE_USER certificates. As a special case, a
 zero-length "valid principals" field means the certificate is valid for
-any principal of the specified type. XXX DNS wildcards?
+any principal of the specified type.
 
 "valid after" and "valid before" specify a validity period for the
 certificate. Each represents a time in seconds since 1970-01-01
@@ -183,7 +203,7 @@ signature is computed over all preceding fields from the initial string
 up to, and including the signature key. Signatures are computed and
 encoded according to the rules defined for the CA's public key algorithm
 (RFC4253 section 6.6 for ssh-rsa and ssh-dss, RFC5656 for the ECDSA
-types).
+types), and draft-josefsson-eddsa-ed25519-03 for Ed25519.
 
 Critical options
 ----------------
@@ -203,8 +223,9 @@ option-specific information (see below). All options are
 "critical", if an implementation does not recognise a option
 then the validating party should refuse to accept the certificate.
 
-The supported options and the contents and structure of their
-data fields are:
+No critical options are defined for host certificates at present. The
+supported user certificate options and the contents and structure of
+their data fields are:
 
 Name                    Format        Description
 -----------------------------------------------------------------------------
@@ -233,8 +254,9 @@ as is the requirement that each name appear only once.
 If an implementation does not recognise an extension, then it should
 ignore it.
 
-The supported extensions and the contents and structure of their data
-fields are:
+No extensions are defined for host certificates at present. The
+supported user certificate extensions and the contents and structure of
+their data fields are:
 
 Name                    Format        Description
 -----------------------------------------------------------------------------
@@ -262,4 +284,4 @@ permit-user-rc          empty         Flag indicating that execution of
                                       of this script will not be permitted if
                                       this option is not present.
 
-$OpenBSD: PROTOCOL.certkeys,v 1.9 2012/03/28 07:23:22 djm Exp $
+$OpenBSD: PROTOCOL.certkeys,v 1.10 2016/05/03 10:27:59 djm Exp $
index 9cf73a9..4857d38 100644 (file)
@@ -34,6 +34,8 @@ Detailed Construction
 The chacha20-poly1305@openssh.com cipher requires 512 bits of key
 material as output from the SSH key exchange. This forms two 256 bit
 keys (K_1 and K_2), used by two separate instances of chacha20.
+The first 256 bits consitute K_2 and the second 256 bits become
+K_1.
 
 The instance keyed by K_1 is a stream cipher that is used only
 to encrypt the 4 byte packet length field. The second instance,
@@ -101,5 +103,5 @@ References
 [3] "ChaCha20 and Poly1305 based Cipher Suites for TLS", Adam Langley
     http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-03
 
-$OpenBSD: PROTOCOL.chacha20poly1305,v 1.2 2013/12/02 02:50:27 djm Exp $
+$OpenBSD: PROTOCOL.chacha20poly1305,v 1.3 2016/05/03 13:10:24 djm Exp $
 
diff --git a/README b/README
index ea6e228..bda8525 100644 (file)
--- a/README
+++ b/README
@@ -1,10 +1,10 @@
-See http://www.openssh.com/txt/release-7.1p2 for the release notes.
+See https://www.openssh.com/releasenotes.html#7.5p1 for the release notes.
 
-Please read http://www.openssh.com/report.html for bug reporting
+Please read https://www.openssh.com/report.html for bug reporting
 instructions and note that we do not use Github for bug reporting or
 patch/pull-request management.
 
-- A Japanese translation of this document and of the OpenSSH FAQ is
+- A Japanese translation of this document and of the release notes is
 - available at http://www.unixuser.org/~haruyama/security/openssh/index.html
 - Thanks to HARUYAMA Seigo <haruyama@unixuser.org>
 
@@ -16,7 +16,7 @@ implementation with all patent-encumbered algorithms removed (to
 external libraries), all known security bugs fixed, new features
 reintroduced and many other clean-ups.  OpenSSH has been created by
 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt,
-and Dug Song. It has a homepage at http://www.openssh.com/
+and Dug Song. It has a homepage at https://www.openssh.com/
 
 This port consists of the re-introduction of autoconf support, PAM
 support, EGD[1]/PRNGD[2] support and replacements for OpenBSD library
@@ -33,17 +33,15 @@ all logins, not just when using password authentication.
 OpenSSH depends on Zlib[3], OpenSSL[4] and optionally PAM[5].
 
 There is now several mailing lists for this port of OpenSSH. Please
-refer to http://www.openssh.com/list.html for details on how to join.
+refer to https://www.openssh.com/list.html for details on how to join.
 
 Please send bug reports and patches to the mailing list
-openssh-unix-dev@mindrot.org. The list is open to posting by
-unsubscribed users.Code contribution are welcomed, but please follow the 
-OpenBSD style guidelines[6].
+openssh-unix-dev@mindrot.org. The list is open to posting by unsubscribed
+users.  Code contribution are welcomed, but please follow the OpenBSD
+style guidelines[6].
 
 Please refer to the INSTALL document for information on how to install
-OpenSSH on your system. There are a number of differences between this
-port of OpenSSH and F-Secure SSH 1.x, please refer to the OpenSSH FAQ[7]
-for details and general tips.
+OpenSSH on your system.
 
 Damien Miller <djm@mindrot.org>
 
@@ -55,15 +53,12 @@ implementation released by Tatu Ylonen.
 
 References -
 
-[0] http://www.openssh.com/faq.html
+[0] https://www.openssh.com/
 [1] http://www.lothar.com/tech/crypto/
 [2] http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html
 [3] http://www.gzip.org/zlib/
 [4] http://www.openssl.org/
 [5] http://www.openpam.org
-    http://www.kernel.org/pub/linux/libs/pam/ 
+    http://www.kernel.org/pub/linux/libs/pam/
     (PAM also is standard on Solaris and HP-UX 11)
-[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
-[7] http://www.openssh.com/faq.html
-
-$Id: README,v 1.87 2014/08/10 01:35:06 djm Exp $
+[6] http://man.openbsd.org/style.9
index d198232..c7be95f 100644 (file)
@@ -36,6 +36,9 @@ loginrestrictions() function, in particular that the user has the
 "rlogin" attribute set.  This check is not done for the root account,
 instead the PermitRootLogin setting in sshd_config is used.
 
+If you are using the IBM compiler you probably want to use CC=xlc rather
+than the default of cc.
+
 
 Cygwin
 ------
@@ -91,6 +94,3 @@ added to sshd's session stack which will prevent users from starting shell
 sessions.  Alternatively, pam_nologin can be added to either the auth or
 account stacks which will prevent authentication entirely, but will still
 return the output from pam_nologin to the client.
-
-
-$Id: README.platform,v 1.10 2009/08/28 23:14:48 dtucker Exp $
index f565e72..2120544 100644 (file)
@@ -8,10 +8,6 @@ More information is available at:
 Privilege separation is now enabled by default; see the
 UsePrivilegeSeparation option in sshd_config(5).
 
-On systems which lack mmap or anonymous (MAP_ANON) memory mapping,
-compression must be disabled in order for privilege separation to
-function.
-
 When privsep is enabled, during the pre-authentication phase sshd will
 chroot(2) to "/var/empty" and change its privileges to the "sshd" user
 and its primary group.  sshd is a pseudo-account that should not be
@@ -35,9 +31,6 @@ privsep user and chroot directory:
   --with-privsep-path=xxx Path for privilege separation chroot
   --with-privsep-user=user Specify non-privileged user for privilege separation
 
-Privsep requires operating system support for file descriptor passing.
-Compression will be disabled on systems without a working mmap MAP_ANON.
-
 PAM-enabled OpenSSH is known to function with privsep on AIX, FreeBSD, 
 HP-UX (including Trusted Mode), Linux, NetBSD and Solaris.
 
@@ -59,5 +52,3 @@ Given the following process listing (from HP-UX):
 process 1005 is the sshd process listening for new connections.
 process 6917 is the privileged monitor process, 6919 is the user owned
 sshd process and 6921 is the shell process.
-
-$Id: README.privsep,v 1.16 2005/06/04 23:21:41 djm Exp $
index 0676284..a5d8c6a 100644 (file)
@@ -1,4 +1,4 @@
 URL: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.1p2.tar.gz
-Version: 7.1p2
+Version: 7.5p1
 BugComponent: 180238
 Owners: ghartman, cloud-android-devs
diff --git a/TODO b/TODO
index e8aaa4b..f22c7e2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -69,10 +69,6 @@ Packaging:
   (gilbert.r.loomis@saic.com)
 
 PrivSep Issues:
-- mmap() issues.
-  + /dev/zero solution (Solaris)
-  + No/broken MAP_ANON (Irix)
-  + broken /dev/zero parse (Linux)
 - PAM
   + See above PAM notes
 - AIX
@@ -82,5 +78,3 @@ PrivSep Issues:
   + SIA is broken
 - Cygwin
   + Privsep for Pre-auth only (no fd passing)
-
-$Id: TODO,v 1.58 2004/12/06 11:40:11 dtucker Exp $
index 1640683..ac6b668 100644 (file)
@@ -1,5 +1,3 @@
-dnl $Id: aclocal.m4,v 1.13 2014/01/22 10:30:12 djm Exp $
-dnl
 dnl OpenSSH-specific autoconf macros
 dnl
 
@@ -59,7 +57,8 @@ int main(int argc, char **argv) {
        float l = i * 2.1;
        double m = l / 0.5;
        long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       long long int p = n * o;
+       printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
        exit(0);
 }
        ]])],
@@ -96,7 +95,8 @@ int main(int argc, char **argv) {
        float l = i * 2.1;
        double m = l / 0.5;
        long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       long long p = n * o;
+       printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
        exit(0);
 }
                ]])],
index 70b050e..8658e10 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: addrmatch.c,v 1.10 2015/07/08 19:04:21 markus Exp $ */
+/*     $OpenBSD: addrmatch.c,v 1.13 2016/09/21 16:55:42 djm Exp $ */
 
 /*
  * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -398,8 +398,8 @@ addr_match_list(const char *addr, const char *_list)
                /* Prefer CIDR address matching */
                r = addr_pton_cidr(cp, &match_addr, &masklen);
                if (r == -2) {
-                       error("Inconsistent mask length for "
-                           "network \"%.100s\"", cp);
+                       debug2("%s: inconsistent mask length for "
+                           "match network \"%.100s\"", __func__, cp);
                        ret = -2;
                        break;
                } else if (r == 0) {
index b1ec234..f854a06 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomicio.c,v 1.27 2015/01/16 06:40:12 deraadt Exp $ */
+/* $OpenBSD: atomicio.c,v 1.28 2016/07/27 23:18:12 djm Exp $ */
 /*
  * Copyright (c) 2006 Damien Miller. All rights reserved.
  * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved.
@@ -107,12 +107,12 @@ atomiciov6(ssize_t (*f) (int, const struct iovec *, int), int fd,
        struct iovec iov_array[IOV_MAX], *iov = iov_array;
        struct pollfd pfd;
 
-       if (iovcnt > IOV_MAX) {
+       if (iovcnt < 0 || iovcnt > IOV_MAX) {
                errno = EINVAL;
                return 0;
        }
        /* Make a copy of the iov array because we may modify it below */
-       memcpy(iov, _iov, iovcnt * sizeof(*_iov));
+       memcpy(iov, _iov, (size_t)iovcnt * sizeof(*_iov));
 
 #ifndef BROKEN_READV_COMPARISON
        pfd.fd = fd;
index 6135591..f8e0bea 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: audit-bsm.c,v 1.8 2012/02/23 23:40:43 dtucker Exp $ */
-
 /*
  * TODO
  *
index b3ee2f4..136ed76 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: audit-linux.c,v 1.1 2011/01/17 10:15:30 dtucker Exp $ */
-
 /*
  * Copyright 2010 Red Hat, Inc.  All rights reserved.
  * Use is subject to license terms.
 #include "log.h"
 #include "audit.h"
 #include "canohost.h"
+#include "packet.h"
 
-const charaudit_username(void);
+const char *audit_username(void);
 
 int
-linux_audit_record_event(int uid, const char *username,
-    const char *hostname, const char *ip, const char *ttyn, int success)
+linux_audit_record_event(int uid, const char *username, const char *hostname,
+    const char *ip, const char *ttyn, int success)
 {
        int audit_fd, rc, saved_errno;
 
-       audit_fd = audit_open();
-       if (audit_fd < 0) {
+       if ((audit_fd = audit_open()) < 0) {
                if (errno == EINVAL || errno == EPROTONOSUPPORT ||
                    errno == EAFNOSUPPORT)
                        return 1; /* No audit support in kernel */
@@ -58,6 +56,7 @@ linux_audit_record_event(int uid, const char *username,
            username == NULL ? uid : -1, hostname, ip, ttyn, success);
        saved_errno = errno;
        close(audit_fd);
+
        /*
         * Do not report error if the error is EPERM and sshd is run as non
         * root user.
@@ -65,7 +64,8 @@ linux_audit_record_event(int uid, const char *username,
        if ((rc == -EPERM) && (geteuid() != 0))
                rc = 0;
        errno = saved_errno;
-       return (rc >= 0);
+
+       return rc >= 0;
 }
 
 /* Below is the sshd audit API code */
@@ -73,8 +73,8 @@ linux_audit_record_event(int uid, const char *username,
 void
 audit_connection_from(const char *host, int port)
 {
-}
        /* not implemented */
+}
 
 void
 audit_run_command(const char *command)
@@ -85,8 +85,8 @@ audit_run_command(const char *command)
 void
 audit_session_open(struct logininfo *li)
 {
-       if (linux_audit_record_event(li->uid, NULL, li->hostname,
-           NULL, li->line, 1) == 0)
+       if (linux_audit_record_event(li->uid, NULL, li->hostname, NULL,
+           li->line, 1) == 0)
                fatal("linux_audit_write_entry failed: %s", strerror(errno));
 }
 
@@ -99,6 +99,8 @@ audit_session_close(struct logininfo *li)
 void
 audit_event(ssh_audit_event_t event)
 {
+       struct ssh *ssh = active_state; /* XXX */
+
        switch(event) {
        case SSH_AUTH_SUCCESS:
        case SSH_CONNECTION_CLOSE:
@@ -106,7 +108,6 @@ audit_event(ssh_audit_event_t event)
        case SSH_LOGIN_EXCEED_MAXTRIES:
        case SSH_LOGIN_ROOT_DENIED:
                break;
-
        case SSH_AUTH_FAIL_NONE:
        case SSH_AUTH_FAIL_PASSWD:
        case SSH_AUTH_FAIL_KBDINT:
@@ -115,12 +116,11 @@ audit_event(ssh_audit_event_t event)
        case SSH_AUTH_FAIL_GSSAPI:
        case SSH_INVALID_USER:
                linux_audit_record_event(-1, audit_username(), NULL,
-                       get_remote_ipaddr(), "sshd", 0);
+                   ssh_remote_ipaddr(ssh), "sshd", 0);
                break;
-
        default:
                debug("%s: unhandled event %d", __func__, event);
+               break;
        }
 }
-
 #endif /* USE_LINUX_AUDIT */
diff --git a/audit.c b/audit.c
index ced57fa..7645c14 100644 (file)
--- a/audit.c
+++ b/audit.c
@@ -1,5 +1,3 @@
-/* $Id: audit.c,v 1.6 2011/01/17 10:15:30 dtucker Exp $ */
-
 /*
  * Copyright (c) 2004, 2005 Darren Tucker.  All rights reserved.
  *
diff --git a/audit.h b/audit.h
index 92ede5b..0b59366 100644 (file)
--- a/audit.h
+++ b/audit.h
@@ -1,5 +1,3 @@
-/* $Id: audit.h,v 1.4 2011/01/17 10:15:30 dtucker Exp $ */
-
 /*
  * Copyright (c) 2004, 2005 Darren Tucker.  All rights reserved.
  *
index 37ff893..e00718f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-bsdauth.c,v 1.13 2014/06/24 01:13:21 djm Exp $ */
+/* $OpenBSD: auth-bsdauth.c,v 1.14 2015/10/20 23:24:25 mmcc Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -103,7 +103,7 @@ bsdauth_respond(void *ctx, u_int numresponses, char **responses)
        if (!authctxt->valid)
                return -1;
 
-       if (authctxt->as == 0)
+       if (authctxt->as == NULL)
                error("bsdauth_respond: no bsd auth session");
 
        if (numresponses != 1)
diff --git a/auth-chall.c b/auth-chall.c
deleted file mode 100644 (file)
index 60c9f14..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/* $OpenBSD: auth-chall.c,v 1.14 2014/06/24 01:13:21 djm Exp $ */
-/*
- * Copyright (c) 2001 Markus Friedl.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "includes.h"
-
-#include <sys/types.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "xmalloc.h"
-#include "key.h"
-#include "hostfile.h"
-#include "auth.h"
-#include "log.h"
-#include "misc.h"
-#include "servconf.h"
-
-/* limited protocol v1 interface to kbd-interactive authentication */
-
-extern KbdintDevice *devices[];
-static KbdintDevice *device;
-extern ServerOptions options;
-
-char *
-get_challenge(Authctxt *authctxt)
-{
-       char *challenge, *name, *info, **prompts;
-       u_int i, numprompts;
-       u_int *echo_on;
-
-#ifdef USE_PAM
-       if (!options.use_pam)
-               remove_kbdint_device("pam");
-#endif
-
-       device = devices[0]; /* we always use the 1st device for protocol 1 */
-       if (device == NULL)
-               return NULL;
-       if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL)
-               return NULL;
-       if (device->query(authctxt->kbdintctxt, &name, &info,
-           &numprompts, &prompts, &echo_on)) {
-               device->free_ctx(authctxt->kbdintctxt);
-               authctxt->kbdintctxt = NULL;
-               return NULL;
-       }
-       if (numprompts < 1)
-               fatal("get_challenge: numprompts < 1");
-       challenge = xstrdup(prompts[0]);
-       for (i = 0; i < numprompts; i++)
-               free(prompts[i]);
-       free(prompts);
-       free(name);
-       free(echo_on);
-       free(info);
-
-       return (challenge);
-}
-int
-verify_response(Authctxt *authctxt, const char *response)
-{
-       char *resp[1], *name, *info, **prompts;
-       u_int i, numprompts, *echo_on;
-       int authenticated = 0;
-
-       if (device == NULL)
-               return 0;
-       if (authctxt->kbdintctxt == NULL)
-               return 0;
-       resp[0] = (char *)response;
-       switch (device->respond(authctxt->kbdintctxt, 1, resp)) {
-       case 0: /* Success */
-               authenticated = 1;
-               break;
-       case 1: /* Postponed - retry with empty query for PAM */
-               if ((device->query(authctxt->kbdintctxt, &name, &info,
-                   &numprompts, &prompts, &echo_on)) != 0)
-                       break;
-               if (numprompts == 0 &&
-                   device->respond(authctxt->kbdintctxt, 0, resp) == 0)
-                       authenticated = 1;
-
-               for (i = 0; i < numprompts; i++)
-                       free(prompts[i]);
-               free(prompts);
-               free(name);
-               free(echo_on);
-               free(info);
-               break;
-       }
-       device->free_ctx(authctxt->kbdintctxt);
-       authctxt->kbdintctxt = NULL;
-       return authenticated;
-}
-void
-abandon_challenge_response(Authctxt *authctxt)
-{
-       if (authctxt->kbdintctxt != NULL) {
-               device->free_ctx(authctxt->kbdintctxt);
-               authctxt->kbdintctxt = NULL;
-       }
-}
index 0089b18..a5a81ed 100644 (file)
@@ -1,8 +1,8 @@
-/* $OpenBSD: auth-krb5.c,v 1.20 2013/07/20 01:55:13 djm Exp $ */
+/* $OpenBSD: auth-krb5.c,v 1.22 2016/05/04 14:22:33 markus Exp $ */
 /*
  *    Kerberos v5 authentication and ticket-passing routines.
  *
- * $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $
+ * From: FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar
  */
 /*
  * Copyright (c) 2002 Daniel Kouril.  All rights reserved.
@@ -36,7 +36,6 @@
 
 #include "xmalloc.h"
 #include "ssh.h"
-#include "ssh1.h"
 #include "packet.h"
 #include "log.h"
 #include "buffer.h"
index e387697..57b49f7 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-options.c,v 1.68 2015/07/03 03:43:18 djm Exp $ */
+/* $OpenBSD: auth-options.c,v 1.72 2016/11/30 02:57:40 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -29,6 +29,7 @@
 #include "ssherr.h"
 #include "log.h"
 #include "canohost.h"
+#include "packet.h"
 #include "sshbuf.h"
 #include "misc.h"
 #include "channels.h"
@@ -75,27 +76,54 @@ auth_clear_options(void)
                free(ce->s);
                free(ce);
        }
-       if (forced_command) {
-               free(forced_command);
-               forced_command = NULL;
-       }
-       if (authorized_principals) {
-               free(authorized_principals);
-               authorized_principals = NULL;
-       }
+       free(forced_command);
+       forced_command = NULL;
+       free(authorized_principals);
+       authorized_principals = NULL;
        forced_tun_device = -1;
        channel_clear_permitted_opens();
 }
 
 /*
+ * Match flag 'opt' in *optsp, and if allow_negate is set then also match
+ * 'no-opt'. Returns -1 if option not matched, 1 if option matches or 0
+ * if negated option matches. 
+ * If the option or negated option matches, then *optsp is updated to
+ * point to the first character after the option and, if 'msg' is not NULL
+ * then a message based on it added via auth_debug_add().
+ */
+static int
+match_flag(const char *opt, int allow_negate, char **optsp, const char *msg)
+{
+       size_t opt_len = strlen(opt);
+       char *opts = *optsp;
+       int negate = 0;
+
+       if (allow_negate && strncasecmp(opts, "no-", 3) == 0) {
+               opts += 3;
+               negate = 1;
+       }
+       if (strncasecmp(opts, opt, opt_len) == 0) {
+               *optsp = opts + opt_len;
+               if (msg != NULL) {
+                       auth_debug_add("%s %s.", msg,
+                           negate ? "disabled" : "enabled");
+               }
+               return negate ? 0 : 1;
+       }
+       return -1;
+}
+
+/*
  * return 1 if access is granted, 0 if not.
  * side effect: sets key option flags
  */
 int
 auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
 {
+       struct ssh *ssh = active_state;         /* XXX */
        const char *cp;
-       int i;
+       int i, r;
 
        /* reset options */
        auth_clear_options();
@@ -104,52 +132,48 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                return 1;
 
        while (*opts && *opts != ' ' && *opts != '\t') {
-               cp = "cert-authority";
-               if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       key_is_cert_authority = 1;
-                       opts += strlen(cp);
+               if ((r = match_flag("cert-authority", 0, &opts, NULL)) != -1) {
+                       key_is_cert_authority = r;
                        goto next_option;
                }
-               cp = "no-port-forwarding";
-               if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       auth_debug_add("Port forwarding disabled.");
+               if ((r = match_flag("restrict", 0, &opts, NULL)) != -1) {
+                       auth_debug_add("Key is restricted.");
                        no_port_forwarding_flag = 1;
-                       opts += strlen(cp);
+                       no_agent_forwarding_flag = 1;
+                       no_x11_forwarding_flag = 1;
+                       no_pty_flag = 1;
+                       no_user_rc = 1;
                        goto next_option;
                }
-               cp = "no-agent-forwarding";
-               if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       auth_debug_add("Agent forwarding disabled.");
-                       no_agent_forwarding_flag = 1;
-                       opts += strlen(cp);
+               if ((r = match_flag("port-forwarding", 1, &opts,
+                   "Port forwarding")) != -1) {
+                       no_port_forwarding_flag = r != 1;
                        goto next_option;
                }
-               cp = "no-X11-forwarding";
-               if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       auth_debug_add("X11 forwarding disabled.");
-                       no_x11_forwarding_flag = 1;
-                       opts += strlen(cp);
+               if ((r = match_flag("agent-forwarding", 1, &opts,
+                   "Agent forwarding")) != -1) {
+                       no_agent_forwarding_flag = r != 1;
                        goto next_option;
                }
-               cp = "no-pty";
-               if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       auth_debug_add("Pty allocation disabled.");
-                       no_pty_flag = 1;
-                       opts += strlen(cp);
+               if ((r = match_flag("x11-forwarding", 1, &opts,
+                   "X11 forwarding")) != -1) {
+                       no_x11_forwarding_flag = r != 1;
                        goto next_option;
                }
-               cp = "no-user-rc";
-               if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       auth_debug_add("User rc file execution disabled.");
-                       no_user_rc = 1;
-                       opts += strlen(cp);
+               if ((r = match_flag("pty", 1, &opts,
+                   "PTY allocation")) != -1) {
+                       no_pty_flag = r != 1;
+                       goto next_option;
+               }
+               if ((r = match_flag("user-rc", 1, &opts,
+                   "User rc execution")) != -1) {
+                       no_user_rc = r != 1;
                        goto next_option;
                }
                cp = "command=\"";
                if (strncasecmp(opts, cp, strlen(cp)) == 0) {
                        opts += strlen(cp);
-                       if (forced_command != NULL)
-                               free(forced_command);
+                       free(forced_command);
                        forced_command = xmalloc(strlen(opts) + 1);
                        i = 0;
                        while (*opts) {
@@ -179,8 +203,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                cp = "principals=\"";
                if (strncasecmp(opts, cp, strlen(cp)) == 0) {
                        opts += strlen(cp);
-                       if (authorized_principals != NULL)
-                               free(authorized_principals);
+                       free(authorized_principals);
                        authorized_principals = xmalloc(strlen(opts) + 1);
                        i = 0;
                        while (*opts) {
@@ -252,9 +275,9 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                }
                cp = "from=\"";
                if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       const char *remote_ip = get_remote_ipaddr();
-                       const char *remote_host = get_canonical_hostname(
-                           options.use_dns);
+                       const char *remote_ip = ssh_remote_ipaddr(ssh);
+                       const char *remote_host = auth_get_canonical_hostname(
+                           ssh, options.use_dns);
                        char *patterns = xmalloc(strlen(opts) + 1);
 
                        opts += strlen(cp);
@@ -436,6 +459,7 @@ parse_option_list(struct sshbuf *oblob, struct passwd *pw,
     char **cert_forced_command,
     int *cert_source_address_done)
 {
+       struct ssh *ssh = active_state;         /* XXX */
        char *command, *allowed;
        const char *remote_ip;
        char *name = NULL;
@@ -509,7 +533,7 @@ parse_option_list(struct sshbuf *oblob, struct passwd *pw,
                                        free(allowed);
                                        goto out;
                                }
-                               remote_ip = get_remote_ipaddr();
+                               remote_ip = ssh_remote_ipaddr(ssh);
                                result = addr_match_cidr_list(remote_ip,
                                    allowed);
                                free(allowed);
@@ -566,8 +590,7 @@ parse_option_list(struct sshbuf *oblob, struct passwd *pw,
                free(*cert_forced_command);
                *cert_forced_command = NULL;
        }
-       if (name != NULL)
-               free(name);
+       free(name);
        sshbuf_free(data);
        sshbuf_free(c);
        return ret;
@@ -578,7 +601,7 @@ parse_option_list(struct sshbuf *oblob, struct passwd *pw,
  * options so this must be called after auth_parse_options().
  */
 int
-auth_cert_options(struct sshkey *k, struct passwd *pw)
+auth_cert_options(struct sshkey *k, struct passwd *pw, const char **reason)
 {
        int cert_no_port_forwarding_flag = 1;
        int cert_no_agent_forwarding_flag = 1;
@@ -588,6 +611,8 @@ auth_cert_options(struct sshkey *k, struct passwd *pw)
        char *cert_forced_command = NULL;
        int cert_source_address_done = 0;
 
+       *reason = "invalid certificate options";
+
        /* Separate options and extensions for v01 certs */
        if (parse_option_list(k->cert->critical, pw,
            OPTIONS_CRITICAL, 1, NULL, NULL, NULL, NULL, NULL,
@@ -609,12 +634,24 @@ auth_cert_options(struct sshkey *k, struct passwd *pw)
        no_x11_forwarding_flag |= cert_no_x11_forwarding_flag;
        no_pty_flag |= cert_no_pty_flag;
        no_user_rc |= cert_no_user_rc;
-       /* CA-specified forced command supersedes key option */
-       if (cert_forced_command != NULL) {
-               if (forced_command != NULL)
+       /*
+        * Only permit both CA and key option forced-command if they match.
+        * Otherwise refuse the certificate.
+        */
+       if (cert_forced_command != NULL && forced_command != NULL) {
+               if (strcmp(forced_command, cert_forced_command) == 0) {
                        free(forced_command);
+                       forced_command = cert_forced_command;
+               } else {
+                       *reason = "certificate and key options forced command "
+                           "do not match";
+                       free(cert_forced_command);
+                       return -1;
+               }
+       } else if (cert_forced_command != NULL)
                forced_command = cert_forced_command;
-       }
+       /* success */
+       *reason = NULL;
        return 0;
 }
 
index 34852e5..52cbb42 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-options.h,v 1.21 2015/01/14 10:30:34 markus Exp $ */
+/* $OpenBSD: auth-options.h,v 1.22 2016/11/30 02:57:40 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -35,6 +35,6 @@ extern char *authorized_principals;
 
 int    auth_parse_options(struct passwd *, char *, char *, u_long);
 void   auth_clear_options(void);
-int    auth_cert_options(struct sshkey *, struct passwd *);
+int    auth_cert_options(struct sshkey *, struct passwd *, const char **);
 
 #endif
index d94c828..bc8e5e0 100644 (file)
@@ -45,7 +45,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
+/* Based on FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des */
+
 #include "includes.h"
 
 #include <sys/types.h>
 #include <pam/pam_appl.h>
 #endif
 
+#if !defined(SSHD_PAM_SERVICE)
+extern char *__progname;
+# define SSHD_PAM_SERVICE              __progname
+#endif
+
 /* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */
 #ifdef PAM_SUN_CODEBASE
-# define sshpam_const          /* Solaris, HP-UX, AIX */
+# define sshpam_const          /* Solaris, HP-UX, SunOS */
 #else
-# define sshpam_const  const   /* LinuxPAM, OpenPAM */
+# define sshpam_const  const   /* LinuxPAM, OpenPAM, AIX */
 #endif
 
 /* Ambiguity in spec: is it an array of pointers or a pointer to an array? */
@@ -153,9 +159,12 @@ sshpam_sigchld_handler(int sig)
            <= 0) {
                /* PAM thread has not exitted, privsep slave must have */
                kill(cleanup_ctxt->pam_thread, SIGTERM);
-               if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0)
-                   <= 0)
-                       return; /* could not wait */
+               while (waitpid(cleanup_ctxt->pam_thread,
+                   &sshpam_thread_status, 0) == -1) {
+                       if (errno == EINTR)
+                               continue;
+                       return;
+               }
        }
        if (WIFSIGNALED(sshpam_thread_status) &&
            WTERMSIG(sshpam_thread_status) == SIGTERM)
@@ -216,7 +225,11 @@ pthread_join(sp_pthread_t thread, void **value)
        if (sshpam_thread_status != -1)
                return (sshpam_thread_status);
        signal(SIGCHLD, sshpam_oldsig);
-       waitpid(thread, &status, 0);
+       while (waitpid(thread, &status, 0) == -1) {
+               if (errno == EINTR)
+                       continue;
+               fatal("%s: waitpid: %s", __func__, strerror(errno));
+       }
        return (status);
 }
 #endif
@@ -228,10 +241,10 @@ static int sshpam_authenticated = 0;
 static int sshpam_session_open = 0;
 static int sshpam_cred_established = 0;
 static int sshpam_account_status = -1;
+static int sshpam_maxtries_reached = 0;
 static char **sshpam_env = NULL;
 static Authctxt *sshpam_authctxt = NULL;
 static const char *sshpam_password = NULL;
-static char badpw[] = "\b\n\r\177INCORRECT";
 
 /* Some PAM implementations don't implement this */
 #ifndef HAVE_PAM_GETENVLIST
@@ -364,17 +377,6 @@ sshpam_thread_conv(int n, sshpam_const struct pam_message **msg,
        for (i = 0; i < n; ++i) {
                switch (PAM_MSG_MEMBER(msg, i, msg_style)) {
                case PAM_PROMPT_ECHO_OFF:
-                       buffer_put_cstring(&buffer,
-                           PAM_MSG_MEMBER(msg, i, msg));
-                       if (ssh_msg_send(ctxt->pam_csock,
-                           PAM_MSG_MEMBER(msg, i, msg_style), &buffer) == -1)
-                               goto fail;
-                       if (ssh_msg_recv(ctxt->pam_csock, &buffer) == -1)
-                               goto fail;
-                       if (buffer_get_char(&buffer) != PAM_AUTHTOK)
-                               goto fail;
-                       reply[i].resp = buffer_get_string(&buffer, NULL);
-                       break;
                case PAM_PROMPT_ECHO_ON:
                        buffer_put_cstring(&buffer,
                            PAM_MSG_MEMBER(msg, i, msg));
@@ -388,12 +390,6 @@ sshpam_thread_conv(int n, sshpam_const struct pam_message **msg,
                        reply[i].resp = buffer_get_string(&buffer, NULL);
                        break;
                case PAM_ERROR_MSG:
-                       buffer_put_cstring(&buffer,
-                           PAM_MSG_MEMBER(msg, i, msg));
-                       if (ssh_msg_send(ctxt->pam_csock,
-                           PAM_MSG_MEMBER(msg, i, msg_style), &buffer) == -1)
-                               goto fail;
-                       break;
                case PAM_TEXT_INFO:
                        buffer_put_cstring(&buffer,
                            PAM_MSG_MEMBER(msg, i, msg));
@@ -467,6 +463,8 @@ sshpam_thread(void *ctxtp)
        if (sshpam_err != PAM_SUCCESS)
                goto auth_fail;
        sshpam_err = pam_authenticate(sshpam_handle, flags);
+       if (sshpam_err == PAM_MAXTRIES)
+               sshpam_set_maxtries_reached(1);
        if (sshpam_err != PAM_SUCCESS)
                goto auth_fail;
 
@@ -518,6 +516,8 @@ sshpam_thread(void *ctxtp)
        /* XXX - can't do much about an error here */
        if (sshpam_err == PAM_ACCT_EXPIRED)
                ssh_msg_send(ctxt->pam_csock, PAM_ACCT_EXPIRED, &buffer);
+       else if (sshpam_maxtries_reached)
+               ssh_msg_send(ctxt->pam_csock, PAM_MAXTRIES, &buffer);
        else
                ssh_msg_send(ctxt->pam_csock, PAM_AUTH_ERR, &buffer);
        buffer_free(&buffer);
@@ -620,9 +620,9 @@ sshpam_cleanup(void)
 static int
 sshpam_init(Authctxt *authctxt)
 {
-       extern char *__progname;
        const char *pam_rhost, *pam_user, *user = authctxt->user;
        const char **ptr_pam_user = &pam_user;
+       struct ssh *ssh = active_state; /* XXX */
 
        if (sshpam_handle != NULL) {
                /* We already have a PAM context; check if the user matches */
@@ -643,7 +643,7 @@ sshpam_init(Authctxt *authctxt)
                sshpam_handle = NULL;
                return (-1);
        }
-       pam_rhost = get_remote_name_or_ip(utmp_len, options.use_dns);
+       pam_rhost = auth_get_canonical_hostname(ssh, options.use_dns);
        debug("PAM: setting PAM_RHOST to \"%s\"", pam_rhost);
        sshpam_err = pam_set_item(sshpam_handle, PAM_RHOST, pam_rhost);
        if (sshpam_err != PAM_SUCCESS) {
@@ -714,6 +714,7 @@ static int
 sshpam_query(void *ctx, char **name, char **info,
     u_int *num, char ***prompts, u_int **echo_on)
 {
+       struct ssh *ssh = active_state; /* XXX */
        Buffer buffer;
        struct pam_ctxt *ctxt = ctx;
        size_t plen;
@@ -756,7 +757,11 @@ sshpam_query(void *ctx, char **name, char **info,
                        free(msg);
                        break;
                case PAM_ACCT_EXPIRED:
-                       sshpam_account_status = 0;
+               case PAM_MAXTRIES:
+                       if (type == PAM_ACCT_EXPIRED)
+                               sshpam_account_status = 0;
+                       if (type == PAM_MAXTRIES)
+                               sshpam_set_maxtries_reached(1);
                        /* FALLTHROUGH */
                case PAM_AUTH_ERR:
                        debug3("PAM: %s", pam_strerror(sshpam_handle, type));
@@ -796,7 +801,7 @@ sshpam_query(void *ctx, char **name, char **info,
                        error("PAM: %s for %s%.100s from %.100s", msg,
                            sshpam_authctxt->valid ? "" : "illegal user ",
                            sshpam_authctxt->user,
-                           get_remote_name_or_ip(utmp_len, options.use_dns));
+                           auth_get_canonical_hostname(ssh, options.use_dns));
                        /* FALLTHROUGH */
                default:
                        *num = 0;
@@ -809,12 +814,37 @@ sshpam_query(void *ctx, char **name, char **info,
        return (-1);
 }
 
+/*
+ * Returns a junk password of identical length to that the user supplied.
+ * Used to mitigate timing attacks against crypt(3)/PAM stacks that
+ * vary processing time in proportion to password length.
+ */
+static char *
+fake_password(const char *wire_password)
+{
+       const char junk[] = "\b\n\r\177INCORRECT";
+       char *ret = NULL;
+       size_t i, l = wire_password != NULL ? strlen(wire_password) : 0;
+
+       if (l >= INT_MAX)
+               fatal("%s: password length too long: %zu", __func__, l);
+
+       ret = malloc(l + 1);
+       if (ret == NULL)
+               return NULL;
+       for (i = 0; i < l; i++)
+               ret[i] = junk[i % (sizeof(junk) - 1)];
+       ret[i] = '\0';
+       return ret;
+}
+
 /* XXX - see also comment in auth-chall.c:verify_response */
 static int
 sshpam_respond(void *ctx, u_int num, char **resp)
 {
        Buffer buffer;
        struct pam_ctxt *ctxt = ctx;
+       char *fake;
 
        debug2("PAM: %s entering, %u responses", __func__, num);
        switch (ctxt->pam_done) {
@@ -835,8 +865,11 @@ sshpam_respond(void *ctx, u_int num, char **resp)
            (sshpam_authctxt->pw->pw_uid != 0 ||
            options.permit_root_login == PERMIT_YES))
                buffer_put_cstring(&buffer, *resp);
-       else
-               buffer_put_cstring(&buffer, badpw);
+       else {
+               fake = fake_password(*resp);
+               buffer_put_cstring(&buffer, fake);
+               free(fake);
+       }
        if (ssh_msg_send(ctxt->pam_psock, PAM_AUTHTOK, &buffer) == -1) {
                buffer_free(&buffer);
                return (-1);
@@ -920,18 +953,6 @@ do_pam_account(void)
 }
 
 void
-do_pam_set_tty(const char *tty)
-{
-       if (tty != NULL) {
-               debug("PAM: setting PAM_TTY to \"%s\"", tty);
-               sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty);
-               if (sshpam_err != PAM_SUCCESS)
-                       fatal("PAM: failed to set PAM_TTY: %s",
-                           pam_strerror(sshpam_handle, sshpam_err));
-       }
-}
-
-void
 do_pam_setcred(int init)
 {
        sshpam_err = pam_set_item(sshpam_handle, PAM_CONV,
@@ -1180,6 +1201,7 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password)
 {
        int flags = (options.permit_empty_passwd == 0 ?
            PAM_DISALLOW_NULL_AUTHTOK : 0);
+       char *fake = NULL;
 
        if (!options.use_pam || sshpam_handle == NULL)
                fatal("PAM: %s called when PAM disabled or failed to "
@@ -1195,7 +1217,7 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password)
         */
        if (!authctxt->valid || (authctxt->pw->pw_uid == 0 &&
            options.permit_root_login != PERMIT_YES))
-               sshpam_password = badpw;
+               sshpam_password = fake = fake_password(password);
 
        sshpam_err = pam_set_item(sshpam_handle, PAM_CONV,
            (const void *)&passwd_conv);
@@ -1205,6 +1227,9 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password)
 
        sshpam_err = pam_authenticate(sshpam_handle, flags);
        sshpam_password = NULL;
+       free(fake);
+       if (sshpam_err == PAM_MAXTRIES)
+               sshpam_set_maxtries_reached(1);
        if (sshpam_err == PAM_SUCCESS && authctxt->valid) {
                debug("PAM: password authentication accepted for %.100s",
                    authctxt->user);
@@ -1216,4 +1241,21 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password)
                return 0;
        }
 }
+
+int
+sshpam_get_maxtries_reached(void)
+{
+       return sshpam_maxtries_reached;
+}
+
+void
+sshpam_set_maxtries_reached(int reached)
+{
+       if (reached == 0 || sshpam_maxtries_reached)
+               return;
+       sshpam_maxtries_reached = 1;
+       options.password_authentication = 0;
+       options.kbd_interactive_authentication = 0;
+       options.challenge_response_authentication = 0;
+}
 #endif /* USE_PAM */
index a1a2b52..c47b442 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: auth-pam.h,v 1.27 2004/09/11 12:17:26 dtucker Exp $ */
-
 /*
  * Copyright (c) 2000 Damien Miller.  All rights reserved.
  *
 #include "includes.h"
 #ifdef USE_PAM
 
-#if !defined(SSHD_PAM_SERVICE)
-# define SSHD_PAM_SERVICE              __progname
-#endif
-
 void start_pam(Authctxt *);
 void finish_pam(void);
 u_int do_pam_account(void);
 void do_pam_session(void);
-void do_pam_set_tty(const char *);
 void do_pam_setcred(int );
 void do_pam_chauthtok(void);
 int do_pam_putenv(char *, char *);
@@ -45,6 +38,8 @@ void free_pam_environment(char **);
 void sshpam_thread_cleanup(void);
 void sshpam_cleanup(void);
 int sshpam_auth_passwd(Authctxt *, const char *);
+int sshpam_get_maxtries_reached(void);
+void sshpam_set_maxtries_reached(int);
 int is_pam_session_open(void);
 
 #endif /* USE_PAM */
index 63ccf3c..996c2cf 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-passwd.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */
+/* $OpenBSD: auth-passwd.c,v 1.45 2016/07/21 01:39:35 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -66,6 +66,8 @@ extern login_cap_t *lc;
 #define DAY            (24L * 60 * 60) /* 1 day in seconds */
 #define TWO_WEEKS      (2L * 7 * DAY)  /* 2 weeks in seconds */
 
+#define MAX_PASSWORD_LEN       1024
+
 void
 disable_forwarding(void)
 {
@@ -87,6 +89,9 @@ auth_password(Authctxt *authctxt, const char *password)
        static int expire_checked = 0;
 #endif
 
+       if (strlen(password) > MAX_PASSWORD_LEN)
+               return 0;
+
 #ifndef HAVE_CYGWIN
        if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
                ok = 0;
@@ -193,7 +198,7 @@ int
 sys_auth_passwd(Authctxt *authctxt, const char *password)
 {
        struct passwd *pw = authctxt->pw;
-       char *encrypted_password;
+       char *encrypted_password, *salt = NULL;
 
        /* Just use the supplied fake password if authctxt is invalid */
        char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd;
@@ -202,9 +207,13 @@ sys_auth_passwd(Authctxt *authctxt, const char *password)
        if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0)
                return (1);
 
-       /* Encrypt the candidate password using the proper salt. */
-       encrypted_password = xcrypt(password,
-           (pw_password[0] && pw_password[1]) ? pw_password : "xx");
+       /*
+        * Encrypt the candidate password using the proper salt, or pass a
+        * NULL and let xcrypt pick one.
+        */
+       if (authctxt->valid && pw_password[0] && pw_password[1])
+               salt = pw_password;
+       encrypted_password = xcrypt(password, salt);
 
        /*
         * Authentication is accepted if the encrypted passwords
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
deleted file mode 100644 (file)
index 2e20396..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/* $OpenBSD: auth-rh-rsa.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */
-/*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
- *                    All rights reserved
- * Rhosts or /etc/hosts.equiv authentication combined with RSA host
- * authentication.
- *
- * As far as I am concerned, the code I have written for this software
- * can be used freely for any purpose.  Any derived versions of this
- * software must be clearly marked as such, and if the derived work is
- * incompatible with the protocol description in the RFC file, it must be
- * called by a name other than "ssh" or "Secure Shell".
- */
-
-#include "includes.h"
-
-#ifdef WITH_SSH1
-
-#include <sys/types.h>
-
-#include <pwd.h>
-#include <stdarg.h>
-
-#include "packet.h"
-#include "uidswap.h"
-#include "log.h"
-#include "buffer.h"
-#include "misc.h"
-#include "servconf.h"
-#include "key.h"
-#include "hostfile.h"
-#include "pathnames.h"
-#include "auth.h"
-#include "canohost.h"
-#ifdef GSSAPI
-#include "ssh-gss.h"
-#endif
-#include "monitor_wrap.h"
-
-/* import */
-extern ServerOptions options;
-
-int
-auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost,
-    Key *client_host_key)
-{
-       HostStatus host_status;
-
-       if (auth_key_is_revoked(client_host_key))
-               return 0;
-
-       /* Check if we would accept it using rhosts authentication. */
-       if (!auth_rhosts(pw, cuser))
-               return 0;
-
-       host_status = check_key_in_hostfiles(pw, client_host_key,
-           chost, _PATH_SSH_SYSTEM_HOSTFILE,
-           options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
-
-       return (host_status == HOST_OK);
-}
-
-/*
- * Tries to authenticate the user using the .rhosts file and the host using
- * its host key.  Returns true if authentication succeeds.
- */
-int
-auth_rhosts_rsa(Authctxt *authctxt, char *cuser, Key *client_host_key)
-{
-       char *chost;
-       struct passwd *pw = authctxt->pw;
-
-       debug("Trying rhosts with RSA host authentication for client user %.100s",
-           cuser);
-
-       if (!authctxt->valid || client_host_key == NULL ||
-           client_host_key->rsa == NULL)
-               return 0;
-
-       chost = (char *)get_canonical_hostname(options.use_dns);
-       debug("Rhosts RSA authentication: canonical host %.900s", chost);
-
-       if (!PRIVSEP(auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key))) {
-               debug("Rhosts with RSA host authentication denied: unknown or invalid host key");
-               packet_send_debug("Your host key cannot be verified: unknown or invalid host key.");
-               return 0;
-       }
-       /* A matching host key was found and is known. */
-
-       /* Perform the challenge-response dialog with the client for the host key. */
-       if (!auth_rsa_challenge_dialog(client_host_key)) {
-               logit("Client on %.800s failed to respond correctly to host authentication.",
-                   chost);
-               return 0;
-       }
-       /*
-        * We have authenticated the user using .rhosts or /etc/hosts.equiv,
-        * and the host using RSA. We accept the authentication.
-        */
-
-       verbose("Rhosts with RSA host authentication accepted for %.100s, %.100s on %.700s.",
-           pw->pw_name, cuser, chost);
-       packet_send_debug("Rhosts with RSA host authentication accepted.");
-       return 1;
-}
-
-#endif /* WITH_SSH1 */
index ee9e827..ecf956f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-rhosts.c,v 1.46 2014/12/23 22:42:48 djm Exp $ */
+/* $OpenBSD: auth-rhosts.c,v 1.48 2016/08/13 17:47:41 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 #include <unistd.h>
 
 #include "packet.h"
-#include "buffer.h"
 #include "uidswap.h"
 #include "pathnames.h"
 #include "log.h"
 #include "misc.h"
+#include "buffer.h" /* XXX */
+#include "key.h" /* XXX */
 #include "servconf.h"
 #include "canohost.h"
-#include "key.h"
+#include "sshkey.h"
 #include "hostfile.h"
 #include "auth.h"
 
@@ -185,19 +186,8 @@ check_rhosts_file(const char *filename, const char *hostname,
  * true if authentication succeeds.  If ignore_rhosts is true, only
  * /etc/hosts.equiv will be considered (.rhosts and .shosts are ignored).
  */
-
 int
-auth_rhosts(struct passwd *pw, const char *client_user)
-{
-       const char *hostname, *ipaddr;
-
-       hostname = get_canonical_hostname(options.use_dns);
-       ipaddr = get_remote_ipaddr();
-       return auth_rhosts2(pw, client_user, hostname, ipaddr);
-}
-
-static int
-auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostname,
+auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
     const char *ipaddr)
 {
        char buf[1024];
@@ -332,10 +322,3 @@ auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostnam
        restore_uid();
        return 0;
 }
-
-int
-auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
-    const char *ipaddr)
-{
-       return auth_rhosts2_raw(pw, client_user, hostname, ipaddr);
-}
diff --git a/auth-rsa.c b/auth-rsa.c
deleted file mode 100644 (file)
index cbd971b..0000000
+++ /dev/null
@@ -1,349 +0,0 @@
-/* $OpenBSD: auth-rsa.c,v 1.90 2015/01/28 22:36:00 djm Exp $ */
-/*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
- *                    All rights reserved
- * RSA-based authentication.  This code determines whether to admit a login
- * based on RSA authentication.  This file also contains functions to check
- * validity of the host key.
- *
- * As far as I am concerned, the code I have written for this software
- * can be used freely for any purpose.  Any derived versions of this
- * software must be clearly marked as such, and if the derived work is
- * incompatible with the protocol description in the RFC file, it must be
- * called by a name other than "ssh" or "Secure Shell".
- */
-
-#include "includes.h"
-
-#ifdef WITH_SSH1
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <openssl/rsa.h>
-
-#include <pwd.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include "xmalloc.h"
-#include "rsa.h"
-#include "packet.h"
-#include "ssh1.h"
-#include "uidswap.h"
-#include "match.h"
-#include "buffer.h"
-#include "pathnames.h"
-#include "log.h"
-#include "misc.h"
-#include "servconf.h"
-#include "key.h"
-#include "auth-options.h"
-#include "hostfile.h"
-#include "auth.h"
-#ifdef GSSAPI
-#include "ssh-gss.h"
-#endif
-#include "monitor_wrap.h"
-#include "ssh.h"
-
-#include "digest.h"
-
-/* import */
-extern ServerOptions options;
-
-/*
- * Session identifier that is used to bind key exchange and authentication
- * responses to a particular session.
- */
-extern u_char session_id[16];
-
-/*
- * The .ssh/authorized_keys file contains public keys, one per line, in the
- * following format:
- *   options bits e n comment
- * where bits, e and n are decimal numbers,
- * and comment is any string of characters up to newline.  The maximum
- * length of a line is SSH_MAX_PUBKEY_BYTES characters.  See sshd(8) for a
- * description of the options.
- */
-
-BIGNUM *
-auth_rsa_generate_challenge(Key *key)
-{
-       BIGNUM *challenge;
-       BN_CTX *ctx;
-
-       if ((challenge = BN_new()) == NULL)
-               fatal("auth_rsa_generate_challenge: BN_new() failed");
-       /* Generate a random challenge. */
-       if (BN_rand(challenge, 256, 0, 0) == 0)
-               fatal("auth_rsa_generate_challenge: BN_rand failed");
-       if ((ctx = BN_CTX_new()) == NULL)
-               fatal("auth_rsa_generate_challenge: BN_CTX_new failed");
-       if (BN_mod(challenge, challenge, key->rsa->n, ctx) == 0)
-               fatal("auth_rsa_generate_challenge: BN_mod failed");
-       BN_CTX_free(ctx);
-
-       return challenge;
-}
-
-int
-auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
-{
-       u_char buf[32], mdbuf[16];
-       struct ssh_digest_ctx *md;
-       int len;
-
-       /* don't allow short keys */
-       if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
-               error("%s: RSA modulus too small: %d < minimum %d bits",
-                   __func__,
-                   BN_num_bits(key->rsa->n), SSH_RSA_MINIMUM_MODULUS_SIZE);
-               return (0);
-       }
-
-       /* The response is MD5 of decrypted challenge plus session id. */
-       len = BN_num_bytes(challenge);
-       if (len <= 0 || len > 32)
-               fatal("%s: bad challenge length %d", __func__, len);
-       memset(buf, 0, 32);
-       BN_bn2bin(challenge, buf + 32 - len);
-       if ((md = ssh_digest_start(SSH_DIGEST_MD5)) == NULL ||
-           ssh_digest_update(md, buf, 32) < 0 ||
-           ssh_digest_update(md, session_id, 16) < 0 ||
-           ssh_digest_final(md, mdbuf, sizeof(mdbuf)) < 0)
-               fatal("%s: md5 failed", __func__);
-       ssh_digest_free(md);
-
-       /* Verify that the response is the original challenge. */
-       if (timingsafe_bcmp(response, mdbuf, 16) != 0) {
-               /* Wrong answer. */
-               return (0);
-       }
-       /* Correct answer. */
-       return (1);
-}
-
-/*
- * Performs the RSA authentication challenge-response dialog with the client,
- * and returns true (non-zero) if the client gave the correct answer to
- * our challenge; returns zero if the client gives a wrong answer.
- */
-
-int
-auth_rsa_challenge_dialog(Key *key)
-{
-       BIGNUM *challenge, *encrypted_challenge;
-       u_char response[16];
-       int i, success;
-
-       if ((encrypted_challenge = BN_new()) == NULL)
-               fatal("auth_rsa_challenge_dialog: BN_new() failed");
-
-       challenge = PRIVSEP(auth_rsa_generate_challenge(key));
-
-       /* Encrypt the challenge with the public key. */
-       if (rsa_public_encrypt(encrypted_challenge, challenge, key->rsa) != 0)
-               fatal("%s: rsa_public_encrypt failed", __func__);
-
-       /* Send the encrypted challenge to the client. */
-       packet_start(SSH_SMSG_AUTH_RSA_CHALLENGE);
-       packet_put_bignum(encrypted_challenge);
-       packet_send();
-       BN_clear_free(encrypted_challenge);
-       packet_write_wait();
-
-       /* Wait for a response. */
-       packet_read_expect(SSH_CMSG_AUTH_RSA_RESPONSE);
-       for (i = 0; i < 16; i++)
-               response[i] = (u_char)packet_get_char();
-       packet_check_eom();
-
-       success = PRIVSEP(auth_rsa_verify_response(key, challenge, response));
-       BN_clear_free(challenge);
-       return (success);
-}
-
-static int
-rsa_key_allowed_in_file(struct passwd *pw, char *file,
-    const BIGNUM *client_n, Key **rkey)
-{
-       char *fp, line[SSH_MAX_PUBKEY_BYTES];
-       int allowed = 0, bits;
-       FILE *f;
-       u_long linenum = 0;
-       Key *key;
-
-       debug("trying public RSA key file %s", file);
-       if ((f = auth_openkeyfile(file, pw, options.strict_modes)) == NULL)
-               return 0;
-
-       /*
-        * Go though the accepted keys, looking for the current key.  If
-        * found, perform a challenge-response dialog to verify that the
-        * user really has the corresponding private key.
-        */
-       key = key_new(KEY_RSA1);
-       while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
-               char *cp;
-               char *key_options;
-               int keybits;
-
-               /* Skip leading whitespace, empty and comment lines. */
-               for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
-                       ;
-               if (!*cp || *cp == '\n' || *cp == '#')
-                       continue;
-
-               /*
-                * Check if there are options for this key, and if so,
-                * save their starting address and skip the option part
-                * for now.  If there are no options, set the starting
-                * address to NULL.
-                */
-               if (*cp < '0' || *cp > '9') {
-                       int quoted = 0;
-                       key_options = cp;
-                       for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) {
-                               if (*cp == '\\' && cp[1] == '"')
-                                       cp++;   /* Skip both */
-                               else if (*cp == '"')
-                                       quoted = !quoted;
-                       }
-               } else
-                       key_options = NULL;
-
-               /* Parse the key from the line. */
-               if (hostfile_read_key(&cp, &bits, key) == 0) {
-                       debug("%.100s, line %lu: non ssh1 key syntax",
-                           file, linenum);
-                       continue;
-               }
-               /* cp now points to the comment part. */
-
-               /*
-                * Check if the we have found the desired key (identified
-                * by its modulus).
-                */
-               if (BN_cmp(key->rsa->n, client_n) != 0)
-                       continue;
-
-               /* check the real bits  */
-               keybits = BN_num_bits(key->rsa->n);
-               if (keybits < 0 || bits != keybits)
-                       logit("Warning: %s, line %lu: keysize mismatch: "
-                           "actual %d vs. announced %d.",
-                           file, linenum, BN_num_bits(key->rsa->n), bits);
-
-               if ((fp = sshkey_fingerprint(key, options.fingerprint_hash,
-                   SSH_FP_DEFAULT)) == NULL)
-                       continue;
-               debug("matching key found: file %s, line %lu %s %s",
-                   file, linenum, key_type(key), fp);
-               free(fp);
-
-               /* Never accept a revoked key */
-               if (auth_key_is_revoked(key))
-                       break;
-
-               /* We have found the desired key. */
-               /*
-                * If our options do not allow this key to be used,
-                * do not send challenge.
-                */
-               if (!auth_parse_options(pw, key_options, file, linenum))
-                       continue;
-               if (key_is_cert_authority)
-                       continue;
-               /* break out, this key is allowed */
-               allowed = 1;
-               break;
-       }
-
-       /* Close the file. */
-       fclose(f);
-
-       /* return key if allowed */
-       if (allowed && rkey != NULL)
-               *rkey = key;
-       else
-               key_free(key);
-
-       return allowed;
-}
-
-/*
- * check if there's user key matching client_n,
- * return key if login is allowed, NULL otherwise
- */
-
-int
-auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
-{
-       char *file;
-       u_int i, allowed = 0;
-
-       temporarily_use_uid(pw);
-
-       for (i = 0; !allowed && i < options.num_authkeys_files; i++) {
-               if (strcasecmp(options.authorized_keys_files[i], "none") == 0)
-                       continue;
-               file = expand_authorized_keys(
-                   options.authorized_keys_files[i], pw);
-               allowed = rsa_key_allowed_in_file(pw, file, client_n, rkey);
-               free(file);
-       }
-
-       restore_uid();
-
-       return allowed;
-}
-
-/*
- * Performs the RSA authentication dialog with the client.  This returns
- * 0 if the client could not be authenticated, and 1 if authentication was
- * successful.  This may exit if there is a serious protocol violation.
- */
-int
-auth_rsa(Authctxt *authctxt, BIGNUM *client_n)
-{
-       Key *key;
-       struct passwd *pw = authctxt->pw;
-
-       /* no user given */
-       if (!authctxt->valid)
-               return 0;
-
-       if (!PRIVSEP(auth_rsa_key_allowed(pw, client_n, &key))) {
-               auth_clear_options();
-               return (0);
-       }
-
-       /* Perform the challenge-response dialog for this key. */
-       if (!auth_rsa_challenge_dialog(key)) {
-               /* Wrong response. */
-               verbose("Wrong response to RSA authentication challenge.");
-               packet_send_debug("Wrong response to RSA authentication challenge.");
-               /*
-                * Break out of the loop. Otherwise we might send
-                * another challenge and break the protocol.
-                */
-               key_free(key);
-               return (0);
-       }
-       /*
-        * Correct response.  The client has been successfully
-        * authenticated. Note that we have not yet processed the
-        * options; this will be reset if the options cause the
-        * authentication to be rejected.
-        */
-       pubkey_auth_info(authctxt, key, NULL);
-
-       packet_send_debug("RSA authentication accepted.");
-       return (1);
-}
-
-#endif /* WITH_SSH1 */
diff --git a/auth.c b/auth.c
index 9e05678..503a0fb 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.113 2015/08/21 03:42:19 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.119 2016/12/15 21:29:05 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -27,6 +27,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/socket.h>
 
 #include <netinet/in.h>
 
@@ -50,6 +51,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
+#include <netdb.h>
 
 #include "xmalloc.h"
 #include "match.h"
@@ -97,9 +99,11 @@ int auth_debug_init;
 int
 allowed_user(struct passwd * pw)
 {
+       struct ssh *ssh = active_state; /* XXX */
        struct stat st;
        const char *hostname = NULL, *ipaddr = NULL, *passwd = NULL;
        u_int i;
+       int r;
 #ifdef USE_SHADOW
        struct spwd *spw = NULL;
 #endif
@@ -182,27 +186,37 @@ allowed_user(struct passwd * pw)
 
        if (options.num_deny_users > 0 || options.num_allow_users > 0 ||
            options.num_deny_groups > 0 || options.num_allow_groups > 0) {
-               hostname = get_canonical_hostname(options.use_dns);
-               ipaddr = get_remote_ipaddr();
+               hostname = auth_get_canonical_hostname(ssh, options.use_dns);
+               ipaddr = ssh_remote_ipaddr(ssh);
        }
 
        /* Return false if user is listed in DenyUsers */
        if (options.num_deny_users > 0) {
-               for (i = 0; i < options.num_deny_users; i++)
-                       if (match_user(pw->pw_name, hostname, ipaddr,
-                           options.deny_users[i])) {
+               for (i = 0; i < options.num_deny_users; i++) {
+                       r = match_user(pw->pw_name, hostname, ipaddr,
+                           options.deny_users[i]);
+                       if (r < 0) {
+                               fatal("Invalid DenyUsers pattern \"%.100s\"",
+                                   options.deny_users[i]);
+                       } else if (r != 0) {
                                logit("User %.100s from %.100s not allowed "
                                    "because listed in DenyUsers",
                                    pw->pw_name, hostname);
                                return 0;
                        }
+               }
        }
        /* Return false if AllowUsers isn't empty and user isn't listed there */
        if (options.num_allow_users > 0) {
-               for (i = 0; i < options.num_allow_users; i++)
-                       if (match_user(pw->pw_name, hostname, ipaddr,
-                           options.allow_users[i]))
+               for (i = 0; i < options.num_allow_users; i++) {
+                       r = match_user(pw->pw_name, hostname, ipaddr,
+                           options.allow_users[i]);
+                       if (r < 0) {
+                               fatal("Invalid AllowUsers pattern \"%.100s\"",
+                                   options.allow_users[i]);
+                       } else if (r == 1)
                                break;
+               }
                /* i < options.num_allow_users iff we break for loop */
                if (i >= options.num_allow_users) {
                        logit("User %.100s from %.100s not allowed because "
@@ -274,6 +288,7 @@ void
 auth_log(Authctxt *authctxt, int authenticated, int partial,
     const char *method, const char *submethod)
 {
+       struct ssh *ssh = active_state; /* XXX */
        void (*authlog) (const char *fmt,...) = verbose;
        char *authmsg;
 
@@ -294,15 +309,14 @@ auth_log(Authctxt *authctxt, int authenticated, int partial,
        else
                authmsg = authenticated ? "Accepted" : "Failed";
 
-       authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s",
+       authlog("%s %s%s%s for %s%.100s from %.200s port %d ssh2%s%s",
            authmsg,
            method,
            submethod != NULL ? "/" : "", submethod == NULL ? "" : submethod,
            authctxt->valid ? "" : "invalid user ",
            authctxt->user,
-           get_remote_ipaddr(),
-           get_remote_port(),
-           compat20 ? "ssh2" : "ssh1",
+           ssh_remote_ipaddr(ssh),
+           ssh_remote_port(ssh),
            authctxt->info != NULL ? ": " : "",
            authctxt->info != NULL ? authctxt->info : "");
        free(authctxt->info);
@@ -314,11 +328,12 @@ auth_log(Authctxt *authctxt, int authenticated, int partial,
            strncmp(method, "keyboard-interactive", 20) == 0 ||
            strcmp(method, "challenge-response") == 0))
                record_failed_login(authctxt->user,
-                   get_canonical_hostname(options.use_dns), "ssh");
+                   auth_get_canonical_hostname(ssh, options.use_dns), "ssh");
 # ifdef WITH_AIXAUTHENTICATE
        if (authenticated)
                sys_auth_record_login(authctxt->user,
-                   get_canonical_hostname(options.use_dns), "ssh", &loginmsg);
+                   auth_get_canonical_hostname(ssh, options.use_dns), "ssh",
+                   &loginmsg);
 # endif
 #endif
 #ifdef SSH_AUDIT_EVENTS
@@ -331,13 +346,14 @@ auth_log(Authctxt *authctxt, int authenticated, int partial,
 void
 auth_maxtries_exceeded(Authctxt *authctxt)
 {
+       struct ssh *ssh = active_state; /* XXX */
+
        error("maximum authentication attempts exceeded for "
-           "%s%.100s from %.200s port %d %s",
+           "%s%.100s from %.200s port %d ssh2",
            authctxt->valid ? "" : "invalid user ",
            authctxt->user,
-           get_remote_ipaddr(),
-           get_remote_port(),
-           compat20 ? "ssh2" : "ssh1");
+           ssh_remote_ipaddr(ssh),
+           ssh_remote_port(ssh));
        packet_disconnect("Too many authentication failures");
        /* NOTREACHED */
 }
@@ -348,6 +364,8 @@ auth_maxtries_exceeded(Authctxt *authctxt)
 int
 auth_root_allowed(const char *method)
 {
+       struct ssh *ssh = active_state; /* XXX */
+
        switch (options.permit_root_login) {
        case PERMIT_YES:
                return 1;
@@ -364,7 +382,8 @@ auth_root_allowed(const char *method)
                }
                break;
        }
-       logit("ROOT LOGIN REFUSED FROM %.200s", get_remote_ipaddr());
+       logit("ROOT LOGIN REFUSED FROM %.200s port %d",
+           ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
        return 0;
 }
 
@@ -613,6 +632,7 @@ auth_openprincipals(const char *file, struct passwd *pw, int strict_modes)
 struct passwd *
 getpwnamallow(const char *user)
 {
+       struct ssh *ssh = active_state; /* XXX */
 #ifdef HAVE_LOGIN_CAP
        extern login_cap_t *lc;
 #ifdef BSD_AUTH
@@ -656,11 +676,11 @@ getpwnamallow(const char *user)
        }
 #endif
        if (pw == NULL) {
-               logit("Invalid user %.100s from %.100s",
-                   user, get_remote_ipaddr());
+               logit("Invalid user %.100s from %.100s port %d",
+                   user, ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
 #ifdef CUSTOM_FAILED_LOGIN
                record_failed_login(user,
-                   get_canonical_hostname(options.use_dns), "ssh");
+                   auth_get_canonical_hostname(ssh, options.use_dns), "ssh");
 #endif
 #ifdef SSH_AUDIT_EVENTS
                audit_event(SSH_INVALID_USER);
@@ -790,3 +810,117 @@ fakepw(void)
 
        return (&fake);
 }
+
+/*
+ * Returns the remote DNS hostname as a string. The returned string must not
+ * be freed. NB. this will usually trigger a DNS query the first time it is
+ * called.
+ * This function does additional checks on the hostname to mitigate some
+ * attacks on legacy rhosts-style authentication.
+ * XXX is RhostsRSAAuthentication vulnerable to these?
+ * XXX Can we remove these checks? (or if not, remove RhostsRSAAuthentication?)
+ */
+
+static char *
+remote_hostname(struct ssh *ssh)
+{
+       struct sockaddr_storage from;
+       socklen_t fromlen;
+       struct addrinfo hints, *ai, *aitop;
+       char name[NI_MAXHOST], ntop2[NI_MAXHOST];
+       const char *ntop = ssh_remote_ipaddr(ssh);
+
+       /* Get IP address of client. */
+       fromlen = sizeof(from);
+       memset(&from, 0, sizeof(from));
+       if (getpeername(ssh_packet_get_connection_in(ssh),
+           (struct sockaddr *)&from, &fromlen) < 0) {
+               debug("getpeername failed: %.100s", strerror(errno));
+               return strdup(ntop);
+       }
+
+       ipv64_normalise_mapped(&from, &fromlen);
+       if (from.ss_family == AF_INET6)
+               fromlen = sizeof(struct sockaddr_in6);
+
+       debug3("Trying to reverse map address %.100s.", ntop);
+       /* Map the IP address to a host name. */
+       if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
+           NULL, 0, NI_NAMEREQD) != 0) {
+               /* Host name not found.  Use ip address. */
+               return strdup(ntop);
+       }
+
+       /*
+        * if reverse lookup result looks like a numeric hostname,
+        * someone is trying to trick us by PTR record like following:
+        *      1.1.1.10.in-addr.arpa.  IN PTR  2.3.4.5
+        */
+       memset(&hints, 0, sizeof(hints));
+       hints.ai_socktype = SOCK_DGRAM; /*dummy*/
+       hints.ai_flags = AI_NUMERICHOST;
+       if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
+               logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
+                   name, ntop);
+               freeaddrinfo(ai);
+               return strdup(ntop);
+       }
+
+       /* Names are stored in lowercase. */
+       lowercase(name);
+
+       /*
+        * Map it back to an IP address and check that the given
+        * address actually is an address of this host.  This is
+        * necessary because anyone with access to a name server can
+        * define arbitrary names for an IP address. Mapping from
+        * name to IP address can be trusted better (but can still be
+        * fooled if the intruder has access to the name server of
+        * the domain).
+        */
+       memset(&hints, 0, sizeof(hints));
+       hints.ai_family = from.ss_family;
+       hints.ai_socktype = SOCK_STREAM;
+       if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
+               logit("reverse mapping checking getaddrinfo for %.700s "
+                   "[%s] failed.", name, ntop);
+               return strdup(ntop);
+       }
+       /* Look for the address from the list of addresses. */
+       for (ai = aitop; ai; ai = ai->ai_next) {
+               if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2,
+                   sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 &&
+                   (strcmp(ntop, ntop2) == 0))
+                               break;
+       }
+       freeaddrinfo(aitop);
+       /* If we reached the end of the list, the address was not there. */
+       if (ai == NULL) {
+               /* Address not found for the host name. */
+               logit("Address %.100s maps to %.600s, but this does not "
+                   "map back to the address.", ntop, name);
+               return strdup(ntop);
+       }
+       return strdup(name);
+}
+
+/*
+ * Return the canonical name of the host in the other side of the current
+ * connection.  The host name is cached, so it is efficient to call this
+ * several times.
+ */
+
+const char *
+auth_get_canonical_hostname(struct ssh *ssh, int use_dns)
+{
+       static char *dnsname;
+
+       if (!use_dns)
+               return ssh_remote_ipaddr(ssh);
+       else if (dnsname != NULL)
+               return dnsname;
+       else {
+               dnsname = remote_hostname(ssh);
+               return dnsname;
+       }
+}
diff --git a/auth.h b/auth.h
index 8b27575..338a62d 100644 (file)
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.h,v 1.84 2015/05/08 06:41:56 djm Exp $ */
+/* $OpenBSD: auth.h,v 1.89 2016/08/13 17:47:41 markus Exp $ */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -112,19 +112,11 @@ struct KbdintDevice
        void    (*free_ctx)(void *ctx);
 };
 
-int      auth_rhosts(struct passwd *, const char *);
 int
 auth_rhosts2(struct passwd *, const char *, const char *, const char *);
 
-int     auth_rhosts_rsa(Authctxt *, char *, Key *);
 int      auth_password(Authctxt *, const char *);
-int      auth_rsa(Authctxt *, BIGNUM *);
-int      auth_rsa_challenge_dialog(Key *);
-BIGNUM *auth_rsa_generate_challenge(Key *);
-int     auth_rsa_verify_response(Key *, BIGNUM *, u_char[]);
-int     auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **);
 
-int     auth_rhosts_rsa_key_allowed(struct passwd *, char *, char *, Key *);
 int     hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
 int     user_key_allowed(struct passwd *, Key *, int);
 void    pubkey_auth_info(Authctxt *, const Key *, const char *, ...)
@@ -155,7 +147,6 @@ void remove_kbdint_device(const char *);
 
 void disable_forwarding(void);
 
-void   do_authentication(Authctxt *);
 void   do_authentication2(Authctxt *);
 
 void   auth_info(Authctxt *authctxt, const char *, ...)
@@ -186,10 +177,6 @@ int        skey_respond(void *, u_int, char **);
 int    allowed_user(struct passwd *);
 struct passwd * getpwnamallow(const char *user);
 
-char   *get_challenge(Authctxt *);
-int    verify_response(Authctxt *, const char *);
-void   abandon_challenge_response(Authctxt *);
-
 char   *expand_authorized_keys(const char *, struct passwd *pw);
 char   *authorized_principals_file(struct passwd *);
 
@@ -197,6 +184,8 @@ FILE        *auth_openkeyfile(const char *, struct passwd *, int);
 FILE   *auth_openprincipals(const char *, struct passwd *, int);
 int     auth_key_is_revoked(Key *);
 
+const char     *auth_get_canonical_hostname(struct ssh *, int);
+
 HostStatus
 check_key_in_hostfiles(struct passwd *, Key *, const char *,
     const char *, const char *);
@@ -207,9 +196,8 @@ Key *get_hostkey_public_by_index(int, struct ssh *);
 Key    *get_hostkey_public_by_type(int, int, struct ssh *);
 Key    *get_hostkey_private_by_type(int, int, struct ssh *);
 int     get_hostkey_index(Key *, int, struct ssh *);
-int     ssh1_session_key(BIGNUM *);
 int     sshd_hostkey_sign(Key *, Key *, u_char **, size_t *,
-            const u_char *, size_t, u_int);
+            const u_char *, size_t, const char *, u_int);
 
 /* debug messages during authentication */
 void    auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2)));
diff --git a/auth1.c b/auth1.c
deleted file mode 100644 (file)
index 5073c49..0000000
--- a/auth1.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/* $OpenBSD: auth1.c,v 1.82 2014/07/15 15:54:14 millert Exp $ */
-/*
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
- *                    All rights reserved
- *
- * As far as I am concerned, the code I have written for this software
- * can be used freely for any purpose.  Any derived versions of this
- * software must be clearly marked as such, and if the derived work is
- * incompatible with the protocol description in the RFC file, it must be
- * called by a name other than "ssh" or "Secure Shell".
- */
-
-#include "includes.h"
-
-#ifdef WITH_SSH1
-
-#include <sys/types.h>
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <pwd.h>
-
-#include "openbsd-compat/sys-queue.h"
-#include "xmalloc.h"
-#include "rsa.h"
-#include "ssh1.h"
-#include "packet.h"
-#include "buffer.h"
-#include "log.h"
-#include "misc.h"
-#include "servconf.h"
-#include "compat.h"
-#include "key.h"
-#include "hostfile.h"
-#include "auth.h"
-#include "channels.h"
-#include "session.h"
-#include "uidswap.h"
-#ifdef GSSAPI
-#include "ssh-gss.h"
-#endif
-#include "monitor_wrap.h"
-#include "buffer.h"
-
-/* import */
-extern ServerOptions options;
-extern Buffer loginmsg;
-
-static int auth1_process_password(Authctxt *);
-static int auth1_process_rsa(Authctxt *);
-static int auth1_process_rhosts_rsa(Authctxt *);
-static int auth1_process_tis_challenge(Authctxt *);
-static int auth1_process_tis_response(Authctxt *);
-
-static char *client_user = NULL;    /* Used to fill in remote user for PAM */
-
-struct AuthMethod1 {
-       int type;
-       char *name;
-       int *enabled;
-       int (*method)(Authctxt *);
-};
-
-const struct AuthMethod1 auth1_methods[] = {
-       {
-               SSH_CMSG_AUTH_PASSWORD, "password",
-               &options.password_authentication, auth1_process_password
-       },
-       {
-               SSH_CMSG_AUTH_RSA, "rsa",
-               &options.rsa_authentication, auth1_process_rsa
-       },
-       {
-               SSH_CMSG_AUTH_RHOSTS_RSA, "rhosts-rsa",
-               &options.rhosts_rsa_authentication, auth1_process_rhosts_rsa
-       },
-       {
-               SSH_CMSG_AUTH_TIS, "challenge-response",
-               &options.challenge_response_authentication,
-               auth1_process_tis_challenge
-       },
-       {
-               SSH_CMSG_AUTH_TIS_RESPONSE, "challenge-response",
-               &options.challenge_response_authentication,
-               auth1_process_tis_response
-       },
-       { -1, NULL, NULL, NULL}
-};
-
-static const struct AuthMethod1
-*lookup_authmethod1(int type)
-{
-       int i;
-
-       for (i = 0; auth1_methods[i].name != NULL; i++)
-               if (auth1_methods[i].type == type)
-                       return (&(auth1_methods[i]));
-
-       return (NULL);
-}
-
-static char *
-get_authname(int type)
-{
-       const struct AuthMethod1 *a;
-       static char buf[64];
-
-       if ((a = lookup_authmethod1(type)) != NULL)
-               return (a->name);
-       snprintf(buf, sizeof(buf), "bad-auth-msg-%d", type);
-       return (buf);
-}
-
-/*ARGSUSED*/
-static int
-auth1_process_password(Authctxt *authctxt)
-{
-       int authenticated = 0;
-       char *password;
-       u_int dlen;
-
-       /*
-        * Read user password.  It is in plain text, but was
-        * transmitted over the encrypted channel so it is
-        * not visible to an outside observer.
-        */
-       password = packet_get_string(&dlen);
-       packet_check_eom();
-
-       /* Try authentication with the password. */
-       authenticated = PRIVSEP(auth_password(authctxt, password));
-
-       explicit_bzero(password, dlen);
-       free(password);
-
-       return (authenticated);
-}
-
-/*ARGSUSED*/
-static int
-auth1_process_rsa(Authctxt *authctxt)
-{
-       int authenticated = 0;
-       BIGNUM *n;
-
-       /* RSA authentication requested. */
-       if ((n = BN_new()) == NULL)
-               fatal("do_authloop: BN_new failed");
-       packet_get_bignum(n);
-       packet_check_eom();
-       authenticated = auth_rsa(authctxt, n);
-       BN_clear_free(n);
-
-       return (authenticated);
-}
-
-/*ARGSUSED*/
-static int
-auth1_process_rhosts_rsa(Authctxt *authctxt)
-{
-       int keybits, authenticated = 0;
-       u_int bits;
-       Key *client_host_key;
-       u_int ulen;
-
-       /*
-        * Get client user name.  Note that we just have to
-        * trust the client; root on the client machine can
-        * claim to be any user.
-        */
-       client_user = packet_get_cstring(&ulen);
-
-       /* Get the client host key. */
-       client_host_key = key_new(KEY_RSA1);
-       bits = packet_get_int();
-       packet_get_bignum(client_host_key->rsa->e);
-       packet_get_bignum(client_host_key->rsa->n);
-
-       keybits = BN_num_bits(client_host_key->rsa->n);
-       if (keybits < 0 || bits != (u_int)keybits) {
-               verbose("Warning: keysize mismatch for client_host_key: "
-                   "actual %d, announced %d",
-                   BN_num_bits(client_host_key->rsa->n), bits);
-       }
-       packet_check_eom();
-
-       authenticated = auth_rhosts_rsa(authctxt, client_user,
-           client_host_key);
-       key_free(client_host_key);
-
-       auth_info(authctxt, "ruser %.100s", client_user);
-
-       return (authenticated);
-}
-
-/*ARGSUSED*/
-static int
-auth1_process_tis_challenge(Authctxt *authctxt)
-{
-       char *challenge;
-
-       if ((challenge = get_challenge(authctxt)) == NULL)
-               return (0);
-
-       debug("sending challenge '%s'", challenge);
-       packet_start(SSH_SMSG_AUTH_TIS_CHALLENGE);
-       packet_put_cstring(challenge);
-       free(challenge);
-       packet_send();
-       packet_write_wait();
-
-       return (-1);
-}
-
-/*ARGSUSED*/
-static int
-auth1_process_tis_response(Authctxt *authctxt)
-{
-       int authenticated = 0;
-       char *response;
-       u_int dlen;
-
-       response = packet_get_string(&dlen);
-       packet_check_eom();
-       authenticated = verify_response(authctxt, response);
-       explicit_bzero(response, dlen);
-       free(response);
-
-       return (authenticated);
-}
-
-/*
- * read packets, try to authenticate the user and
- * return only if authentication is successful
- */
-static void
-do_authloop(Authctxt *authctxt)
-{
-       int authenticated = 0;
-       int prev = 0, type = 0;
-       const struct AuthMethod1 *meth;
-
-       debug("Attempting authentication for %s%.100s.",
-           authctxt->valid ? "" : "invalid user ", authctxt->user);
-
-       /* If the user has no password, accept authentication immediately. */
-       if (options.permit_empty_passwd && options.password_authentication &&
-#ifdef KRB5
-           (!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
-#endif
-           PRIVSEP(auth_password(authctxt, ""))) {
-#ifdef USE_PAM
-               if (options.use_pam && (PRIVSEP(do_pam_account())))
-#endif
-               {
-                       auth_log(authctxt, 1, 0, "without authentication",
-                           NULL);
-                       return;
-               }
-       }
-
-       /* Indicate that authentication is needed. */
-       packet_start(SSH_SMSG_FAILURE);
-       packet_send();
-       packet_write_wait();
-
-       for (;;) {
-               /* default to fail */
-               authenticated = 0;
-
-
-               /* Get a packet from the client. */
-               prev = type;
-               type = packet_read();
-
-               /*
-                * If we started challenge-response authentication but the
-                * next packet is not a response to our challenge, release
-                * the resources allocated by get_challenge() (which would
-                * normally have been released by verify_response() had we
-                * received such a response)
-                */
-               if (prev == SSH_CMSG_AUTH_TIS &&
-                   type != SSH_CMSG_AUTH_TIS_RESPONSE)
-                       abandon_challenge_response(authctxt);
-
-               if (authctxt->failures >= options.max_authtries)
-                       goto skip;
-               if ((meth = lookup_authmethod1(type)) == NULL) {
-                       logit("Unknown message during authentication: "
-                           "type %d", type);
-                       goto skip;
-               }
-
-               if (!*(meth->enabled)) {
-                       verbose("%s authentication disabled.", meth->name);
-                       goto skip;
-               }
-
-               authenticated = meth->method(authctxt);
-               if (authenticated == -1)
-                       continue; /* "postponed" */
-
-#ifdef BSD_AUTH
-               if (authctxt->as) {
-                       auth_close(authctxt->as);
-                       authctxt->as = NULL;
-               }
-#endif
-               if (!authctxt->valid && authenticated)
-                       fatal("INTERNAL ERROR: authenticated invalid user %s",
-                           authctxt->user);
-
-#ifdef _UNICOS
-               if (authenticated && cray_access_denied(authctxt->user)) {
-                       authenticated = 0;
-                       fatal("Access denied for user %s.",authctxt->user);
-               }
-#endif /* _UNICOS */
-
-#ifndef HAVE_CYGWIN
-               /* Special handling for root */
-               if (authenticated && authctxt->pw->pw_uid == 0 &&
-                   !auth_root_allowed(meth->name)) {
-                       authenticated = 0;
-# ifdef SSH_AUDIT_EVENTS
-                       PRIVSEP(audit_event(SSH_LOGIN_ROOT_DENIED));
-# endif
-               }
-#endif
-
-#ifdef USE_PAM
-               if (options.use_pam && authenticated &&
-                   !PRIVSEP(do_pam_account())) {
-                       char *msg;
-                       size_t len;
-
-                       error("Access denied for user %s by PAM account "
-                           "configuration", authctxt->user);
-                       len = buffer_len(&loginmsg);
-                       buffer_append(&loginmsg, "\0", 1);
-                       msg = buffer_ptr(&loginmsg);
-                       /* strip trailing newlines */
-                       if (len > 0)
-                               while (len > 0 && msg[--len] == '\n')
-                                       msg[len] = '\0';
-                       else
-                               msg = "Access denied.";
-                       packet_disconnect("%s", msg);
-               }
-#endif
-
- skip:
-               /* Log before sending the reply */
-               auth_log(authctxt, authenticated, 0, get_authname(type), NULL);
-
-               free(client_user);
-               client_user = NULL;
-
-               if (authenticated)
-                       return;
-
-               if (++authctxt->failures >= options.max_authtries) {
-#ifdef SSH_AUDIT_EVENTS
-                       PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
-#endif
-                       auth_maxtries_exceeded(authctxt);
-               }
-
-               packet_start(SSH_SMSG_FAILURE);
-               packet_send();
-               packet_write_wait();
-       }
-}
-
-/*
- * Performs authentication of an incoming connection.  Session key has already
- * been exchanged and encryption is enabled.
- */
-void
-do_authentication(Authctxt *authctxt)
-{
-       u_int ulen;
-       char *user, *style = NULL;
-
-       /* Get the name of the user that we wish to log in as. */
-       packet_read_expect(SSH_CMSG_USER);
-
-       /* Get the user name. */
-       user = packet_get_cstring(&ulen);
-       packet_check_eom();
-
-       if ((style = strchr(user, ':')) != NULL)
-               *style++ = '\0';
-
-       authctxt->user = user;
-       authctxt->style = style;
-
-       /* Verify that the user is a valid user. */
-       if ((authctxt->pw = PRIVSEP(getpwnamallow(user))) != NULL)
-               authctxt->valid = 1;
-       else {
-               debug("do_authentication: invalid user %s", user);
-               authctxt->pw = fakepw();
-       }
-
-       /* Configuration may have changed as a result of Match */
-       if (options.num_auth_methods != 0)
-               fatal("AuthenticationMethods is not supported with SSH "
-                   "protocol 1");
-
-       setproctitle("%s%s", authctxt->valid ? user : "unknown",
-           use_privsep ? " [net]" : "");
-
-#ifdef USE_PAM
-       if (options.use_pam)
-               PRIVSEP(start_pam(authctxt));
-#endif
-
-       /*
-        * If we are not running as root, the user must have the same uid as
-        * the server.
-        */
-#ifndef HAVE_CYGWIN
-       if (!use_privsep && getuid() != 0 && authctxt->pw &&
-           authctxt->pw->pw_uid != getuid())
-               packet_disconnect("Cannot change user when server not running as root.");
-#endif
-
-       /*
-        * Loop until the user has been authenticated or the connection is
-        * closed, do_authloop() returns only if authentication is successful
-        */
-       do_authloop(authctxt);
-
-       /* The user has been authenticated and accepted. */
-       packet_start(SSH_SMSG_SUCCESS);
-       packet_send();
-       packet_write_wait();
-}
-
-#endif /* WITH_SSH1 */
index 4aff09d..ead4803 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-chall.c,v 1.43 2015/07/18 07:57:14 djm Exp $ */
+/* $OpenBSD: auth2-chall.c,v 1.44 2016/05/02 08:49:03 djm Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2001 Per Allansson.  All rights reserved.
@@ -122,8 +122,8 @@ kbdint_alloc(const char *devs)
                        buffer_append(&b, devices[i]->name,
                            strlen(devices[i]->name));
                }
-               buffer_append(&b, "\0", 1);
-               kbdintctxt->devices = xstrdup(buffer_ptr(&b));
+               if ((kbdintctxt->devices = sshbuf_dup_string(&b)) == NULL)
+                       fatal("%s: sshbuf_dup_string failed", __func__);
                buffer_free(&b);
        } else {
                kbdintctxt->devices = xstrdup(devs);
index e2327cf..1b3c3b2 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-hostbased.c,v 1.25 2015/05/04 06:10:48 djm Exp $ */
+/* $OpenBSD: auth2-hostbased.c,v 1.26 2016/03/07 19:02:43 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -160,6 +160,7 @@ int
 hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
     Key *key)
 {
+       struct ssh *ssh = active_state; /* XXX */
        const char *resolvedname, *ipaddr, *lookup, *reason;
        HostStatus host_status;
        int len;
@@ -168,8 +169,8 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
        if (auth_key_is_revoked(key))
                return 0;
 
-       resolvedname = get_canonical_hostname(options.use_dns);
-       ipaddr = get_remote_ipaddr();
+       resolvedname = auth_get_canonical_hostname(ssh, options.use_dns);
+       ipaddr = ssh_remote_ipaddr(ssh);
 
        debug2("%s: chost %s resolvedname %s ipaddr %s", __func__,
            chost, resolvedname, ipaddr);
index 5aa319c..3e5706f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-pubkey.c,v 1.53 2015/06/15 18:44:22 jsing Exp $ */
+/* $OpenBSD: auth2-pubkey.c,v 1.62 2017/01/30 01:03:00 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -79,19 +79,19 @@ userauth_pubkey(Authctxt *authctxt)
 {
        Buffer b;
        Key *key = NULL;
-       char *pkalg, *userstyle;
+       char *pkalg, *userstyle, *fp = NULL;
        u_char *pkblob, *sig;
        u_int alen, blen, slen;
        int have_sig, pktype;
        int authenticated = 0;
 
        if (!authctxt->valid) {
-               debug2("userauth_pubkey: disabled because of invalid user");
+               debug2("%s: disabled because of invalid user", __func__);
                return 0;
        }
        have_sig = packet_get_char();
        if (datafellows & SSH_BUG_PKAUTH) {
-               debug2("userauth_pubkey: SSH_BUG_PKAUTH");
+               debug2("%s: SSH_BUG_PKAUTH", __func__);
                /* no explicit pkalg given */
                pkblob = packet_get_string(&blen);
                buffer_init(&b);
@@ -106,18 +106,18 @@ userauth_pubkey(Authctxt *authctxt)
        pktype = key_type_from_name(pkalg);
        if (pktype == KEY_UNSPEC) {
                /* this is perfectly legal */
-               logit("userauth_pubkey: unsupported public key algorithm: %s",
-                   pkalg);
+               logit("%s: unsupported public key algorithm: %s",
+                   __func__, pkalg);
                goto done;
        }
        key = key_from_blob(pkblob, blen);
        if (key == NULL) {
-               error("userauth_pubkey: cannot decode key: %s", pkalg);
+               error("%s: cannot decode key: %s", __func__, pkalg);
                goto done;
        }
        if (key->type != pktype) {
-               error("userauth_pubkey: type mismatch for decoded key "
-                   "(received %d, expected %d)", key->type, pktype);
+               error("%s: type mismatch for decoded key "
+                   "(received %d, expected %d)", __func__, key->type, pktype);
                goto done;
        }
        if (key_type_plain(key->type) == KEY_RSA &&
@@ -126,6 +126,7 @@ userauth_pubkey(Authctxt *authctxt)
                    "signature scheme");
                goto done;
        }
+       fp = sshkey_fingerprint(key, options.fingerprint_hash, SSH_FP_DEFAULT);
        if (auth2_userkey_already_used(authctxt, key)) {
                logit("refusing previously-used %s key", key_type(key));
                goto done;
@@ -138,6 +139,8 @@ userauth_pubkey(Authctxt *authctxt)
        }
 
        if (have_sig) {
+               debug3("%s: have signature for %s %s",
+                   __func__, sshkey_type(key), fp);
                sig = packet_get_string(&slen);
                packet_check_eom();
                buffer_init(&b);
@@ -183,7 +186,8 @@ userauth_pubkey(Authctxt *authctxt)
                buffer_free(&b);
                free(sig);
        } else {
-               debug("test whether pkalg/pkblob are acceptable");
+               debug("%s: test whether pkalg/pkblob are acceptable for %s %s",
+                   __func__, sshkey_type(key), fp);
                packet_check_eom();
 
                /* XXX fake reply and always send PK_OK ? */
@@ -206,11 +210,12 @@ userauth_pubkey(Authctxt *authctxt)
        if (authenticated != 1)
                auth_clear_options();
 done:
-       debug2("userauth_pubkey: authenticated %d pkalg %s", authenticated, pkalg);
+       debug2("%s: authenticated %d pkalg %s", __func__, authenticated, pkalg);
        if (key != NULL)
                key_free(key);
        free(pkalg);
        free(pkblob);
+       free(fp);
        return authenticated;
 }
 
@@ -555,13 +560,16 @@ match_principals_option(const char *principal_list, struct sshkey_cert *cert)
 
 static int
 process_principals(FILE *f, char *file, struct passwd *pw,
-    struct sshkey_cert *cert)
+    const struct sshkey_cert *cert)
 {
        char line[SSH_MAX_PUBKEY_BYTES], *cp, *ep, *line_opts;
        u_long linenum = 0;
-       u_int i;
+       u_int i, found_principal = 0;
 
        while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
+               /* Always consume entire input */
+               if (found_principal)
+                       continue;
                /* Skip leading whitespace. */
                for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
                        ;
@@ -594,11 +602,12 @@ process_principals(FILE *f, char *file, struct passwd *pw,
                                if (auth_parse_options(pw, line_opts,
                                    file, linenum) != 1)
                                        continue;
-                               return 1;
+                               found_principal = 1;
+                               continue;
                        }
                }
        }
-       return 0;
+       return found_principal;
 }
 
 static int
@@ -624,14 +633,17 @@ match_principals_file(char *file, struct passwd *pw, struct sshkey_cert *cert)
  * returns 1 if the principal is allowed or 0 otherwise.
  */
 static int
-match_principals_command(struct passwd *user_pw, struct sshkey_cert *cert)
+match_principals_command(struct passwd *user_pw, const struct sshkey *key)
 {
+       const struct sshkey_cert *cert = key->cert;
        FILE *f = NULL;
-       int ok, found_principal = 0;
+       int r, ok, found_principal = 0;
        struct passwd *pw;
        int i, ac = 0, uid_swapped = 0;
        pid_t pid;
        char *tmp, *username = NULL, *command = NULL, **av = NULL;
+       char *ca_fp = NULL, *key_fp = NULL, *catext = NULL, *keytext = NULL;
+       char serial_s[16];
        void (*osigchld)(int);
 
        if (options.authorized_principals_command == NULL)
@@ -669,10 +681,38 @@ match_principals_command(struct passwd *user_pw, struct sshkey_cert *cert)
                    command);
                goto out;
        }
+       if ((ca_fp = sshkey_fingerprint(cert->signature_key,
+           options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL) {
+               error("%s: sshkey_fingerprint failed", __func__);
+               goto out;
+       }
+       if ((key_fp = sshkey_fingerprint(key,
+           options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL) {
+               error("%s: sshkey_fingerprint failed", __func__);
+               goto out;
+       }
+       if ((r = sshkey_to_base64(cert->signature_key, &catext)) != 0) {
+               error("%s: sshkey_to_base64 failed: %s", __func__, ssh_err(r));
+               goto out;
+       }
+       if ((r = sshkey_to_base64(key, &keytext)) != 0) {
+               error("%s: sshkey_to_base64 failed: %s", __func__, ssh_err(r));
+               goto out;
+       }
+       snprintf(serial_s, sizeof(serial_s), "%llu",
+           (unsigned long long)cert->serial);
        for (i = 1; i < ac; i++) {
                tmp = percent_expand(av[i],
                    "u", user_pw->pw_name,
                    "h", user_pw->pw_dir,
+                   "t", sshkey_ssh_name(key),
+                   "T", sshkey_ssh_name(cert->signature_key),
+                   "f", key_fp,
+                   "F", ca_fp,
+                   "k", keytext,
+                   "K", catext,
+                   "i", cert->key_id,
+                   "s", serial_s,
                    (char *)NULL);
                if (tmp == NULL)
                        fatal("%s: percent_expand failed", __func__);
@@ -691,6 +731,9 @@ match_principals_command(struct passwd *user_pw, struct sshkey_cert *cert)
 
        ok = process_principals(f, NULL, pw, cert);
 
+       fclose(f);
+       f = NULL;
+
        if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command) != 0)
                goto out;
 
@@ -707,6 +750,10 @@ match_principals_command(struct passwd *user_pw, struct sshkey_cert *cert)
                restore_uid();
        free(command);
        free(username);
+       free(ca_fp);
+       free(key_fp);
+       free(catext);
+       free(keytext);
        return found_principal;
 }
 /*
@@ -717,17 +764,20 @@ static int
 check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
 {
        char line[SSH_MAX_PUBKEY_BYTES];
-       const char *reason;
        int found_key = 0;
        u_long linenum = 0;
        Key *found;
-       char *fp;
 
        found_key = 0;
 
        found = NULL;
        while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
-               char *cp, *key_options = NULL;
+               char *cp, *key_options = NULL, *fp = NULL;
+               const char *reason = NULL;
+
+               /* Always consume entrire file */
+               if (found_key)
+                       continue;
                if (found != NULL)
                        key_free(found);
                found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type);
@@ -792,12 +842,11 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
                            authorized_principals == NULL ? pw->pw_name : NULL,
                            &reason) != 0)
                                goto fail_reason;
-                       if (auth_cert_options(key, pw) != 0) {
-                               free(fp);
-                               continue;
-                       }
-                       verbose("Accepted certificate ID \"%s\" "
+                       if (auth_cert_options(key, pw, &reason) != 0)
+                               goto fail_reason;
+                       verbose("Accepted certificate ID \"%s\" (serial %llu) "
                            "signed by %s CA %s via %s", key->cert->key_id,
+                           (unsigned long long)key->cert->serial,
                            key_type(found), fp, file);
                        free(fp);
                        found_key = 1;
@@ -815,7 +864,7 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
                            file, linenum, key_type(found), fp);
                        free(fp);
                        found_key = 1;
-                       break;
+                       continue;
                }
        }
        if (found != NULL)
@@ -857,7 +906,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
                        found_principal = 1;
        }
        /* Try querying command if specified */
-       if (!found_principal && match_principals_command(pw, key->cert))
+       if (!found_principal && match_principals_command(pw, key))
                found_principal = 1;
        /* If principals file or command is specified, then require a match */
        use_authorized_principals = principals_file != NULL ||
@@ -872,11 +921,13 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
        if (key_cert_check_authority(key, 0, 1,
            use_authorized_principals ? NULL : pw->pw_name, &reason) != 0)
                goto fail_reason;
-       if (auth_cert_options(key, pw) != 0)
-               goto out;
+       if (auth_cert_options(key, pw, &reason) != 0)
+               goto fail_reason;
 
-       verbose("Accepted certificate ID \"%s\" signed by %s CA %s via %s",
-           key->cert->key_id, key_type(key->cert->signature_key), ca_fp,
+       verbose("Accepted certificate ID \"%s\" (serial %llu) signed by "
+           "%s CA %s via %s", key->cert->key_id,
+           (unsigned long long)key->cert->serial,
+           key_type(key->cert->signature_key), ca_fp,
            options.trusted_user_ca_keys);
        ret = 1;
 
@@ -1009,6 +1060,9 @@ user_key_command_allowed2(struct passwd *user_pw, Key *key)
 
        ok = check_authkeys_file(f, options.authorized_keys_command, key, pw);
 
+       fclose(f);
+       f = NULL;
+
        if (exited_cleanly(pid, "AuthorizedKeysCommand", command) != 0)
                goto out;
 
diff --git a/auth2.c b/auth2.c
index 7177962..97dd2ef 100644 (file)
--- a/auth2.c
+++ b/auth2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2.c,v 1.135 2015/01/19 20:07:45 markus Exp $ */
+/* $OpenBSD: auth2.c,v 1.137 2017/02/03 23:05:57 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -212,6 +212,7 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
 static int
 input_userauth_request(int type, u_int32_t seq, void *ctxt)
 {
+       struct ssh *ssh = active_state; /* XXX */
        Authctxt *authctxt = ctxt;
        Authmethod *m = NULL;
        char *user, *service, *method, *style = NULL;
@@ -235,9 +236,10 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
                authctxt->user = xstrdup(user);
                if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
                        authctxt->valid = 1;
-                       debug2("input_userauth_request: setting up authctxt for %s", user);
+                       debug2("%s: setting up authctxt for %s",
+                           __func__, user);
                } else {
-                       logit("input_userauth_request: invalid user %s", user);
+                       /* Invalid user, fake password information */
                        authctxt->pw = fakepw();
 #ifdef SSH_AUDIT_EVENTS
                        PRIVSEP(audit_event(SSH_INVALID_USER));
@@ -247,6 +249,8 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
                if (options.use_pam)
                        PRIVSEP(start_pam(authctxt));
 #endif
+               ssh_packet_set_log_preamble(ssh, "%suser %s",
+                   authctxt->valid ? "authenticating " : "invalid ", user);
                setproctitle("%s%s", authctxt->valid ? user : "unknown",
                    use_privsep ? " [net]" : "");
                authctxt->service = xstrdup(service);
@@ -292,6 +296,7 @@ void
 userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
     const char *submethod)
 {
+       struct ssh *ssh = active_state; /* XXX */
        char *methods;
        int partial = 0;
 
@@ -353,6 +358,7 @@ userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
                packet_write_wait();
                /* now we can break out */
                authctxt->success = 1;
+               ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user);
        } else {
 
                /* Allow initial try of "none" auth without failure penalty */
@@ -424,8 +430,8 @@ authmethods_get(Authctxt *authctxt)
                buffer_append(&b, authmethods[i]->name,
                    strlen(authmethods[i]->name));
        }
-       buffer_append(&b, "\0", 1);
-       list = xstrdup(buffer_ptr(&b));
+       if ((list = sshbuf_dup_string(&b)) == NULL)
+               fatal("%s: sshbuf_dup_string failed", __func__);
        buffer_free(&b);
        return list;
 }
index eaa1426..a634bcb 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfd.c,v 1.98 2015/07/03 03:43:18 djm Exp $ */
+/* $OpenBSD: authfd.c,v 1.100 2015/12/04 16:41:28 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -426,11 +426,24 @@ ssh_decrypt_challenge(int sock, struct sshkey* key, BIGNUM *challenge,
 }
 #endif
 
+/* encode signature algoritm in flag bits, so we can keep the msg format */
+static u_int
+agent_encode_alg(struct sshkey *key, const char *alg)
+{
+       if (alg != NULL && key->type == KEY_RSA) {
+               if (strcmp(alg, "rsa-sha2-256") == 0)
+                       return SSH_AGENT_RSA_SHA2_256;
+               else if (strcmp(alg, "rsa-sha2-512") == 0)
+                       return SSH_AGENT_RSA_SHA2_512;
+       }
+       return 0;
+}
+
 /* ask agent to sign data, returns err.h code on error, 0 on success */
 int
 ssh_agent_sign(int sock, struct sshkey *key,
     u_char **sigp, size_t *lenp,
-    const u_char *data, size_t datalen, u_int compat)
+    const u_char *data, size_t datalen, const char *alg, u_int compat)
 {
        struct sshbuf *msg;
        u_char *blob = NULL, type;
@@ -449,12 +462,13 @@ ssh_agent_sign(int sock, struct sshkey *key,
                return SSH_ERR_ALLOC_FAIL;
        if ((r = sshkey_to_blob(key, &blob, &blen)) != 0)
                goto out;
+       flags |= agent_encode_alg(key, alg);
        if ((r = sshbuf_put_u8(msg, SSH2_AGENTC_SIGN_REQUEST)) != 0 ||
            (r = sshbuf_put_string(msg, blob, blen)) != 0 ||
            (r = sshbuf_put_string(msg, data, datalen)) != 0 ||
            (r = sshbuf_put_u32(msg, flags)) != 0)
                goto out;
-       if ((r = ssh_request_reply(sock, msg, msg) != 0))
+       if ((r = ssh_request_reply(sock, msg, msg)) != 0)
                goto out;
        if ((r = sshbuf_get_u8(msg, &type)) != 0)
                goto out;
index bea20c2..4b417e3 100644 (file)
--- a/authfd.h
+++ b/authfd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfd.h,v 1.38 2015/01/14 20:05:27 djm Exp $ */
+/* $OpenBSD: authfd.h,v 1.39 2015/12/04 16:41:28 markus Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -41,7 +41,7 @@ int   ssh_decrypt_challenge(int sock, struct sshkey* key, BIGNUM *challenge,
            u_char session_id[16], u_char response[16]);
 int    ssh_agent_sign(int sock, struct sshkey *key,
            u_char **sigp, size_t *lenp,
-           const u_char *data, size_t datalen, u_int compat);
+           const u_char *data, size_t datalen, const char *alg, u_int compat);
 
 /* Messages for the authentication agent connection. */
 #define SSH_AGENTC_REQUEST_RSA_IDENTITIES      1
@@ -86,5 +86,7 @@ int   ssh_agent_sign(int sock, struct sshkey *key,
 #define SSH_COM_AGENT2_FAILURE                 102
 
 #define        SSH_AGENT_OLD_SIGNATURE                 0x01
+#define        SSH_AGENT_RSA_SHA2_256                  0x02
+#define        SSH_AGENT_RSA_SHA2_512                  0x04
 
 #endif                         /* AUTHFD_H */
index 58f589a..7411b68 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfile.c,v 1.116 2015/07/09 09:49:46 markus Exp $ */
+/* $OpenBSD: authfile.c,v 1.122 2016/11/25 23:24:45 djm Exp $ */
 /*
  * Copyright (c) 2000, 2013 Markus Friedl.  All rights reserved.
  *
@@ -100,13 +100,25 @@ sshkey_load_file(int fd, struct sshbuf *blob)
        u_char buf[1024];
        size_t len;
        struct stat st;
-       int r;
+       int r, dontmax = 0;
 
        if (fstat(fd, &st) < 0)
                return SSH_ERR_SYSTEM_ERROR;
        if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
            st.st_size > MAX_KEY_FILE_SIZE)
                return SSH_ERR_INVALID_FORMAT;
+       /*
+        * Pre-allocate the buffer used for the key contents and clamp its
+        * maximum size. This ensures that key contents are never leaked via
+        * implicit realloc() in the sshbuf code.
+        */
+       if ((st.st_mode & S_IFREG) == 0 || st.st_size <= 0) {
+               st.st_size = 64*1024; /* 64k should be enough for anyone :) */
+               dontmax = 1;
+       }
+       if ((r = sshbuf_allocate(blob, st.st_size)) != 0 ||
+           (dontmax && (r = sshbuf_set_max_size(blob, st.st_size)) != 0))
+               return r;
        for (;;) {
                if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
                        if (errno == EPIPE)
@@ -147,7 +159,8 @@ sshkey_load_public_rsa1(int fd, struct sshkey **keyp, char **commentp)
        struct sshbuf *b = NULL;
        int r;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
        if (commentp != NULL)
                *commentp = NULL;
 
@@ -200,7 +213,8 @@ sshkey_load_private_type(int type, const char *filename, const char *passphrase,
 {
        int fd, r;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
        if (commentp != NULL)
                *commentp = NULL;
 
@@ -231,6 +245,8 @@ sshkey_load_private_type_fd(int fd, int type, const char *passphrase,
        struct sshbuf *buffer = NULL;
        int r;
 
+       if (keyp != NULL)
+               *keyp = NULL;
        if ((buffer = sshbuf_new()) == NULL) {
                r = SSH_ERR_ALLOC_FAIL;
                goto out;
@@ -243,8 +259,7 @@ sshkey_load_private_type_fd(int fd, int type, const char *passphrase,
        /* success */
        r = 0;
  out:
-       if (buffer != NULL)
-               sshbuf_free(buffer);
+       sshbuf_free(buffer);
        return r;
 }
 
@@ -256,7 +271,8 @@ sshkey_load_private(const char *filename, const char *passphrase,
        struct sshbuf *buffer = NULL;
        int r, fd;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
        if (commentp != NULL)
                *commentp = NULL;
 
@@ -272,14 +288,13 @@ sshkey_load_private(const char *filename, const char *passphrase,
                goto out;
        }
        if ((r = sshkey_load_file(fd, buffer)) != 0 ||
-           (r = sshkey_parse_private_fileblob(buffer, passphrase, filename,
-           keyp, commentp)) != 0)
+           (r = sshkey_parse_private_fileblob(buffer, passphrase, keyp,
+           commentp)) != 0)
                goto out;
        r = 0;
  out:
        close(fd);
-       if (buffer != NULL)
-               sshbuf_free(buffer);
+       sshbuf_free(buffer);
        return r;
 }
 
@@ -410,7 +425,8 @@ sshkey_load_cert(const char *filename, struct sshkey **keyp)
        char *file = NULL;
        int r = SSH_ERR_INTERNAL_ERROR;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
 
        if (asprintf(&file, "%s-cert.pub", filename) == -1)
                return SSH_ERR_ALLOC_FAIL;
@@ -420,16 +436,15 @@ sshkey_load_cert(const char *filename, struct sshkey **keyp)
        }
        if ((r = sshkey_try_load_public(pub, file, NULL)) != 0)
                goto out;
-
-       *keyp = pub;
-       pub = NULL;
+       /* success */
+       if (keyp != NULL) {
+               *keyp = pub;
+               pub = NULL;
+       }
        r = 0;
-
  out:
-       if (file != NULL)
-               free(file);
-       if (pub != NULL)
-               sshkey_free(pub);
+       free(file);
+       sshkey_free(pub);
        return r;
 }
 
@@ -441,7 +456,8 @@ sshkey_load_private_cert(int type, const char *filename, const char *passphrase,
        struct sshkey *key = NULL, *cert = NULL;
        int r;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
 
        switch (type) {
 #ifdef WITH_OPENSSL
@@ -471,13 +487,13 @@ sshkey_load_private_cert(int type, const char *filename, const char *passphrase,
            (r = sshkey_cert_copy(cert, key)) != 0)
                goto out;
        r = 0;
-       *keyp = key;
-       key = NULL;
+       if (keyp != NULL) {
+               *keyp = key;
+               key = NULL;
+       }
  out:
-       if (key != NULL)
-               sshkey_free(key);
-       if (cert != NULL)
-               sshkey_free(cert);
+       sshkey_free(key);
+       sshkey_free(cert);
        return r;
 }
 
@@ -538,8 +554,7 @@ sshkey_in_file(struct sshkey *key, const char *filename, int strict_type,
        }
        r = SSH_ERR_KEY_NOT_FOUND;
  out:
-       if (pub != NULL)
-               sshkey_free(pub);
+       sshkey_free(pub);
        fclose(f);
        return r;
 }
index 4b842b3..4ccc5f8 100644 (file)
@@ -247,7 +247,7 @@ cat > pkginfo << _EOF
 PKG=$PKGNAME
 NAME="OpenSSH Portable for ${UNAME_S}"
 DESC="Secure Shell remote access utility; replaces telnet and rlogin/rsh."
-VENDOR="OpenSSH Portable Team - http://www.openssh.com/portable.html"
+VENDOR="OpenSSH Portable Team - https://www.openssh.com/portable.html"
 ARCH=$ARCH
 VERSION=$VERSION$REV
 CATEGORY="Security,application"
index 223964e..f71a085 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: canohost.c,v 1.72 2015/03/01 15:44:40 millert Exp $ */
+/* $OpenBSD: canohost.c,v 1.73 2016/03/07 19:02:43 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 #include "canohost.h"
 #include "misc.h"
 
-static void check_ip_options(int, char *);
-static char *canonical_host_ip = NULL;
-static int cached_port = -1;
-
-/*
- * Return the canonical name of the host at the other end of the socket. The
- * caller should free the returned string.
- */
-
-static char *
-get_remote_hostname(int sock, int use_dns)
-{
-       struct sockaddr_storage from;
-       socklen_t fromlen;
-       struct addrinfo hints, *ai, *aitop;
-       char name[NI_MAXHOST], ntop[NI_MAXHOST], ntop2[NI_MAXHOST];
-
-       /* Get IP address of client. */
-       fromlen = sizeof(from);
-       memset(&from, 0, sizeof(from));
-       if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {
-               debug("getpeername failed: %.100s", strerror(errno));
-               cleanup_exit(255);
-       }
-
-       if (from.ss_family == AF_INET)
-               check_ip_options(sock, ntop);
-
-       ipv64_normalise_mapped(&from, &fromlen);
-
-       if (from.ss_family == AF_INET6)
-               fromlen = sizeof(struct sockaddr_in6);
-
-       if (getnameinfo((struct sockaddr *)&from, fromlen, ntop, sizeof(ntop),
-           NULL, 0, NI_NUMERICHOST) != 0)
-               fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed");
-
-       if (!use_dns)
-               return xstrdup(ntop);
-
-       debug3("Trying to reverse map address %.100s.", ntop);
-       /* Map the IP address to a host name. */
-       if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
-           NULL, 0, NI_NAMEREQD) != 0) {
-               /* Host name not found.  Use ip address. */
-               return xstrdup(ntop);
-       }
-
-       /*
-        * if reverse lookup result looks like a numeric hostname,
-        * someone is trying to trick us by PTR record like following:
-        *      1.1.1.10.in-addr.arpa.  IN PTR  2.3.4.5
-        */
-       memset(&hints, 0, sizeof(hints));
-       hints.ai_socktype = SOCK_DGRAM; /*dummy*/
-       hints.ai_flags = AI_NUMERICHOST;
-       if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
-               logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
-                   name, ntop);
-               freeaddrinfo(ai);
-               return xstrdup(ntop);
-       }
-
-       /* Names are stores in lowercase. */
-       lowercase(name);
-
-       /*
-        * Map it back to an IP address and check that the given
-        * address actually is an address of this host.  This is
-        * necessary because anyone with access to a name server can
-        * define arbitrary names for an IP address. Mapping from
-        * name to IP address can be trusted better (but can still be
-        * fooled if the intruder has access to the name server of
-        * the domain).
-        */
-       memset(&hints, 0, sizeof(hints));
-       hints.ai_family = from.ss_family;
-       hints.ai_socktype = SOCK_STREAM;
-       if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
-               logit("reverse mapping checking getaddrinfo for %.700s "
-                   "[%s] failed - POSSIBLE BREAK-IN ATTEMPT!", name, ntop);
-               return xstrdup(ntop);
-       }
-       /* Look for the address from the list of addresses. */
-       for (ai = aitop; ai; ai = ai->ai_next) {
-               if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2,
-                   sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 &&
-                   (strcmp(ntop, ntop2) == 0))
-                               break;
-       }
-       freeaddrinfo(aitop);
-       /* If we reached the end of the list, the address was not there. */
-       if (!ai) {
-               /* Address not found for the host name. */
-               logit("Address %.100s maps to %.600s, but this does not "
-                   "map back to the address - POSSIBLE BREAK-IN ATTEMPT!",
-                   ntop, name);
-               return xstrdup(ntop);
-       }
-       return xstrdup(name);
-}
-
-/*
- * If IP options are supported, make sure there are none (log and
- * disconnect them if any are found).  Basically we are worried about
- * source routing; it can be used to pretend you are somebody
- * (ip-address) you are not. That itself may be "almost acceptable"
- * under certain circumstances, but rhosts autentication is useless
- * if source routing is accepted. Notice also that if we just dropped
- * source routing here, the other side could use IP spoofing to do
- * rest of the interaction and could still bypass security.  So we
- * exit here if we detect any IP options.
- */
-/* IPv4 only */
-static void
-check_ip_options(int sock, char *ipaddr)
-{
-#ifdef IP_OPTIONS
-       u_char options[200];
-       char text[sizeof(options) * 3 + 1];
-       socklen_t option_size, i;
-       int ipproto;
-       struct protoent *ip;
-
-       if ((ip = getprotobyname("ip")) != NULL)
-               ipproto = ip->p_proto;
-       else
-               ipproto = IPPROTO_IP;
-       option_size = sizeof(options);
-       if (getsockopt(sock, ipproto, IP_OPTIONS, options,
-           &option_size) >= 0 && option_size != 0) {
-               text[0] = '\0';
-               for (i = 0; i < option_size; i++)
-                       snprintf(text + i*3, sizeof(text) - i*3,
-                           " %2.2x", options[i]);
-               fatal("Connection from %.100s with IP options:%.800s",
-                   ipaddr, text);
-       }
-#endif /* IP_OPTIONS */
-}
-
 void
 ipv64_normalise_mapped(struct sockaddr_storage *addr, socklen_t *len)
 {
@@ -202,38 +61,6 @@ ipv64_normalise_mapped(struct sockaddr_storage *addr, socklen_t *len)
 }
 
 /*
- * Return the canonical name of the host in the other side of the current
- * connection.  The host name is cached, so it is efficient to call this
- * several times.
- */
-
-const char *
-get_canonical_hostname(int use_dns)
-{
-       char *host;
-       static char *canonical_host_name = NULL;
-       static char *remote_ip = NULL;
-
-       /* Check if we have previously retrieved name with same option. */
-       if (use_dns && canonical_host_name != NULL)
-               return canonical_host_name;
-       if (!use_dns && remote_ip != NULL)
-               return remote_ip;
-
-       /* Get the real hostname if socket; otherwise return UNKNOWN. */
-       if (packet_connection_is_on_socket())
-               host = get_remote_hostname(packet_get_connection_in(), use_dns);
-       else
-               host = "UNKNOWN";
-
-       if (use_dns)
-               canonical_host_name = host;
-       else
-               remote_ip = host;
-       return host;
-}
-
-/*
  * Returns the local/remote IP-address/hostname of socket as a string.
  * The returned string must be freed.
  */
@@ -250,12 +77,10 @@ get_socket_address(int sock, int remote, int flags)
        memset(&addr, 0, sizeof(addr));
 
        if (remote) {
-               if (getpeername(sock, (struct sockaddr *)&addr, &addrlen)
-                   < 0)
+               if (getpeername(sock, (struct sockaddr *)&addr, &addrlen) != 0)
                        return NULL;
        } else {
-               if (getsockname(sock, (struct sockaddr *)&addr, &addrlen)
-                   < 0)
+               if (getsockname(sock, (struct sockaddr *)&addr, &addrlen) != 0)
                        return NULL;
        }
 
@@ -271,7 +96,7 @@ get_socket_address(int sock, int remote, int flags)
                /* Get the address in ascii. */
                if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop,
                    sizeof(ntop), NULL, 0, flags)) != 0) {
-                       error("get_socket_address: getnameinfo %d failed: %s",
+                       error("%s: getnameinfo %d failed: %s", __func__,
                            flags, ssh_gai_strerror(r));
                        return NULL;
                }
@@ -316,7 +141,8 @@ get_local_name(int fd)
 
        /* Handle the case where we were passed a pipe */
        if (gethostname(myname, sizeof(myname)) == -1) {
-               verbose("get_local_name: gethostname: %s", strerror(errno));
+               verbose("%s: gethostname: %s", __func__, strerror(errno));
+               host = xstrdup("UNKNOWN");
        } else {
                host = xstrdup(myname);
        }
@@ -324,51 +150,9 @@ get_local_name(int fd)
        return host;
 }
 
-void
-clear_cached_addr(void)
-{
-       free(canonical_host_ip);
-       canonical_host_ip = NULL;
-       cached_port = -1;
-}
-
-/*
- * Returns the IP-address of the remote host as a string.  The returned
- * string must not be freed.
- */
-
-const char *
-get_remote_ipaddr(void)
-{
-       /* Check whether we have cached the ipaddr. */
-       if (canonical_host_ip == NULL) {
-               if (packet_connection_is_on_socket()) {
-                       canonical_host_ip =
-                           get_peer_ipaddr(packet_get_connection_in());
-                       if (canonical_host_ip == NULL)
-                               cleanup_exit(255);
-               } else {
-                       /* If not on socket, return UNKNOWN. */
-                       canonical_host_ip = xstrdup("UNKNOWN");
-               }
-       }
-       return canonical_host_ip;
-}
-
-const char *
-get_remote_name_or_ip(u_int utmp_len, int use_dns)
-{
-       static const char *remote = "";
-       if (utmp_len > 0)
-               remote = get_canonical_hostname(use_dns);
-       if (utmp_len == 0 || strlen(remote) > utmp_len)
-               remote = get_remote_ipaddr();
-       return remote;
-}
-
 /* Returns the local/remote port for the socket. */
 
-int
+static int
 get_sock_port(int sock, int local)
 {
        struct sockaddr_storage from;
@@ -402,27 +186,11 @@ get_sock_port(int sock, int local)
        /* Return port number. */
        if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0,
            strport, sizeof(strport), NI_NUMERICSERV)) != 0)
-               fatal("get_sock_port: getnameinfo NI_NUMERICSERV failed: %s",
+               fatal("%s: getnameinfo NI_NUMERICSERV failed: %s", __func__,
                    ssh_gai_strerror(r));
        return atoi(strport);
 }
 
-/* Returns remote/local port number for the current connection. */
-
-static int
-get_port(int local)
-{
-       /*
-        * If the connection is not a socket, return 65535.  This is
-        * intentionally chosen to be an unprivileged port number.
-        */
-       if (!packet_connection_is_on_socket())
-               return 65535;
-
-       /* Get socket and return the port number. */
-       return get_sock_port(packet_get_connection_in(), local);
-}
-
 int
 get_peer_port(int sock)
 {
@@ -430,17 +198,7 @@ get_peer_port(int sock)
 }
 
 int
-get_remote_port(void)
-{
-       /* Cache to avoid getpeername() on a dead connection */
-       if (cached_port == -1)
-               cached_port = get_port(0);
-
-       return cached_port;
-}
-
-int
-get_local_port(void)
+get_local_port(int sock)
 {
-       return get_port(1);
+       return get_sock_port(sock, 1);
 }
index 4c8636f..26d6285 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: canohost.h,v 1.11 2009/05/27 06:31:25 andreas Exp $ */
+/* $OpenBSD: canohost.h,v 1.12 2016/03/07 19:02:43 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * called by a name other than "ssh" or "Secure Shell".
  */
 
-const char     *get_canonical_hostname(int);
-const char     *get_remote_ipaddr(void);
-const char     *get_remote_name_or_ip(u_int, int);
+#ifndef _CANOHOST_H
+#define _CANOHOST_H
 
 char           *get_peer_ipaddr(int);
 int             get_peer_port(int);
 char           *get_local_ipaddr(int);
 char           *get_local_name(int);
+int            get_local_port(int);
 
-int             get_remote_port(void);
-int             get_local_port(void);
-int             get_sock_port(int, int);
-void            clear_cached_addr(void);
+#endif /* _CANOHOST_H */
 
 void            ipv64_normalise_mapped(struct sockaddr_storage *, socklen_t *);
index 40eaf2d..7620525 100644 (file)
--- a/chacha.h
+++ b/chacha.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: chacha.h,v 1.3 2014/05/02 03:27:54 djm Exp $ */
+/* $OpenBSD: chacha.h,v 1.4 2016/08/27 04:04:56 guenther Exp $ */
 
 /*
 chacha-merged.c version 20080118
@@ -10,6 +10,7 @@ Public domain.
 #define CHACHA_H
 
 #include <sys/types.h>
+#include <stdlib.h>
 
 struct chacha_ctx {
        u_int input[16];
index a84b487..d030fcd 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.347 2015/07/01 02:26:31 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.357 2017/02/01 02:59:09 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -42,7 +42,6 @@
 #include "includes.h"
 
 #include <sys/types.h>
-#include <sys/param.h> /* MIN MAX */
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/un.h>
@@ -72,6 +71,7 @@
 #include "ssh.h"
 #include "ssh1.h"
 #include "ssh2.h"
+#include "ssherr.h"
 #include "packet.h"
 #include "log.h"
 #include "misc.h"
@@ -121,6 +121,7 @@ typedef struct {
        char *listen_host;              /* Remote side should listen address. */
        char *listen_path;              /* Remote side should listen path. */
        int listen_port;                /* Remote side should listen port. */
+       Channel *downstream;            /* Downstream mux*/
 } ForwardPermission;
 
 /* List of all permitted host/port pairs to connect by the user. */
@@ -138,6 +139,9 @@ static int num_adm_permitted_opens = 0;
 /* special-case port number meaning allow any port */
 #define FWD_PERMIT_ANY_PORT    0
 
+/* special-case wildcard meaning allow any host */
+#define FWD_PERMIT_ANY_HOST    "*"
+
 /*
  * If this is true, all opens are permitted.  This is the case on the server
  * on which we have to trust the client anyway, and the user could do
@@ -181,6 +185,7 @@ static int IPv4or6 = AF_UNSPEC;
 
 /* helper */
 static void port_open_helper(Channel *c, char *rtype);
+static const char *channel_rfwd_bind_host(const char *listen_host);
 
 /* non-blocking connect helpers */
 static int connect_next(struct channel_connect *);
@@ -205,6 +210,20 @@ channel_by_id(int id)
        return c;
 }
 
+Channel *
+channel_by_remote_id(int remote_id)
+{
+       Channel *c;
+       u_int i;
+
+       for (i = 0; i < channels_alloc; i++) {
+               c = channels[i];
+               if (c != NULL && c->remote_id == remote_id)
+                       return c;
+       }
+       return NULL;
+}
+
 /*
  * Returns the channel if it is allowed to receive protocol messages.
  * Private channels, like listening sockets, may not receive messages.
@@ -227,6 +246,7 @@ channel_lookup(int id)
        case SSH_CHANNEL_INPUT_DRAINING:
        case SSH_CHANNEL_OUTPUT_DRAINING:
        case SSH_CHANNEL_ABANDONED:
+       case SSH_CHANNEL_MUX_PROXY:
                return (c);
        }
        logit("Non-public channel %d, type %d.", id, c->type);
@@ -242,9 +262,9 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
     int extusage, int nonblock, int is_tty)
 {
        /* Update the maximum file descriptor value. */
-       channel_max_fd = MAX(channel_max_fd, rfd);
-       channel_max_fd = MAX(channel_max_fd, wfd);
-       channel_max_fd = MAX(channel_max_fd, efd);
+       channel_max_fd = MAXIMUM(channel_max_fd, rfd);
+       channel_max_fd = MAXIMUM(channel_max_fd, wfd);
+       channel_max_fd = MAXIMUM(channel_max_fd, efd);
 
        if (rfd != -1)
                fcntl(rfd, F_SETFD, FD_CLOEXEC);
@@ -370,9 +390,9 @@ channel_find_maxfd(void)
        for (i = 0; i < channels_alloc; i++) {
                c = channels[i];
                if (c != NULL) {
-                       max = MAX(max, c->rfd);
-                       max = MAX(max, c->wfd);
-                       max = MAX(max, c->efd);
+                       max = MAXIMUM(max, c->rfd);
+                       max = MAXIMUM(max, c->wfd);
+                       max = MAXIMUM(max, c->efd);
                }
        }
        return max;
@@ -408,14 +428,56 @@ channel_free(Channel *c)
 {
        char *s;
        u_int i, n;
+       Channel *other;
        struct channel_confirm *cc;
 
-       for (n = 0, i = 0; i < channels_alloc; i++)
-               if (channels[i])
+       for (n = 0, i = 0; i < channels_alloc; i++) {
+               if ((other = channels[i]) != NULL) {
                        n++;
+
+                       /* detach from mux client and prepare for closing */
+                       if (c->type == SSH_CHANNEL_MUX_CLIENT &&
+                           other->type == SSH_CHANNEL_MUX_PROXY &&
+                           other->mux_ctx == c) {
+                               other->mux_ctx = NULL;
+                               other->type = SSH_CHANNEL_OPEN;
+                               other->istate = CHAN_INPUT_CLOSED;
+                               other->ostate = CHAN_OUTPUT_CLOSED;
+                       }
+               }
+       }
        debug("channel %d: free: %s, nchannels %u", c->self,
            c->remote_name ? c->remote_name : "???", n);
 
+       /* XXX more MUX cleanup: remove remote forwardings */
+       if (c->type == SSH_CHANNEL_MUX_CLIENT) {
+               for (i = 0; i < (u_int)num_permitted_opens; i++) {
+                       if (permitted_opens[i].downstream != c)
+                               continue;
+                       /* cancel on the server, since mux client is gone */
+                       debug("channel %d: cleanup remote forward for %s:%u",
+                           c->self,
+                           permitted_opens[i].listen_host,
+                           permitted_opens[i].listen_port);
+                       packet_start(SSH2_MSG_GLOBAL_REQUEST);
+                       packet_put_cstring("cancel-tcpip-forward");
+                       packet_put_char(0);
+                       packet_put_cstring(channel_rfwd_bind_host(
+                           permitted_opens[i].listen_host));
+                       packet_put_int(permitted_opens[i].listen_port);
+                       packet_send();
+                       /* unregister */
+                       permitted_opens[i].listen_port = 0;
+                       permitted_opens[i].port_to_connect = 0;
+                       free(permitted_opens[i].host_to_connect);
+                       permitted_opens[i].host_to_connect = NULL;
+                       free(permitted_opens[i].listen_host);
+                       permitted_opens[i].listen_host = NULL;
+                       permitted_opens[i].listen_path = NULL;
+                       permitted_opens[i].downstream = NULL;
+               }
+       }
+
        s = channel_open_message();
        debug3("channel %d: status: %s", c->self, s);
        free(s);
@@ -561,6 +623,7 @@ channel_still_open(void)
                case SSH_CHANNEL_OPEN:
                case SSH_CHANNEL_X11_OPEN:
                case SSH_CHANNEL_MUX_CLIENT:
+               case SSH_CHANNEL_MUX_PROXY:
                        return 1;
                case SSH_CHANNEL_INPUT_DRAINING:
                case SSH_CHANNEL_OUTPUT_DRAINING:
@@ -594,6 +657,7 @@ channel_find_open(void)
                case SSH_CHANNEL_RPORT_LISTENER:
                case SSH_CHANNEL_MUX_LISTENER:
                case SSH_CHANNEL_MUX_CLIENT:
+               case SSH_CHANNEL_MUX_PROXY:
                case SSH_CHANNEL_OPENING:
                case SSH_CHANNEL_CONNECTING:
                case SSH_CHANNEL_ZOMBIE:
@@ -619,7 +683,6 @@ channel_find_open(void)
        return -1;
 }
 
-
 /*
  * Returns a message describing the currently open forwarded connections,
  * suitable for sending to the client.  The message contains crlf pairs for
@@ -648,7 +711,6 @@ channel_open_message(void)
                case SSH_CHANNEL_AUTH_SOCKET:
                case SSH_CHANNEL_ZOMBIE:
                case SSH_CHANNEL_ABANDONED:
-               case SSH_CHANNEL_MUX_CLIENT:
                case SSH_CHANNEL_MUX_LISTENER:
                case SSH_CHANNEL_UNIX_LISTENER:
                case SSH_CHANNEL_RUNIX_LISTENER:
@@ -661,8 +723,10 @@ channel_open_message(void)
                case SSH_CHANNEL_X11_OPEN:
                case SSH_CHANNEL_INPUT_DRAINING:
                case SSH_CHANNEL_OUTPUT_DRAINING:
+               case SSH_CHANNEL_MUX_PROXY:
+               case SSH_CHANNEL_MUX_CLIENT:
                        snprintf(buf, sizeof buf,
-                           "  #%d %.300s (t%d r%d i%d/%d o%d/%d fd %d/%d cc %d)\r\n",
+                           "  #%d %.300s (t%d r%d i%u/%d o%u/%d fd %d/%d cc %d)\r\n",
                            c->self, c->remote_name,
                            c->type, c->remote_id,
                            c->istate, buffer_len(&c->input),
@@ -1416,7 +1480,7 @@ port_open_helper(Channel *c, char *rtype)
 {
        char buf[1024];
        char *local_ipaddr = get_local_ipaddr(c->sock);
-       int local_port = c->sock == -1 ? 65536 : get_sock_port(c->sock, 1);
+       int local_port = c->sock == -1 ? 65536 : get_local_port(c->sock);
        char *remote_ipaddr = get_peer_ipaddr(c->sock);
        int remote_port = get_peer_port(c->sock);
 
@@ -1895,14 +1959,14 @@ read_mux(Channel *c, u_int need)
 
        if (buffer_len(&c->input) < need) {
                rlen = need - buffer_len(&c->input);
-               len = read(c->rfd, buf, MIN(rlen, CHAN_RBUF));
+               len = read(c->rfd, buf, MINIMUM(rlen, CHAN_RBUF));
+               if (len < 0 && (errno == EINTR || errno == EAGAIN))
+                       return buffer_len(&c->input);
                if (len <= 0) {
-                       if (errno != EINTR && errno != EAGAIN) {
-                               debug2("channel %d: ctl read<=0 rfd %d len %d",
-                                   c->self, c->rfd, len);
-                               chan_read_failed(c);
-                               return 0;
-                       }
+                       debug2("channel %d: ctl read<=0 rfd %d len %d",
+                           c->self, c->rfd, len);
+                       chan_read_failed(c);
+                       return 0;
                } else
                        buffer_append(&c->input, buf, len);
        }
@@ -2198,7 +2262,7 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
 {
        u_int n, sz, nfdset;
 
-       n = MAX(*maxfdp, channel_max_fd);
+       n = MAXIMUM(*maxfdp, channel_max_fd);
 
        nfdset = howmany(n+1, NFDBITS);
        /* Explicitly test here, because xrealloc isn't always called */
@@ -2358,6 +2422,284 @@ channel_output_poll(void)
        }
 }
 
+/* -- mux proxy support  */
+
+/*
+ * When multiplexing channel messages for mux clients we have to deal
+ * with downstream messages from the mux client and upstream messages
+ * from the ssh server:
+ * 1) Handling downstream messages is straightforward and happens
+ *    in channel_proxy_downstream():
+ *    - We forward all messages (mostly) unmodified to the server.
+ *    - However, in order to route messages from upstream to the correct
+ *      downstream client, we have to replace the channel IDs used by the
+ *      mux clients with a unique channel ID because the mux clients might
+ *      use conflicting channel IDs.
+ *    - so we inspect and change both SSH2_MSG_CHANNEL_OPEN and
+ *      SSH2_MSG_CHANNEL_OPEN_CONFIRMATION messages, create a local
+ *      SSH_CHANNEL_MUX_PROXY channel and replace the mux clients ID
+ *      with the newly allocated channel ID.
+ * 2) Upstream messages are received by matching SSH_CHANNEL_MUX_PROXY
+ *    channels and procesed by channel_proxy_upstream(). The local channel ID
+ *    is then translated back to the original mux client ID.
+ * 3) In both cases we need to keep track of matching SSH2_MSG_CHANNEL_CLOSE
+ *    messages so we can clean up SSH_CHANNEL_MUX_PROXY channels.
+ * 4) The SSH_CHANNEL_MUX_PROXY channels also need to closed when the
+ *    downstream mux client are removed.
+ * 5) Handling SSH2_MSG_CHANNEL_OPEN messages from the upstream server
+ *    requires more work, because they are not addressed to a specific
+ *    channel. E.g. client_request_forwarded_tcpip() needs to figure
+ *    out whether the request is addressed to the local client or a
+ *    specific downstream client based on the listen-address/port.
+ * 6) Agent and X11-Forwarding have a similar problem and are currenly
+ *    not supported as the matching session/channel cannot be identified
+ *    easily.
+ */
+
+/*
+ * receive packets from downstream mux clients:
+ * channel callback fired on read from mux client, creates
+ * SSH_CHANNEL_MUX_PROXY channels and translates channel IDs
+ * on channel creation.
+ */
+int
+channel_proxy_downstream(Channel *downstream)
+{
+       Channel *c = NULL;
+       struct ssh *ssh = active_state;
+       struct sshbuf *original = NULL, *modified = NULL;
+       const u_char *cp;
+       char *ctype = NULL, *listen_host = NULL;
+       u_char type;
+       size_t have;
+       int ret = -1, r, idx;
+       u_int id, remote_id, listen_port;
+
+       /* sshbuf_dump(&downstream->input, stderr); */
+       if ((r = sshbuf_get_string_direct(&downstream->input, &cp, &have))
+           != 0) {
+               error("%s: malformed message: %s", __func__, ssh_err(r));
+               return -1;
+       }
+       if (have < 2) {
+               error("%s: short message", __func__);
+               return -1;
+       }
+       type = cp[1];
+       /* skip padlen + type */
+       cp += 2;
+       have -= 2;
+       if (ssh_packet_log_type(type))
+               debug3("%s: channel %u: down->up: type %u", __func__,
+                   downstream->self, type);
+
+       switch (type) {
+       case SSH2_MSG_CHANNEL_OPEN:
+               if ((original = sshbuf_from(cp, have)) == NULL ||
+                   (modified = sshbuf_new()) == NULL) {
+                       error("%s: alloc", __func__);
+                       goto out;
+               }
+               if ((r = sshbuf_get_cstring(original, &ctype, NULL)) != 0 ||
+                   (r = sshbuf_get_u32(original, &id)) != 0) {
+                       error("%s: parse error %s", __func__, ssh_err(r));
+                       goto out;
+               }
+               c = channel_new("mux proxy", SSH_CHANNEL_MUX_PROXY,
+                  -1, -1, -1, 0, 0, 0, ctype, 1);
+               c->mux_ctx = downstream;        /* point to mux client */
+               c->mux_downstream_id = id;      /* original downstream id */
+               if ((r = sshbuf_put_cstring(modified, ctype)) != 0 ||
+                   (r = sshbuf_put_u32(modified, c->self)) != 0 ||
+                   (r = sshbuf_putb(modified, original)) != 0) {
+                       error("%s: compose error %s", __func__, ssh_err(r));
+                       channel_free(c);
+                       goto out;
+               }
+               break;
+       case SSH2_MSG_CHANNEL_OPEN_CONFIRMATION:
+               /*
+                * Almost the same as SSH2_MSG_CHANNEL_OPEN, except then we
+                * need to parse 'remote_id' instead of 'ctype'.
+                */
+               if ((original = sshbuf_from(cp, have)) == NULL ||
+                   (modified = sshbuf_new()) == NULL) {
+                       error("%s: alloc", __func__);
+                       goto out;
+               }
+               if ((r = sshbuf_get_u32(original, &remote_id)) != 0 ||
+                   (r = sshbuf_get_u32(original, &id)) != 0) {
+                       error("%s: parse error %s", __func__, ssh_err(r));
+                       goto out;
+               }
+               c = channel_new("mux proxy", SSH_CHANNEL_MUX_PROXY,
+                  -1, -1, -1, 0, 0, 0, "mux-down-connect", 1);
+               c->mux_ctx = downstream;        /* point to mux client */
+               c->mux_downstream_id = id;
+               c->remote_id = remote_id;
+               if ((r = sshbuf_put_u32(modified, remote_id)) != 0 ||
+                   (r = sshbuf_put_u32(modified, c->self)) != 0 ||
+                   (r = sshbuf_putb(modified, original)) != 0) {
+                       error("%s: compose error %s", __func__, ssh_err(r));
+                       channel_free(c);
+                       goto out;
+               }
+               break;
+       case SSH2_MSG_GLOBAL_REQUEST:
+               if ((original = sshbuf_from(cp, have)) == NULL) {
+                       error("%s: alloc", __func__);
+                       goto out;
+               }
+               if ((r = sshbuf_get_cstring(original, &ctype, NULL)) != 0) {
+                       error("%s: parse error %s", __func__, ssh_err(r));
+                       goto out;
+               }
+               if (strcmp(ctype, "tcpip-forward") != 0) {
+                       error("%s: unsupported request %s", __func__, ctype);
+                       goto out;
+               }
+               if ((r = sshbuf_get_u8(original, NULL)) != 0 ||
+                   (r = sshbuf_get_cstring(original, &listen_host, NULL)) != 0 ||
+                   (r = sshbuf_get_u32(original, &listen_port)) != 0) {
+                       error("%s: parse error %s", __func__, ssh_err(r));
+                       goto out;
+               }
+               if (listen_port > 65535) {
+                       error("%s: tcpip-forward for %s: bad port %u",
+                           __func__, listen_host, listen_port);
+                       goto out;
+               }
+               /* Record that connection to this host/port is permitted. */
+               permitted_opens = xreallocarray(permitted_opens,
+                   num_permitted_opens + 1, sizeof(*permitted_opens));
+               idx = num_permitted_opens++;
+               permitted_opens[idx].host_to_connect = xstrdup("<mux>");
+               permitted_opens[idx].port_to_connect = -1;
+               permitted_opens[idx].listen_host = listen_host;
+               permitted_opens[idx].listen_port = (int)listen_port;
+               permitted_opens[idx].downstream = downstream;
+               listen_host = NULL;
+               break;
+       case SSH2_MSG_CHANNEL_CLOSE:
+               if (have < 4)
+                       break;
+               remote_id = PEEK_U32(cp);
+               if ((c = channel_by_remote_id(remote_id)) != NULL) {
+                       if (c->flags & CHAN_CLOSE_RCVD)
+                               channel_free(c);
+                       else
+                               c->flags |= CHAN_CLOSE_SENT;
+               }
+               break;
+       }
+       if (modified) {
+               if ((r = sshpkt_start(ssh, type)) != 0 ||
+                   (r = sshpkt_putb(ssh, modified)) != 0 ||
+                   (r = sshpkt_send(ssh)) != 0) {
+                       error("%s: send %s", __func__, ssh_err(r));
+                       goto out;
+               }
+       } else {
+               if ((r = sshpkt_start(ssh, type)) != 0 ||
+                   (r = sshpkt_put(ssh, cp, have)) != 0 ||
+                   (r = sshpkt_send(ssh)) != 0) {
+                       error("%s: send %s", __func__, ssh_err(r));
+                       goto out;
+               }
+       }
+       ret = 0;
+ out:
+       free(ctype);
+       free(listen_host);
+       sshbuf_free(original);
+       sshbuf_free(modified);
+       return ret;
+}
+
+/*
+ * receive packets from upstream server and de-multiplex packets
+ * to correct downstream:
+ * implemented as a helper for channel input handlers,
+ * replaces local (proxy) channel ID with downstream channel ID.
+ */
+int
+channel_proxy_upstream(Channel *c, int type, u_int32_t seq, void *ctxt)
+{
+       struct ssh *ssh = active_state;
+       struct sshbuf *b = NULL;
+       Channel *downstream;
+       const u_char *cp = NULL;
+       size_t len;
+       int r;
+
+       /*
+        * When receiving packets from the peer we need to check whether we
+        * need to forward the packets to the mux client. In this case we
+        * restore the orignal channel id and keep track of CLOSE messages,
+        * so we can cleanup the channel.
+        */
+       if (c == NULL || c->type != SSH_CHANNEL_MUX_PROXY)
+               return 0;
+       if ((downstream = c->mux_ctx) == NULL)
+               return 0;
+       switch (type) {
+       case SSH2_MSG_CHANNEL_CLOSE:
+       case SSH2_MSG_CHANNEL_DATA:
+       case SSH2_MSG_CHANNEL_EOF:
+       case SSH2_MSG_CHANNEL_EXTENDED_DATA:
+       case SSH2_MSG_CHANNEL_OPEN_CONFIRMATION:
+       case SSH2_MSG_CHANNEL_OPEN_FAILURE:
+       case SSH2_MSG_CHANNEL_WINDOW_ADJUST:
+       case SSH2_MSG_CHANNEL_SUCCESS:
+       case SSH2_MSG_CHANNEL_FAILURE:
+       case SSH2_MSG_CHANNEL_REQUEST:
+               break;
+       default:
+               debug2("%s: channel %u: unsupported type %u", __func__,
+                   c->self, type);
+               return 0;
+       }
+       if ((b = sshbuf_new()) == NULL) {
+               error("%s: alloc reply", __func__);
+               goto out;
+       }
+       /* get remaining payload (after id) */
+       cp = sshpkt_ptr(ssh, &len);
+       if (cp == NULL) {
+               error("%s: no packet", __func__);
+               goto out;
+       }
+       /* translate id and send to muxclient */
+       if ((r = sshbuf_put_u8(b, 0)) != 0 ||   /* padlen */
+           (r = sshbuf_put_u8(b, type)) != 0 ||
+           (r = sshbuf_put_u32(b, c->mux_downstream_id)) != 0 ||
+           (r = sshbuf_put(b, cp, len)) != 0 ||
+           (r = sshbuf_put_stringb(&downstream->output, b)) != 0) {
+               error("%s: compose for muxclient %s", __func__, ssh_err(r));
+               goto out;
+       }
+       /* sshbuf_dump(b, stderr); */
+       if (ssh_packet_log_type(type))
+               debug3("%s: channel %u: up->down: type %u", __func__, c->self,
+                   type);
+ out:
+       /* update state */
+       switch (type) {
+       case SSH2_MSG_CHANNEL_OPEN_CONFIRMATION:
+               /* record remote_id for SSH2_MSG_CHANNEL_CLOSE */
+               if (cp && len > 4)
+                       c->remote_id = PEEK_U32(cp);
+               break;
+       case SSH2_MSG_CHANNEL_CLOSE:
+               if (c->flags & CHAN_CLOSE_SENT)
+                       channel_free(c);
+               else
+                       c->flags |= CHAN_CLOSE_RCVD;
+               break;
+       }
+       sshbuf_free(b);
+       return 1;
+}
 
 /* -- protocol input */
 
@@ -2375,6 +2717,8 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
        c = channel_lookup(id);
        if (c == NULL)
                packet_disconnect("Received data for nonexistent channel %d.", id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
 
        /* Ignore any data for non-open channels (might happen on close) */
        if (c->type != SSH_CHANNEL_OPEN &&
@@ -2437,6 +2781,8 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
 
        if (c == NULL)
                packet_disconnect("Received extended_data for bad channel %d.", id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
        if (c->type != SSH_CHANNEL_OPEN) {
                logit("channel %d: ext data for non open", id);
                return 0;
@@ -2482,6 +2828,8 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
        c = channel_lookup(id);
        if (c == NULL)
                packet_disconnect("Received ieof for nonexistent channel %d.", id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
        chan_rcvd_ieof(c);
 
        /* XXX force input close */
@@ -2506,7 +2854,8 @@ channel_input_close(int type, u_int32_t seq, void *ctxt)
        c = channel_lookup(id);
        if (c == NULL)
                packet_disconnect("Received close for nonexistent channel %d.", id);
-
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
        /*
         * Send a confirmation that we have closed the channel and no more
         * data is coming for it.
@@ -2541,9 +2890,11 @@ channel_input_oclose(int type, u_int32_t seq, void *ctxt)
        int id = packet_get_int();
        Channel *c = channel_lookup(id);
 
-       packet_check_eom();
        if (c == NULL)
                packet_disconnect("Received oclose for nonexistent channel %d.", id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
+       packet_check_eom();
        chan_rcvd_oclose(c);
        return 0;
 }
@@ -2555,10 +2906,12 @@ channel_input_close_confirmation(int type, u_int32_t seq, void *ctxt)
        int id = packet_get_int();
        Channel *c = channel_lookup(id);
 
-       packet_check_eom();
        if (c == NULL)
                packet_disconnect("Received close confirmation for "
                    "out-of-range channel %d.", id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
+       packet_check_eom();
        if (c->type != SSH_CHANNEL_CLOSED && c->type != SSH_CHANNEL_ABANDONED)
                packet_disconnect("Received close confirmation for "
                    "non-closed channel %d (type %d).", id, c->type);
@@ -2576,7 +2929,12 @@ channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt)
        id = packet_get_int();
        c = channel_lookup(id);
 
-       if (c==NULL || c->type != SSH_CHANNEL_OPENING)
+       if (c==NULL)
+               packet_disconnect("Received open confirmation for "
+                   "unknown channel %d.", id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
+       if (c->type != SSH_CHANNEL_OPENING)
                packet_disconnect("Received open confirmation for "
                    "non-opening channel %d.", id);
        remote_id = packet_get_int();
@@ -2626,7 +2984,12 @@ channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
        id = packet_get_int();
        c = channel_lookup(id);
 
-       if (c==NULL || c->type != SSH_CHANNEL_OPENING)
+       if (c==NULL)
+               packet_disconnect("Received open failure for "
+                   "unknown channel %d.", id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
+       if (c->type != SSH_CHANNEL_OPENING)
                packet_disconnect("Received open failure for "
                    "non-opening channel %d.", id);
        if (compat20) {
@@ -2670,6 +3033,8 @@ channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
                logit("Received window adjust for non-open channel %d.", id);
                return 0;
        }
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
        adjust = packet_get_int();
        packet_check_eom();
        debug2("channel %d: rcvd adjust %u", id, adjust);
@@ -2700,7 +3065,7 @@ channel_input_port_open(int type, u_int32_t seq, void *ctxt)
        }
        packet_check_eom();
        c = channel_connect_to_port(host, host_port,
-           "connected socket", originator_string);
+           "connected socket", originator_string, NULL, NULL);
        free(originator_string);
        free(host);
        if (c == NULL) {
@@ -2724,14 +3089,15 @@ channel_input_status_confirm(int type, u_int32_t seq, void *ctxt)
        packet_set_alive_timeouts(0);
 
        id = packet_get_int();
-       packet_check_eom();
-
        debug2("channel_input_status_confirm: type %d id %d", type, id);
 
        if ((c = channel_lookup(id)) == NULL) {
                logit("channel_input_status_confirm: %d: unknown", id);
                return 0;
        }       
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
+       packet_check_eom();
        if ((cc = TAILQ_FIRST(&c->status_confirms)) == NULL)
                return 0;
        cc->cb(type, c, cc->ctx);
@@ -2935,7 +3301,7 @@ channel_setup_fwd_listener_tcpip(int type, struct Forward *fwd,
                if (type == SSH_CHANNEL_RPORT_LISTENER && fwd->listen_port == 0 &&
                    allocated_listen_port != NULL &&
                    *allocated_listen_port == 0) {
-                       *allocated_listen_port = get_sock_port(sock, 1);
+                       *allocated_listen_port = get_local_port(sock);
                        debug("Allocated listen port %d",
                            *allocated_listen_port);
                }
@@ -3285,6 +3651,7 @@ channel_request_remote_forwarding(struct Forward *fwd)
                        permitted_opens[idx].listen_path = NULL;
                        permitted_opens[idx].listen_port = fwd->listen_port;
                }
+               permitted_opens[idx].downstream = NULL;
        }
        return (idx);
 }
@@ -3298,7 +3665,8 @@ open_match(ForwardPermission *allowed_open, const char *requestedhost,
        if (allowed_open->port_to_connect != FWD_PERMIT_ANY_PORT &&
            allowed_open->port_to_connect != requestedport)
                return 0;
-       if (strcmp(allowed_open->host_to_connect, requestedhost) != 0)
+       if (strcmp(allowed_open->host_to_connect, FWD_PERMIT_ANY_HOST) != 0 &&
+           strcmp(allowed_open->host_to_connect, requestedhost) != 0)
                return 0;
        return 1;
 }
@@ -3379,6 +3747,7 @@ channel_request_rforward_cancel_tcpip(const char *host, u_short port)
        free(permitted_opens[i].listen_host);
        permitted_opens[i].listen_host = NULL;
        permitted_opens[i].listen_path = NULL;
+       permitted_opens[i].downstream = NULL;
 
        return 0;
 }
@@ -3416,6 +3785,7 @@ channel_request_rforward_cancel_streamlocal(const char *path)
        permitted_opens[i].listen_host = NULL;
        free(permitted_opens[i].listen_path);
        permitted_opens[i].listen_path = NULL;
+       permitted_opens[i].downstream = NULL;
 
        return 0;
 }
@@ -3436,45 +3806,6 @@ channel_request_rforward_cancel(struct Forward *fwd)
 }
 
 /*
- * This is called after receiving CHANNEL_FORWARDING_REQUEST.  This initates
- * listening for the port, and sends back a success reply (or disconnect
- * message if there was an error).
- */
-int
-channel_input_port_forward_request(int is_root, struct ForwardOptions *fwd_opts)
-{
-       int success = 0;
-       struct Forward fwd;
-
-       /* Get arguments from the packet. */
-       memset(&fwd, 0, sizeof(fwd));
-       fwd.listen_port = packet_get_int();
-       fwd.connect_host = packet_get_string(NULL);
-       fwd.connect_port = packet_get_int();
-
-#ifndef HAVE_CYGWIN
-       /*
-        * Check that an unprivileged user is not trying to forward a
-        * privileged port.
-        */
-       if (fwd.listen_port < IPPORT_RESERVED && !is_root)
-               packet_disconnect(
-                   "Requested forwarding of port %d but user is not root.",
-                   fwd.listen_port);
-       if (fwd.connect_port == 0)
-               packet_disconnect("Dynamic forwarding denied.");
-#endif
-
-       /* Initiate forwarding */
-       success = channel_setup_local_fwd_listener(&fwd, fwd_opts);
-
-       /* Free the argument string. */
-       free(fwd.connect_host);
-
-       return (success ? 0 : -1);
-}
-
-/*
  * Permits opening to any host/port if permitted_opens[] is empty.  This is
  * usually called by the server, because the user could connect to any port
  * anyway, and the server has no way to know but to trust the client anyway.
@@ -3498,6 +3829,7 @@ channel_add_permitted_opens(char *host, int port)
        permitted_opens[num_permitted_opens].listen_host = NULL;
        permitted_opens[num_permitted_opens].listen_path = NULL;
        permitted_opens[num_permitted_opens].listen_port = 0;
+       permitted_opens[num_permitted_opens].downstream = NULL;
        num_permitted_opens++;
 
        all_opens_permitted = 0;
@@ -3629,7 +3961,7 @@ connect_next(struct channel_connect *cctx)
 {
        int sock, saved_errno;
        struct sockaddr_un *sunaddr;
-       char ntop[NI_MAXHOST], strport[MAX(NI_MAXSERV,sizeof(sunaddr->sun_path))];
+       char ntop[NI_MAXHOST], strport[MAXIMUM(NI_MAXSERV,sizeof(sunaddr->sun_path))];
 
        for (; cctx->ai; cctx->ai = cctx->ai->ai_next) {
                switch (cctx->ai->ai_family) {
@@ -3694,9 +4026,13 @@ channel_connect_ctx_free(struct channel_connect *cctx)
        memset(cctx, 0, sizeof(*cctx));
 }
 
-/* Return CONNECTING channel to remote host:port or local socket path */
+/*
+ * Return CONNECTING channel to remote host:port or local socket path,
+ * passing back the failure reason if appropriate.
+ */
 static Channel *
-connect_to(const char *name, int port, char *ctype, char *rname)
+connect_to_reason(const char *name, int port, char *ctype, char *rname,
+     int *reason, const char **errmsg)
 {
        struct addrinfo hints;
        int gaierr;
@@ -3737,7 +4073,12 @@ connect_to(const char *name, int port, char *ctype, char *rname)
                hints.ai_family = IPv4or6;
                hints.ai_socktype = SOCK_STREAM;
                snprintf(strport, sizeof strport, "%d", port);
-               if ((gaierr = getaddrinfo(name, strport, &hints, &cctx.aitop)) != 0) {
+               if ((gaierr = getaddrinfo(name, strport, &hints, &cctx.aitop))
+                   != 0) {
+                       if (errmsg != NULL)
+                               *errmsg = ssh_gai_strerror(gaierr);
+                       if (reason != NULL)
+                               *reason = SSH2_OPEN_CONNECT_FAILED;
                        error("connect_to %.100s: unknown host (%s)", name,
                            ssh_gai_strerror(gaierr));
                        return NULL;
@@ -3760,6 +4101,17 @@ connect_to(const char *name, int port, char *ctype, char *rname)
        return c;
 }
 
+/* Return CONNECTING channel to remote host:port or local socket path */
+static Channel *
+connect_to(const char *name, int port, char *ctype, char *rname)
+{
+       return connect_to_reason(name, port, ctype, rname, NULL, NULL);
+}
+
+/*
+ * returns either the newly connected channel or the downstream channel
+ * that needs to deal with this connection.
+ */
 Channel *
 channel_connect_by_listen_address(const char *listen_host,
     u_short listen_port, char *ctype, char *rname)
@@ -3769,6 +4121,8 @@ channel_connect_by_listen_address(const char *listen_host,
        for (i = 0; i < num_permitted_opens; i++) {
                if (open_listen_match_tcpip(&permitted_opens[i], listen_host,
                    listen_port, 1)) {
+                       if (permitted_opens[i].downstream)
+                               return permitted_opens[i].downstream;
                        return connect_to(
                            permitted_opens[i].host_to_connect,
                            permitted_opens[i].port_to_connect, ctype, rname);
@@ -3798,7 +4152,8 @@ channel_connect_by_listen_path(const char *path, char *ctype, char *rname)
 
 /* Check if connecting to that port is permitted and connect. */
 Channel *
-channel_connect_to_port(const char *host, u_short port, char *ctype, char *rname)
+channel_connect_to_port(const char *host, u_short port, char *ctype,
+    char *rname, int *reason, const char **errmsg)
 {
        int i, permit, permit_adm = 1;
 
@@ -3823,9 +4178,11 @@ channel_connect_to_port(const char *host, u_short port, char *ctype, char *rname
        if (!permit || !permit_adm) {
                logit("Received request to connect to host %.100s port %d, "
                    "but the request was denied.", host, port);
+               if (reason != NULL)
+                       *reason = SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED;
                return NULL;
        }
-       return connect_to(host, port, ctype, rname);
+       return connect_to_reason(host, port, ctype, rname, reason, errmsg);
 }
 
 /* Check if connecting to that path is permitted and connect. */
@@ -4016,6 +4373,33 @@ connect_local_xsocket(u_int dnr)
        return connect_local_xsocket_path(buf);
 }
 
+#ifdef __APPLE__
+static int
+is_path_to_xsocket(const char *display, char *path, size_t pathlen)
+{
+       struct stat sbuf;
+
+       if (strlcpy(path, display, pathlen) >= pathlen) {
+               error("%s: display path too long", __func__);
+               return 0;
+       }
+       if (display[0] != '/')
+               return 0;
+       if (stat(path, &sbuf) == 0) {
+               return 1;
+       } else {
+               char *dot = strrchr(path, '.');
+               if (dot != NULL) {
+                       *dot = '\0';
+                       if (stat(path, &sbuf) == 0) {
+                               return 1;
+                       }
+               }
+       }
+       return 0;
+}
+#endif
+
 int
 x11_connect_display(void)
 {
@@ -4037,15 +4421,22 @@ x11_connect_display(void)
         * connection to the real X server.
         */
 
-       /* Check if the display is from launchd. */
 #ifdef __APPLE__
-       if (strncmp(display, "/tmp/launch", 11) == 0) {
-               sock = connect_local_xsocket_path(display);
-               if (sock < 0)
-                       return -1;
+       /* Check if display is a path to a socket (as set by launchd). */
+       {
+               char path[PATH_MAX];
 
-               /* OK, we now have a connection to the display. */
-               return sock;
+               if (is_path_to_xsocket(display, path, sizeof(path))) {
+                       debug("x11_connect_display: $DISPLAY is launchd");
+
+                       /* Create a socket. */
+                       sock = connect_local_xsocket_path(path);
+                       if (sock < 0)
+                               return -1;
+
+                       /* OK, we now have a connection to the display. */
+                       return sock;
+               }
        }
 #endif
        /*
@@ -4212,7 +4603,6 @@ x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
        char *new_data;
        int screen_number;
        const char *cp;
-       u_int32_t rnd = 0;
 
        if (x11_saved_display == NULL)
                x11_saved_display = xstrdup(disp);
@@ -4233,23 +4623,20 @@ x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
        if (x11_saved_proto == NULL) {
                /* Save protocol name. */
                x11_saved_proto = xstrdup(proto);
-               /*
-                * Extract real authentication data and generate fake data
-                * of the same length.
-                */
+
+               /* Extract real authentication data. */
                x11_saved_data = xmalloc(data_len);
-               x11_fake_data = xmalloc(data_len);
                for (i = 0; i < data_len; i++) {
                        if (sscanf(data + 2 * i, "%2x", &value) != 1)
                                fatal("x11_request_forwarding: bad "
                                    "authentication data: %.100s", data);
-                       if (i % 4 == 0)
-                               rnd = arc4random();
                        x11_saved_data[i] = value;
-                       x11_fake_data[i] = rnd & 0xff;
-                       rnd >>= 8;
                }
                x11_saved_data_len = data_len;
+
+               /* Generate fake data of the same length. */
+               x11_fake_data = xmalloc(data_len);
+               arc4random_buf(x11_fake_data, data_len);
                x11_fake_data_len = data_len;
        }
 
index 9d76c9d..ce43236 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.h,v 1.118 2015/07/01 02:26:31 djm Exp $ */
+/* $OpenBSD: channels.h,v 1.121 2017/02/01 02:59:09 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -58,7 +58,8 @@
 #define SSH_CHANNEL_ABANDONED          17      /* Abandoned session, eg mux */
 #define SSH_CHANNEL_UNIX_LISTENER      18      /* Listening on a domain socket. */
 #define SSH_CHANNEL_RUNIX_LISTENER     19      /* Listening to a R-style domain socket. */
-#define SSH_CHANNEL_MAX_TYPE           20
+#define SSH_CHANNEL_MUX_PROXY          20      /* proxy channel for mux-slave */
+#define SSH_CHANNEL_MAX_TYPE           21
 
 #define CHANNEL_CANCEL_PORT_STATIC     -1
 
@@ -162,6 +163,7 @@ struct Channel {
        mux_callback_fn         *mux_rcb;
        void                    *mux_ctx;
        int                     mux_pause;
+       int                     mux_downstream_id;
 };
 
 #define CHAN_EXTENDED_IGNORE           0
@@ -209,6 +211,7 @@ struct Channel {
 /* channel management */
 
 Channel        *channel_by_id(int);
+Channel        *channel_by_remote_id(int);
 Channel        *channel_lookup(int);
 Channel *channel_new(char *, int, int, int, int, u_int, u_int, int, char *, int);
 void    channel_set_fds(int, int, int, int, int, int, int, u_int);
@@ -228,6 +231,11 @@ void        channel_cancel_cleanup(int);
 int     channel_close_fd(int *);
 void    channel_send_window_changes(void);
 
+/* mux proxy support */
+
+int     channel_proxy_downstream(Channel *mc);
+int     channel_proxy_upstream(Channel *, int, u_int32_t, void *);
+
 /* protocol handler */
 
 int     channel_input_close(int, u_int32_t, void *);
@@ -267,8 +275,8 @@ void         channel_update_permitted_opens(int, int);
 void    channel_clear_permitted_opens(void);
 void    channel_clear_adm_permitted_opens(void);
 void    channel_print_adm_permitted_opens(void);
-int      channel_input_port_forward_request(int, struct ForwardOptions *);
-Channel        *channel_connect_to_port(const char *, u_short, char *, char *);
+Channel        *channel_connect_to_port(const char *, u_short, char *, char *, int *,
+            const char **);
 Channel *channel_connect_to_path(const char *, char *, char *);
 Channel        *channel_connect_stdio_fwd(const char*, u_short, int, int);
 Channel        *channel_connect_by_listen_address(const char *, u_short,
index 6a0f1f3..9fcc278 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "includes.h"
 
+#ifdef WITH_SSH1
+
 #include <sys/types.h>
 #include <string.h>
 #include <openssl/evp.h>
@@ -153,3 +155,4 @@ evp_ssh1_3des(void)
        ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH;
        return &ssh1_3des;
 }
+#endif /* WITH_SSH1 */
index ee72ac0..c205b07 100644 (file)
@@ -20,7 +20,8 @@
 
 #include "includes.h"
 
-#ifdef WITH_OPENSSL
+#ifdef WITH_SSH1
+#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_BF)
 
 #include <sys/types.h>
 
@@ -100,4 +101,6 @@ evp_ssh1_bf(void)
        ssh1_bf.key_len = 32;
        return (&ssh1_bf);
 }
-#endif /* WITH_OPENSSL */
+#endif /* defined(WITH_OPENSSL) && !defined(OPENSSL_NO_BF) */
+
+#endif /* WITH_SSH1 */
index 7f31ff4..0899c5a 100644 (file)
@@ -14,7 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $OpenBSD: cipher-chachapoly.c,v 1.7 2015/01/14 10:24:42 markus Exp $ */
+/* $OpenBSD: cipher-chachapoly.c,v 1.8 2016/08/03 05:41:57 djm Exp $ */
 
 #include "includes.h"
 
@@ -28,7 +28,8 @@
 #include "ssherr.h"
 #include "cipher-chachapoly.h"
 
-int chachapoly_init(struct chachapoly_ctx *ctx,
+int
+chachapoly_init(struct chachapoly_ctx *ctx,
     const u_char *key, u_int keylen)
 {
        if (keylen != (32 + 32)) /* 2 x 256 bit keys */
index 6bd3f0c..82da6a2 100644 (file)
--- a/cipher.c
+++ b/cipher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher.c,v 1.100 2015/01/14 10:29:45 djm Exp $ */
+/* $OpenBSD: cipher.c,v 1.102 2016/08/03 05:41:57 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -57,6 +57,15 @@ extern const EVP_CIPHER *evp_ssh1_3des(void);
 extern int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
 #endif
 
+struct sshcipher_ctx {
+       int     plaintext;
+       int     encrypt;
+       EVP_CIPHER_CTX *evp;
+       struct chachapoly_ctx cp_ctx; /* XXX union with evp? */
+       struct aesctr_ctx ac_ctx; /* XXX union with evp? */
+       const struct sshcipher *cipher;
+};
+
 struct sshcipher {
        char    *name;
        int     number;         /* for ssh1 only */
@@ -81,20 +90,28 @@ static const struct sshcipher ciphers[] = {
 #ifdef WITH_SSH1
        { "des",        SSH_CIPHER_DES, 8, 8, 0, 0, 0, 1, EVP_des_cbc },
        { "3des",       SSH_CIPHER_3DES, 8, 16, 0, 0, 0, 1, evp_ssh1_3des },
+# ifndef OPENSSL_NO_BF
        { "blowfish",   SSH_CIPHER_BLOWFISH, 8, 32, 0, 0, 0, 1, evp_ssh1_bf },
+# endif /* OPENSSL_NO_BF */
 #endif /* WITH_SSH1 */
 #ifdef WITH_OPENSSL
        { "none",       SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
 #if !defined(ANDROID)
        { "3des-cbc",   SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
+# endif /* ANDROID */
+# ifndef OPENSSL_NO_BF
        { "blowfish-cbc",
                        SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
+# endif /* OPENSSL_NO_BF */
+# ifndef OPENSSL_NO_CAST
        { "cast128-cbc",
                        SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_cast5_cbc },
-#endif
+# endif /* OPENSSL_NO_CAST */
+# ifndef OPENSSL_NO_RC4
        { "arcfour",    SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 0, EVP_rc4 },
        { "arcfour128", SSH_CIPHER_SSH2, 8, 16, 0, 0, 1536, 0, EVP_rc4 },
        { "arcfour256", SSH_CIPHER_SSH2, 8, 32, 0, 0, 1536, 0, EVP_rc4 },
+# endif /* OPENSSL_NO_RC4 */
        { "aes128-cbc", SSH_CIPHER_SSH2, 16, 16, 0, 0, 0, 1, EVP_aes_128_cbc },
        { "aes192-cbc", SSH_CIPHER_SSH2, 16, 24, 0, 0, 0, 1, EVP_aes_192_cbc },
        { "aes256-cbc", SSH_CIPHER_SSH2, 16, 32, 0, 0, 0, 1, EVP_aes_256_cbc },
@@ -202,6 +219,18 @@ cipher_is_cbc(const struct sshcipher *c)
 }
 
 u_int
+cipher_ctx_is_plaintext(struct sshcipher_ctx *cc)
+{
+       return cc->plaintext;
+}
+
+u_int
+cipher_ctx_get_number(struct sshcipher_ctx *cc)
+{
+       return cc->cipher->number;
+}
+
+u_int
 cipher_mask_ssh1(int client)
 {
        u_int mask = 0;
@@ -293,88 +322,116 @@ cipher_warning_message(const struct sshcipher_ctx *cc)
 }
 
 int
-cipher_init(struct sshcipher_ctx *cc, const struct sshcipher *cipher,
+cipher_init(struct sshcipher_ctx **ccp, const struct sshcipher *cipher,
     const u_char *key, u_int keylen, const u_char *iv, u_int ivlen,
     int do_encrypt)
 {
-#ifdef WITH_OPENSSL
+       struct sshcipher_ctx *cc = NULL;
        int ret = SSH_ERR_INTERNAL_ERROR;
+#ifdef WITH_OPENSSL
        const EVP_CIPHER *type;
        int klen;
        u_char *junk, *discard;
+#endif
+
+       *ccp = NULL;
+       if ((cc = calloc(sizeof(*cc), 1)) == NULL)
+               return SSH_ERR_ALLOC_FAIL;
 
        if (cipher->number == SSH_CIPHER_DES) {
                if (keylen > 8)
                        keylen = 8;
        }
-#endif
+
        cc->plaintext = (cipher->number == SSH_CIPHER_NONE);
        cc->encrypt = do_encrypt;
 
        if (keylen < cipher->key_len ||
-           (iv != NULL && ivlen < cipher_ivlen(cipher)))
-               return SSH_ERR_INVALID_ARGUMENT;
+           (iv != NULL && ivlen < cipher_ivlen(cipher))) {
+               ret = SSH_ERR_INVALID_ARGUMENT;
+               goto out;
+       }
 
        cc->cipher = cipher;
        if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) {
-               return chachapoly_init(&cc->cp_ctx, key, keylen);
+               ret = chachapoly_init(&cc->cp_ctx, key, keylen);
+               goto out;
        }
 #ifndef WITH_OPENSSL
        if ((cc->cipher->flags & CFLAG_AESCTR) != 0) {
                aesctr_keysetup(&cc->ac_ctx, key, 8 * keylen, 8 * ivlen);
                aesctr_ivsetup(&cc->ac_ctx, iv);
-               return 0;
+               ret = 0;
+               goto out;
        }
-       if ((cc->cipher->flags & CFLAG_NONE) != 0)
-               return 0;
-       return SSH_ERR_INVALID_ARGUMENT;
-#else
+       if ((cc->cipher->flags & CFLAG_NONE) != 0) {
+               ret = 0;
+               goto out;
+       }
+       ret = SSH_ERR_INVALID_ARGUMENT;
+       goto out;
+#else /* WITH_OPENSSL */
        type = (*cipher->evptype)();
-       EVP_CIPHER_CTX_init(&cc->evp);
-       if (EVP_CipherInit(&cc->evp, type, NULL, (u_char *)iv,
+       if ((cc->evp = EVP_CIPHER_CTX_new()) == NULL) {
+               ret = SSH_ERR_ALLOC_FAIL;
+               goto out;
+       }
+       if (EVP_CipherInit(cc->evp, type, NULL, (u_char *)iv,
            (do_encrypt == CIPHER_ENCRYPT)) == 0) {
                ret = SSH_ERR_LIBCRYPTO_ERROR;
-               goto bad;
+               goto out;
        }
        if (cipher_authlen(cipher) &&
-           !EVP_CIPHER_CTX_ctrl(&cc->evp, EVP_CTRL_GCM_SET_IV_FIXED,
+           !EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_SET_IV_FIXED,
            -1, (u_char *)iv)) {
                ret = SSH_ERR_LIBCRYPTO_ERROR;
-               goto bad;
+               goto out;
        }
-       klen = EVP_CIPHER_CTX_key_length(&cc->evp);
+       klen = EVP_CIPHER_CTX_key_length(cc->evp);
        if (klen > 0 && keylen != (u_int)klen) {
-               if (EVP_CIPHER_CTX_set_key_length(&cc->evp, keylen) == 0) {
+               if (EVP_CIPHER_CTX_set_key_length(cc->evp, keylen) == 0) {
                        ret = SSH_ERR_LIBCRYPTO_ERROR;
-                       goto bad;
+                       goto out;
                }
        }
-       if (EVP_CipherInit(&cc->evp, NULL, (u_char *)key, NULL, -1) == 0) {
+       if (EVP_CipherInit(cc->evp, NULL, (u_char *)key, NULL, -1) == 0) {
                ret = SSH_ERR_LIBCRYPTO_ERROR;
-               goto bad;
+               goto out;
        }
 
        if (cipher->discard_len > 0) {
                if ((junk = malloc(cipher->discard_len)) == NULL ||
                    (discard = malloc(cipher->discard_len)) == NULL) {
-                       if (junk != NULL)
-                               free(junk);
+                       free(junk);
                        ret = SSH_ERR_ALLOC_FAIL;
-                       goto bad;
+                       goto out;
                }
-               ret = EVP_Cipher(&cc->evp, discard, junk, cipher->discard_len);
+               ret = EVP_Cipher(cc->evp, discard, junk, cipher->discard_len);
                explicit_bzero(discard, cipher->discard_len);
                free(junk);
                free(discard);
                if (ret != 1) {
                        ret = SSH_ERR_LIBCRYPTO_ERROR;
- bad:
-                       EVP_CIPHER_CTX_cleanup(&cc->evp);
-                       return ret;
+                       goto out;
                }
        }
-#endif
-       return 0;
+       ret = 0;
+#endif /* WITH_OPENSSL */
+ out:
+       if (ret == 0) {
+               /* success */
+               *ccp = cc;
+       } else {
+               if (cc != NULL) {
+#ifdef WITH_OPENSSL
+                       if (cc->evp != NULL)
+                               EVP_CIPHER_CTX_free(cc->evp);
+#endif /* WITH_OPENSSL */
+                       explicit_bzero(cc, sizeof(*cc));
+                       free(cc);
+               }
+       }
+       return ret;
 }
 
 /*
@@ -415,33 +472,33 @@ cipher_crypt(struct sshcipher_ctx *cc, u_int seqnr, u_char *dest,
                if (authlen != cipher_authlen(cc->cipher))
                        return SSH_ERR_INVALID_ARGUMENT;
                /* increment IV */
-               if (!EVP_CIPHER_CTX_ctrl(&cc->evp, EVP_CTRL_GCM_IV_GEN,
+               if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
                    1, lastiv))
                        return SSH_ERR_LIBCRYPTO_ERROR;
                /* set tag on decyption */
                if (!cc->encrypt &&
-                   !EVP_CIPHER_CTX_ctrl(&cc->evp, EVP_CTRL_GCM_SET_TAG,
+                   !EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_SET_TAG,
                    authlen, (u_char *)src + aadlen + len))
                        return SSH_ERR_LIBCRYPTO_ERROR;
        }
        if (aadlen) {
                if (authlen &&
-                   EVP_Cipher(&cc->evp, NULL, (u_char *)src, aadlen) < 0)
+                   EVP_Cipher(cc->evp, NULL, (u_char *)src, aadlen) < 0)
                        return SSH_ERR_LIBCRYPTO_ERROR;
                memcpy(dest, src, aadlen);
        }
        if (len % cc->cipher->block_size)
                return SSH_ERR_INVALID_ARGUMENT;
-       if (EVP_Cipher(&cc->evp, dest + aadlen, (u_char *)src + aadlen,
+       if (EVP_Cipher(cc->evp, dest + aadlen, (u_char *)src + aadlen,
            len) < 0)
                return SSH_ERR_LIBCRYPTO_ERROR;
        if (authlen) {
                /* compute tag (on encrypt) or verify tag (on decrypt) */
-               if (EVP_Cipher(&cc->evp, NULL, NULL, 0) < 0)
+               if (EVP_Cipher(cc->evp, NULL, NULL, 0) < 0)
                        return cc->encrypt ?
                            SSH_ERR_LIBCRYPTO_ERROR : SSH_ERR_MAC_INVALID;
                if (cc->encrypt &&
-                   !EVP_CIPHER_CTX_ctrl(&cc->evp, EVP_CTRL_GCM_GET_TAG,
+                   !EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_GET_TAG,
                    authlen, dest + aadlen + len))
                        return SSH_ERR_LIBCRYPTO_ERROR;
        }
@@ -463,20 +520,23 @@ cipher_get_length(struct sshcipher_ctx *cc, u_int *plenp, u_int seqnr,
        return 0;
 }
 
-int
-cipher_cleanup(struct sshcipher_ctx *cc)
+void
+cipher_free(struct sshcipher_ctx *cc)
 {
-       if (cc == NULL || cc->cipher == NULL)
-               return 0;
+       if (cc == NULL)
+               return;
        if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0)
                explicit_bzero(&cc->cp_ctx, sizeof(cc->cp_ctx));
        else if ((cc->cipher->flags & CFLAG_AESCTR) != 0)
                explicit_bzero(&cc->ac_ctx, sizeof(cc->ac_ctx));
 #ifdef WITH_OPENSSL
-       else if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0)
-               return SSH_ERR_LIBCRYPTO_ERROR;
+       if (cc->evp != NULL) {
+               EVP_CIPHER_CTX_free(cc->evp);
+               cc->evp = NULL;
+       }
 #endif
-       return 0;
+       explicit_bzero(cc, sizeof(*cc));
+       free(cc);
 }
 
 /*
@@ -484,8 +544,8 @@ cipher_cleanup(struct sshcipher_ctx *cc)
  * passphrase and using the resulting 16 bytes as the key.
  */
 int
-cipher_set_key_string(struct sshcipher_ctx *cc, const struct sshcipher *cipher,
-    const char *passphrase, int do_encrypt)
+cipher_set_key_string(struct sshcipher_ctx **ccp,
+    const struct sshcipher *cipher, const char *passphrase, int do_encrypt)
 {
        u_char digest[16];
        int r = SSH_ERR_INTERNAL_ERROR;
@@ -495,7 +555,7 @@ cipher_set_key_string(struct sshcipher_ctx *cc, const struct sshcipher *cipher,
            digest, sizeof(digest))) != 0)
                goto out;
 
-       r = cipher_init(cc, cipher, digest, 16, NULL, 0, do_encrypt);
+       r = cipher_init(ccp, cipher, digest, 16, NULL, 0, do_encrypt);
  out:
        explicit_bzero(digest, sizeof(digest));
        return r;
@@ -520,7 +580,7 @@ cipher_get_keyiv_len(const struct sshcipher_ctx *cc)
                ivlen = sizeof(cc->ac_ctx.ctr);
 #ifdef WITH_OPENSSL
        else
-               ivlen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+               ivlen = EVP_CIPHER_CTX_iv_length(cc->evp);
 #endif /* WITH_OPENSSL */
        return (ivlen);
 }
@@ -552,7 +612,7 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
        case SSH_CIPHER_SSH2:
        case SSH_CIPHER_DES:
        case SSH_CIPHER_BLOWFISH:
-               evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+               evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
                if (evplen == 0)
                        return 0;
                else if (evplen < 0)
@@ -561,20 +621,20 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
                        return SSH_ERR_INVALID_ARGUMENT;
 #ifndef OPENSSL_HAVE_EVPCTR
                if (c->evptype == evp_aes_128_ctr)
-                       ssh_aes_ctr_iv(&cc->evp, 0, iv, len);
+                       ssh_aes_ctr_iv(cc->evp, 0, iv, len);
                else
 #endif
                if (cipher_authlen(c)) {
-                       if (!EVP_CIPHER_CTX_ctrl(&cc->evp, EVP_CTRL_GCM_IV_GEN,
+                       if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
                           len, iv))
                               return SSH_ERR_LIBCRYPTO_ERROR;
                } else
-                       memcpy(iv, cc->evp.iv, len);
+                       memcpy(iv, cc->evp->iv, len);
                break;
 #endif
 #ifdef WITH_SSH1
        case SSH_CIPHER_3DES:
-               return ssh1_3des_iv(&cc->evp, 0, iv, 24);
+               return ssh1_3des_iv(cc->evp, 0, iv, 24);
 #endif
        default:
                return SSH_ERR_INVALID_ARGUMENT;
@@ -600,21 +660,27 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
        case SSH_CIPHER_SSH2:
        case SSH_CIPHER_DES:
        case SSH_CIPHER_BLOWFISH:
-               evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+               evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
                if (evplen <= 0)
                        return SSH_ERR_LIBCRYPTO_ERROR;
+#ifndef OPENSSL_HAVE_EVPCTR
+               /* XXX iv arg is const, but ssh_aes_ctr_iv isn't */
+               if (c->evptype == evp_aes_128_ctr)
+                       ssh_aes_ctr_iv(cc->evp, 1, (u_char *)iv, evplen);
+               else
+#endif
                if (cipher_authlen(c)) {
                        /* XXX iv arg is const, but EVP_CIPHER_CTX_ctrl isn't */
-                       if (!EVP_CIPHER_CTX_ctrl(&cc->evp,
+                       if (!EVP_CIPHER_CTX_ctrl(cc->evp,
                            EVP_CTRL_GCM_SET_IV_FIXED, -1, (void *)iv))
                                return SSH_ERR_LIBCRYPTO_ERROR;
                } else
-                       memcpy(cc->evp.iv, iv, evplen);
+                       memcpy(cc->evp->iv, iv, evplen);
                break;
 #endif
 #ifdef WITH_SSH1
        case SSH_CIPHER_3DES:
-               return ssh1_3des_iv(&cc->evp, 1, (u_char *)iv, 24);
+               return ssh1_3des_iv(cc->evp, 1, (u_char *)iv, 24);
 #endif
        default:
                return SSH_ERR_INVALID_ARGUMENT;
@@ -623,14 +689,14 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
 }
 
 #ifdef WITH_OPENSSL
-#define EVP_X_STATE(evp)       (evp).cipher_data
-#define EVP_X_STATE_LEN(evp)   (evp).cipher->ctx_size
+#define EVP_X_STATE(evp)       (evp)->cipher_data
+#define EVP_X_STATE_LEN(evp)   (evp)->cipher->ctx_size
 #endif
 
 int
 cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
 {
-#ifdef WITH_OPENSSL
+#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
        const struct sshcipher *c = cc->cipher;
        int plen = 0;
 
@@ -649,7 +715,7 @@ cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
 void
 cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat)
 {
-#ifdef WITH_OPENSSL
+#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
        const struct sshcipher *c = cc->cipher;
        int plen;
 
index 06d4be4..f4bca62 100644 (file)
--- a/cipher.h
+++ b/cipher.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher.h,v 1.48 2015/07/08 19:09:25 markus Exp $ */
+/* $OpenBSD: cipher.h,v 1.49 2016/08/03 05:41:57 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
 #define CIPHER_DECRYPT         0
 
 struct sshcipher;
-struct sshcipher_ctx {
-       int     plaintext;
-       int     encrypt;
-       EVP_CIPHER_CTX evp;
-       struct chachapoly_ctx cp_ctx; /* XXX union with evp? */
-       struct aesctr_ctx ac_ctx; /* XXX union with evp? */
-       const struct sshcipher *cipher;
-};
+struct sshcipher_ctx;
 
 u_int   cipher_mask_ssh1(int);
 const struct sshcipher *cipher_by_name(const char *);
@@ -80,15 +73,15 @@ char        *cipher_name(int);
 const char *cipher_warning_message(const struct sshcipher_ctx *);
 int     ciphers_valid(const char *);
 char   *cipher_alg_list(char, int);
-int     cipher_init(struct sshcipher_ctx *, const struct sshcipher *,
+int     cipher_init(struct sshcipher_ctx **, const struct sshcipher *,
     const u_char *, u_int, const u_char *, u_int, int);
 int     cipher_crypt(struct sshcipher_ctx *, u_int, u_char *, const u_char *,
     u_int, u_int, u_int);
 int     cipher_get_length(struct sshcipher_ctx *, u_int *, u_int,
     const u_char *, u_int);
-int     cipher_cleanup(struct sshcipher_ctx *);
-int     cipher_set_key_string(struct sshcipher_ctx *, const struct sshcipher *,
-    const char *, int);
+void    cipher_free(struct sshcipher_ctx *);
+int     cipher_set_key_string(struct sshcipher_ctx **,
+    const struct sshcipher *, const char *, int);
 u_int   cipher_blocksize(const struct sshcipher *);
 u_int   cipher_keylen(const struct sshcipher *);
 u_int   cipher_seclen(const struct sshcipher *);
@@ -96,10 +89,14 @@ u_int        cipher_authlen(const struct sshcipher *);
 u_int   cipher_ivlen(const struct sshcipher *);
 u_int   cipher_is_cbc(const struct sshcipher *);
 
+u_int   cipher_ctx_is_plaintext(struct sshcipher_ctx *);
+u_int   cipher_ctx_get_number(struct sshcipher_ctx *);
+
 u_int   cipher_get_number(const struct sshcipher *);
 int     cipher_get_keyiv(struct sshcipher_ctx *, u_char *, u_int);
 int     cipher_set_keyiv(struct sshcipher_ctx *, const u_char *);
 int     cipher_get_keyiv_len(const struct sshcipher_ctx *);
 int     cipher_get_keycontext(const struct sshcipher_ctx *, u_char *);
 void    cipher_set_keycontext(struct sshcipher_ctx *, const u_char *);
+
 #endif                         /* CIPHER_H */
index 87ceb3d..0648162 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.275 2015/07/10 06:21:53 markus Exp $ */
+/* $OpenBSD: clientloop.c,v 1.291 2017/03/10 05:01:13 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -61,7 +61,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN MAX */
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #ifdef HAVE_SYS_STAT_H
 #include "sshpty.h"
 #include "match.h"
 #include "msg.h"
-#include "roaming.h"
 #include "ssherr.h"
 #include "hostfile.h"
 
@@ -124,6 +122,9 @@ extern int stdin_null_flag;
 /* Flag indicating that no shell has been requested */
 extern int no_shell_flag;
 
+/* Flag indicating that ssh should daemonise after authentication is complete */
+extern int fork_after_authentication_flag;
+
 /* Control socket */
 extern int muxserver_sock; /* XXX use mux_client_cleanup() instead */
 
@@ -169,8 +170,6 @@ static u_int x11_refuse_time;       /* If >0, refuse x11 opens after this time. */
 static void client_init_dispatch(void);
 int    session_ident = -1;
 
-int    session_resumed = 0;
-
 /* Track escape per proto2 channel */
 struct escape_filter_ctx {
        int escape_pending;
@@ -288,6 +287,9 @@ client_x11_display_valid(const char *display)
 {
        size_t i, dlen;
 
+       if (display == NULL)
+               return 0;
+
        dlen = strlen(display);
        for (i = 0; i < dlen; i++) {
                if (!isalnum((u_char)display[i]) &&
@@ -301,35 +303,34 @@ client_x11_display_valid(const char *display)
 
 #define SSH_X11_PROTO          "MIT-MAGIC-COOKIE-1"
 #define X11_TIMEOUT_SLACK      60
-void
+int
 client_x11_get_proto(const char *display, const char *xauth_path,
     u_int trusted, u_int timeout, char **_proto, char **_data)
 {
-       char cmd[1024];
-       char line[512];
-       char xdisplay[512];
+       char cmd[1024], line[512], xdisplay[512];
+       char xauthfile[PATH_MAX], xauthdir[PATH_MAX];
        static char proto[512], data[512];
        FILE *f;
-       int got_data = 0, generated = 0, do_unlink = 0, i;
-       char *xauthdir, *xauthfile;
+       int got_data = 0, generated = 0, do_unlink = 0, r;
        struct stat st;
        u_int now, x11_timeout_real;
 
-       xauthdir = xauthfile = NULL;
        *_proto = proto;
        *_data = data;
-       proto[0] = data[0] = '\0';
+       proto[0] = data[0] = xauthfile[0] = xauthdir[0] = '\0';
 
-       if (xauth_path == NULL ||(stat(xauth_path, &st) == -1)) {
+       if (!client_x11_display_valid(display)) {
+               if (display != NULL)
+                       logit("DISPLAY \"%s\" invalid; disabling X11 forwarding",
+                           display);
+               return -1;
+       }
+       if (xauth_path != NULL && stat(xauth_path, &st) == -1) {
                debug("No xauth program.");
-       } else if (!client_x11_display_valid(display)) {
-               logit("DISPLAY '%s' invalid, falling back to fake xauth data",
-                   display);
-       } else {
-               if (display == NULL) {
-                       debug("x11_get_proto: DISPLAY not set");
-                       return;
-               }
+               xauth_path = NULL;
+       }
+
+       if (xauth_path != NULL) {
                /*
                 * Handle FamilyLocal case where $DISPLAY does
                 * not match an authorization entry.  For this we
@@ -338,45 +339,60 @@ client_x11_get_proto(const char *display, const char *xauth_path,
                 *      is not perfect.
                 */
                if (strncmp(display, "localhost:", 10) == 0) {
-                       snprintf(xdisplay, sizeof(xdisplay), "unix:%s",
-                           display + 10);
+                       if ((r = snprintf(xdisplay, sizeof(xdisplay), "unix:%s",
+                           display + 10)) < 0 ||
+                           (size_t)r >= sizeof(xdisplay)) {
+                               error("%s: display name too long", __func__);
+                               return -1;
+                       }
                        display = xdisplay;
                }
                if (trusted == 0) {
-                       xauthdir = xmalloc(PATH_MAX);
-                       xauthfile = xmalloc(PATH_MAX);
-                       mktemp_proto(xauthdir, PATH_MAX);
                        /*
+                        * Generate an untrusted X11 auth cookie.
+                        *
                         * The authentication cookie should briefly outlive
                         * ssh's willingness to forward X11 connections to
                         * avoid nasty fail-open behaviour in the X server.
                         */
+                       mktemp_proto(xauthdir, sizeof(xauthdir));
+                       if (mkdtemp(xauthdir) == NULL) {
+                               error("%s: mkdtemp: %s",
+                                   __func__, strerror(errno));
+                               return -1;
+                       }
+                       do_unlink = 1;
+                       if ((r = snprintf(xauthfile, sizeof(xauthfile),
+                           "%s/xauthfile", xauthdir)) < 0 ||
+                           (size_t)r >= sizeof(xauthfile)) {
+                               error("%s: xauthfile path too long", __func__);
+                               unlink(xauthfile);
+                               rmdir(xauthdir);
+                               return -1;
+                       }
+
                        if (timeout >= UINT_MAX - X11_TIMEOUT_SLACK)
                                x11_timeout_real = UINT_MAX;
                        else
                                x11_timeout_real = timeout + X11_TIMEOUT_SLACK;
-                       if (mkdtemp(xauthdir) != NULL) {
-                               do_unlink = 1;
-                               snprintf(xauthfile, PATH_MAX, "%s/xauthfile",
-                                   xauthdir);
-                               snprintf(cmd, sizeof(cmd),
-                                   "%s -f %s generate %s " SSH_X11_PROTO
-                                   " untrusted timeout %u 2>" _PATH_DEVNULL,
-                                   xauth_path, xauthfile, display,
-                                   x11_timeout_real);
-                               debug2("x11_get_proto: %s", cmd);
-                               if (x11_refuse_time == 0) {
-                                       now = monotime() + 1;
-                                       if (UINT_MAX - timeout < now)
-                                               x11_refuse_time = UINT_MAX;
-                                       else
-                                               x11_refuse_time = now + timeout;
-                                       channel_set_x11_refuse_time(
-                                           x11_refuse_time);
-                               }
-                               if (system(cmd) == 0)
-                                       generated = 1;
+                       if ((r = snprintf(cmd, sizeof(cmd),
+                           "%s -f %s generate %s " SSH_X11_PROTO
+                           " untrusted timeout %u 2>" _PATH_DEVNULL,
+                           xauth_path, xauthfile, display,
+                           x11_timeout_real)) < 0 ||
+                           (size_t)r >= sizeof(cmd))
+                               fatal("%s: cmd too long", __func__);
+                       debug2("%s: %s", __func__, cmd);
+                       if (x11_refuse_time == 0) {
+                               now = monotime() + 1;
+                               if (UINT_MAX - timeout < now)
+                                       x11_refuse_time = UINT_MAX;
+                               else
+                                       x11_refuse_time = now + timeout;
+                               channel_set_x11_refuse_time(x11_refuse_time);
                        }
+                       if (system(cmd) == 0)
+                               generated = 1;
                }
 
                /*
@@ -398,17 +414,20 @@ client_x11_get_proto(const char *display, const char *xauth_path,
                                got_data = 1;
                        if (f)
                                pclose(f);
-               } else
-                       error("Warning: untrusted X11 forwarding setup failed: "
-                           "xauth key data not generated");
+               }
        }
 
        if (do_unlink) {
                unlink(xauthfile);
                rmdir(xauthdir);
        }
-       free(xauthdir);
-       free(xauthfile);
+
+       /* Don't fall back to fake X11 data for untrusted forwarding */
+       if (!trusted && !got_data) {
+               error("Warning: untrusted X11 forwarding setup failed: "
+                   "xauth key data not generated");
+               return -1;
+       }
 
        /*
         * If we didn't get authentication data, just make up some
@@ -419,19 +438,20 @@ client_x11_get_proto(const char *display, const char *xauth_path,
         * for the local connection.
         */
        if (!got_data) {
-               u_int32_t rnd = 0;
+               u_int8_t rnd[16];
+               u_int i;
 
                logit("Warning: No xauth data; "
                    "using fake authentication data for X11 forwarding.");
                strlcpy(proto, SSH_X11_PROTO, sizeof proto);
-               for (i = 0; i < 16; i++) {
-                       if (i % 4 == 0)
-                               rnd = arc4random();
+               arc4random_buf(rnd, sizeof(rnd));
+               for (i = 0; i < sizeof(rnd); i++) {
                        snprintf(data + 2 * i, sizeof data - 2 * i, "%02x",
-                           rnd & 0xff);
-                       rnd >>= 8;
+                           rnd[i]);
                }
        }
+
+       return 0;
 }
 
 /*
@@ -650,16 +670,16 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
                server_alive_time = now + options.server_alive_interval;
        }
        if (options.rekey_interval > 0 && compat20 && !rekeying)
-               timeout_secs = MIN(timeout_secs, packet_get_rekey_timeout());
+               timeout_secs = MINIMUM(timeout_secs, packet_get_rekey_timeout());
        set_control_persist_exit_time();
        if (control_persist_exit_time > 0) {
-               timeout_secs = MIN(timeout_secs,
+               timeout_secs = MINIMUM(timeout_secs,
                        control_persist_exit_time - now);
                if (timeout_secs < 0)
                        timeout_secs = 0;
        }
        if (minwait_secs != 0)
-               timeout_secs = MIN(timeout_secs, (int)minwait_secs);
+               timeout_secs = MINIMUM(timeout_secs, (int)minwait_secs);
        if (timeout_secs == INT_MAX)
                tvp = NULL;
        else {
@@ -735,7 +755,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
 static void
 client_process_net_input(fd_set *readset)
 {
-       int len, cont = 0;
+       int len;
        char buf[SSH_IOBUFSZ];
 
        /*
@@ -744,8 +764,8 @@ client_process_net_input(fd_set *readset)
         */
        if (FD_ISSET(connection_in, readset)) {
                /* Read as much as possible. */
-               len = roaming_read(connection_in, buf, sizeof(buf), &cont);
-               if (len == 0 && cont == 0) {
+               len = read(connection_in, buf, sizeof(buf));
+               if (len == 0) {
                        /*
                         * Received EOF.  The remote host has closed the
                         * connection.
@@ -971,7 +991,7 @@ process_cmdline(void)
                            CHANNEL_CANCEL_PORT_STATIC,
                            &options.fwd_opts) > 0;
                if (!ok) {
-                       logit("Unkown port forwarding.");
+                       logit("Unknown port forwarding.");
                        goto out;
                }
                logit("Canceled forwarding.");
@@ -1483,13 +1503,44 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
 {
        fd_set *readset = NULL, *writeset = NULL;
        double start_time, total_time;
-       int r, max_fd = 0, max_fd2 = 0, len, rekeying = 0;
+       int r, max_fd = 0, max_fd2 = 0, len;
        u_int64_t ibytes, obytes;
        u_int nalloc = 0;
        char buf[100];
 
        debug("Entering interactive session.");
 
+       if (options.control_master &&
+           !option_clear_or_none(options.control_path)) {
+               debug("pledge: id");
+               if (pledge("stdio rpath wpath cpath unix inet dns recvfd proc exec id tty",
+                   NULL) == -1)
+                       fatal("%s pledge(): %s", __func__, strerror(errno));
+
+       } else if (options.forward_x11 || options.permit_local_command) {
+               debug("pledge: exec");
+               if (pledge("stdio rpath wpath cpath unix inet dns proc exec tty",
+                   NULL) == -1)
+                       fatal("%s pledge(): %s", __func__, strerror(errno));
+
+       } else if (options.update_hostkeys) {
+               debug("pledge: filesystem full");
+               if (pledge("stdio rpath wpath cpath unix inet dns proc tty",
+                   NULL) == -1)
+                       fatal("%s pledge(): %s", __func__, strerror(errno));
+
+       } else if (!option_clear_or_none(options.proxy_command) ||
+           fork_after_authentication_flag) {
+               debug("pledge: proc");
+               if (pledge("stdio cpath unix inet dns proc tty", NULL) == -1)
+                       fatal("%s pledge(): %s", __func__, strerror(errno));
+
+       } else {
+               debug("pledge: network");
+               if (pledge("stdio unix inet dns tty", NULL) == -1)
+                       fatal("%s pledge(): %s", __func__, strerror(errno));
+       }
+
        start_time = get_current_time();
 
        /* Initialize variables. */
@@ -1500,7 +1551,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
        buffer_high = 64 * 1024;
        connection_in = packet_get_connection_in();
        connection_out = packet_get_connection_out();
-       max_fd = MAX(connection_in, connection_out);
+       max_fd = MAXIMUM(connection_in, connection_out);
 
        if (!compat20) {
                /* enable nonblocking unless tty */
@@ -1510,9 +1561,9 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
                        set_nonblock(fileno(stdout));
                if (!isatty(fileno(stderr)))
                        set_nonblock(fileno(stderr));
-               max_fd = MAX(max_fd, fileno(stdin));
-               max_fd = MAX(max_fd, fileno(stdout));
-               max_fd = MAX(max_fd, fileno(stderr));
+               max_fd = MAXIMUM(max_fd, fileno(stdin));
+               max_fd = MAXIMUM(max_fd, fileno(stdout));
+               max_fd = MAXIMUM(max_fd, fileno(stderr));
        }
        quit_pending = 0;
        escape_char1 = escape_char_arg;
@@ -1568,10 +1619,15 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
                if (compat20 && session_closed && !channel_still_open())
                        break;
 
-               rekeying = (active_state->kex != NULL && !active_state->kex->done);
-
-               if (rekeying) {
+               if (ssh_packet_is_rekeying(active_state)) {
                        debug("rekeying in progress");
+               } else if (need_rekeying) {
+                       /* manual rekey request */
+                       debug("need rekeying");
+                       if ((r = kex_start_rekex(active_state)) != 0)
+                               fatal("%s: kex_start_rekex: %s", __func__,
+                                   ssh_err(r));
+                       need_rekeying = 0;
                } else {
                        /*
                         * Make packets of buffered stdin data, and buffer
@@ -1602,23 +1658,14 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
                 */
                max_fd2 = max_fd;
                client_wait_until_can_do_something(&readset, &writeset,
-                   &max_fd2, &nalloc, rekeying);
+                   &max_fd2, &nalloc, ssh_packet_is_rekeying(active_state));
 
                if (quit_pending)
                        break;
 
                /* Do channel operations unless rekeying in progress. */
-               if (!rekeying) {
+               if (!ssh_packet_is_rekeying(active_state))
                        channel_after_select(readset, writeset);
-                       if (need_rekeying || packet_need_rekeying()) {
-                               debug("need rekeying");
-                               active_state->kex->done = 0;
-                               if ((r = kex_send_kexinit(active_state)) != 0)
-                                       fatal("%s: kex_send_kexinit: %s",
-                                           __func__, ssh_err(r));
-                               need_rekeying = 0;
-                       }
-               }
 
                /* Buffer input from the connection.  */
                client_process_net_input(readset);
@@ -1636,14 +1683,6 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
                        client_process_output(writeset);
                }
 
-               if (session_resumed) {
-                       connection_in = packet_get_connection_in();
-                       connection_out = packet_get_connection_out();
-                       max_fd = MAX(max_fd, connection_out);
-                       max_fd = MAX(max_fd, connection_in);
-                       session_resumed = 0;
-               }
-
                /*
                 * Send as much buffered packet data as possible to the
                 * sender.
@@ -1737,7 +1776,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
        }
 
        /* Clear and free any buffers. */
-       memset(buf, 0, sizeof(buf));
+       explicit_bzero(buf, sizeof(buf));
        buffer_free(&stdin_buffer);
        buffer_free(&stdout_buffer);
        buffer_free(&stderr_buffer);
@@ -1844,11 +1883,14 @@ client_input_agent_open(int type, u_int32_t seq, void *ctxt)
 }
 
 static Channel *
-client_request_forwarded_tcpip(const char *request_type, int rchan)
+client_request_forwarded_tcpip(const char *request_type, int rchan,
+    u_int rwindow, u_int rmaxpack)
 {
        Channel *c = NULL;
+       struct sshbuf *b = NULL;
        char *listen_address, *originator_address;
        u_short listen_port, originator_port;
+       int r;
 
        /* Get rest of the packet */
        listen_address = packet_get_string(NULL);
@@ -1863,6 +1905,31 @@ client_request_forwarded_tcpip(const char *request_type, int rchan)
        c = channel_connect_by_listen_address(listen_address, listen_port,
            "forwarded-tcpip", originator_address);
 
+       if (c != NULL && c->type == SSH_CHANNEL_MUX_CLIENT) {
+               if ((b = sshbuf_new()) == NULL) {
+                       error("%s: alloc reply", __func__);
+                       goto out;
+               }
+               /* reconstruct and send to muxclient */
+               if ((r = sshbuf_put_u8(b, 0)) != 0 ||   /* padlen */
+                   (r = sshbuf_put_u8(b, SSH2_MSG_CHANNEL_OPEN)) != 0 ||
+                   (r = sshbuf_put_cstring(b, request_type)) != 0 ||
+                   (r = sshbuf_put_u32(b, rchan)) != 0 ||
+                   (r = sshbuf_put_u32(b, rwindow)) != 0 ||
+                   (r = sshbuf_put_u32(b, rmaxpack)) != 0 ||
+                   (r = sshbuf_put_cstring(b, listen_address)) != 0 ||
+                   (r = sshbuf_put_u32(b, listen_port)) != 0 ||
+                   (r = sshbuf_put_cstring(b, originator_address)) != 0 ||
+                   (r = sshbuf_put_u32(b, originator_port)) != 0 ||
+                   (r = sshbuf_put_stringb(&c->output, b)) != 0) {
+                       error("%s: compose for muxclient %s", __func__,
+                           ssh_err(r));
+                       goto out;
+               }
+       }
+
+ out:
+       sshbuf_free(b);
        free(originator_address);
        free(listen_address);
        return c;
@@ -2018,7 +2085,8 @@ client_input_channel_open(int type, u_int32_t seq, void *ctxt)
            ctype, rchan, rwindow, rmaxpack);
 
        if (strcmp(ctype, "forwarded-tcpip") == 0) {
-               c = client_request_forwarded_tcpip(ctype, rchan);
+               c = client_request_forwarded_tcpip(ctype, rchan, rwindow,
+                   rmaxpack);
        } else if (strcmp(ctype, "forwarded-streamlocal@openssh.com") == 0) {
                c = client_request_forwarded_streamlocal(ctype, rchan);
        } else if (strcmp(ctype, "x11") == 0) {
@@ -2026,8 +2094,9 @@ client_input_channel_open(int type, u_int32_t seq, void *ctxt)
        } else if (strcmp(ctype, "auth-agent@openssh.com") == 0) {
                c = client_request_agent(ctype, rchan);
        }
-/* XXX duplicate : */
-       if (c != NULL) {
+       if (c != NULL && c->type == SSH_CHANNEL_MUX_CLIENT) {
+               debug3("proxied to downstream: %s", ctype);
+       } else if (c != NULL) {
                debug("confirm %s", ctype);
                c->remote_id = rchan;
                c->remote_window = rwindow;
@@ -2063,6 +2132,9 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt)
        char *rtype;
 
        id = packet_get_int();
+       c = channel_lookup(id);
+       if (channel_proxy_upstream(c, type, seq, ctxt))
+               return 0;
        rtype = packet_get_string(NULL);
        reply = packet_get_char();
 
@@ -2071,7 +2143,7 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt)
 
        if (id == -1) {
                error("client_input_channel_req: request for channel -1");
-       } else if ((c = channel_lookup(id)) == NULL) {
+       } else if (c == NULL) {
                error("client_input_channel_req: channel %d: "
                    "unknown channel", id);
        } else if (strcmp(rtype, "eow@openssh.com") == 0) {
@@ -2319,6 +2391,26 @@ client_global_hostkeys_private_confirm(int type, u_int32_t seq, void *_ctx)
 }
 
 /*
+ * Returns non-zero if the key is accepted by HostkeyAlgorithms.
+ * Made slightly less trivial by the multiple RSA signature algorithm names.
+ */
+static int
+key_accepted_by_hostkeyalgs(const struct sshkey *key)
+{
+       const char *ktype = sshkey_ssh_name(key);
+       const char *hostkeyalgs = options.hostkeyalgorithms != NULL ?
+           options.hostkeyalgorithms : KEX_DEFAULT_PK_ALG;
+
+       if (key == NULL || key->type == KEY_UNSPEC)
+               return 0;
+       if (key->type == KEY_RSA &&
+           (match_pattern_list("rsa-sha2-256", hostkeyalgs, 0) == 1 ||
+           match_pattern_list("rsa-sha2-512", hostkeyalgs, 0) == 1))
+               return 1;
+       return match_pattern_list(ktype, hostkeyalgs, 0) == 1;
+}
+
+/*
  * Handle hostkeys-00@openssh.com global request to inform the client of all
  * the server's hostkeys. The keys are checked against the user's
  * HostkeyAlgorithms preference before they are accepted.
@@ -2364,10 +2456,7 @@ client_input_hostkeys(void)
                    sshkey_type(key), fp);
                free(fp);
 
-               /* Check that the key is accepted in HostkeyAlgorithms */
-               if (match_pattern_list(sshkey_ssh_name(key),
-                   options.hostkeyalgorithms ? options.hostkeyalgorithms :
-                   KEX_DEFAULT_PK_ALG, 0) != 1) {
+               if (!key_accepted_by_hostkeyalgs(key)) {
                        debug3("%s: %s key not permitted by HostkeyAlgorithms",
                            __func__, sshkey_ssh_name(key));
                        continue;
index 338d451..ae83aa8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.h,v 1.31 2013/06/02 23:36:29 dtucker Exp $ */
+/* $OpenBSD: clientloop.h,v 1.33 2016/09/30 09:19:13 markus Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -39,7 +39,7 @@
 
 /* Client side main loop for the interactive session. */
 int     client_loop(int, int, int);
-void    client_x11_get_proto(const char *, const char *, u_int, u_int,
+int     client_x11_get_proto(const char *, const char *, u_int, u_int,
            char **, char **);
 void    client_global_request_reply_fwd(int, u_int32_t, void *);
 void    client_session2_setup(int, int, int, const char *, struct termios *,
@@ -71,9 +71,10 @@ void client_expect_confirm(int, const char *, enum confirm_action);
 #define SSHMUX_COMMAND_FORWARD         5       /* Forward only, no command */
 #define SSHMUX_COMMAND_STOP            6       /* Disable mux but not conn */
 #define SSHMUX_COMMAND_CANCEL_FWD      7       /* Cancel forwarding(s) */
+#define SSHMUX_COMMAND_PROXY           8       /* Open new connection */
 
 void   muxserver_listen(void);
-void   muxclient(const char *);
+int    muxclient(const char *);
 void   mux_exit_message(Channel *, int);
 void   mux_tty_alloc_failed(Channel *);
 
index 5583804..1e80cfa 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat.c,v 1.97 2015/08/19 23:21:42 djm Exp $ */
+/* $OpenBSD: compat.c,v 1.100 2017/02/03 23:01:19 djm Exp $ */
 /*
  * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl.  All rights reserved.
  *
@@ -37,6 +37,7 @@
 #include "compat.h"
 #include "log.h"
 #include "match.h"
+#include "kex.h"
 
 int compat13 = 0;
 int compat20 = 0;
@@ -250,42 +251,14 @@ proto_spec(const char *spec)
        return ret;
 }
 
-/*
- * Filters a proposal string, excluding any algorithm matching the 'filter'
- * pattern list.
- */
-static char *
-filter_proposal(char *proposal, const char *filter)
-{
-       Buffer b;
-       char *orig_prop, *fix_prop;
-       char *cp, *tmp;
-
-       buffer_init(&b);
-       tmp = orig_prop = xstrdup(proposal);
-       while ((cp = strsep(&tmp, ",")) != NULL) {
-               if (match_pattern_list(cp, filter, 0) != 1) {
-                       if (buffer_len(&b) > 0)
-                               buffer_append(&b, ",", 1);
-                       buffer_append(&b, cp, strlen(cp));
-               } else
-                       debug2("Compat: skipping algorithm \"%s\"", cp);
-       }
-       buffer_append(&b, "\0", 1);
-       fix_prop = xstrdup((char *)buffer_ptr(&b));
-       buffer_free(&b);
-       free(orig_prop);
-
-       return fix_prop;
-}
-
 char *
 compat_cipher_proposal(char *cipher_prop)
 {
        if (!(datafellows & SSH_BUG_BIGENDIANAES))
                return cipher_prop;
        debug2("%s: original cipher proposal: %s", __func__, cipher_prop);
-       cipher_prop = filter_proposal(cipher_prop, "aes*");
+       if ((cipher_prop = match_filter_list(cipher_prop, "aes*")) == NULL)
+               fatal("match_filter_list failed");
        debug2("%s: compat cipher proposal: %s", __func__, cipher_prop);
        if (*cipher_prop == '\0')
                fatal("No supported ciphers found");
@@ -298,7 +271,8 @@ compat_pkalg_proposal(char *pkalg_prop)
        if (!(datafellows & SSH_BUG_RSASIGMD5))
                return pkalg_prop;
        debug2("%s: original public key proposal: %s", __func__, pkalg_prop);
-       pkalg_prop = filter_proposal(pkalg_prop, "ssh-rsa");
+       if ((pkalg_prop = match_filter_list(pkalg_prop, "ssh-rsa")) == NULL)
+               fatal("match_filter_list failed");
        debug2("%s: compat public key proposal: %s", __func__, pkalg_prop);
        if (*pkalg_prop == '\0')
                fatal("No supported PK algorithms found");
@@ -312,10 +286,14 @@ compat_kex_proposal(char *p)
                return p;
        debug2("%s: original KEX proposal: %s", __func__, p);
        if ((datafellows & SSH_BUG_CURVE25519PAD) != 0)
-               p = filter_proposal(p, "curve25519-sha256@libssh.org");
+               if ((p = match_filter_list(p,
+                   "curve25519-sha256@libssh.org")) == NULL)
+                       fatal("match_filter_list failed");
        if ((datafellows & SSH_OLD_DHGEX) != 0) {
-               p = filter_proposal(p, "diffie-hellman-group-exchange-sha256");
-               p = filter_proposal(p, "diffie-hellman-group-exchange-sha1");
+               if ((p = match_filter_list(p,
+                   "diffie-hellman-group-exchange-sha256,"
+                   "diffie-hellman-group-exchange-sha1")) == NULL)
+                       fatal("match_filter_list failed");
        }
        debug2("%s: compat KEX proposal: %s", __func__, p);
        if (*p == '\0')
index c563628..c4bd827 100755 (executable)
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012, 2013 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2012-12-23'
+timestamp='2016-05-15'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-12-23'
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -54,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       eval $set_cc_for_build
+       cat <<-EOF > $dummy.c
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+       ;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # Note: NetBSD doesn't particularly care about the vendor
        # portion of the name.  We always set it to "unknown".
        sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+           /sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || \
+           echo unknown)`
        case "${UNAME_MACHINE_ARCH}" in
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
+           earmv*)
+               arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+               endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+               machine=${arch}${endian}-unknown
+               ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
+       # to ELF recently (or will in the future) and ABI.
        case "${UNAME_MACHINE_ARCH}" in
+           earm*)
+               os=netbsdelf
+               ;;
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                os=netbsd
                ;;
        esac
+       # Determine ABI tags.
+       case "${UNAME_MACHINE_ARCH}" in
+           earm*)
+               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+               abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+               ;;
+       esac
        # The OS release
        # Debian GNU/NetBSD machines have a different userland, and
        # thus, need a distinct triplet. However, they do not need
@@ -192,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                release='-gnu'
                ;;
            *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
                ;;
        esac
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
+       echo "${machine}-${os}${release}${abi}"
        exit ;;
     *:Bitrig:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -208,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
        exit ;;
+    *:LibertyBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+       exit ;;
     *:ekkoBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
        exit ;;
@@ -220,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:MirBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
        exit ;;
+    *:Sortix:*:*)
+       echo ${UNAME_MACHINE}-unknown-sortix
+       exit ;;
     alpha:OSF1:*:*)
        case $UNAME_RELEASE in
        *4.0)
@@ -236,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
        case "$ALPHA_CPU_TYPE" in
            "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
+               UNAME_MACHINE=alphaev5 ;;
            "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
+               UNAME_MACHINE=alphaev56 ;;
            "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
+               UNAME_MACHINE=alphapca56 ;;
            "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
+               UNAME_MACHINE=alphapca57 ;;
            "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
+               UNAME_MACHINE=alphaev6 ;;
            "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
+               UNAME_MACHINE=alphaev67 ;;
            "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
+               UNAME_MACHINE=alphaev69 ;;
            "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
+               UNAME_MACHINE=alphaev7 ;;
            "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
+               UNAME_MACHINE=alphaev79 ;;
        esac
        # A Pn.n version is a patched version.
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
        exitcode=$?
        trap '' 0
@@ -344,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
-       SUN_ARCH="i386"
+       SUN_ARCH=i386
        # If there is a compiler, see if it is configured for 64-bit objects.
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
        # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
                grep IS_64BIT_ARCH >/dev/null
            then
-               SUN_ARCH="x86_64"
+               SUN_ARCH=x86_64
            fi
        fi
        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -378,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
        case "`/bin/arch`" in
            sun3)
                echo m68k-sun-sunos${UNAME_RELEASE}
@@ -564,8 +603,9 @@ EOF
        else
                IBM_ARCH=powerpc
        fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
+       if [ -x /usr/bin/lslpp ] ; then
+               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+                          awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
@@ -602,13 +642,13 @@ EOF
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                    case "${sc_cpu_version}" in
-                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                     523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
                        case "${sc_kernel_bits}" in
-                         32) HP_ARCH="hppa2.0n" ;;
-                         64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                         32) HP_ARCH=hppa2.0n ;;
+                         64) HP_ARCH=hppa2.0w ;;
+                         '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
                        esac ;;
                    esac
                fi
@@ -647,11 +687,11 @@ EOF
                    exit (0);
                }
 EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
                fi ;;
        esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
+       if [ ${HP_ARCH} = hppa2.0w ]
        then
            eval $set_cc_for_build
 
@@ -664,12 +704,12 @@ EOF
            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
            # => hppa64-hp-hpux11.23
 
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+           if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
                grep -q __LP64__
            then
-               HP_ARCH="hppa2.0w"
+               HP_ARCH=hppa2.0w
            else
-               HP_ARCH="hppa64"
+               HP_ARCH=hppa64
            fi
        fi
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -774,14 +814,14 @@ EOF
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     5000:UNIX_System_V:4.*:*)
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -811,7 +851,7 @@ EOF
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
-    i*:MSYS*:*)
+    *:MSYS*:*)
        echo ${UNAME_MACHINE}-pc-msys
        exit ;;
     i*:windows32*:*)
@@ -859,21 +899,21 @@ EOF
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
     aarch64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     aarch64_be:Linux:*:*)
        UNAME_MACHINE=aarch64_be
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -886,59 +926,60 @@ EOF
          EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
+           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        else
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
                | grep -q __ARM_PCS_VFP
            then
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
            else
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
            fi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     cris:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     crisv32:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+       exit ;;
+    e2k:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     frv:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     hexagon:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:Linux:*:*)
-       LIBC=gnu
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    k1om:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -957,60 +998,63 @@ EOF
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
-    or32:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+    openrisc*:Linux:*:*)
+       echo or1k-unknown-linux-${LIBC}
+       exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-gnu
+       echo sparc-unknown-linux-${LIBC}
        exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+       echo hppa64-unknown-linux-${LIBC}
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
+         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+         *)    echo hppa-unknown-linux-${LIBC} ;;
        esac
        exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+       echo powerpc64-unknown-linux-${LIBC}
        exit ;;
     ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+       echo powerpc-unknown-linux-${LIBC}
        exit ;;
     ppc64le:Linux:*:*)
-       echo powerpc64le-unknown-linux-gnu
+       echo powerpc64le-unknown-linux-${LIBC}
        exit ;;
     ppcle:Linux:*:*)
-       echo powerpcle-unknown-linux-gnu
+       echo powerpcle-unknown-linux-${LIBC}
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
+       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
+       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1086,7 +1130,7 @@ EOF
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
        # the processor, so we play safe by assuming i586.
        # Note: whatever this is, it MUST be the same as what config.sub
-       # prints for the "djgpp" host, or else GDB configury will decide that
+       # prints for the "djgpp" host, or else GDB configure will decide that
        # this is a cross-build.
        echo i586-pc-msdosdjgpp
        exit ;;
@@ -1235,6 +1279,9 @@ EOF
     SX-8R:SUPER-UX:*:*)
        echo sx8r-nec-superux${UNAME_RELEASE}
        exit ;;
+    SX-ACE:SUPER-UX:*:*)
+       echo sxace-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1243,24 +1290,36 @@ EOF
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           i386)
-               eval $set_cc_for_build
-               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-                     grep IS_64BIT_ARCH >/dev/null
-                 then
-                     UNAME_PROCESSOR="x86_64"
-                 fi
-               fi ;;
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
+       eval $set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+           if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
+           fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
+       fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
+       if test "$UNAME_PROCESSOR" = x86; then
                UNAME_PROCESSOR=i386
                UNAME_MACHINE=pc
        fi
@@ -1291,7 +1350,7 @@ EOF
        # "uname -m" is not consistent, so use $cputype instead. 386
        # is converted to i386 for consistency with other x86
        # operating systems.
-       if test "$cputype" = "386"; then
+       if test "$cputype" = 386; then
            UNAME_MACHINE=i386
        else
            UNAME_MACHINE="$cputype"
@@ -1333,7 +1392,7 @@ EOF
        echo i386-pc-xenix
        exit ;;
     i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
        exit ;;
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
@@ -1344,171 +1403,25 @@ EOF
     x86_64:VMkernel:*:*)
        echo ${UNAME_MACHINE}-unknown-esx
        exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-       "4"
-#else
-       ""
-#endif
-       ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
+    amd64:Isilon\ OneFS:*:*)
+       echo x86_64-unknown-onefs
        exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
+esac
 
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 
index 5acadd1..aeb2663 100644 (file)
--- a/config.h
+++ b/config.h
 /* File names may not contain backslash characters */
 /* #undef FILESYSTEM_NO_BACKSLASH */
 
+#define OPENSSL_NO_BF 1
+#define OPENSSL_NO_CAST 1
+
 /* fsid_t has member val */
 /* #undef FSID_HAS_VAL */
 
index 7500df5..b65420e 100644 (file)
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
 /* Define if you have a getaddrinfo that fails for the all-zeros IPv6 address
    */
 #undef AIX_GETNAMEINFO_HACK
@@ -34,9 +37,6 @@
 /* ia_uinfo routines not supported by OS yet */
 #undef BROKEN_LIBIAF
 
-/* Ultrix mmap can't map files */
-#undef BROKEN_MMAP
-
 /* Define if your struct dirent expects you to allocate extra space for d_name
    */
 #undef BROKEN_ONE_BYTE_DIRENT_D_NAME
@@ -75,7 +75,7 @@
 /* Define if your snprintf is busted */
 #undef BROKEN_SNPRINTF
 
-/* FreeBSD strnvis argument order is swapped compared to OpenBSD */
+/* strnvis detected broken */
 #undef BROKEN_STRNVIS
 
 /* tcgetattr with ICANON may hang */
 /* Define to 1 if you have the `endutxent' function. */
 #undef HAVE_ENDUTXENT
 
+/* Define to 1 if you have the `err' function. */
+#undef HAVE_ERR
+
+/* Define to 1 if you have the `errx' function. */
+#undef HAVE_ERRX
+
+/* Define to 1 if you have the <err.h> header file. */
+#undef HAVE_ERR_H
+
 /* Define if your system has /etc/default/login */
 #undef HAVE_ETC_DEFAULT_LOGIN
 
 /* Define to 1 if you have the `krb5_get_error_message' function. */
 #undef HAVE_KRB5_GET_ERROR_MESSAGE
 
+/* Define to 1 if you have the <langinfo.h> header file. */
+#undef HAVE_LANGINFO_H
+
 /* Define to 1 if you have the <lastlog.h> header file. */
 #undef HAVE_LASTLOG_H
 
 /* Define to 1 if you have the `network' library (-lnetwork). */
 #undef HAVE_LIBNETWORK
 
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
 /* Define to 1 if you have the `pam' library (-lpam). */
 #undef HAVE_LIBPAM
 
 /* Define to 1 if you have the <linux/seccomp.h> header file. */
 #undef HAVE_LINUX_SECCOMP_H
 
+/* Define to 1 if you have the `llabs' function. */
+#undef HAVE_LLABS
+
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
 /* Define to 1 if you have the `mblen' function. */
 #undef HAVE_MBLEN
 
+/* Define to 1 if you have the `mbtowc' function. */
+#undef HAVE_MBTOWC
+
 /* Define to 1 if you have the `md5_crypt' function. */
 #undef HAVE_MD5_CRYPT
 
 /* Define to 1 if you have the `mkdtemp' function. */
 #undef HAVE_MKDTEMP
 
-/* Define to 1 if you have the `mmap' function. */
-#undef HAVE_MMAP
-
 /* define if you have mode_t data type */
 #undef HAVE_MODE_T
 
 /* Define to 1 if you have the `ngetaddrinfo' function. */
 #undef HAVE_NGETADDRINFO
 
+/* Define to 1 if you have the `nl_langinfo' function. */
+#undef HAVE_NL_LANGINFO
+
 /* Define to 1 if you have the `nsleep' function. */
 #undef HAVE_NSLEEP
 
 /* define if you have pid_t data type */
 #undef HAVE_PID_T
 
+/* Define to 1 if you have the `pledge' function. */
+#undef HAVE_PLEDGE
+
 /* Define to 1 if you have the `poll' function. */
 #undef HAVE_POLL
 
 /* Define to 1 if you have the `prctl' function. */
 #undef HAVE_PRCTL
 
+/* Define to 1 if you have the `priv_basicset' function. */
+#undef HAVE_PRIV_BASICSET
+
+/* Define to 1 if you have the <priv.h> header file. */
+#undef HAVE_PRIV_H
+
 /* Define if you have /proc/$pid/fd */
 #undef HAVE_PROC_PID
 
 /* Define to 1 if you have the `setpcred' function. */
 #undef HAVE_SETPCRED
 
+/* Define to 1 if you have the `setpflags' function. */
+#undef HAVE_SETPFLAGS
+
+/* Define to 1 if you have the `setppriv' function. */
+#undef HAVE_SETPPRIV
+
 /* Define to 1 if you have the `setproctitle' function. */
 #undef HAVE_SETPROCTITLE
 
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
 /* Define to 1 if you have the `strdup' function. */
 #undef HAVE_STRDUP
 
 /* define if you have struct in6_addr data type */
 #undef HAVE_STRUCT_IN6_ADDR
 
-/* Define to 1 if `pw_change' is member of `struct passwd'. */
+/* Define to 1 if `pw_change' is member of `struct passwd'. */
 #undef HAVE_STRUCT_PASSWD_PW_CHANGE
 
-/* Define to 1 if `pw_class' is member of `struct passwd'. */
+/* Define to 1 if `pw_class' is member of `struct passwd'. */
 #undef HAVE_STRUCT_PASSWD_PW_CLASS
 
-/* Define to 1 if `pw_expire' is member of `struct passwd'. */
+/* Define to 1 if `pw_expire' is member of `struct passwd'. */
 #undef HAVE_STRUCT_PASSWD_PW_EXPIRE
 
-/* Define to 1 if `pw_gecos' is member of `struct passwd'. */
+/* Define to 1 if `pw_gecos' is member of `struct passwd'. */
 #undef HAVE_STRUCT_PASSWD_PW_GECOS
 
 /* define if you have struct sockaddr_in6 data type */
 #undef HAVE_STRUCT_SOCKADDR_IN6
 
-/* Define to 1 if `sin6_scope_id' is member of `struct sockaddr_in6'. */
+/* Define to 1 if `sin6_scope_id' is member of `struct sockaddr_in6'. */
 #undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
 
 /* define if you have struct sockaddr_storage data type */
 #undef HAVE_STRUCT_SOCKADDR_STORAGE
 
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
 /* Define to 1 if the system has the type `struct timespec'. */
 /* Define to 1 if you have the <sys/ptms.h> header file. */
 #undef HAVE_SYS_PTMS_H
 
+/* Define to 1 if you have the <sys/ptrace.h> header file. */
+#undef HAVE_SYS_PTRACE_H
+
 /* Define to 1 if you have the <sys/select.h> header file. */
 #undef HAVE_SYS_SELECT_H
 
 /* Define to 1 if you have the `waitpid' function. */
 #undef HAVE_WAITPID
 
+/* Define to 1 if you have the `warn' function. */
+#undef HAVE_WARN
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define to 1 if you have the `wcwidth' function. */
+#undef HAVE_WCWIDTH
+
 /* Define to 1 if you have the `_getlong' function. */
 #undef HAVE__GETLONG
 
 /* String used in /etc/passwd to denote locked account */
 #undef LOCKED_PASSWD_SUBSTR
 
-/* Some versions of /bin/login need the TERM supplied on the commandline */
-#undef LOGIN_NEEDS_TERM
-
 /* Some systems need a utmpx entry for /bin/login to work */
 #undef LOGIN_NEEDS_UTMPX
 
-/* Define if your login program cannot handle end of options ("--") */
-#undef LOGIN_NO_ENDOPT
-
-/* If your header files don't define LOGIN_PROGRAM, then use this (detected)
-   from environment and PATH */
-#undef LOGIN_PROGRAM_FALLBACK
-
 /* Set this to your mail directory if you do not have _PATH_MAILDIR */
 #undef MAIL_DIRECTORY
 
 /* compiler does not accept __attribute__ on return types */
 #undef NO_ATTRIBUTE_ON_RETURN_TYPE
 
-/* Define if the concept of ports only accessible to superusers isn't known */
-#undef NO_IPPORT_RESERVED_CONCEPT
-
 /* Define if you don't want to use lastlog in session.c */
 #undef NO_SSH_LASTLOG
 
+/* Define to disable UID restoration test */
+#undef NO_UID_RESTORATION_TEST
+
 /* Define if X11 doesn't support AF_UNIX sockets on that system */
 #undef NO_X11_UNIX_SOCKETS
 
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
 /* no privsep sandboxing */
 #undef SANDBOX_NULL
 
+/* Sandbox using pledge(2) */
+#undef SANDBOX_PLEDGE
+
 /* Sandbox using setrlimit(2) */
 #undef SANDBOX_RLIMIT
 
 /* define if setrlimit RLIMIT_NOFILE breaks things */
 #undef SANDBOX_SKIP_RLIMIT_NOFILE
 
+/* Sandbox using Solaris/Illumos privileges */
+#undef SANDBOX_SOLARIS
+
 /* Sandbox using systrace(4) */
 #undef SANDBOX_SYSTRACE
 
 /* Define if sshd somehow reacquires a controlling TTY after setsid() */
 #undef SSHD_ACQUIRES_CTTY
 
+/* sshd PAM service name */
+#undef SSHD_PAM_SERVICE
+
 /* Define if pam_chauthtok wants real uid set to the unpriv'ed user */
 #undef SSHPAM_CHAUTHTOK_NEEDS_RUID
 
 /* Use PIPES instead of a socketpair() */
 #undef USE_PIPES
 
+/* Define if you have Solaris privileges */
+#undef USE_SOLARIS_PRIVS
+
 /* Define if you have Solaris process contracts */
 #undef USE_SOLARIS_PROCESS_CONTRACTS
 
 /* include SSH protocol version 1 support */
 #undef WITH_SSH1
 
-/* Define to 1 if your processor stores words with the most significant byte
-   first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+#  undef WORDS_BIGENDIAN
+# endif
+#endif
 
 /* Define if xauth is found in your path */
 #undef XAUTH_PATH
 
+/* Enable large inode numbers on Mac OS X 10.5.  */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
index eee8dcc..9feb73b 100755 (executable)
@@ -1,24 +1,18 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012, 2013 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2012-12-23'
+timestamp='2016-06-20'
 
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -26,11 +20,12 @@ timestamp='2012-12-23'
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches to <config-patches@gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -38,7 +33,7 @@ timestamp='2012-12-23'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -58,8 +53,7 @@ timestamp='2012-12-23'
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
@@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -259,19 +251,21 @@ case $basic_machine in
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
-       | arc \
+       | arc | arceb \
        | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
        | avr | avr32 \
+       | ba \
        | be32 | be64 \
        | bfin \
-       | c4x | clipper \
+       | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | epiphany \
-       | fido | fr30 | frv \
+       | e2k | epiphany \
+       | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | k1om \
        | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -289,26 +283,29 @@ case $basic_machine in
        | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa32r6 | mipsisa32r6el \
        | mipsisa64 | mipsisa64el \
        | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64r6 | mipsisa64r6el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipsr5900 | mipsr5900el \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
        | moxie \
        | mt \
        | msp430 \
        | nds32 | nds32le | nds32be \
-       | nios | nios2 \
+       | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | open8 \
-       | or32 \
+       | open8 | or1k | or1knd | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
+       | riscv32 | riscv64 \
        | rl78 | rx \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -316,6 +313,7 @@ case $basic_machine in
        | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+       | visium \
        | we32k \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
@@ -330,7 +328,10 @@ case $basic_machine in
        c6x)
                basic_machine=tic6x-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+       leon|leon[3-9])
+               basic_machine=sparc-$basic_machine
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -372,21 +373,23 @@ case $basic_machine in
        | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | ba-* \
        | be32-* | be64-* \
        | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* \
-       | clipper-* | craynv-* | cydra-* \
+       | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
+       | e2k-* | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | k1om-* \
        | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
@@ -406,28 +409,33 @@ case $basic_machine in
        | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa32r6-* | mipsisa32r6el-* \
        | mipsisa64-* | mipsisa64el-* \
        | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64r6-* | mipsisa64r6el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipsr5900-* | mipsr5900el-* \
        | mipstx39-* | mipstx39el-* \
        | mmix-* \
        | mt-* \
        | msp430-* \
        | nds32-* | nds32le-* | nds32be-* \
-       | nios-* | nios2-* \
+       | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | open8-* \
+       | or1k*-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
+       | riscv32-* | riscv64-* \
        | rl78-* | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
        | tahoe-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tile*-* \
@@ -435,6 +443,7 @@ case $basic_machine in
        | ubicom32-* \
        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
        | vax-* \
+       | visium-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
@@ -511,6 +520,9 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-aros
                ;;
+       asmjs)
+               basic_machine=asmjs-unknown
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -631,6 +643,14 @@ case $basic_machine in
                basic_machine=m68k-bull
                os=-sysv3
                ;;
+       e500v[12])
+               basic_machine=powerpc-unknown
+               os=$os"spe"
+               ;;
+       e500v[12]-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=$os"spe"
+               ;;
        ebmon29k)
                basic_machine=a29k-amd
                os=-ebmon
@@ -772,6 +792,9 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       leon-*|leon[3-9]-*)
+               basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+               ;;
        m68knommu)
                basic_machine=m68k-unknown
                os=-linux
@@ -799,7 +822,7 @@ case $basic_machine in
                os=-mingw64
                ;;
        mingw32)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-mingw32
                ;;
        mingw32ce)
@@ -827,6 +850,10 @@ case $basic_machine in
                basic_machine=powerpc-unknown
                os=-morphos
                ;;
+       moxiebox)
+               basic_machine=moxie-unknown
+               os=-moxiebox
+               ;;
        msdos)
                basic_machine=i386-pc
                os=-msdos
@@ -835,7 +862,7 @@ case $basic_machine in
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
        msys)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-msys
                ;;
        mvs)
@@ -1357,29 +1384,30 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-             | -sym* | -kopensolaris* \
+             | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* | -aros* \
+             | -aos* | -aros* | -cloudabi* | -sortix* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -bitrig* | -openbsd* | -solidbsd* \
+             | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+             | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+             | -onefs* | -tirtos* | -phoenix*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1503,9 +1531,6 @@ case $os in
        -aros*)
                os=-aros
                ;;
-       -kaos*)
-               os=-kaos
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
@@ -1514,6 +1539,8 @@ case $os in
                ;;
        -nacl*)
                ;;
+       -ios)
+               ;;
        -none)
                ;;
        *)
@@ -1554,6 +1581,9 @@ case $basic_machine in
        c4x-* | tic4x-*)
                os=-coff
                ;;
+       c8051-*)
+               os=-elf
+               ;;
        hexagon-*)
                os=-elf
                ;;
index 0d7a5b9..5eaaa39 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,63 +1,84 @@
 #! /bin/sh
 # From configure.ac Revision: 1.583 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for OpenSSH Portable.
+# Generated by GNU Autoconf 2.69 for OpenSSH Portable.
 #
 # Report bugs to <openssh-unix-dev@mindrot.org>.
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    PATH_SEPARATOR=:
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
   fi
-  rm -f conf$$.sh
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -66,20 +87,19 @@ fi
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -90,32 +110,316 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: openssh-unix-dev@mindrot.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
   fi
-done
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
 
-# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -129,13 +433,17 @@ else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
            s//\1/
            q
@@ -150,427 +458,125 @@ echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  if test $as_have_required = yes &&    (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
 }
 
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
-if as_func_ret_success; then
-  :
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_ln_s='cp -pR'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-IFS=$as_save_IFS
-
-
-      for as_shell in $as_candidate_shells $SHELL; do
-        # Try only shells that exist, to save several forks.
-        if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-               { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 fi
 
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-              as_have_required=yes
-              if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
-fi
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
 
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf@gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='OpenSSH'
@@ -578,6 +584,7 @@ PACKAGE_TARNAME='openssh'
 PACKAGE_VERSION='Portable'
 PACKAGE_STRING='OpenSSH Portable'
 PACKAGE_BUGREPORT='openssh-unix-dev@mindrot.org'
+PACKAGE_URL=''
 
 ac_unique_file="ssh.c"
 # Factoring default headers for most tests.
@@ -616,111 +623,174 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-CPP
-GREP
-EGREP
-AWK
-RANLIB
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-AR
-ac_ct_AR
-CAT
-KILL
-PERL
-SED
-ENT
-TEST_MINUS_S_SH
-SH
-GROFF
-NROFF
-MANDOC
-TEST_SHELL
-MANFMT
-PATH_GROUPADD_PROG
-PATH_USERADD_PROG
-MAKE_PACKAGE_SUPPORTED
-STARTUP_SCRIPT_SHELL
-LOGIN_PROGRAM_FALLBACK
-PATH_PASSWD_PROG
-LD
-PKGCONFIG
-LIBEDIT
-TEST_SSH_ECC
-COMMENT_OUT_ECC
-SSH_PRIVSEP_USER
-SSHLIBS
-SSHDLIBS
-KRB5CONF
-GSSLIBS
-K5LIBS
-PRIVSEP_PATH
-xauth_path
-STRIP_OPT
-XAUTH_PATH
-MANTYPE
-mansubdir
-user_path
-piddir
-TEST_SSH_IPV6
-TEST_MALLOC_OPTIONS
-UNSUPPORTED_ALGORITHMS
+ac_subst_vars='LTLIBOBJS
 LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
+UNSUPPORTED_ALGORITHMS
+TEST_MALLOC_OPTIONS
+TEST_SSH_UTF8
+TEST_SSH_IPV6
+piddir
+user_path
+mansubdir
+MANTYPE
+XAUTH_PATH
+STRIP_OPT
+xauth_path
+PRIVSEP_PATH
+K5LIBS
+GSSLIBS
+KRB5CONF
+SSHDLIBS
+SSHLIBS
+SSH_PRIVSEP_USER
+COMMENT_OUT_ECC
+TEST_SSH_ECC
+LIBEDIT
+PKGCONFIG
+LDNSCONFIG
+COMMENT_OUT_RSA1
+LD
+PATH_PASSWD_PROG
+STARTUP_SCRIPT_SHELL
+MAKE_PACKAGE_SUPPORTED
+PATH_USERADD_PROG
+PATH_GROUPADD_PROG
+MANFMT
+TEST_SHELL
+MANDOC
+NROFF
+GROFF
+SH
+TEST_MINUS_S_SH
+ENT
+SED
+PERL
+KILL
+CAT
+ac_ct_AR
+AR
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+RANLIB
+AWK
+EGREP
+GREP
+CPP
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_largefile
+with_openssl
+with_ssh1
+with_stackprotect
+with_hardening
+with_rpath
+with_cflags
+with_cppflags
+with_ldflags
+with_libs
+with_Werror
+with_solaris_contracts
+with_solaris_projects
+with_solaris_privs
+with_osfsia
+with_zlib
+with_zlib_version_check
+with_skey
+with_ldns
+with_libedit
+with_audit
+with_pie
+enable_pkcs11
+with_ssl_dir
+with_openssl_header_check
+with_ssl_engine
+with_prngd_port
+with_prngd_socket
+with_pam
+with_pam_service
+with_privsep_user
+with_sandbox
+with_selinux
+with_kerberos5
+with_privsep_path
+with_xauth
+enable_strip
+with_maildir
+with_mantype
+with_md5_passwords
+with_shadow
+with_ipaddr_display
+enable_etc_default_login
+with_default_path
+with_superuser_path
+with_4in6
+with_bsd_auth
+with_pid_dir
+enable_lastlog
+enable_utmp
+enable_utmpx
+enable_wtmp
+enable_wtmpx
+enable_libutil
+enable_pututline
+enable_pututxline
+with_lastlog
+'
       ac_precious_vars='build_alias
 host_alias
 target_alias
@@ -735,6 +805,8 @@ CPP'
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 cache_file=/dev/null
@@ -790,8 +862,9 @@ do
   fi
 
   case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -833,13 +906,20 @@ do
     datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
 
   -docdir | --docdir | --docdi | --doc | --do)
     ac_prev=docdir ;;
@@ -852,13 +932,20 @@ do
     dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1049,22 +1136,36 @@ do
     ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+        ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -1084,26 +1185,26 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1111,23 +1212,36 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
 fi
 
-# Be sure to have absolute directory names.
+# Check all directory arguments for consistency.
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
                libdir localedir mandir
 do
   eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
   case $ac_val in
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1141,8 +1255,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1157,23 +1269,21 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { echo "$as_me: error: Working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$0" : 'X\(//\)[^/]' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_myself" : 'X\(//\)[^/]' \| \
+        X"$as_myself" : 'X\(//\)$' \| \
+        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -1200,13 +1310,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1246,7 +1354,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1254,9 +1362,9 @@ Configuration:
 
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
-                         [$ac_default_prefix]
+                          [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
+                          [PREFIX]
 
 By default, \`make install' will install all the files in
 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
@@ -1266,25 +1374,25 @@ for instance \`--prefix=\$HOME'.
 For better control, use the options below.
 
 Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR          info documentation [DATAROOTDIR/info]
-  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/openssh]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/openssh]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1302,9 +1410,11 @@ if test -n "$ac_init_help"; then
   cat <<\_ACEOF
 
 Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-largefile     omit support for large files
+  --disable-pkcs11        disable PKCS#11 support code [no]
   --disable-strip         Disable calling strip(1) on install
   --disable-etc-default-login Disable using PATH from /etc/default/login no
   --disable-lastlog       disable use of lastlog even if detected no
@@ -1320,7 +1430,7 @@ Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --without-openssl       Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL**
-  --without-ssh1          Enable support for SSH protocol 1
+  --with-ssh1             Enable support for SSH protocol 1
   --without-stackprotect  Don't use compiler's stack protection
   --without-hardening     Don't use toolchain hardening flags
   --without-rpath         Disable auto-added -R linker paths
@@ -1331,6 +1441,7 @@ Optional Packages:
   --with-Werror           Build main code with -Werror
   --with-solaris-contracts Enable Solaris process contracts (experimental)
   --with-solaris-projects Enable Solaris projects (experimental)
+  --with-solaris-privs    Enable Solaris/Illumos privileges (experimental)
   --with-osfsia           Enable Digital Unix SIA
   --with-zlib=PATH        Use zlib in PATH
   --without-zlib-version-check Disable zlib version check
@@ -1345,8 +1456,9 @@ Optional Packages:
   --with-prngd-port=PORT  read entropy from PRNGD/EGD TCP localhost:PORT
   --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
   --with-pam              Enable PAM support
+  --with-pam-service=name Specify PAM service name
   --with-privsep-user=user Specify non-privileged user for privilege separation
-  --with-sandbox=style    Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter, capsicum)
+  --with-sandbox=style    Specify privilege separation sandbox (no, capsicum, darwin, rlimit, seccomp_filter, systrace, pledge)
   --with-selinux          Enable SELinux support
   --with-kerberos5=PATH   Enable Kerberos 5 support
   --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
@@ -1369,7 +1481,7 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
 
@@ -1384,15 +1496,17 @@ fi
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" || continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
     ac_builddir=.
 
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1428,7 +1542,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       echo &&
       $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
@@ -1438,591 +1552,1277 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 OpenSSH configure Portable
-generated by GNU Autoconf 2.61
+generated by GNU Autoconf 2.69
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
 
-It was created by OpenSSH $as_me Portable, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-  $ $0 $@
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-_ACEOF
-exec 5>>config.log
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+} # ac_fn_c_try_run
 
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-_ASUNAME
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
+} # ac_fn_c_try_cpp
 
-} >&5
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-cat >&5 <<_ACEOF
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_decl
 
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
 
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------------- ##
+## Report this to openssh-unix-dev@mindrot.org ##
+## ------------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
+} # ac_fn_c_check_header_mongrel
 
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
 
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=\$$ac_var
-       case $ac_val in
-       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
+#undef $2
 
-# Predefined preprocessor variables.
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_func
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+        return 0;
+  ;
+  return 0;
+}
 _ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+           return 0;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+} # ac_fn_c_check_type
 
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
 
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
 else
-  set x "$ac_default_prefix/share/config.site" \
-       "$ac_default_prefix/etc/config.site"
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
 fi
-shift
-for ac_site_file
-do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
 else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-       ac_cache_corrupted=:
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
 
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
 
+  fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
+} # ac_fn_c_compute_int
 
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+It was created by OpenSSH $as_me Portable, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
+  $ $0 $@
 
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
 
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
 
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
 
-ac_config_headers="$ac_config_headers config.h"
+_ASUNAME
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+} >&5
 
+cat >&5 <<_ACEOF
 
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+## ----------- ##
+## Core tests. ##
+## ----------- ##
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
+_ACEOF
 
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
 done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
 done
-IFS=$as_save_IFS
+ac_signal=0
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
 fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
 
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
 
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
   fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  ac_prog_rejected=no
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2032,25 +2832,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2063,10 +2863,10 @@ if test -z "$CC"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2076,25 +2876,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2106,12 +2906,8 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
@@ -2121,51 +2917,37 @@ fi
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2177,42 +2959,38 @@ main ()
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort.  b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions.  Remove them first so a
-# subsequent execution test works.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
 ac_rmfiles=
 for ac_file in $ac_files
 do
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
   esac
 done
 rm -f $ac_rmfiles
 
-if { (ac_try="$ac_link_default"
+if { ac_try="$ac_link_default"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link_default") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
@@ -2222,14 +3000,14 @@ for ac_file in $ac_files ''
 do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
        ;;
     [ab].out )
        # We found the default executable, but exeext='' is most
        # certainly right.
        break;;
     *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
        then :; else
           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
        fi
@@ -2248,78 +3026,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 else
   ac_file=''
 fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
-  echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
 ac_exeext=$ac_cv_exeext
 
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-       cross_compiling=yes
-    else
-       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  fi
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
 # work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2327,37 +3068,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 for ac_file in conftest.exe conftest conftest.*; do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          break;;
     * ) break;;
   esac
 done
 else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
-rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2369,51 +3163,46 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+if { ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_compile") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   for ac_file in conftest.o conftest.obj conftest.*; do
   test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
 done
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2427,54 +3216,34 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_compiler_gnu=no
+  ac_compiler_gnu=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
    CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2485,34 +3254,11 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2523,35 +3269,12 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-       ac_c_werror_flag=$ac_save_c_werror_flag
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
         CFLAGS="-g"
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2562,42 +3285,18 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -2613,23 +3312,18 @@ else
     CFLAGS=
   fi
 fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2681,31 +3375,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_c89=$ac_arg
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
@@ -2716,17 +3388,19 @@ fi
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
   xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
   *)
     CC="$CC $ac_cv_prog_cc_c89"
-    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
+fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2751,9 +3425,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -2767,35 +3439,27 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -2811,28 +3475,24 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -2854,15 +3514,15 @@ ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -2876,11 +3536,7 @@ do
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -2889,76 +3545,34 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
                     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
   break
 fi
 
@@ -2970,8 +3584,8 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -2981,11 +3595,7 @@ do
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -2994,83 +3604,40 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
                     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3080,45 +3647,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
+  if test -z "$GREP"; then
   ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-    # Check for GNU ac_path_GREP and select it if it is found.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'GREP' >> "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_GREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_GREP="$ac_path_GREP"
@@ -3130,77 +3692,61 @@ case `"$ac_path_GREP" --version 2>&1` in
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_GREP_found && break 3
+      $ac_path_GREP_found && break 3
+    done
+  done
   done
-done
-
-done
 IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
   ac_cv_path_GREP=$GREP
 fi
 
-
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
  GREP="$ac_cv_path_GREP"
 
 
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    then ac_cv_path_EGREP="$GREP -E"
    else
-     # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+     if test -z "$EGREP"; then
   ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-    # Check for GNU ac_path_EGREP and select it if it is found.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'EGREP' >> "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_EGREP="$ac_path_EGREP"
@@ -3212,46 +3758,31 @@ case `"$ac_path_EGREP" --version 2>&1` in
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_EGREP_found && break 3
+      $ac_path_EGREP_found && break 3
+    done
+  done
   done
-done
-
-done
 IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
   ac_cv_path_EGREP=$EGREP
 fi
 
-
    fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
  EGREP="$ac_cv_path_EGREP"
 
 
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3266,47 +3797,23 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_header_stdc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_stdc=no
+  ac_cv_header_stdc=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <string.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
 else
   ac_cv_header_stdc=no
 fi
@@ -3316,18 +3823,14 @@ fi
 
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
+  $EGREP "free" >/dev/null 2>&1; then :
+
 else
   ac_cv_header_stdc=no
 fi
@@ -3337,14 +3840,10 @@ fi
 
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then :
   :
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ctype.h>
 #include <stdlib.h>
@@ -3371,113 +3870,35 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_run "$LINENO"; then :
 
-( exit $ac_status )
-ac_cv_header_stdc=no
+else
+  ac_cv_header_stdc=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
 if test $ac_cv_header_stdc = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
 
 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
                  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 done
 
 
-{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
-#include <sys/param.h>
+            #include <sys/param.h>
 
 int
 main ()
 {
-#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
-       && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
- bogus endian macros
-#endif
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   # It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
-#include <sys/param.h>
+               #include <sys/param.h>
 
 int
 main ()
 {
 #if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
               not big endian
+               #endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_c_bigendian=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_c_bigendian=no
+  ac_cv_c_bigendian=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
-       # It does not; compile a test program.
-if test "$cross_compiling" = yes; then
-  # try to guess the endianness by grepping values into an object file
-  ac_cv_c_bigendian=unknown
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+#include <limits.h>
+
 int
 main ()
 {
- _ascii (); _ebcdic ();
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
 fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-  if test "$ac_cv_c_bigendian" = unknown; then
-    ac_cv_c_bigendian=no
-  else
-    # finding both strings is unlikely to happen, but who knows?
-    ac_cv_c_bigendian=unknown
-  fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
 
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
 int
 main ()
 {
 
-  /* Are we little or big endian?  From Harbison&Steele.  */
-  union
-  {
-    long int l;
-    char c[sizeof (long int)];
-  } u;
-  u.l = 1;
-  return u.c[sizeof (long int) - 1] == 1;
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
   ac_cv_c_bigendian=no
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_bigendian=yes
+  ac_cv_c_bigendian=yes
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
+    fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
-case $ac_cv_c_bigendian in
-  yes)
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
-  no)
-     ;;
-  *)
-    { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
 
 
 # Checks for programs.
@@ -3727,10 +4136,10 @@ for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -3740,25 +4149,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -3770,15 +4179,15 @@ ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3792,11 +4201,7 @@ do
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -3805,76 +4210,34 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
                     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
   break
 fi
 
@@ -3886,8 +4249,8 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -3897,11 +4260,7 @@ do
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -3910,83 +4269,40 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
                     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3998,10 +4314,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -4011,25 +4327,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -4038,10 +4354,10 @@ if test -z "$ac_cv_prog_RANLIB"; then
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -4051,25 +4367,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
   if test "x$ac_ct_RANLIB" = x; then
@@ -4077,12 +4393,8 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     RANLIB=$ac_ct_RANLIB
@@ -4104,22 +4416,23 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
   /usr/ucb/* ) ;;
   *)
     # OSF1 and SCO ODT 3.0 have their own names for install.
@@ -4127,7 +4440,7 @@ case $as_dir/ in
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+       if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
          if test $ac_prog = install &&
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
@@ -4137,17 +4450,29 @@ case $as_dir/ in
            # program-specific install script used by HP pwplus--don't use.
            :
          else
-           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-           break 3
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
          fi
        fi
       done
     done
     ;;
 esac
-done
+
+  done
 IFS=$as_save_IFS
 
+rm -rf conftest.one conftest.two conftest.dir
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
@@ -4160,8 +4485,8 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -4171,48 +4496,43 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    then ac_cv_path_EGREP="$GREP -E"
    else
-     # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+     if test -z "$EGREP"; then
   ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-    # Check for GNU ac_path_EGREP and select it if it is found.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'EGREP' >> "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_EGREP="$ac_path_EGREP"
@@ -4224,33 +4544,22 @@ case `"$ac_path_EGREP" --version 2>&1` in
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_EGREP_found && break 3
+      $ac_path_EGREP_found && break 3
+    done
+  done
   done
-done
-
-done
 IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
   ac_cv_path_EGREP=$EGREP
 fi
 
-
    fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
  EGREP="$ac_cv_path_EGREP"
 
 
@@ -4259,10 +4568,10 @@ if test -n "$ac_tool_prefix"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -4272,25 +4581,25 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
-  { echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
   done
 fi
 if test -z "$AR"; then
-  ac_ct_AR=$AR
-  for ac_prog in ar
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$ac_ct_AR" && break
-done
-
-  if test "x$ac_ct_AR" = x; then
-    AR=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-fi
-
-# Extract the first word of "cat", so it can be a program name with args.
-set dummy cat; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_CAT+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $CAT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-CAT=$ac_cv_path_CAT
-if test -n "$CAT"; then
-  { echo "$as_me:$LINENO: result: $CAT" >&5
-echo "${ECHO_T}$CAT" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "kill", so it can be a program name with args.
-set dummy kill; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_KILL+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $KILL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-KILL=$ac_cv_path_KILL
-if test -n "$KILL"; then
-  { echo "$as_me:$LINENO: result: $KILL" >&5
-echo "${ECHO_T}$KILL" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-for ac_prog in perl5 perl
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PERL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PERL=$ac_cv_path_PERL
-if test -n "$PERL"; then
-  { echo "$as_me:$LINENO: result: $PERL" >&5
-echo "${ECHO_T}$PERL" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$PERL" && break
-done
-
-# Extract the first word of "sed", so it can be a program name with args.
-set dummy sed; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_SED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $SED in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SED="$SED" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-SED=$ac_cv_path_SED
-if test -n "$SED"; then
-  { echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-
-# Extract the first word of "ent", so it can be a program name with args.
-set dummy ent; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_ENT+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $ENT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ENT=$ac_cv_path_ENT
-if test -n "$ENT"; then
-  { echo "$as_me:$LINENO: result: $ENT" >&5
-echo "${ECHO_T}$ENT" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-
-# Extract the first word of "bash", so it can be a program name with args.
-set dummy bash; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $TEST_MINUS_S_SH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
-if test -n "$TEST_MINUS_S_SH"; then
-  { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
-echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "ksh", so it can be a program name with args.
-set dummy ksh; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $TEST_MINUS_S_SH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
-if test -n "$TEST_MINUS_S_SH"; then
-  { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
-echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "sh", so it can be a program name with args.
-set dummy sh; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $TEST_MINUS_S_SH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
-if test -n "$TEST_MINUS_S_SH"; then
-  { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
-echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "sh", so it can be a program name with args.
-set dummy sh; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_SH+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $SH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SH="$SH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-SH=$ac_cv_path_SH
-if test -n "$SH"; then
-  { echo "$as_me:$LINENO: result: $SH" >&5
-echo "${ECHO_T}$SH" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "groff", so it can be a program name with args.
-set dummy groff; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_GROFF+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $GROFF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-GROFF=$ac_cv_path_GROFF
-if test -n "$GROFF"; then
-  { echo "$as_me:$LINENO: result: $GROFF" >&5
-echo "${ECHO_T}$GROFF" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "nroff", so it can be a program name with args.
-set dummy nroff; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_NROFF+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $NROFF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-NROFF=$ac_cv_path_NROFF
-if test -n "$NROFF"; then
-  { echo "$as_me:$LINENO: result: $NROFF" >&5
-echo "${ECHO_T}$NROFF" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "mandoc", so it can be a program name with args.
-set dummy mandoc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_MANDOC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $MANDOC in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-MANDOC=$ac_cv_path_MANDOC
-if test -n "$MANDOC"; then
-  { echo "$as_me:$LINENO: result: $MANDOC" >&5
-echo "${ECHO_T}$MANDOC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-TEST_SHELL=sh
-
-
-if test "x$MANDOC" != "x" ; then
-       MANFMT="$MANDOC"
-elif test "x$NROFF" != "x" ; then
-       MANFMT="$NROFF -mandoc"
-elif test "x$GROFF" != "x" ; then
-       MANFMT="$GROFF -mandoc -Tascii"
-else
-       { echo "$as_me:$LINENO: WARNING: no manpage formatted found" >&5
-echo "$as_me: WARNING: no manpage formatted found" >&2;}
-       MANFMT="false"
-fi
-
-
-# Extract the first word of "groupadd", so it can be a program name with args.
-set dummy groupadd; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PATH_GROUPADD_PROG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PATH_GROUPADD_PROG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
-  ;;
-esac
-fi
-PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
-if test -n "$PATH_GROUPADD_PROG"; then
-  { echo "$as_me:$LINENO: result: $PATH_GROUPADD_PROG" >&5
-echo "${ECHO_T}$PATH_GROUPADD_PROG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "useradd", so it can be a program name with args.
-set dummy useradd; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PATH_USERADD_PROG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PATH_USERADD_PROG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
-  ;;
-esac
-fi
-PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
-if test -n "$PATH_USERADD_PROG"; then
-  { echo "$as_me:$LINENO: result: $PATH_USERADD_PROG" >&5
-echo "${ECHO_T}$PATH_USERADD_PROG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "pkgmk", so it can be a program name with args.
-set dummy pkgmk; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$MAKE_PACKAGE_SUPPORTED"; then
-  ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
-fi
-fi
-MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
-if test -n "$MAKE_PACKAGE_SUPPORTED"; then
-  { echo "$as_me:$LINENO: result: $MAKE_PACKAGE_SUPPORTED" >&5
-echo "${ECHO_T}$MAKE_PACKAGE_SUPPORTED" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-if test -x /sbin/sh; then
-       STARTUP_SCRIPT_SHELL=/sbin/sh
-
-else
-       STARTUP_SCRIPT_SHELL=/bin/sh
-
-fi
-
-# System features
-# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then
-  enableval=$enable_largefile;
-fi
-
-if test "$enable_largefile" != no; then
-
-  { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
-echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
-if test "${ac_cv_sys_largefile_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_sys_largefile_CC=no
-     if test "$GCC" != yes; then
-       ac_save_CC=$CC
-       while :; do
-        # IRIX 6.2 and later do not support large files by default,
-        # so use the C compiler's -n32 option if that helps.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-        rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-        CC="$CC -n32"
-        rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_sys_largefile_CC=' -n32'; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-        break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
-echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
-
-  { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  while :; do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_sys_file_offset_bits=no; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_sys_file_offset_bits=64; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_file_offset_bits=unknown
-  break
-done
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
-echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-;;
-esac
-rm -f conftest*
-  if test $ac_cv_sys_file_offset_bits = unknown; then
-    { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
-echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  while :; do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_sys_large_files=no; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_sys_large_files=1; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_large_files=unknown
-  break
-done
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
-echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-;;
-esac
-rm -f conftest*
-  fi
-fi
-
-
-if test -z "$AR" ; then
-       { { echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
-echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# Use LOGIN_PROGRAM from environment if possible
-if test ! -z "$LOGIN_PROGRAM" ; then
-
-cat >>confdefs.h <<_ACEOF
-#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
-_ACEOF
-
-else
-       # Search for login
-       # Extract the first word of "login", so it can be a program name with args.
-set dummy login; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $LOGIN_PROGRAM_FALLBACK in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
-if test -n "$LOGIN_PROGRAM_FALLBACK"; then
-  { echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5
-echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-       if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
-               cat >>confdefs.h <<_ACEOF
-#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
-_ACEOF
-
-       fi
-fi
-
-# Extract the first word of "passwd", so it can be a program name with args.
-set dummy passwd; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PATH_PASSWD_PROG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PATH_PASSWD_PROG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
-if test -n "$PATH_PASSWD_PROG"; then
-  { echo "$as_me:$LINENO: result: $PATH_PASSWD_PROG" >&5
-echo "${ECHO_T}$PATH_PASSWD_PROG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-if test ! -z "$PATH_PASSWD_PROG" ; then
-
-cat >>confdefs.h <<_ACEOF
-#define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
-_ACEOF
-
-fi
-
-if test -z "$LD" ; then
-       LD=$CC
-fi
-
-
-{ echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
-if test "${ac_cv_c_inline+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_inline=$ac_kw
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6; }
-
-
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
-    ;;
-esac
-
-
-{ echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5
-echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <limits.h>
-
-int
-main ()
-{
-#ifndef LLONG_MAX
-  (void) LLONG_MAX;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_LLONG_MAX=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_LLONG_MAX=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
-echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; }
-if test $ac_cv_have_decl_LLONG_MAX = yes; then
-  have_llong_max=1
-fi
-
-{ echo "$as_me:$LINENO: checking whether SYSTR_POLICY_KILL is declared" >&5
-echo $ECHO_N "checking whether SYSTR_POLICY_KILL is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_SYSTR_POLICY_KILL+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-       #include <sys/types.h>
-       #include <sys/param.h>
-       #include <dev/systrace.h>
-
-
-int
-main ()
-{
-#ifndef SYSTR_POLICY_KILL
-  (void) SYSTR_POLICY_KILL;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_SYSTR_POLICY_KILL=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_SYSTR_POLICY_KILL=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_SYSTR_POLICY_KILL" >&5
-echo "${ECHO_T}$ac_cv_have_decl_SYSTR_POLICY_KILL" >&6; }
-if test $ac_cv_have_decl_SYSTR_POLICY_KILL = yes; then
-  have_systr_policy_kill=1
-fi
-
-{ echo "$as_me:$LINENO: checking whether RLIMIT_NPROC is declared" >&5
-echo $ECHO_N "checking whether RLIMIT_NPROC is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_RLIMIT_NPROC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-       #include <sys/types.h>
-       #include <sys/resource.h>
-
-
-int
-main ()
-{
-#ifndef RLIMIT_NPROC
-  (void) RLIMIT_NPROC;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_RLIMIT_NPROC=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_RLIMIT_NPROC=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_RLIMIT_NPROC" >&5
-echo "${ECHO_T}$ac_cv_have_decl_RLIMIT_NPROC" >&6; }
-if test $ac_cv_have_decl_RLIMIT_NPROC = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RLIMIT_NPROC
-_ACEOF
-
-fi
-
-{ echo "$as_me:$LINENO: checking whether PR_SET_NO_NEW_PRIVS is declared" >&5
-echo $ECHO_N "checking whether PR_SET_NO_NEW_PRIVS is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_PR_SET_NO_NEW_PRIVS+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-       #include <sys/types.h>
-       #include <linux/prctl.h>
-
-
-int
-main ()
-{
-#ifndef PR_SET_NO_NEW_PRIVS
-  (void) PR_SET_NO_NEW_PRIVS;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_PR_SET_NO_NEW_PRIVS=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_PR_SET_NO_NEW_PRIVS=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" >&5
-echo "${ECHO_T}$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" >&6; }
-if test $ac_cv_have_decl_PR_SET_NO_NEW_PRIVS = yes; then
-  have_linux_no_new_privs=1
-fi
-
-
-openssl=yes
-ssh1=no
-
-# Check whether --with-openssl was given.
-if test "${with_openssl+set}" = set; then
-  withval=$with_openssl;   if test "x$withval" = "xno" ; then
-               openssl=no
-               ssh1=no
-          fi
-
-
-fi
-
-{ echo "$as_me:$LINENO: checking whether OpenSSL will be used for cryptography" >&5
-echo $ECHO_N "checking whether OpenSSL will be used for cryptography... $ECHO_C" >&6; }
-if test "x$openssl" = "xyes" ; then
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define WITH_OPENSSL 1
-_ACEOF
-
-else
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Check whether --with-ssh1 was given.
-if test "${with_ssh1+set}" = set; then
-  withval=$with_ssh1;
-               if test "x$withval" = "xyes" ; then
-                       if test "x$openssl" = "xno" ; then
-                               { { echo "$as_me:$LINENO: error: Cannot enable SSH protocol 1 with OpenSSL disabled" >&5
-echo "$as_me: error: Cannot enable SSH protocol 1 with OpenSSL disabled" >&2;}
-   { (exit 1); exit 1; }; }
-                       fi
-                       ssh1=yes
-               elif test "x$withval" = "xno" ; then
-                       ssh1=no
-               else
-                       { { echo "$as_me:$LINENO: error: unknown --with-ssh1 argument" >&5
-echo "$as_me: error: unknown --with-ssh1 argument" >&2;}
-   { (exit 1); exit 1; }; }
-               fi
-
-
-fi
-
-{ echo "$as_me:$LINENO: checking whether SSH protocol 1 support is enabled" >&5
-echo $ECHO_N "checking whether SSH protocol 1 support is enabled... $ECHO_C" >&6; }
-if test "x$ssh1" = "xyes" ; then
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define WITH_SSH1 1
-_ACEOF
-
-else
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-use_stack_protector=1
-use_toolchain_hardening=1
-
-# Check whether --with-stackprotect was given.
-if test "${with_stackprotect+set}" = set; then
-  withval=$with_stackprotect;
-    if test "x$withval" = "xno"; then
-       use_stack_protector=0
-    fi
-fi
-
-
-# Check whether --with-hardening was given.
-if test "${with_hardening+set}" = set; then
-  withval=$with_hardening;
-    if test "x$withval" = "xno"; then
-       use_toolchain_hardening=0
-    fi
-fi
-
-
-# We use -Werror for the tests only so that we catch warnings like "this is
-# on by default" for things like -fPIE.
-{ echo "$as_me:$LINENO: checking if $CC supports -Werror" >&5
-echo $ECHO_N "checking if $CC supports -Werror... $ECHO_C" >&6; }
-saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Werror"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-int main(void) { return 0; }
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-         WERROR="-Werror"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-         WERROR=""
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CFLAGS="$saved_CFLAGS"
-
-if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Qunused-arguments" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Qunused-arguments... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Qunused-arguments"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wunknown-warning-option" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wunknown-warning-option... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wall" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wall... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wall"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wall"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wpointer-arith" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wpointer-arith... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wpointer-arith"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wuninitialized" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wuninitialized... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wuninitialized"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wsign-compare" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wsign-compare... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wsign-compare"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wformat-security" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wformat-security... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wformat-security"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wpointer-sign" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wpointer-sign... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wpointer-sign"
-       _define_flag="-Wno-pointer-sign"
-       test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wunused-result" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wunused-result... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wunused-result"
-       _define_flag="-Wno-unused-result"
-       test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -fno-strict-aliasing" >&5
-echo $ECHO_N "checking if $CC supports compile flag -fno-strict-aliasing... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5
-echo $ECHO_N "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-    if test "x$use_toolchain_hardening" = "x1"; then
-       {
-       { echo "$as_me:$LINENO: checking if $LD supports link flag -Wl,-z,relro" >&5
-echo $ECHO_N "checking if $LD supports link flag -Wl,-z,relro... $ECHO_C" >&6; }
-       saved_LDFLAGS="$LDFLAGS"
-       LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                 LDFLAGS="$saved_LDFLAGS $_define_flag"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 LDFLAGS="$saved_LDFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $LD supports link flag -Wl,-z,now" >&5
-echo $ECHO_N "checking if $LD supports link flag -Wl,-z,now... $ECHO_C" >&6; }
-       saved_LDFLAGS="$LDFLAGS"
-       LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                 LDFLAGS="$saved_LDFLAGS $_define_flag"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 LDFLAGS="$saved_LDFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $LD supports link flag -Wl,-z,noexecstack" >&5
-echo $ECHO_N "checking if $LD supports link flag -Wl,-z,noexecstack... $ECHO_C" >&6; }
-       saved_LDFLAGS="$LDFLAGS"
-       LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                 LDFLAGS="$saved_LDFLAGS $_define_flag"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 LDFLAGS="$saved_LDFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-}
-       # NB. -ftrapv expects certain support functions to be present in
-       # the compiler library (libgcc or similar) to detect integer operations
-       # that can overflow. We must check that the result of enabling it
-       # actually links. The test program compiled/linked includes a number
-       # of integer operations that should exercise this.
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5
-echo $ECHO_N "checking if $CC supports compile flag -ftrapv and linking succeeds... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -ftrapv"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-ftrapv"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-}
-    fi
-       { echo "$as_me:$LINENO: checking gcc version" >&5
-echo $ECHO_N "checking gcc version... $ECHO_C" >&6; }
-       GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
-       case $GCC_VER in
-               1.*) no_attrib_nonnull=1 ;;
-               2.8* | 2.9*)
-                    no_attrib_nonnull=1
-                    ;;
-               2.*) no_attrib_nonnull=1 ;;
-               *) ;;
-       esac
-       { echo "$as_me:$LINENO: result: $GCC_VER" >&5
-echo "${ECHO_T}$GCC_VER" >&6; }
-
-       { echo "$as_me:$LINENO: checking if $CC accepts -fno-builtin-memset" >&5
-echo $ECHO_N "checking if $CC accepts -fno-builtin-memset... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS -fno-builtin-memset"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <string.h>
-int
-main ()
-{
- char b[10]; memset(b, 0, sizeof(b));
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-       # -fstack-protector-all doesn't always work for some GCC versions
-       # and/or platforms, so we test if we can.  If it's not supported
-       # on a given platform gcc will emit a warning so we use -Werror.
-       if test "x$use_stack_protector" = "x1"; then
-           for t in -fstack-protector-strong -fstack-protector-all \
-                   -fstack-protector; do
-               { echo "$as_me:$LINENO: checking if $CC supports $t" >&5
-echo $ECHO_N "checking if $CC supports $t... $ECHO_C" >&6; }
-               saved_CFLAGS="$CFLAGS"
-               saved_LDFLAGS="$LDFLAGS"
-               CFLAGS="$CFLAGS $t -Werror"
-               LDFLAGS="$LDFLAGS $t -Werror"
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <stdio.h>
-int
-main ()
-{
-
-       char x[256];
-       snprintf(x, sizeof(x), "XXX");
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                     CFLAGS="$saved_CFLAGS $t"
-                     LDFLAGS="$saved_LDFLAGS $t"
-                     { echo "$as_me:$LINENO: checking if $t works" >&5
-echo $ECHO_N "checking if $t works... $ECHO_C" >&6; }
-                     if test "$cross_compiling" = yes; then
-   { echo "$as_me:$LINENO: WARNING: cross compiling: cannot test" >&5
-echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
-                         break
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <stdio.h>
-int
-main ()
-{
-
-       char x[256];
-       snprintf(x, sizeof(x), "XXX");
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                         break
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-               CFLAGS="$saved_CFLAGS"
-               LDFLAGS="$saved_LDFLAGS"
-           done
-       fi
-
-       if test -z "$have_llong_max"; then
-               # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
-               unset ac_cv_have_decl_LLONG_MAX
-               saved_CFLAGS="$CFLAGS"
-               CFLAGS="$CFLAGS -std=gnu99"
-               { echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5
-echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <limits.h>
-
-
-int
-main ()
-{
-#ifndef LLONG_MAX
-  (void) LLONG_MAX;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_LLONG_MAX=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_LLONG_MAX=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
-echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; }
-if test $ac_cv_have_decl_LLONG_MAX = yes; then
-  have_llong_max=1
-else
-  CFLAGS="$saved_CFLAGS"
-fi
-
-       fi
-fi
-
-{ echo "$as_me:$LINENO: checking if compiler allows __attribute__ on return types" >&5
-echo $ECHO_N "checking if compiler allows __attribute__ on return types... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-__attribute__((__unused__)) static void foo(void){return;}
-int
-main ()
-{
- exit(0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_ATTRIBUTE_ON_RETURN_TYPE 1
-_ACEOF
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test "x$no_attrib_nonnull" != "x1" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ATTRIBUTE__NONNULL__ 1
-_ACEOF
-
-fi
-
-
-# Check whether --with-rpath was given.
-if test "${with_rpath+set}" = set; then
-  withval=$with_rpath;
-               if test "x$withval" = "xno" ; then
-                       need_dash_r=""
-               fi
-               if test "x$withval" = "xyes" ; then
-                       need_dash_r=1
-               fi
-
-
-fi
-
-
-# Allow user to specify flags
-
-# Check whether --with-cflags was given.
-if test "${with_cflags+set}" = set; then
-  withval=$with_cflags;
-               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
-                   test "x${withval}" != "xyes"; then
-                       CFLAGS="$CFLAGS $withval"
-               fi
-
-
-fi
-
-
-# Check whether --with-cppflags was given.
-if test "${with_cppflags+set}" = set; then
-  withval=$with_cppflags;
-               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
-                   test "x${withval}" != "xyes"; then
-                       CPPFLAGS="$CPPFLAGS $withval"
-               fi
-
-
-fi
-
-
-# Check whether --with-ldflags was given.
-if test "${with_ldflags+set}" = set; then
-  withval=$with_ldflags;
-               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
-                   test "x${withval}" != "xyes"; then
-                       LDFLAGS="$LDFLAGS $withval"
-               fi
-
-
-fi
-
-
-# Check whether --with-libs was given.
-if test "${with_libs+set}" = set; then
-  withval=$with_libs;
-               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
-                   test "x${withval}" != "xyes"; then
-                       LIBS="$LIBS $withval"
-               fi
-
-
-fi
-
-
-# Check whether --with-Werror was given.
-if test "${with_Werror+set}" = set; then
-  withval=$with_Werror;
-               if test -n "$withval"  &&  test "x$withval" != "xno"; then
-                       werror_flags="-Werror"
-                       if test "x${withval}" != "xyes"; then
-                               werror_flags="$withval"
-                       fi
-               fi
-
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in  \
-       blf.h \
-       bstring.h \
-       crypt.h \
-       crypto/sha2.h \
-       dirent.h \
-       endian.h \
-       elf.h \
-       features.h \
-       fcntl.h \
-       floatingpoint.h \
-       getopt.h \
-       glob.h \
-       ia.h \
-       iaf.h \
-       inttypes.h \
-       limits.h \
-       locale.h \
-       login.h \
-       maillock.h \
-       ndir.h \
-       net/if_tun.h \
-       netdb.h \
-       netgroup.h \
-       pam/pam_appl.h \
-       paths.h \
-       poll.h \
-       pty.h \
-       readpassphrase.h \
-       rpc/types.h \
-       security/pam_appl.h \
-       sha2.h \
-       shadow.h \
-       stddef.h \
-       stdint.h \
-       string.h \
-       strings.h \
-       sys/audit.h \
-       sys/bitypes.h \
-       sys/bsdtty.h \
-       sys/capability.h \
-       sys/cdefs.h \
-       sys/dir.h \
-       sys/mman.h \
-       sys/ndir.h \
-       sys/poll.h \
-       sys/prctl.h \
-       sys/pstat.h \
-       sys/select.h \
-       sys/stat.h \
-       sys/stream.h \
-       sys/stropts.h \
-       sys/strtio.h \
-       sys/statvfs.h \
-       sys/sysmacros.h \
-       sys/time.h \
-       sys/timers.h \
-       time.h \
-       tmpdir.h \
-       ttyent.h \
-       ucred.h \
-       unistd.h \
-       usersec.h \
-       util.h \
-       utime.h \
-       utmp.h \
-       utmpx.h \
-       vis.h \
-
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# lastlog.h requires sys/time.h to be included first on Solaris
-
-for ac_header in lastlog.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# sys/ptms.h requires sys/stream.h to be included first on Solaris
-
-for ac_header in sys/ptms.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_SYS_STREAM_H
-# include <sys/stream.h>
-#endif
-
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# login_cap.h requires sys/types.h on NetBSD
-
-for ac_header in login_cap.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# older BSDs need sys/param.h before sys/mount.h
-
-for ac_header in sys/mount.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/param.h>
-
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# Android requires sys/socket.h to be included before sys/un.h
-
-for ac_header in sys/un.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# Messages for features tested for in target-specific section
-SIA_MSG="no"
-SPC_MSG="no"
-SP_MSG="no"
-
-# Check for some target-specific stuff
-case "$host" in
-*-*-aix*)
-       # Some versions of VAC won't allow macro redefinitions at
-       # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
-       # particularly with older versions of vac or xlc.
-       # It also throws errors about null macro argments, but these are
-       # not fatal.
-       { echo "$as_me:$LINENO: checking if compiler allows macro redefinitions" >&5
-echo $ECHO_N "checking if compiler allows macro redefinitions... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#define testmacro foo
-#define testmacro bar
-int
-main ()
-{
- exit(0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-             CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
-             LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
-             CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
-             CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-       { echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5
-echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6; }
-       if (test -z "$blibpath"); then
-               blibpath="/usr/lib:/lib"
-       fi
-       saved_LDFLAGS="$LDFLAGS"
-       if test "$GCC" = "yes"; then
-               flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
-       else
-               flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
-       fi
-       for tryflags in $flags ;do
-               if (test -z "$blibflags"); then
-                       LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  blibflags=$tryflags
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-               fi
-       done
-       if (test -z "$blibflags"); then
-               { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-               { { echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5
-echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;}
-   { (exit 1); exit 1; }; }
-       else
-               { echo "$as_me:$LINENO: result: $blibflags" >&5
-echo "${ECHO_T}$blibflags" >&6; }
-       fi
-       LDFLAGS="$saved_LDFLAGS"
-               { echo "$as_me:$LINENO: checking for authenticate" >&5
-echo $ECHO_N "checking for authenticate... $ECHO_C" >&6; }
-if test "${ac_cv_func_authenticate+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define authenticate to an innocuous variant, in case <limits.h> declares authenticate.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define authenticate innocuous_authenticate
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char authenticate (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef authenticate
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char authenticate ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_authenticate || defined __stub___authenticate
-choke me
-#endif
-
-int
-main ()
-{
-return authenticate ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_authenticate=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_authenticate=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5
-echo "${ECHO_T}$ac_cv_func_authenticate" >&6; }
-if test $ac_cv_func_authenticate = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_AIXAUTHENTICATE 1
-_ACEOF
-
-else
-  { echo "$as_me:$LINENO: checking for authenticate in -ls" >&5
-echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6; }
-if test "${ac_cv_lib_s_authenticate+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ls  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char authenticate ();
-int
-main ()
-{
-return authenticate ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_s_authenticate=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_s_authenticate=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5
-echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6; }
-if test $ac_cv_lib_s_authenticate = yes; then
-   cat >>confdefs.h <<\_ACEOF
-#define WITH_AIXAUTHENTICATE 1
-_ACEOF
-
-                               LIBS="$LIBS -ls"
-
-fi
-
-
-fi
-
-               { echo "$as_me:$LINENO: checking whether authenticate is declared" >&5
-echo $ECHO_N "checking whether authenticate is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_authenticate+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <usersec.h>
-
-int
-main ()
-{
-#ifndef authenticate
-  (void) authenticate;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_authenticate=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_authenticate=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_authenticate" >&5
-echo "${ECHO_T}$ac_cv_have_decl_authenticate" >&6; }
-if test $ac_cv_have_decl_authenticate = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_AUTHENTICATE 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_AUTHENTICATE 0
-_ACEOF
-
-
-fi
-{ echo "$as_me:$LINENO: checking whether loginrestrictions is declared" >&5
-echo $ECHO_N "checking whether loginrestrictions is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_loginrestrictions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <usersec.h>
-
-int
-main ()
-{
-#ifndef loginrestrictions
-  (void) loginrestrictions;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_loginrestrictions=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_loginrestrictions=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginrestrictions" >&5
-echo "${ECHO_T}$ac_cv_have_decl_loginrestrictions" >&6; }
-if test $ac_cv_have_decl_loginrestrictions = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOGINRESTRICTIONS 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOGINRESTRICTIONS 0
-_ACEOF
-
-
-fi
-{ echo "$as_me:$LINENO: checking whether loginsuccess is declared" >&5
-echo $ECHO_N "checking whether loginsuccess is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_loginsuccess+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <usersec.h>
-
-int
-main ()
-{
-#ifndef loginsuccess
-  (void) loginsuccess;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_loginsuccess=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_loginsuccess=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginsuccess" >&5
-echo "${ECHO_T}$ac_cv_have_decl_loginsuccess" >&6; }
-if test $ac_cv_have_decl_loginsuccess = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOGINSUCCESS 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOGINSUCCESS 0
-_ACEOF
-
-
-fi
-{ echo "$as_me:$LINENO: checking whether passwdexpired is declared" >&5
-echo $ECHO_N "checking whether passwdexpired is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_passwdexpired+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <usersec.h>
-
-int
-main ()
-{
-#ifndef passwdexpired
-  (void) passwdexpired;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_passwdexpired=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_passwdexpired=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_passwdexpired" >&5
-echo "${ECHO_T}$ac_cv_have_decl_passwdexpired" >&6; }
-if test $ac_cv_have_decl_passwdexpired = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PASSWDEXPIRED 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PASSWDEXPIRED 0
-_ACEOF
-
-
-fi
-{ echo "$as_me:$LINENO: checking whether setauthdb is declared" >&5
-echo $ECHO_N "checking whether setauthdb is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_setauthdb+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <usersec.h>
-
-int
-main ()
-{
-#ifndef setauthdb
-  (void) setauthdb;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_setauthdb=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_setauthdb=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_setauthdb" >&5
-echo "${ECHO_T}$ac_cv_have_decl_setauthdb" >&6; }
-if test $ac_cv_have_decl_setauthdb = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SETAUTHDB 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SETAUTHDB 0
-_ACEOF
-
-
-fi
-
-
-               { echo "$as_me:$LINENO: checking whether loginfailed is declared" >&5
-echo $ECHO_N "checking whether loginfailed is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_loginfailed+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <usersec.h>
-
-
-int
-main ()
-{
-#ifndef loginfailed
-  (void) loginfailed;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_loginfailed=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_loginfailed=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginfailed" >&5
-echo "${ECHO_T}$ac_cv_have_decl_loginfailed" >&6; }
-if test $ac_cv_have_decl_loginfailed = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOGINFAILED 1
-_ACEOF
-
-{ echo "$as_me:$LINENO: checking if loginfailed takes 4 arguments" >&5
-echo $ECHO_N "checking if loginfailed takes 4 arguments... $ECHO_C" >&6; }
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <usersec.h>
-int
-main ()
-{
- (void)loginfailed("user","host","tty",0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define AIX_LOGINFAILED_4ARG 1
-_ACEOF
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOGINFAILED 0
-_ACEOF
-
-
-fi
-
-
-
-
-for ac_func in getgrset setauthdb
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-       { echo "$as_me:$LINENO: checking whether F_CLOSEM is declared" >&5
-echo $ECHO_N "checking whether F_CLOSEM is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_F_CLOSEM+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <limits.h>
-             #include <fcntl.h>
-
-
-int
-main ()
-{
-#ifndef F_CLOSEM
-  (void) F_CLOSEM;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_F_CLOSEM=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_F_CLOSEM=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_CLOSEM" >&5
-echo "${ECHO_T}$ac_cv_have_decl_F_CLOSEM" >&6; }
-if test $ac_cv_have_decl_F_CLOSEM = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FCNTL_CLOSEM 1
-_ACEOF
-
-fi
-
-       check_for_aix_broken_getaddrinfo=1
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_REALPATH 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_LASTLOG 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define LOGIN_NEEDS_UTMPX 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SPT_TYPE SPT_REUSEARGV
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define PTY_ZEROREAD 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define PLATFORM_SYS_DIR_UID 2
-_ACEOF
-
-       ;;
-*-*-android*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UTMP 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_WTMP 1
-_ACEOF
-
-       ;;
-*-*-cygwin*)
-       check_for_libcrypt_later=1
-       LIBS="$LIBS /usr/lib/textreadmode.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CYGWIN 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_SHADOW 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_X11_UNIX_SOCKETS 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_IPPORT_RESERVED_CONCEPT 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_FD_PASSING 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_IOBUFSZ 65535
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define FILESYSTEM_NO_BACKSLASH 1
-_ACEOF
-
-       # Cygwin defines optargs, optargs as declspec(dllimport) for historical
-       # reasons which cause compile warnings, so we disable those warnings.
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -Wno-attributes" >&5
-echo $ECHO_N "checking if $CC supports compile flag -Wno-attributes... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -Wno-attributes"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-Wno-attributes"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       ;;
-*-*-dgux*)
-
-cat >>confdefs.h <<\_ACEOF
-#define IP_TOS_IS_BROKEN 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       ;;
-*-*-darwin*)
-       use_pie=auto
-       { echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5
-echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: result: assume it is working" >&5
-echo "${ECHO_T}assume it is working" >&6; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <mach-o/dyld.h>
-main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
-               exit(0);
-       else
-               exit(1);
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: working" >&5
-echo "${ECHO_T}working" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ echo "$as_me:$LINENO: result: buggy" >&5
-echo "${ECHO_T}buggy" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GETADDRINFO 1
-_ACEOF
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GLOB 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define BIND_8_COMPAT 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_FREEBSD 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_COMPAT_AF 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_PREPEND_AF 1
-_ACEOF
-
-
-       { echo "$as_me:$LINENO: checking whether AU_IPv4 is declared" >&5
-echo $ECHO_N "checking whether AU_IPv4 is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_AU_IPv4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef AU_IPv4
-  (void) AU_IPv4;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_AU_IPv4=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_AU_IPv4=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_AU_IPv4" >&5
-echo "${ECHO_T}$ac_cv_have_decl_AU_IPv4" >&6; }
-if test $ac_cv_have_decl_AU_IPv4 = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define AU_IPv4 0
-_ACEOF
-
-           #include <bsm/audit.h>
-
-cat >>confdefs.h <<\_ACEOF
-#define LASTLOG_WRITE_PUTUTXLINE 1
-_ACEOF
-
-
-fi
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SPT_TYPE SPT_REUSEARGV
-_ACEOF
-
-
-for ac_func in sandbox_init
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_header in sandbox.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-       ;;
-*-*-dragonfly*)
-       SSHDLIBS="$SSHDLIBS -lcrypt"
-       TEST_MALLOC_OPTIONS="AFGJPRX"
-       ;;
-*-*-haiku*)
-    LIBS="$LIBS -lbsd "
-
-{ echo "$as_me:$LINENO: checking for socket in -lnetwork" >&5
-echo $ECHO_N "checking for socket in -lnetwork... $ECHO_C" >&6; }
-if test "${ac_cv_lib_network_socket+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetwork  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char socket ();
-int
-main ()
-{
-return socket ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_network_socket=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_network_socket=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_socket" >&5
-echo "${ECHO_T}$ac_cv_lib_network_socket" >&6; }
-if test $ac_cv_lib_network_socket = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNETWORK 1
-_ACEOF
-
-  LIBS="-lnetwork $LIBS"
-
-fi
-
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INT64_T 1
-_ACEOF
-
-    MANTYPE=man
-    ;;
-*-*-hpux*)
-       # first we define all of the options common to all HP-UX releases
-       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
-       IPADDR_IN_DISPLAY=yes
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define LOGIN_NO_ENDOPT 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define LOGIN_NEEDS_UTMPX 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_STRING "*"
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SPT_TYPE SPT_PSTAT
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define PLATFORM_SYS_DIR_UID 2
-_ACEOF
-
-       maildir="/var/mail"
-       LIBS="$LIBS -lsec"
-
-{ echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
-echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6; }
-if test "${ac_cv_lib_xnet_t_error+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxnet  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char t_error ();
-int
-main ()
-{
-return t_error ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_xnet_t_error=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_xnet_t_error=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
-echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6; }
-if test $ac_cv_lib_xnet_t_error = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBXNET 1
-_ACEOF
-
-  LIBS="-lxnet $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
-echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-       # next, we define all of the options specific to major releases
-       case "$host" in
-       *-*-hpux10*)
-               if test -z "$GCC"; then
-                       CFLAGS="$CFLAGS -Ae"
-               fi
-               ;;
-       *-*-hpux11*)
-
-cat >>confdefs.h <<\_ACEOF
-#define PAM_SUN_CODEBASE 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UTMP 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_BTMP 1
-_ACEOF
-
-               check_for_hpux_broken_getaddrinfo=1
-               check_for_conflicting_getspnam=1
-               ;;
-       esac
-
-       # lastly, we define options specific to minor releases
-       case "$host" in
-       *-*-hpux10.26)
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SECUREWARE 1
-_ACEOF
-
-               disable_ptmx_check=yes
-               LIBS="$LIBS -lsecpw"
-               ;;
-       esac
-       ;;
-*-*-irix5*)
-       PATH="$PATH:/usr/etc"
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_INET_NTOA 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_ABBREV_NO_TTY 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_STRING "*LK*"
-_ACEOF
-
-       ;;
-*-*-irix6*)
-       PATH="$PATH:/usr/etc"
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_IRIX_ARRAY 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_IRIX_PROJECT 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_IRIX_AUDIT 1
-_ACEOF
-
-       { echo "$as_me:$LINENO: checking for jlimit_startjob" >&5
-echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6; }
-if test "${ac_cv_func_jlimit_startjob+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define jlimit_startjob to an innocuous variant, in case <limits.h> declares jlimit_startjob.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define jlimit_startjob innocuous_jlimit_startjob
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char jlimit_startjob (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef jlimit_startjob
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char jlimit_startjob ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_jlimit_startjob || defined __stub___jlimit_startjob
-choke me
-#endif
-
-int
-main ()
-{
-return jlimit_startjob ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_jlimit_startjob=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_jlimit_startjob=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5
-echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6; }
-if test $ac_cv_func_jlimit_startjob = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_IRIX_JOBS 1
-_ACEOF
-
-fi
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_INET_NTOA 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_UPDWTMPX 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define WITH_ABBREV_NO_TTY 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_STRING "*LK*"
-_ACEOF
-
-       ;;
-*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
-       check_for_libcrypt_later=1
-       cat >>confdefs.h <<\_ACEOF
-#define PAM_TTY_KLUDGE 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_PREFIX "!"
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SPT_TYPE SPT_REUSEARGV
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _PATH_BTMP "/var/log/btmp"
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_BTMP 1
-_ACEOF
-
-       ;;
-*-*-linux*)
-       no_dev_ptmx=1
-       use_pie=auto
-       check_for_libcrypt_later=1
-       check_for_openpty_ctty_bug=1
-
-cat >>confdefs.h <<\_ACEOF
-#define PAM_TTY_KLUDGE 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_PREFIX "!"
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SPT_TYPE SPT_REUSEARGV
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define LINK_OPNOTSUPP_ERRNO EPERM
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _PATH_BTMP "/var/log/btmp"
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define USE_BTMP 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define LINUX_OOM_ADJUST 1
-_ACEOF
-
-       inet6_default_4in6=yes
-       case `uname -r` in
-       1.*|2.0.*)
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_CMSG_TYPE 1
-_ACEOF
-
-               ;;
-       esac
-       # tun(4) forwarding compat code
-
-for ac_header in linux/if_tun.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-       if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_LINUX 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_COMPAT_AF 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_PREPEND_AF 1
-_ACEOF
-
-       fi
-
-
-
-for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <linux/types.h>
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in prctl
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-       { echo "$as_me:$LINENO: checking for seccomp architecture" >&5
-echo $ECHO_N "checking for seccomp architecture... $ECHO_C" >&6; }
-       seccomp_audit_arch=
-       case "$host" in
-       x86_64-*)
-               seccomp_audit_arch=AUDIT_ARCH_X86_64
-               ;;
-       i*86-*)
-               seccomp_audit_arch=AUDIT_ARCH_I386
-               ;;
-       arm*-*)
-               seccomp_audit_arch=AUDIT_ARCH_ARM
-               ;;
-       aarch64*-*)
-               seccomp_audit_arch=AUDIT_ARCH_AARCH64
-               ;;
-       esac
-       if test "x$seccomp_audit_arch" != "x" ; then
-               { echo "$as_me:$LINENO: result: \"$seccomp_audit_arch\"" >&5
-echo "${ECHO_T}\"$seccomp_audit_arch\"" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
-_ACEOF
-
-       else
-               { echo "$as_me:$LINENO: result: architecture not supported" >&5
-echo "${ECHO_T}architecture not supported" >&6; }
-       fi
-       ;;
-mips-sony-bsd|mips-sony-newsos4)
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_SETPGRP 1
-_ACEOF
-
-       SONY=1
-       ;;
-*-*-netbsd*)
-       check_for_libcrypt_before=1
-       if test "x$withval" != "xno" ; then
-               need_dash_r=1
-       fi
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_FREEBSD 1
-_ACEOF
-
-       if test "${ac_cv_header_net_if_tap_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
-echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_net_if_tap_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
-echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
-echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <net/if_tap.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
-echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <net/if_tap.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: net/if_tap.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: net/if_tap.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
-echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_net_if_tap_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_net_if_tap_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
-echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
-
-fi
-if test $ac_cv_header_net_if_tap_h = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_NO_L2 1
-_ACEOF
-
-fi
-
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_PREPEND_AF 1
-_ACEOF
-
-       TEST_MALLOC_OPTIONS="AJRX"
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_STRNVIS 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_READ_COMPARISON 1
-_ACEOF
-
-       ;;
-*-*-freebsd*)
-       check_for_libcrypt_later=1
-
-cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_PREFIX "*LOCKED*"
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_FREEBSD 1
-_ACEOF
-
-       if test "${ac_cv_header_net_if_tap_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
-echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_net_if_tap_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
-echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
-echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <net/if_tap.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
-echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <net/if_tap.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: net/if_tap.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: net/if_tap.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
-echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_net_if_tap_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_net_if_tap_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
-echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
-
-fi
-if test $ac_cv_header_net_if_tap_h = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_NO_L2 1
-_ACEOF
-
-fi
-
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GLOB 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_STRNVIS 1
-_ACEOF
-
-       TEST_MALLOC_OPTIONS="AJRX"
-       # Preauth crypto occasionally uses file descriptors for crypto offload
-       # and will crash if they cannot be opened.
-
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_SKIP_RLIMIT_NOFILE 1
-_ACEOF
-
-       ;;
-*-*-bsdi*)
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       ;;
-*-next-*)
-       conf_lastlog_location="/usr/adm/lastlog"
-       conf_utmp_location=/etc/utmp
-       conf_wtmp_location=/usr/adm/wtmp
-       maildir=/usr/spool/mail
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_REALPATH 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SAVED_UIDS 1
-_ACEOF
-
-       ;;
-*-*-openbsd*)
-       use_pie=auto
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ATTRIBUTE__SENTINEL__ 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ATTRIBUTE__BOUNDED__ 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_TUN_OPENBSD 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SYSLOG_R_SAFE_IN_SIGHAND 1
-_ACEOF
-
-       TEST_MALLOC_OPTIONS="AFGJPRX"
-       ;;
-*-*-solaris*)
-       if test "x$withval" != "xno" ; then
-               need_dash_r=1
-       fi
-       cat >>confdefs.h <<\_ACEOF
-#define PAM_SUN_CODEBASE 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define LOGIN_NEEDS_UTMPX 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define LOGIN_NEEDS_TERM 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define PAM_TTY_KLUDGE 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_STRING "*LK*"
-_ACEOF
-
-       # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
-
-cat >>confdefs.h <<\_ACEOF
-#define SSHD_ACQUIRES_CTTY 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define PASSWD_NEEDS_USERNAME 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_TCGETATTR_ICANON 1
-_ACEOF
-
-       external_path_file=/etc/default/login
-       # hardwire lastlog location (can't detect it on some versions)
-       conf_lastlog_location="/var/adm/lastlog"
-       { echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5
-echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6; }
-       sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
-       if test "$sol2ver" -ge 8; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-               cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UTMP 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_WTMP 1
-_ACEOF
-
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
-
-# Check whether --with-solaris-contracts was given.
-if test "${with_solaris_contracts+set}" = set; then
-  withval=$with_solaris_contracts;
-               { echo "$as_me:$LINENO: checking for ct_tmpl_activate in -lcontract" >&5
-echo $ECHO_N "checking for ct_tmpl_activate in -lcontract... $ECHO_C" >&6; }
-if test "${ac_cv_lib_contract_ct_tmpl_activate+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcontract  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ct_tmpl_activate ();
-int
-main ()
-{
-return ct_tmpl_activate ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_contract_ct_tmpl_activate=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_contract_ct_tmpl_activate=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
-echo "${ECHO_T}$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
-if test $ac_cv_lib_contract_ct_tmpl_activate = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_SOLARIS_PROCESS_CONTRACTS 1
-_ACEOF
-
-                         SSHDLIBS="$SSHDLIBS -lcontract"
-                         SPC_MSG="yes"
-fi
-
-
-fi
-
-
-# Check whether --with-solaris-projects was given.
-if test "${with_solaris_projects+set}" = set; then
-  withval=$with_solaris_projects;
-               { echo "$as_me:$LINENO: checking for setproject in -lproject" >&5
-echo $ECHO_N "checking for setproject in -lproject... $ECHO_C" >&6; }
-if test "${ac_cv_lib_project_setproject+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lproject  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char setproject ();
-int
-main ()
-{
-return setproject ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_project_setproject=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_project_setproject=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_project_setproject" >&5
-echo "${ECHO_T}$ac_cv_lib_project_setproject" >&6; }
-if test $ac_cv_lib_project_setproject = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_SOLARIS_PROJECTS 1
-_ACEOF
-
-                       SSHDLIBS="$SSHDLIBS -lproject"
-                       SP_MSG="yes"
-fi
-
-
-fi
-
-       TEST_SHELL=$SHELL       # let configure find us a capable shell
-       ;;
-*-*-sunos4*)
-       CPPFLAGS="$CPPFLAGS -DSUNOS4"
-
-for ac_func in getpwanam
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-       cat >>confdefs.h <<\_ACEOF
-#define PAM_SUN_CODEBASE 1
-_ACEOF
-
-       conf_utmp_location=/etc/utmp
-       conf_wtmp_location=/var/adm/wtmp
-       conf_lastlog_location=/var/adm/lastlog
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       ;;
-*-ncr-sysv*)
-       LIBS="$LIBS -lc89"
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SSHD_ACQUIRES_CTTY 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       ;;
-*-sni-sysv*)
-       # /usr/ucblib MUST NOT be searched on ReliantUNIX
-
-{ echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5
-echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlsym+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlsym ();
-int
-main ()
-{
-return dlsym ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dl_dlsym=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_dl_dlsym=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6; }
-if test $ac_cv_lib_dl_dlsym = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
-_ACEOF
-
-  LIBS="-ldl $LIBS"
-
-fi
-
-       # -lresolv needs to be at the end of LIBS or DNS lookups break
-       { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
-echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
-if test "${ac_cv_lib_resolv_res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_query ();
-int
-main ()
-{
-return res_query ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_resolv_res_query=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_resolv_res_query=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5
-echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6; }
-if test $ac_cv_lib_resolv_res_query = yes; then
-   LIBS="$LIBS -lresolv"
-fi
-
-       IPADDR_IN_DISPLAY=yes
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define IP_TOS_IS_BROKEN 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SSHD_ACQUIRES_CTTY 1
-_ACEOF
-
-       external_path_file=/etc/default/login
-       # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
-       # Attention: always take care to bind libsocket and libnsl before libc,
-       # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
-       ;;
-# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
-*-*-sysv4.2*)
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define PASSWD_NEEDS_USERNAME 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_STRING "*LK*"
-_ACEOF
-
-       TEST_SHELL=$SHELL       # let configure find us a capable shell
-       ;;
-# UnixWare 7.x, OpenUNIX 8
-*-*-sysv5*)
-       CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
-
-cat >>confdefs.h <<\_ACEOF
-#define UNIXWARE_LONG_PASSWORDS 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GETADDRINFO 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define PASSWD_NEEDS_USERNAME 1
-_ACEOF
-
-       TEST_SHELL=$SHELL       # let configure find us a capable shell
-       case "$host" in
-       *-*-sysv5SCO_SV*)       # SCO OpenServer 6.x
-               maildir=/var/spool/mail
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_LIBIAF 1
-_ACEOF
-
-               cat >>confdefs.h <<\_ACEOF
-#define BROKEN_UPDWTMPX 1
-_ACEOF
-
-               { echo "$as_me:$LINENO: checking for getluid in -lprot" >&5
-echo $ECHO_N "checking for getluid in -lprot... $ECHO_C" >&6; }
-if test "${ac_cv_lib_prot_getluid+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lprot  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getluid ();
-int
-main ()
-{
-return getluid ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_prot_getluid=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_prot_getluid=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getluid" >&5
-echo "${ECHO_T}$ac_cv_lib_prot_getluid" >&6; }
-if test $ac_cv_lib_prot_getluid = yes; then
-   LIBS="$LIBS -lprot"
-
-
-for ac_func in getluid setluid
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_SECUREWARE 1
-_ACEOF
-
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_SHADOW 1
-_ACEOF
-
-
-fi
-
-               ;;
-       *)      cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_STRING "*LK*"
-_ACEOF
-
-               check_for_libcrypt_later=1
-               ;;
-       esac
-       ;;
-*-*-sysv*)
-       ;;
-# SCO UNIX and OEM versions of SCO UNIX
-*-*-sco3.2v4*)
-       { { echo "$as_me:$LINENO: error: \"This Platform is no longer supported.\"" >&5
-echo "$as_me: error: \"This Platform is no longer supported.\"" >&2;}
-   { (exit 1); exit 1; }; }
-       ;;
-# SCO OpenServer 5.x
-*-*-sco3.2v5*)
-       if test -z "$GCC"; then
-               CFLAGS="$CFLAGS -belf"
-       fi
-       LIBS="$LIBS -lprot -lx -ltinfo -lm"
-       no_dev_ptmx=1
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define HAVE_SECUREWARE 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_SHADOW 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_FD_PASSING 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GETADDRINFO 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define WITH_ABBREV_NO_TTY 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_UPDWTMPX 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define PASSWD_NEEDS_USERNAME 1
-_ACEOF
-
-
-
-for ac_func in getluid setluid
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-       MANTYPE=man
-       TEST_SHELL=$SHELL       # let configure find us a capable shell
-       SKIP_DISABLE_LASTLOG_DEFINE=yes
-       ;;
-*-*-unicosmk*)
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_SSH_LASTLOG 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_FD_PASSING 1
-_ACEOF
-
-       LDFLAGS="$LDFLAGS"
-       LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
-       MANTYPE=cat
-       ;;
-*-*-unicosmp*)
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define WITH_ABBREV_NO_TTY 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_FD_PASSING 1
-_ACEOF
-
-       LDFLAGS="$LDFLAGS"
-       LIBS="$LIBS -lgen -lacid -ldb"
-       MANTYPE=cat
-       ;;
-*-*-unicos*)
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_FD_PASSING 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define NO_SSH_LASTLOG 1
-_ACEOF
-
-       LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
-       LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
-       MANTYPE=cat
-       ;;
-*-dec-osf*)
-       { echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5
-echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6; }
-       no_osfsia=""
-
-# Check whether --with-osfsia was given.
-if test "${with_osfsia+set}" = set; then
-  withval=$with_osfsia;
-                       if test "x$withval" = "xno" ; then
-                               { echo "$as_me:$LINENO: result: disabled" >&5
-echo "${ECHO_T}disabled" >&6; }
-                               no_osfsia=1
-                       fi
-
-fi
-
-       if test -z "$no_osfsia" ; then
-               if test -f /etc/sia/matrix.conf; then
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OSF_SIA 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_LOGIN 1
-_ACEOF
-
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_FD_PASSING 1
-_ACEOF
-
-                       LIBS="$LIBS -lsecurity -ldb -lm -laud"
-                       SIA_MSG="yes"
-               else
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define LOCKED_PASSWD_SUBSTR "Nologin"
-_ACEOF
-
-               fi
-       fi
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GETADDRINFO 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SETEUID_BREAKS_SETUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREUID 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETREGID 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_READV_COMPARISON 1
-_ACEOF
-
-       ;;
-
-*-*-nto-qnx*)
-       cat >>confdefs.h <<\_ACEOF
-#define USE_PIPES 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define NO_X11_UNIX_SOCKETS 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_LASTLOG 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define SSHD_ACQUIRES_CTTY 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SHADOW_EXPIRE 1
-_ACEOF
-
-       enable_etc_default_login=no     # has incompatible /etc/default/login
-       case "$host" in
-       *-*-nto-qnx6*)
-               cat >>confdefs.h <<\_ACEOF
-#define DISABLE_FD_PASSING 1
-_ACEOF
-
-               ;;
-       esac
-       ;;
-
-*-*-ultrix*)
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GETGROUPS 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_MMAP 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define NEED_SETPGRP 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_SYSLOG_H 1
-_ACEOF
-
-       ;;
-
-*-*-lynxos)
-        CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETVBUF 1
-_ACEOF
-
-        ;;
-esac
-
-{ echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5
-echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-       { echo "$as_me:$LINENO: WARNING: cross compiling: not checking compiler sanity" >&5
-echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <stdio.h>
-int
-main ()
-{
- exit(0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               { { echo "$as_me:$LINENO: error: *** compiler cannot create working executables, check config.log ***" >&5
-echo "$as_me: error: *** compiler cannot create working executables, check config.log ***" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-
-# Checks for libraries.
-{ echo "$as_me:$LINENO: checking for yp_match" >&5
-echo $ECHO_N "checking for yp_match... $ECHO_C" >&6; }
-if test "${ac_cv_func_yp_match+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define yp_match to an innocuous variant, in case <limits.h> declares yp_match.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define yp_match innocuous_yp_match
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char yp_match (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef yp_match
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char yp_match ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_yp_match || defined __stub___yp_match
-choke me
-#endif
-
-int
-main ()
-{
-return yp_match ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_yp_match=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_yp_match=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5
-echo "${ECHO_T}$ac_cv_func_yp_match" >&6; }
-if test $ac_cv_func_yp_match = yes; then
-  :
-else
-
-{ echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5
-echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char yp_match ();
-int
-main ()
-{
-return yp_match ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_nsl_yp_match=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_nsl_yp_match=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6; }
-if test $ac_cv_lib_nsl_yp_match = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
-_ACEOF
-
-  LIBS="-lnsl $LIBS"
-
-fi
-
-fi
-
-{ echo "$as_me:$LINENO: checking for setsockopt" >&5
-echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
-if test "${ac_cv_func_setsockopt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define setsockopt innocuous_setsockopt
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char setsockopt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef setsockopt
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char setsockopt ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_setsockopt || defined __stub___setsockopt
-choke me
-#endif
-
-int
-main ()
-{
-return setsockopt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_setsockopt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_setsockopt=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
-echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
-if test $ac_cv_func_setsockopt = yes; then
-  :
-else
-
-{ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
-echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
-if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char setsockopt ();
-int
-main ()
-{
-return setsockopt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_socket_setsockopt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_socket_setsockopt=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
-if test $ac_cv_lib_socket_setsockopt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
-
-  LIBS="-lsocket $LIBS"
-
-fi
-
-fi
-
-
-
-for ac_func in dirname
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-for ac_header in libgen.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-else
-
-       { echo "$as_me:$LINENO: checking for dirname in -lgen" >&5
-echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6; }
-if test "${ac_cv_lib_gen_dirname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgen  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dirname ();
-int
-main ()
-{
-return dirname ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_gen_dirname=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_gen_dirname=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5
-echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6; }
-if test $ac_cv_lib_gen_dirname = yes; then
-
-               { echo "$as_me:$LINENO: checking for broken dirname" >&5
-echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6; }
-if test "${ac_cv_have_broken_dirname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-                       save_LIBS="$LIBS"
-                       LIBS="$LIBS -lgen"
-                       if test "$cross_compiling" = yes; then
-   ac_cv_have_broken_dirname="no"
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <libgen.h>
-#include <string.h>
-
-int main(int argc, char **argv) {
-    char *s, buf[32];
-
-    strncpy(buf,"/etc", 32);
-    s = dirname(buf);
-    if (!s || strncmp(s, "/", 32) != 0) {
-       exit(1);
-    } else {
-       exit(0);
-    }
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-   ac_cv_have_broken_dirname="no"
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
- ac_cv_have_broken_dirname="yes"
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-                       LIBS="$save_LIBS"
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5
-echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6; }
-               if test "x$ac_cv_have_broken_dirname" = "xno" ; then
-                       LIBS="$LIBS -lgen"
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_DIRNAME 1
-_ACEOF
-
-
-for ac_header in libgen.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-               fi
-
-fi
-
-
-fi
-done
-
-
-{ echo "$as_me:$LINENO: checking for getspnam" >&5
-echo $ECHO_N "checking for getspnam... $ECHO_C" >&6; }
-if test "${ac_cv_func_getspnam+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getspnam to an innocuous variant, in case <limits.h> declares getspnam.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getspnam innocuous_getspnam
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getspnam (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getspnam
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getspnam ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_getspnam || defined __stub___getspnam
-choke me
-#endif
-
-int
-main ()
-{
-return getspnam ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_getspnam=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_getspnam=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
-echo "${ECHO_T}$ac_cv_func_getspnam" >&6; }
-if test $ac_cv_func_getspnam = yes; then
-  :
-else
-  { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
-echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
-if test "${ac_cv_lib_gen_getspnam+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgen  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getspnam ();
-int
-main ()
-{
-return getspnam ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_gen_getspnam=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_gen_getspnam=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
-echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
-if test $ac_cv_lib_gen_getspnam = yes; then
-  LIBS="$LIBS -lgen"
-fi
-
-fi
-
-{ echo "$as_me:$LINENO: checking for library containing basename" >&5
-echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6; }
-if test "${ac_cv_search_basename+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char basename ();
-int
-main ()
-{
-return basename ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' gen; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_basename=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_basename+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_basename+set}" = set; then
-  :
-else
-  ac_cv_search_basename=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5
-echo "${ECHO_T}$ac_cv_search_basename" >&6; }
-ac_res=$ac_cv_search_basename
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BASENAME 1
-_ACEOF
-
-fi
-
-
-
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then
-  withval=$with_zlib;  if test "x$withval" = "xno" ; then
-               { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5
-echo "$as_me: error: *** zlib is required ***" >&2;}
-   { (exit 1); exit 1; }; }
-         elif test "x$withval" != "xyes"; then
-               if test -d "$withval/lib"; then
-                       if test -n "${need_dash_r}"; then
-                               LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
-                       else
-                               LDFLAGS="-L${withval}/lib ${LDFLAGS}"
-                       fi
-               else
-                       if test -n "${need_dash_r}"; then
-                               LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
-                       else
-                               LDFLAGS="-L${withval} ${LDFLAGS}"
-                       fi
-               fi
-               if test -d "$withval/include"; then
-                       CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
-               else
-                       CPPFLAGS="-I${withval} ${CPPFLAGS}"
-               fi
-       fi
-
-fi
-
-
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
-echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <zlib.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
-echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <zlib.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_zlib_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
-
-fi
-if test $ac_cv_header_zlib_h = yes; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: *** zlib.h missing - please install first or check config.log ***" >&5
-echo "$as_me: error: *** zlib.h missing - please install first or check config.log ***" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-
-{ echo "$as_me:$LINENO: checking for deflate in -lz" >&5
-echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; }
-if test "${ac_cv_lib_z_deflate+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char deflate ();
-int
-main ()
-{
-return deflate ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_z_deflate=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_z_deflate=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
-echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; }
-if test $ac_cv_lib_z_deflate = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
-  LIBS="-lz $LIBS"
-
-else
-
-               saved_CPPFLAGS="$CPPFLAGS"
-               saved_LDFLAGS="$LDFLAGS"
-               save_LIBS="$LIBS"
-                               if test -n "${need_dash_r}"; then
-                       LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
-               else
-                       LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
-               fi
-               CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
-               LIBS="$LIBS -lz"
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char deflate ();
-int
-main ()
-{
-return deflate ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                               { { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5
-echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
-   { (exit 1); exit 1; }; }
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-
-fi
-
-
-
-# Check whether --with-zlib-version-check was given.
-if test "${with_zlib_version_check+set}" = set; then
-  withval=$with_zlib_version_check;   if test "x$withval" = "xno" ; then
-               zlib_check_nonfatal=1
-          fi
-
-
-fi
-
-
-{ echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5
-echo $ECHO_N "checking for possibly buggy zlib... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-       { echo "$as_me:$LINENO: WARNING: cross compiling: not checking zlib version" >&5
-echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <zlib.h>
-
-int
-main ()
-{
-
-       int a=0, b=0, c=0, d=0, n, v;
-       n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
-       if (n != 3 && n != 4)
-               exit(1);
-       v = a*1000000 + b*10000 + c*100 + d;
-       fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
-
-       /* 1.1.4 is OK */
-       if (a == 1 && b == 1 && c >= 4)
-               exit(0);
-
-       /* 1.2.3 and up are OK */
-       if (v >= 1020300)
-               exit(0);
-
-       exit(2);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-         if test -z "$zlib_check_nonfatal" ; then
-               { { echo "$as_me:$LINENO: error: *** zlib too old - check config.log ***
-Your reported zlib version has known security problems.  It's possible your
-vendor has fixed these problems without changing the version number.  If you
-are sure this is the case, you can disable the check by running
-\"./configure --without-zlib-version-check\".
-If you are in doubt, upgrade zlib to version 1.2.3 or greater.
-See http://www.gzip.org/zlib/ for details." >&5
-echo "$as_me: error: *** zlib too old - check config.log ***
-Your reported zlib version has known security problems.  It's possible your
-vendor has fixed these problems without changing the version number.  If you
-are sure this is the case, you can disable the check by running
-\"./configure --without-zlib-version-check\".
-If you are in doubt, upgrade zlib to version 1.2.3 or greater.
-See http://www.gzip.org/zlib/ for details." >&2;}
-   { (exit 1); exit 1; }; }
-         else
-               { echo "$as_me:$LINENO: WARNING: zlib version may have security problems" >&5
-echo "$as_me: WARNING: zlib version may have security problems" >&2;}
-         fi
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-
-{ echo "$as_me:$LINENO: checking for strcasecmp" >&5
-echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6; }
-if test "${ac_cv_func_strcasecmp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define strcasecmp to an innocuous variant, in case <limits.h> declares strcasecmp.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strcasecmp innocuous_strcasecmp
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strcasecmp (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef strcasecmp
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasecmp ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_strcasecmp || defined __stub___strcasecmp
-choke me
-#endif
-
-int
-main ()
-{
-return strcasecmp ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_strcasecmp=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_strcasecmp=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
-echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6; }
-if test $ac_cv_func_strcasecmp = yes; then
-  :
-else
-   { echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
-echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6; }
-if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char strcasecmp ();
-int
-main ()
-{
-return strcasecmp ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_resolv_strcasecmp=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_resolv_strcasecmp=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5
-echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6; }
-if test $ac_cv_lib_resolv_strcasecmp = yes; then
-  LIBS="$LIBS -lresolv"
-fi
-
-
-fi
-
-
-for ac_func in utimes
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-   { echo "$as_me:$LINENO: checking for utimes in -lc89" >&5
-echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6; }
-if test "${ac_cv_lib_c89_utimes+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc89  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char utimes ();
-int
-main ()
-{
-return utimes ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_c89_utimes=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_c89_utimes=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5
-echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6; }
-if test $ac_cv_lib_c89_utimes = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_UTIMES 1
-_ACEOF
-
-                                       LIBS="$LIBS -lc89"
-fi
-
-
-fi
-done
-
-
-
-
-for ac_header in bsd/libutil.h libutil.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-{ echo "$as_me:$LINENO: checking for library containing fmt_scaled" >&5
-echo $ECHO_N "checking for library containing fmt_scaled... $ECHO_C" >&6; }
-if test "${ac_cv_search_fmt_scaled+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char fmt_scaled ();
-int
-main ()
-{
-return fmt_scaled ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' util bsd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_fmt_scaled=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_fmt_scaled+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_fmt_scaled+set}" = set; then
-  :
-else
-  ac_cv_search_fmt_scaled=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_fmt_scaled" >&5
-echo "${ECHO_T}$ac_cv_search_fmt_scaled" >&6; }
-ac_res=$ac_cv_search_fmt_scaled
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ echo "$as_me:$LINENO: checking for library containing scan_scaled" >&5
-echo $ECHO_N "checking for library containing scan_scaled... $ECHO_C" >&6; }
-if test "${ac_cv_search_scan_scaled+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char scan_scaled ();
-int
-main ()
-{
-return scan_scaled ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' util bsd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_scan_scaled=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_scan_scaled+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_scan_scaled+set}" = set; then
-  :
-else
-  ac_cv_search_scan_scaled=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_scan_scaled" >&5
-echo "${ECHO_T}$ac_cv_search_scan_scaled" >&6; }
-ac_res=$ac_cv_search_scan_scaled
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ echo "$as_me:$LINENO: checking for library containing login" >&5
-echo $ECHO_N "checking for library containing login... $ECHO_C" >&6; }
-if test "${ac_cv_search_login+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char login ();
-int
-main ()
-{
-return login ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' util bsd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_login=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_login+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_login+set}" = set; then
-  :
-else
-  ac_cv_search_login=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5
-echo "${ECHO_T}$ac_cv_search_login" >&6; }
-ac_res=$ac_cv_search_login
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ echo "$as_me:$LINENO: checking for library containing logout" >&5
-echo $ECHO_N "checking for library containing logout... $ECHO_C" >&6; }
-if test "${ac_cv_search_logout+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char logout ();
-int
-main ()
-{
-return logout ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' util bsd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_logout=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_logout+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_logout+set}" = set; then
-  :
-else
-  ac_cv_search_logout=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_logout" >&5
-echo "${ECHO_T}$ac_cv_search_logout" >&6; }
-ac_res=$ac_cv_search_logout
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ echo "$as_me:$LINENO: checking for library containing logwtmp" >&5
-echo $ECHO_N "checking for library containing logwtmp... $ECHO_C" >&6; }
-if test "${ac_cv_search_logwtmp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char logwtmp ();
-int
-main ()
-{
-return logwtmp ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' util bsd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_logwtmp=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_logwtmp+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_logwtmp+set}" = set; then
-  :
-else
-  ac_cv_search_logwtmp=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_logwtmp" >&5
-echo "${ECHO_T}$ac_cv_search_logwtmp" >&6; }
-ac_res=$ac_cv_search_logwtmp
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ echo "$as_me:$LINENO: checking for library containing openpty" >&5
-echo $ECHO_N "checking for library containing openpty... $ECHO_C" >&6; }
-if test "${ac_cv_search_openpty+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char openpty ();
-int
-main ()
-{
-return openpty ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' util bsd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_openpty=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_openpty+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_openpty+set}" = set; then
-  :
-else
-  ac_cv_search_openpty=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_openpty" >&5
-echo "${ECHO_T}$ac_cv_search_openpty" >&6; }
-ac_res=$ac_cv_search_openpty
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ echo "$as_me:$LINENO: checking for library containing updwtmp" >&5
-echo $ECHO_N "checking for library containing updwtmp... $ECHO_C" >&6; }
-if test "${ac_cv_search_updwtmp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char updwtmp ();
-int
-main ()
-{
-return updwtmp ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' util bsd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_updwtmp=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_updwtmp+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_updwtmp+set}" = set; then
-  :
-else
-  ac_cv_search_updwtmp=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_updwtmp" >&5
-echo "${ECHO_T}$ac_cv_search_updwtmp" >&6; }
-ac_res=$ac_cv_search_updwtmp
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-
-
-
-
-
-
-
-for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-# On some platforms, inet_ntop may be found in libresolv or libnsl.
-{ echo "$as_me:$LINENO: checking for library containing inet_ntop" >&5
-echo $ECHO_N "checking for library containing inet_ntop... $ECHO_C" >&6; }
-if test "${ac_cv_search_inet_ntop+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_ntop ();
-int
-main ()
-{
-return inet_ntop ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' resolv nsl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_inet_ntop=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_inet_ntop+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_inet_ntop+set}" = set; then
-  :
-else
-  ac_cv_search_inet_ntop=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_inet_ntop" >&5
-echo "${ECHO_T}$ac_cv_search_inet_ntop" >&6; }
-ac_res=$ac_cv_search_inet_ntop
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-
-
-for ac_func in strftime
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  # strftime is in -lintl on SCO UNIX.
-{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
-echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_intl_strftime+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char strftime ();
-int
-main ()
-{
-return strftime ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_intl_strftime=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_intl_strftime=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
-if test $ac_cv_lib_intl_strftime = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRFTIME 1
-_ACEOF
-
-LIBS="-lintl $LIBS"
-fi
-
-fi
-done
-
-
-# Check for ALTDIRFUNC glob() extension
-{ echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5
-echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-               #include <glob.h>
-               #ifdef GLOB_ALTDIRFUNC
-               FOUNDIT
-               #endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "FOUNDIT" >/dev/null 2>&1; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define GLOB_HAS_ALTDIRFUNC 1
-_ACEOF
-
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-else
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-
-fi
-rm -f conftest*
-
-
-# Check for g.gl_matchc glob() extension
-{ echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5
-echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <glob.h>
-int
-main ()
-{
- glob_t g; g.gl_matchc = 1;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define GLOB_HAS_GL_MATCHC 1
-_ACEOF
-
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-# Check for g.gl_statv glob() extension
-{ echo "$as_me:$LINENO: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
-echo $ECHO_N "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <glob.h>
-int
-main ()
-{
-
-#ifndef GLOB_KEEPSTAT
-#error "glob does not support GLOB_KEEPSTAT extension"
-#endif
-glob_t g;
-g.gl_statv = NULL;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define GLOB_HAS_GL_STATV 1
-_ACEOF
-
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-{ echo "$as_me:$LINENO: checking whether GLOB_NOMATCH is declared" >&5
-echo $ECHO_N "checking whether GLOB_NOMATCH is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_GLOB_NOMATCH+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <glob.h>
-
-int
-main ()
-{
-#ifndef GLOB_NOMATCH
-  (void) GLOB_NOMATCH;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_GLOB_NOMATCH=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_GLOB_NOMATCH=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GLOB_NOMATCH" >&5
-echo "${ECHO_T}$ac_cv_have_decl_GLOB_NOMATCH" >&6; }
-if test $ac_cv_have_decl_GLOB_NOMATCH = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GLOB_NOMATCH 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GLOB_NOMATCH 0
-_ACEOF
-
-
-fi
-
-
-
-{ echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5
-echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-
-               { echo "$as_me:$LINENO: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
-echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
-               cat >>confdefs.h <<\_ACEOF
-#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
-_ACEOF
-
-
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <dirent.h>
-int
-main ()
-{
-
-       struct dirent d;
-       exit(sizeof(d.d_name)<=sizeof(char));
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
-_ACEOF
-
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-
-{ echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5
-echo $ECHO_N "checking for /proc/pid/fd directory... $ECHO_C" >&6; }
-if test -d "/proc/$$/fd" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PROC_PID 1
-_ACEOF
-
-       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-# Check whether user wants S/Key support
-SKEY_MSG="no"
-
-# Check whether --with-skey was given.
-if test "${with_skey+set}" = set; then
-  withval=$with_skey;
-               if test "x$withval" != "xno" ; then
-
-                       if test "x$withval" != "xyes" ; then
-                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
-                               LDFLAGS="$LDFLAGS -L${withval}/lib"
-                       fi
-
-
-cat >>confdefs.h <<\_ACEOF
-#define SKEY 1
-_ACEOF
-
-                       LIBS="-lskey $LIBS"
-                       SKEY_MSG="yes"
-
-                       { echo "$as_me:$LINENO: checking for s/key support" >&5
-echo $ECHO_N "checking for s/key support... $ECHO_C" >&6; }
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <skey.h>
-
-int
-main ()
-{
-
-       char *ff = skey_keyinfo(""); ff="";
-       exit(0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                                       { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5
-echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-                       { echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5
-echo $ECHO_N "checking if skeychallenge takes 4 arguments... $ECHO_C" >&6; }
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <skey.h>
-
-int
-main ()
-{
-
-       (void)skeychallenge(NULL,"name","",0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-                               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define SKEYCHALLENGE_4ARG 1
-_ACEOF
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-               fi
-
-
-fi
-
-
-# Check whether user wants to use ldns
-LDNS_MSG="no"
-
-# Check whether --with-ldns was given.
-if test "${with_ldns+set}" = set; then
-  withval=$with_ldns;
-        if test "x$withval" != "xno" ; then
-
-                       if test "x$withval" != "xyes" ; then
-                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
-                               LDFLAGS="$LDFLAGS -L${withval}/lib"
-                       fi
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LDNS 1
-_ACEOF
-
-            LIBS="-lldns $LIBS"
-            LDNS_MSG="yes"
-
-            { echo "$as_me:$LINENO: checking for ldns support" >&5
-echo $ECHO_N "checking for ldns support... $ECHO_C" >&6; }
-            cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <ldns/ldns.h>
-int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
-
-
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                                       { { echo "$as_me:$LINENO: error: ** Incomplete or missing ldns libraries." >&5
-echo "$as_me: error: ** Incomplete or missing ldns libraries." >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        fi
-
-
-fi
-
-
-# Check whether user wants libedit support
-LIBEDIT_MSG="no"
-
-# Check whether --with-libedit was given.
-if test "${with_libedit+set}" = set; then
-  withval=$with_libedit;  if test "x$withval" != "xno" ; then
-               if test "x$withval" = "xyes" ; then
-                       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
-echo "${ECHO_T}$PKGCONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKGCONFIG"; then
-  ac_pt_PKGCONFIG=$PKGCONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_ac_pt_PKGCONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $ac_pt_PKGCONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
-if test -n "$ac_pt_PKGCONFIG"; then
-  { echo "$as_me:$LINENO: result: $ac_pt_PKGCONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKGCONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_pt_PKGCONFIG" = x; then
-    PKGCONFIG="no"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKGCONFIG=$ac_pt_PKGCONFIG
-  fi
-else
-  PKGCONFIG="$ac_cv_path_PKGCONFIG"
-fi
-
-                       if test "x$PKGCONFIG" != "xno"; then
-                               { echo "$as_me:$LINENO: checking if $PKGCONFIG knows about libedit" >&5
-echo $ECHO_N "checking if $PKGCONFIG knows about libedit... $ECHO_C" >&6; }
-                               if "$PKGCONFIG" libedit; then
-                                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                                       use_pkgconfig_for_libedit=yes
-                               else
-                                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                               fi
-                       fi
-               else
-                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
-                       if test -n "${need_dash_r}"; then
-                               LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
-                       else
-                               LDFLAGS="-L${withval}/lib ${LDFLAGS}"
-                       fi
-               fi
-               if test "x$use_pkgconfig_for_libedit" = "xyes"; then
-                       LIBEDIT=`$PKGCONFIG --libs libedit`
-                       CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
-               else
-                       LIBEDIT="-ledit -lcurses"
-               fi
-               OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
-               { echo "$as_me:$LINENO: checking for el_init in -ledit" >&5
-echo $ECHO_N "checking for el_init in -ledit... $ECHO_C" >&6; }
-if test "${ac_cv_lib_edit_el_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ledit  $OTHERLIBS
-                $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char el_init ();
-int
-main ()
-{
-return el_init ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_edit_el_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_edit_el_init=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_edit_el_init" >&5
-echo "${ECHO_T}$ac_cv_lib_edit_el_init" >&6; }
-if test $ac_cv_lib_edit_el_init = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_LIBEDIT 1
-_ACEOF
-
-                         LIBEDIT_MSG="yes"
-
-
-else
-   { { echo "$as_me:$LINENO: error: libedit not found" >&5
-echo "$as_me: error: libedit not found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-               { echo "$as_me:$LINENO: checking if libedit version is compatible" >&5
-echo $ECHO_N "checking if libedit version is compatible... $ECHO_C" >&6; }
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <histedit.h>
-int
-main ()
-{
-
-       int i = H_SETSIZE;
-       el_init("", NULL, NULL, NULL);
-       exit(0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                     { { echo "$as_me:$LINENO: error: libedit version is not compatible" >&5
-echo "$as_me: error: libedit version is not compatible" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       fi
-
-fi
-
-
-AUDIT_MODULE=none
-
-# Check whether --with-audit was given.
-if test "${with_audit+set}" = set; then
-  withval=$with_audit;
-         { echo "$as_me:$LINENO: checking for supported audit module" >&5
-echo $ECHO_N "checking for supported audit module... $ECHO_C" >&6; }
-         case "$withval" in
-         bsm)
-               { echo "$as_me:$LINENO: result: bsm" >&5
-echo "${ECHO_T}bsm" >&6; }
-               AUDIT_MODULE=bsm
-
-for ac_header in bsm/audit.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_TIME_H
-# include <time.h>
-#endif
-
-
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  { { echo "$as_me:$LINENO: error: BSM enabled and bsm/audit.h not found" >&5
-echo "$as_me: error: BSM enabled and bsm/audit.h not found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-done
-
-
-{ echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5
-echo $ECHO_N "checking for getaudit in -lbsm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_bsm_getaudit+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getaudit ();
-int
-main ()
-{
-return getaudit ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_bsm_getaudit=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_bsm_getaudit=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5
-echo "${ECHO_T}$ac_cv_lib_bsm_getaudit" >&6; }
-if test $ac_cv_lib_bsm_getaudit = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBSM 1
-_ACEOF
-
-  LIBS="-lbsm $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: BSM enabled and required library not found" >&5
-echo "$as_me: error: BSM enabled and required library not found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-for ac_func in getaudit
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  { { echo "$as_me:$LINENO: error: BSM enabled and required function not found" >&5
-echo "$as_me: error: BSM enabled and required function not found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-done
-
-               # These are optional
-
-
-for ac_func in getaudit_addr aug_get_machine
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_BSM_AUDIT 1
-_ACEOF
-
-               if test "$sol2ver" -ge 11; then
-                       SSHDLIBS="$SSHDLIBS -lscf"
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_BSM_API 1
-_ACEOF
-
-               fi
-               ;;
-         linux)
-               { echo "$as_me:$LINENO: result: linux" >&5
-echo "${ECHO_T}linux" >&6; }
-               AUDIT_MODULE=linux
-
-for ac_header in libaudit.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-               SSHDLIBS="$SSHDLIBS -laudit"
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_LINUX_AUDIT 1
-_ACEOF
-
-               ;;
-         debug)
-               AUDIT_MODULE=debug
-               { echo "$as_me:$LINENO: result: debug" >&5
-echo "${ECHO_T}debug" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define SSH_AUDIT_EVENTS 1
-_ACEOF
-
-               ;;
-         no)
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               ;;
-         *)
-               { { echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5
-echo "$as_me: error: Unknown audit module $withval" >&2;}
-   { (exit 1); exit 1; }; }
-               ;;
-       esac
-
-fi
-
-
-
-# Check whether --with-pie was given.
-if test "${with_pie+set}" = set; then
-  withval=$with_pie;
-       if test "x$withval" = "xno"; then
-               use_pie=no
-       fi
-       if test "x$withval" = "xyes"; then
-               use_pie=yes
-       fi
-
-
-fi
-
-if test "x$use_pie" = "x"; then
-       use_pie=no
-fi
-if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then
-       # Turn off automatic PIE when toolchain hardening is off.
-       use_pie=no
-fi
-if test "x$use_pie" = "xauto"; then
-       # Automatic PIE requires gcc >= 4.x
-       { echo "$as_me:$LINENO: checking for gcc >= 4.x" >&5
-echo $ECHO_N "checking for gcc >= 4.x... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#if !defined(__GNUC__) || __GNUC__ < 4
-#error gcc is too old
-#endif
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-         use_pie=no
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if test "x$use_pie" != "xno"; then
-       SAVED_CFLAGS="$CFLAGS"
-       SAVED_LDFLAGS="$LDFLAGS"
-       {
-       { echo "$as_me:$LINENO: checking if $CC supports compile flag -fPIE" >&5
-echo $ECHO_N "checking if $CC supports compile flag -fPIE... $ECHO_C" >&6; }
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $WERROR -fPIE"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-fPIE"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-if `grep -i "unrecognized option" conftest.err >/dev/null`
-then
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$saved_CFLAGS"
-else
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                CFLAGS="$saved_CFLAGS $_define_flag"
-fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 CFLAGS="$saved_CFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-}
-       {
-       { echo "$as_me:$LINENO: checking if $LD supports link flag -pie" >&5
-echo $ECHO_N "checking if $LD supports link flag -pie... $ECHO_C" >&6; }
-       saved_LDFLAGS="$LDFLAGS"
-       LDFLAGS="$LDFLAGS $WERROR -pie"
-       _define_flag=""
-       test "x$_define_flag" = "x" && _define_flag="-pie"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <stdio.h>
-int main(int argc, char **argv) {
-       /* Some math to catch -ftrapv problems in the toolchain */
-       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
-       float l = i * 2.1;
-       double m = l / 0.5;
-       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
-       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
-       exit(0);
-}
-
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                 LDFLAGS="$saved_LDFLAGS $_define_flag"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                 LDFLAGS="$saved_LDFLAGS"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-}
-       # We use both -fPIE and -pie or neither.
-       { echo "$as_me:$LINENO: checking whether both -fPIE and -pie are supported" >&5
-echo $ECHO_N "checking whether both -fPIE and -pie are supported... $ECHO_C" >&6; }
-       if echo "x $CFLAGS"  | grep ' -fPIE' >/dev/null 2>&1 && \
-          echo "x $LDFLAGS" | grep ' -pie'  >/dev/null 2>&1 ; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               CFLAGS="$SAVED_CFLAGS"
-               LDFLAGS="$SAVED_LDFLAGS"
-       fi
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in  \
-       Blowfish_initstate \
-       Blowfish_expandstate \
-       Blowfish_expand0state \
-       Blowfish_stream2word \
-       asprintf \
-       b64_ntop \
-       __b64_ntop \
-       b64_pton \
-       __b64_pton \
-       bcopy \
-       bcrypt_pbkdf \
-       bindresvport_sa \
-       blf_enc \
-       cap_rights_limit \
-       clock \
-       closefrom \
-       dirfd \
-       endgrent \
-       explicit_bzero \
-       fchmod \
-       fchown \
-       freeaddrinfo \
-       fstatfs \
-       fstatvfs \
-       futimes \
-       getaddrinfo \
-       getcwd \
-       getgrouplist \
-       getnameinfo \
-       getopt \
-       getpeereid \
-       getpeerucred \
-       getpgid \
-       getpgrp \
-       _getpty \
-       getrlimit \
-       getttyent \
-       glob \
-       group_from_gid \
-       inet_aton \
-       inet_ntoa \
-       inet_ntop \
-       innetgr \
-       login_getcapbool \
-       mblen \
-       md5_crypt \
-       memmove \
-       memset_s \
-       mkdtemp \
-       mmap \
-       ngetaddrinfo \
-       nsleep \
-       ogetaddrinfo \
-       openlog_r \
-       poll \
-       prctl \
-       pstat \
-       readpassphrase \
-       reallocarray \
-       recvmsg \
-       rresvport_af \
-       sendmsg \
-       setdtablesize \
-       setegid \
-       setenv \
-       seteuid \
-       setgroupent \
-       setgroups \
-       setlinebuf \
-       setlogin \
-       setpassent\
-       setpcred \
-       setproctitle \
-       setregid \
-       setreuid \
-       setrlimit \
-       setsid \
-       setvbuf \
-       sigaction \
-       sigvec \
-       snprintf \
-       socketpair \
-       statfs \
-       statvfs \
-       strdup \
-       strerror \
-       strlcat \
-       strlcpy \
-       strmode \
-       strnlen \
-       strnvis \
-       strptime \
-       strtonum \
-       strtoll \
-       strtoul \
-       strtoull \
-       swap32 \
-       sysconf \
-       tcgetpgrp \
-       timingsafe_bcmp \
-       truncate \
-       unsetenv \
-       updwtmpx \
-       user_from_uid \
-       usleep \
-       vasprintf \
-       vsnprintf \
-       waitpid \
-
+  ac_ct_AR=$AR
+  for ac_prog in ar
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+  test -n "$ac_ct_AR" && break
+done
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+    AR=$ac_ct_AR
+  fi
+fi
+
+# Extract the first word of "cat", so it can be a program name with args.
+set dummy cat; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CAT+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case $CAT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-       eval "$as_ac_var=no"
+  ;;
+esac
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+CAT=$ac_cv_path_CAT
+if test -n "$CAT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
+$as_echo "$CAT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-fi
-done
 
+# Extract the first word of "kill", so it can be a program name with args.
+set dummy kill; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_KILL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $KILL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <ctype.h>
-int
-main ()
-{
- return (isblank('a'));
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ISBLANK 1
-_ACEOF
+fi
+KILL=$ac_cv_path_KILL
+if test -n "$KILL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
+$as_echo "$KILL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+for ac_prog in perl5 perl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 
-# PKCS11 depends on OpenSSL.
-if test "x$openssl" = "xyes" ; then
-       # PKCS#11 support requires dlopen() and co
-       { echo "$as_me:$LINENO: checking for library containing dlopen" >&5
-echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
-if test "${ac_cv_search_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  test -n "$PERL" && break
+done
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+# Extract the first word of "sed", so it can be a program name with args.
+set dummy sed; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $SED in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SED="$SED" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_dlopen=$ac_res
+fi
+SED=$ac_cv_path_SED
+if test -n "$SED"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
+$as_echo "$SED" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_dlopen+set}" = set; then
-  break
+# Extract the first word of "ent", so it can be a program name with args.
+set dummy ent; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ENT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ENT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
 fi
-done
-if test "${ac_cv_search_dlopen+set}" = set; then
-  :
+ENT=$ac_cv_path_ENT
+if test -n "$ENT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
+$as_echo "$ENT" >&6; }
 else
-  ac_cv_search_dlopen=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
-echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
-ac_res=$ac_cv_search_dlopen
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_PKCS11
-_ACEOF
 
 
-fi
+# Extract the first word of "bash", so it can be a program name with args.
+set dummy bash; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TEST_MINUS_S_SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
+if test -n "$TEST_MINUS_S_SH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
+$as_echo "$TEST_MINUS_S_SH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-# IRIX has a const char return value for gai_strerror()
 
-for ac_func in gai_strerror
+# Extract the first word of "ksh", so it can be a program name with args.
+set dummy ksh; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TEST_MINUS_S_SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
+if test -n "$TEST_MINUS_S_SH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
+$as_echo "$TEST_MINUS_S_SH" >&6; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TEST_MINUS_S_SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-#undef $ac_func
+  ;;
+esac
+fi
+TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
+if test -n "$TEST_MINUS_S_SH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
+$as_echo "$TEST_MINUS_S_SH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SH+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case $SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SH="$SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-       eval "$as_ac_var=no"
+  ;;
+esac
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+SH=$ac_cv_path_SH
+if test -n "$SH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
+$as_echo "$SH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-       cat >>confdefs.h <<\_ACEOF
-#define HAVE_GAI_STRERROR 1
-_ACEOF
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
+# Extract the first word of "groff", so it can be a program name with args.
+set dummy groff; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GROFF+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GROFF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-const char *gai_strerror(int);
+  ;;
+esac
+fi
+GROFF=$ac_cv_path_GROFF
+if test -n "$GROFF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
+$as_echo "$GROFF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-int
-main ()
-{
 
-       char *str;
-       str = gai_strerror(0);
+# Extract the first word of "nroff", so it can be a program name with args.
+set dummy nroff; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_NROFF+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $NROFF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+fi
+NROFF=$ac_cv_path_NROFF
+if test -n "$NROFF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
+$as_echo "$NROFF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONST_GAI_STRERROR_PROTO 1
-_ACEOF
+# Extract the first word of "mandoc", so it can be a program name with args.
+set dummy mandoc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MANDOC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MANDOC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+MANDOC=$ac_cv_path_MANDOC
+if test -n "$MANDOC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
+$as_echo "$MANDOC" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-fi
+TEST_SHELL=sh
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test "x$MANDOC" != "x" ; then
+       MANFMT="$MANDOC"
+elif test "x$NROFF" != "x" ; then
+       MANFMT="$NROFF -mandoc"
+elif test "x$GROFF" != "x" ; then
+       MANFMT="$GROFF -mandoc -Tascii"
+else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatted found" >&5
+$as_echo "$as_me: WARNING: no manpage formatted found" >&2;}
+       MANFMT="false"
 fi
-done
 
 
-{ echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
-echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; }
-if test "${ac_cv_search_nanosleep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# Extract the first word of "groupadd", so it can be a program name with args.
+set dummy groupadd; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char nanosleep ();
-int
-main ()
-{
-return nanosleep ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' rt posix4; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  case $PATH_GROUPADD_PROG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
+  ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_nanosleep=$ac_res
+fi
+PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
+if test -n "$PATH_GROUPADD_PROG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
+$as_echo "$PATH_GROUPADD_PROG" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-fi
+# Extract the first word of "useradd", so it can be a program name with args.
+set dummy useradd; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PATH_USERADD_PROG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_nanosleep+set}" = set; then
-  break
+  test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
+  ;;
+esac
 fi
-done
-if test "${ac_cv_search_nanosleep+set}" = set; then
-  :
+PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
+if test -n "$PATH_USERADD_PROG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
+$as_echo "$PATH_USERADD_PROG" >&6; }
 else
-  ac_cv_search_nanosleep=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
-echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; }
-ac_res=$ac_cv_search_nanosleep
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NANOSLEEP 1
-_ACEOF
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-{ echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5
-echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6; }
-if test "${ac_cv_search_clock_gettime+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# Extract the first word of "pkgmk", so it can be a program name with args.
+set dummy pkgmk; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
-int
-main ()
-{
-return clock_gettime ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' rt; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_clock_gettime=$ac_res
+  if test -n "$MAKE_PACKAGE_SUPPORTED"; then
+  ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_clock_gettime+set}" = set; then
-  break
 fi
-done
-if test "${ac_cv_search_clock_gettime+set}" = set; then
-  :
+MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
+if test -n "$MAKE_PACKAGE_SUPPORTED"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
+$as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
 else
-  ac_cv_search_clock_gettime=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5
-echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6; }
-ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLOCK_GETTIME 1
-_ACEOF
+
+if test -x /sbin/sh; then
+       STARTUP_SCRIPT_SHELL=/sbin/sh
+
+else
+       STARTUP_SCRIPT_SHELL=/bin/sh
 
 fi
 
+# System features
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+  enableval=$enable_largefile;
+fi
 
-{ echo "$as_me:$LINENO: checking whether getrusage is declared" >&5
-echo $ECHO_N "checking whether getrusage is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_getrusage+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test "$enable_largefile" != no; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if ${ac_cv_sys_largefile_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main ()
 {
-#ifndef getrusage
-  (void) getrusage;
-#endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_getrusage=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_getrusage=no
+        if ac_fn_c_try_compile "$LINENO"; then :
+  break
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext
+        CC="$CC -n32"
+        if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_largefile_CC=' -n32'; break
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5
-echo "${ECHO_T}$ac_cv_have_decl_getrusage" >&6; }
-if test $ac_cv_have_decl_getrusage = yes; then
-
-for ac_func in getrusage
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+rm -f core conftest.err conftest.$ac_objext
+        break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if ${ac_cv_sys_file_offset_bits+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main ()
 {
-return $ac_func ();
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=no; break
 fi
-
-{ echo "$as_me:$LINENO: checking whether strsep is declared" >&5
-echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_strsep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-
-
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main ()
 {
-#ifndef strsep
-  (void) strsep;
-#endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_strsep=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_strsep=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=64; break
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_file_offset_bits=unknown
+  break
+done
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5
-echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6; }
-if test $ac_cv_have_decl_strsep = yes; then
-
-for ac_func in strsep
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+;;
+esac
+rm -rf conftest*
+  if test $ac_cv_sys_file_offset_bits = unknown; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if ${ac_cv_sys_large_files+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main ()
 {
-return $ac_func ();
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=no; break
 fi
-
-
-{ echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5
-echo $ECHO_N "checking whether tcsendbreak is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <termios.h>
-
-
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main ()
 {
-#ifndef tcsendbreak
-  (void) tcsendbreak;
-#endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_tcsendbreak=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_tcsendbreak=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=1; break
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_large_files=unknown
+  break
+done
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5
-echo "${ECHO_T}$ac_cv_have_decl_tcsendbreak" >&6; }
-if test $ac_cv_have_decl_tcsendbreak = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_TCSENDBREAK 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
 _ACEOF
+;;
+esac
+rm -rf conftest*
+  fi
 
-else
-
-for ac_func in tcsendbreak
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+if test -z "$AR" ; then
+       as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+# Extract the first word of "passwd", so it can be a program name with args.
+set dummy passwd; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PATH_PASSWD_PROG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+fi
+PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
+if test -n "$PATH_PASSWD_PROG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
+$as_echo "$PATH_PASSWD_PROG" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+
+if test ! -z "$PATH_PASSWD_PROG" ; then
+
+cat >>confdefs.h <<_ACEOF
+#define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
 _ACEOF
 
 fi
-done
 
+if test -z "$LD" ; then
+       LD=$CC
 fi
 
 
-{ echo "$as_me:$LINENO: checking whether h_errno is declared" >&5
-echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_h_errno+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <netdb.h>
-
-int
-main ()
-{
-#ifndef h_errno
-  (void) h_errno;
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
 #endif
 
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_h_errno=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_h_errno=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5
-echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6; }
-if test $ac_cv_have_decl_h_errno = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_H_ERRNO 1
-_ACEOF
+  test "$ac_cv_c_inline" != no && break
+done
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_H_ERRNO 0
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
 _ACEOF
+    ;;
+esac
 
 
+ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
+"
+if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
+  have_llong_max=1
 fi
 
+ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
+       #include <sys/types.h>
+       #include <sys/param.h>
+       #include <dev/systrace.h>
 
+"
+if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
+  have_systr_policy_kill=1
+fi
 
-{ echo "$as_me:$LINENO: checking whether SHUT_RD is declared" >&5
-echo $ECHO_N "checking whether SHUT_RD is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_SHUT_RD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
+ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
+       #include <sys/types.h>
+       #include <sys/resource.h>
 
-int
-main ()
-{
-#ifndef SHUT_RD
-  (void) SHUT_RD;
-#endif
+"
+if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_SHUT_RD=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
 
-       ac_cv_have_decl_SHUT_RD=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
+       #include <sys/types.h>
+       #include <linux/prctl.h>
+
+"
+if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
+  have_linux_no_new_privs=1
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_SHUT_RD" >&5
-echo "${ECHO_T}$ac_cv_have_decl_SHUT_RD" >&6; }
-if test $ac_cv_have_decl_SHUT_RD = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SHUT_RD 1
-_ACEOF
 
+openssl=yes
+ssh1=no
+COMMENT_OUT_RSA1="#no ssh1#"
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SHUT_RD 0
-_ACEOF
+# Check whether --with-openssl was given.
+if test "${with_openssl+set}" = set; then :
+  withval=$with_openssl;   if test "x$withval" = "xno" ; then
+               openssl=no
+               ssh1=no
+          fi
 
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL will be used for cryptography" >&5
+$as_echo_n "checking whether OpenSSL will be used for cryptography... " >&6; }
+if test "x$openssl" = "xyes" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-
-{ echo "$as_me:$LINENO: checking whether O_NONBLOCK is declared" >&5
-echo $ECHO_N "checking whether O_NONBLOCK is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_O_NONBLOCK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define WITH_OPENSSL 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
+else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-int
-main ()
-{
-#ifndef O_NONBLOCK
-  (void) O_NONBLOCK;
-#endif
+# Check whether --with-ssh1 was given.
+if test "${with_ssh1+set}" = set; then :
+  withval=$with_ssh1;
+               if test "x$withval" = "xyes" ; then
+                       if test "x$openssl" = "xno" ; then
+                               as_fn_error $? "Cannot enable SSH protocol 1 with OpenSSL disabled" "$LINENO" 5
+                       fi
+                       ssh1=yes
+                       COMMENT_OUT_RSA1=""
+               elif test "x$withval" = "xno" ; then
+                       ssh1=no
+               else
+                       as_fn_error $? "unknown --with-ssh1 argument" "$LINENO" 5
+               fi
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_O_NONBLOCK=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_O_NONBLOCK=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_O_NONBLOCK" >&5
-echo "${ECHO_T}$ac_cv_have_decl_O_NONBLOCK" >&6; }
-if test $ac_cv_have_decl_O_NONBLOCK = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSH protocol 1 support is enabled" >&5
+$as_echo_n "checking whether SSH protocol 1 support is enabled... " >&6; }
+if test "x$ssh1" = "xyes" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_O_NONBLOCK 1
+#define WITH_SSH1 1
 _ACEOF
 
 
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_O_NONBLOCK 0
-_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+use_stack_protector=1
+use_toolchain_hardening=1
 
+# Check whether --with-stackprotect was given.
+if test "${with_stackprotect+set}" = set; then :
+  withval=$with_stackprotect;
+    if test "x$withval" = "xno"; then
+       use_stack_protector=0
+    fi
 fi
 
 
+# Check whether --with-hardening was given.
+if test "${with_hardening+set}" = set; then :
+  withval=$with_hardening;
+    if test "x$withval" = "xno"; then
+       use_toolchain_hardening=0
+    fi
+fi
+
 
-{ echo "$as_me:$LINENO: checking whether writev is declared" >&5
-echo $ECHO_N "checking whether writev is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_writev+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+# We use -Werror for the tests only so that we catch warnings like "this is
+# on by default" for things like -fPIE.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
+$as_echo_n "checking if $CC supports -Werror... " >&6; }
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void) { return 0; }
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+         WERROR="-Werror"
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+         WERROR=""
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$saved_CFLAGS"
+
+if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Qunused-arguments" >&5
+$as_echo_n "checking if $CC supports compile flag -Qunused-arguments... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Qunused-arguments"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-int
-main ()
-{
-#ifndef writev
-  (void) writev;
-#endif
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
+fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-  ;
-  return 0;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 }
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunknown-warning-option" >&5
+$as_echo_n "checking if $CC supports compile flag -Wunknown-warning-option... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_writev=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
+fi
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-       ac_cv_have_decl_writev=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_writev" >&5
-echo "${ECHO_T}$ac_cv_have_decl_writev" >&6; }
-if test $ac_cv_have_decl_writev = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_WRITEV 1
-_ACEOF
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wall" >&5
+$as_echo_n "checking if $CC supports compile flag -Wall... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wall"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wall"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_WRITEV 0
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-arith" >&5
+$as_echo_n "checking if $CC supports compile flag -Wpointer-arith... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wpointer-arith"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
-{ echo "$as_me:$LINENO: checking whether MAXSYMLINKS is declared" >&5
-echo $ECHO_N "checking whether MAXSYMLINKS is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_MAXSYMLINKS+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/param.h>
+if ac_fn_c_try_compile "$LINENO"; then :
 
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
+fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-int
-main ()
-{
-#ifndef MAXSYMLINKS
-  (void) MAXSYMLINKS;
-#endif
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wuninitialized" >&5
+$as_echo_n "checking if $CC supports compile flag -Wuninitialized... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wuninitialized"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  ;
-  return 0;
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
 }
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_MAXSYMLINKS=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-       ac_cv_have_decl_MAXSYMLINKS=no
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_MAXSYMLINKS" >&5
-echo "${ECHO_T}$ac_cv_have_decl_MAXSYMLINKS" >&6; }
-if test $ac_cv_have_decl_MAXSYMLINKS = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MAXSYMLINKS 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsign-compare" >&5
+$as_echo_n "checking if $CC supports compile flag -Wsign-compare... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wsign-compare"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MAXSYMLINKS 0
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
+fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wformat-security" >&5
+$as_echo_n "checking if $CC supports compile flag -Wformat-security... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wformat-security"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-{ echo "$as_me:$LINENO: checking whether offsetof is declared" >&5
-echo $ECHO_N "checking whether offsetof is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_offsetof+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
+fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5
+$as_echo_n "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-int
-main ()
-{
-#ifndef offsetof
-  (void) offsetof;
-#endif
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
+fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-  ;
-  return 0;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-sign" >&5
+$as_echo_n "checking if $CC supports compile flag -Wpointer-sign... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wpointer-sign"
+       _define_flag="-Wno-pointer-sign"
+       test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
 }
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_offsetof=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-       ac_cv_have_decl_offsetof=no
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_offsetof" >&5
-echo "${ECHO_T}$ac_cv_have_decl_offsetof" >&6; }
-if test $ac_cv_have_decl_offsetof = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_OFFSETOF 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunused-result" >&5
+$as_echo_n "checking if $CC supports compile flag -Wunused-result... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wunused-result"
+       _define_flag="-Wno-unused-result"
+       test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_OFFSETOF 0
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
-
-
-
-# extra bits for select(2)
-{ echo "$as_me:$LINENO: checking whether howmany is declared" >&5
-echo $ECHO_N "checking whether howmany is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_howmany+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_SYSMACROS_H
-#include <sys/sysmacros.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-int
-main ()
-{
-#ifndef howmany
-  (void) howmany;
-#endif
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5
+$as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  ;
-  return 0;
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
 }
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_howmany=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-       ac_cv_have_decl_howmany=no
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_howmany" >&5
-echo "${ECHO_T}$ac_cv_have_decl_howmany" >&6; }
-if test $ac_cv_have_decl_howmany = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_HOWMANY 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5
+$as_echo_n "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_HOWMANY 0
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
-{ echo "$as_me:$LINENO: checking whether NFDBITS is declared" >&5
-echo $ECHO_N "checking whether NFDBITS is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_NFDBITS+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+    if test "x$use_toolchain_hardening" = "x1"; then
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,relro" >&5
+$as_echo_n "checking if $LD supports link flag -Wl,-z,relro... " >&6; }
+       saved_LDFLAGS="$LDFLAGS"
+       LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/param.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_SYSMACROS_H
-#include <sys/sysmacros.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       long long p = n * o;
+       printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
+       exit(0);
+}
 
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 LDFLAGS="$saved_LDFLAGS $_define_flag"
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 LDFLAGS="$saved_LDFLAGS"
 
-int
-main ()
-{
-#ifndef NFDBITS
-  (void) NFDBITS;
-#endif
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,now" >&5
+$as_echo_n "checking if $LD supports link flag -Wl,-z,now... " >&6; }
+       saved_LDFLAGS="$LDFLAGS"
+       LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  ;
-  return 0;
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       long long p = n * o;
+       printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
+       exit(0);
 }
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_NFDBITS=yes
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 LDFLAGS="$saved_LDFLAGS $_define_flag"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 LDFLAGS="$saved_LDFLAGS"
 
-       ac_cv_have_decl_NFDBITS=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,noexecstack" >&5
+$as_echo_n "checking if $LD supports link flag -Wl,-z,noexecstack... " >&6; }
+       saved_LDFLAGS="$LDFLAGS"
+       LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_NFDBITS" >&5
-echo "${ECHO_T}$ac_cv_have_decl_NFDBITS" >&6; }
-if test $ac_cv_have_decl_NFDBITS = yes; then
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       long long p = n * o;
+       printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
+       exit(0);
+}
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NFDBITS 1
 _ACEOF
-
-
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 LDFLAGS="$saved_LDFLAGS $_define_flag"
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NFDBITS 0
-_ACEOF
-
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 LDFLAGS="$saved_LDFLAGS"
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+}
+       # NB. -ftrapv expects certain support functions to be present in
+       # the compiler library (libgcc or similar) to detect integer operations
+       # that can overflow. We must check that the result of enabling it
+       # actually links. The test program compiled/linked includes a number
+       # of integer operations that should exercise this.
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5
+$as_echo_n "checking if $CC supports compile flag -ftrapv and linking succeeds... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -ftrapv"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-ftrapv"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       long long int p = n * o;
+       printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
+       exit(0);
+}
 
-{ echo "$as_me:$LINENO: checking for fd_mask" >&5
-echo $ECHO_N "checking for fd_mask... $ECHO_C" >&6; }
-if test "${ac_cv_type_fd_mask+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+if ac_fn_c_try_link "$LINENO"; then :
 
-#include <sys/param.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
+fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+}
+    fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
+$as_echo_n "checking gcc version... " >&6; }
+       GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
+       case $GCC_VER in
+               1.*) no_attrib_nonnull=1 ;;
+               2.8* | 2.9*)
+                    no_attrib_nonnull=1
+                    ;;
+               2.*) no_attrib_nonnull=1 ;;
+               *) ;;
+       esac
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
+$as_echo "$GCC_VER" >&6; }
 
-typedef fd_mask ac__type_new_;
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
+$as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -fno-builtin-memset"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <string.h>
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+ char b[10]; memset(b, 0, sizeof(b));
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_fd_mask=yes
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_type_fd_mask=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_fd_mask" >&5
-echo "${ECHO_T}$ac_cv_type_fd_mask" >&6; }
-if test $ac_cv_type_fd_mask = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FD_MASK 1
-_ACEOF
-
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-
-
-for ac_func in setresuid
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       # -fstack-protector-all doesn't always work for some GCC versions
+       # and/or platforms, so we test if we can.  If it's not supported
+       # on a given platform gcc will emit a warning so we use -Werror.
+       if test "x$use_stack_protector" = "x1"; then
+           for t in -fstack-protector-strong -fstack-protector-all \
+                   -fstack-protector; do
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
+$as_echo_n "checking if $CC supports $t... " >&6; }
+               saved_CFLAGS="$CFLAGS"
+               saved_LDFLAGS="$LDFLAGS"
+               CFLAGS="$CFLAGS $t -Werror"
+               LDFLAGS="$LDFLAGS $t -Werror"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+ #include <stdio.h>
 int
 main ()
 {
-return $ac_func ();
+
+       char x[256];
+       snprintf(x, sizeof(x), "XXX");
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-               { echo "$as_me:$LINENO: checking if setresuid seems to work" >&5
-echo $ECHO_N "checking if setresuid seems to work... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
-echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                     CFLAGS="$saved_CFLAGS $t"
+                     LDFLAGS="$saved_LDFLAGS $t"
+                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
+$as_echo_n "checking if $t works... " >&6; }
+                     if test "$cross_compiling" = yes; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
+$as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
+                         break
 
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <errno.h>
-
+ #include <stdio.h>
 int
 main ()
 {
 
-       errno=0;
-       setresuid(0,0,0);
-       if (errno==ENOSYS)
-               exit(1);
-       else
-               exit(0);
+       char x[256];
+       snprintf(x, sizeof(x), "XXX");
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_run "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                         break
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETRESUID 1
-_ACEOF
-
-                { echo "$as_me:$LINENO: result: not implemented" >&5
-echo "${ECHO_T}not implemented" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
-done
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               CFLAGS="$saved_CFLAGS"
+               LDFLAGS="$saved_LDFLAGS"
+           done
+       fi
 
+       if test -z "$have_llong_max"; then
+               # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
+               unset ac_cv_have_decl_LLONG_MAX
+               saved_CFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS -std=gnu99"
+               ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
 
-for ac_func in setresgid
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+"
+if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
+  have_llong_max=1
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+  CFLAGS="$saved_CFLAGS"
+fi
 
-#undef $ac_func
+       fi
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
+$as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+__attribute__((__unused__)) static void foo(void){return;}
 int
 main ()
 {
-return $ac_func ();
+ exit(0);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
+
 
-       eval "$as_ac_var=no"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test "x$no_attrib_nonnull" != "x1" ; then
+
+$as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-               { echo "$as_me:$LINENO: checking if setresgid seems to work" >&5
-echo $ECHO_N "checking if setresgid seems to work... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
-echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Check whether --with-rpath was given.
+if test "${with_rpath+set}" = set; then :
+  withval=$with_rpath;
+               if test "x$withval" = "xno" ; then
+                       need_dash_r=""
+               fi
+               if test "x$withval" = "xyes" ; then
+                       need_dash_r=1
+               fi
 
-#include <stdlib.h>
-#include <errno.h>
 
-int
-main ()
-{
+fi
 
-       errno=0;
-       setresgid(0,0,0);
-       if (errno==ENOSYS)
-               exit(1);
-       else
-               exit(0);
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Allow user to specify flags
+
+# Check whether --with-cflags was given.
+if test "${with_cflags+set}" = set; then :
+  withval=$with_cflags;
+               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
+                   test "x${withval}" != "xyes"; then
+                       CFLAGS="$CFLAGS $withval"
+               fi
+
+
+fi
+
+
+# Check whether --with-cppflags was given.
+if test "${with_cppflags+set}" = set; then :
+  withval=$with_cppflags;
+               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
+                   test "x${withval}" != "xyes"; then
+                       CPPFLAGS="$CPPFLAGS $withval"
+               fi
 
-( exit $ac_status )
 
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SETRESGID 1
-_ACEOF
+fi
+
+
+# Check whether --with-ldflags was given.
+if test "${with_ldflags+set}" = set; then :
+  withval=$with_ldflags;
+               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
+                   test "x${withval}" != "xyes"; then
+                       LDFLAGS="$LDFLAGS $withval"
+               fi
+
 
-                { echo "$as_me:$LINENO: result: not implemented" >&5
-echo "${ECHO_T}not implemented" >&6; }
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+
+# Check whether --with-libs was given.
+if test "${with_libs+set}" = set; then :
+  withval=$with_libs;
+               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
+                   test "x${withval}" != "xyes"; then
+                       LIBS="$LIBS $withval"
+               fi
+
+
 fi
 
 
+# Check whether --with-Werror was given.
+if test "${with_Werror+set}" = set; then :
+  withval=$with_Werror;
+               if test -n "$withval"  &&  test "x$withval" != "xno"; then
+                       werror_flags="-Werror"
+                       if test "x${withval}" != "xyes"; then
+                               werror_flags="$withval"
+                       fi
+               fi
+
 
 fi
-done
 
 
+for ac_header in  \
+       blf.h \
+       bstring.h \
+       crypt.h \
+       crypto/sha2.h \
+       dirent.h \
+       endian.h \
+       elf.h \
+       err.h \
+       features.h \
+       fcntl.h \
+       floatingpoint.h \
+       getopt.h \
+       glob.h \
+       ia.h \
+       iaf.h \
+       inttypes.h \
+       langinfo.h \
+       limits.h \
+       locale.h \
+       login.h \
+       maillock.h \
+       ndir.h \
+       net/if_tun.h \
+       netdb.h \
+       netgroup.h \
+       pam/pam_appl.h \
+       paths.h \
+       poll.h \
+       pty.h \
+       readpassphrase.h \
+       rpc/types.h \
+       security/pam_appl.h \
+       sha2.h \
+       shadow.h \
+       stddef.h \
+       stdint.h \
+       string.h \
+       strings.h \
+       sys/audit.h \
+       sys/bitypes.h \
+       sys/bsdtty.h \
+       sys/capability.h \
+       sys/cdefs.h \
+       sys/dir.h \
+       sys/mman.h \
+       sys/ndir.h \
+       sys/poll.h \
+       sys/prctl.h \
+       sys/pstat.h \
+       sys/ptrace.h \
+       sys/select.h \
+       sys/stat.h \
+       sys/stream.h \
+       sys/stropts.h \
+       sys/strtio.h \
+       sys/statvfs.h \
+       sys/sysmacros.h \
+       sys/time.h \
+       sys/timers.h \
+       time.h \
+       tmpdir.h \
+       ttyent.h \
+       ucred.h \
+       unistd.h \
+       usersec.h \
+       util.h \
+       utime.h \
+       utmp.h \
+       utmpx.h \
+       vis.h \
+       wchar.h \
 
-for ac_func in realpath
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+done
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
+# lastlog.h requires sys/time.h to be included first on Solaris
+for ac_header in lastlog.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
 #endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+"
+if test "x$ac_cv_header_lastlog_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LASTLOG_H 1
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+done
 
-                                       { echo "$as_me:$LINENO: checking if realpath works with non-existent files" >&5
-echo $ECHO_N "checking if realpath works with non-existent files... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: WARNING: cross compiling: assuming working" >&5
-echo "$as_me: WARNING: cross compiling: assuming working" >&2;}
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# sys/ptms.h requires sys/stream.h to be included first on Solaris
+for ac_header in sys/ptms.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
+#ifdef HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
 
-#include <limits.h>
-#include <stdlib.h>
-#include <errno.h>
+"
+if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PTMS_H 1
+_ACEOF
 
-int
-main ()
-{
+fi
 
-               char buf[PATH_MAX];
-               if (realpath("/opensshnonexistentfilename1234", buf) == NULL)
-                       if (errno == ENOENT)
-                               exit(1);
-               exit(0);
+done
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
+# login_cap.h requires sys/types.h on NetBSD
+for ac_header in login_cap.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
+#include <sys/types.h>
 
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_REALPATH 1
+"
+if test "x$ac_cv_header_login_cap_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LOGIN_CAP_H 1
 _ACEOF
 
-                { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
+done
+
+
+# older BSDs need sys/param.h before sys/mount.h
+for ac_header in sys/mount.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
+#include <sys/param.h>
 
+"
+if test "x$ac_cv_header_sys_mount_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_MOUNT_H 1
+_ACEOF
 
 fi
-done
 
+done
 
 
+# Android requires sys/socket.h to be included before sys/un.h
+for ac_header in sys/un.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
+#include <sys/types.h>
+#include <sys/socket.h>
 
-for ac_func in gettimeofday time
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+"
+if test "x$ac_cv_header_sys_un_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_UN_H 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+done
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+# Messages for features tested for in target-specific section
+SIA_MSG="no"
+SPC_MSG="no"
+SP_MSG="no"
+SPP_MSG="no"
+
+# Support for Solaris/Illumos privileges (this test is used by both
+# the --with-solaris-privs option and --with-sandbox=solaris).
+SOLARIS_PRIVS="no"
+
+# Check for some target-specific stuff
+case "$host" in
+*-*-aix*)
+       # Some versions of VAC won't allow macro redefinitions at
+       # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
+       # particularly with older versions of vac or xlc.
+       # It also throws errors about null macro argments, but these are
+       # not fatal.
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
+$as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#define testmacro foo
+#define testmacro bar
 int
 main ()
 {
-return $ac_func ();
+ exit(0);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+             CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
+             LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
+             CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
+             CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
 fi
-done
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
+$as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
+       if (test -z "$blibpath"); then
+               blibpath="/usr/lib:/lib"
+       fi
+       saved_LDFLAGS="$LDFLAGS"
+       if test "$GCC" = "yes"; then
+               flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
+       else
+               flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
+       fi
+       for tryflags in $flags ;do
+               if (test -z "$blibflags"); then
+                       LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  blibflags=$tryflags
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               fi
+       done
+       if (test -z "$blibflags"); then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+               as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
+$as_echo "$blibflags" >&6; }
+       fi
+       LDFLAGS="$saved_LDFLAGS"
+               ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
+if test "x$ac_cv_func_authenticate" = xyes; then :
 
+$as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
 
-for ac_func in endutent getutent getutid getutline pututline setutent
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
+$as_echo_n "checking for authenticate in -ls... " >&6; }
+if ${ac_cv_lib_s_authenticate+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ls  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -18985,473 +6957,384 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char authenticate ();
 int
 main ()
 {
-return $ac_func ();
+return authenticate ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_s_authenticate=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_lib_s_authenticate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
+$as_echo "$ac_cv_lib_s_authenticate" >&6; }
+if test "x$ac_cv_lib_s_authenticate" = xyes; then :
+   $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
+
+                               LIBS="$LIBS -ls"
 
-       eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
+               ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
+"
+if test "x$ac_cv_have_decl_authenticate" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-done
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_AUTHENTICATE $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
+"
+if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
-for ac_func in utmpname
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
+"
+if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
+  ac_have_decl=1
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOGINSUCCESS $ac_have_decl
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
+"
+if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
+"
+if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETAUTHDB $ac_have_decl
+_ACEOF
 
-#undef $ac_func
+               ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+"
+if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOGINFAILED $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
+$as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <usersec.h>
 int
 main ()
 {
-return $ac_func ();
+ (void)loginfailed("user","host","tty",0);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       eval "$as_ac_var=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+       for ac_func in getgrset setauthdb
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 done
 
+       ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
+             #include <fcntl.h>
 
+"
+if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
 
+$as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
 
+fi
 
+       check_for_aix_broken_getaddrinfo=1
 
+$as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
 
-for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+$as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+$as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
+$as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
+
+
+$as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
+
+
+$as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
+
+
+$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
+
+
+$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
+
+
+$as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
+
+
+$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
+
+       ;;
+*-*-android*)
+
+$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
+
+
+$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
+
+       ;;
+*-*-cygwin*)
+       check_for_libcrypt_later=1
+       LIBS="$LIBS /usr/lib/textreadmode.o"
+
+$as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
+
+
+$as_echo "#define USE_PIPES 1" >>confdefs.h
+
+
+$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
+
+
+$as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
+
+
+$as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
+
+
+$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
+
+
+$as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
+
+
+$as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
+
+       # Cygwin defines optargs, optargs as declspec(dllimport) for historical
+       # reasons which cause compile warnings, so we disable those warnings.
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-attributes" >&5
+$as_echo_n "checking if $CC supports compile flag -Wno-attributes... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -Wno-attributes"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-Wno-attributes"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-       eval "$as_ac_var=no"
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       ;;
+*-*-dgux*)
 
-fi
-done
+$as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
 
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-for ac_func in setutxdb setutxent utmpxname
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       ;;
+*-*-darwin*)
+       use_pie=auto
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
+$as_echo_n "checking if we have working getaddrinfo... " >&6; }
+       if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
+$as_echo "assume it is working" >&6; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+ #include <mach-o/dyld.h>
+main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
+               exit(0);
+       else
+               exit(1);
+}
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
+$as_echo "working" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
+$as_echo "buggy" >&6; }
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+$as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-       eval "$as_ac_var=no"
-fi
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-fi
-done
 
+$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
 
-for ac_func in getlastlogxbyname
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+
+cat >>confdefs.h <<_ACEOF
+#define BIND_8_COMPAT 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
+
+
+$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
+
+
+       ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
+if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
-fi
+$as_echo "#define AU_IPv4 0" >>confdefs.h
+
+           #include <bsm/audit.h>
+
+$as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
+
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+
+$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
+
+       for ac_func in sandbox_init
+do :
+  ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
+if test "x$ac_cv_func_sandbox_init" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_SANDBOX_INIT 1
 _ACEOF
 
 fi
 done
 
-
-{ echo "$as_me:$LINENO: checking for daemon" >&5
-echo $ECHO_N "checking for daemon... $ECHO_C" >&6; }
-if test "${ac_cv_func_daemon+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+       for ac_header in sandbox.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
+if test "x$ac_cv_header_sandbox_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SANDBOX_H 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define daemon to an innocuous variant, in case <limits.h> declares daemon.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define daemon innocuous_daemon
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char daemon (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+done
 
-#undef daemon
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sandbox_apply in -lsandbox" >&5
+$as_echo_n "checking for sandbox_apply in -lsandbox... " >&6; }
+if ${ac_cv_lib_sandbox_sandbox_apply+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsandbox  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -19459,72 +7342,47 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char daemon ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_daemon || defined __stub___daemon
-choke me
-#endif
-
+char sandbox_apply ();
 int
 main ()
 {
-return daemon ();
+return sandbox_apply ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_daemon=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_sandbox_sandbox_apply=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_daemon=no
+  ac_cv_lib_sandbox_sandbox_apply=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
-echo "${ECHO_T}$ac_cv_func_daemon" >&6; }
-if test $ac_cv_func_daemon = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sandbox_sandbox_apply" >&5
+$as_echo "$ac_cv_lib_sandbox_sandbox_apply" >&6; }
+if test "x$ac_cv_lib_sandbox_sandbox_apply" = xyes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DAEMON 1
-_ACEOF
+           SSHDLIBS="$SSHDLIBS -lsandbox"
 
-else
-  { echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5
-echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6; }
-if test "${ac_cv_lib_bsd_daemon+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+
+       ;;
+*-*-dragonfly*)
+       SSHDLIBS="$SSHDLIBS -lcrypt"
+       TEST_MALLOC_OPTIONS="AFGJPRX"
+       ;;
+*-*-haiku*)
+       LIBS="$LIBS -lbsd "
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
+$as_echo_n "checking for socket in -lnetwork... " >&6; }
+if ${ac_cv_lib_network_socket+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lnetwork  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -19533,158 +7391,65 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char daemon ();
+char socket ();
 int
 main ()
 {
-return daemon ();
+return socket ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_bsd_daemon=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_network_socket=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_bsd_daemon=no
+  ac_cv_lib_network_socket=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5
-echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6; }
-if test $ac_cv_lib_bsd_daemon = yes; then
-  LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
-#define HAVE_DAEMON 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
+$as_echo "$ac_cv_lib_network_socket" >&6; }
+if test "x$ac_cv_lib_network_socket" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNETWORK 1
 _ACEOF
 
-fi
-
+  LIBS="-lnetwork $LIBS"
 
 fi
 
+       $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
 
-{ echo "$as_me:$LINENO: checking for getpagesize" >&5
-echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
-if test "${ac_cv_func_getpagesize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define getpagesize to an innocuous variant, in case <limits.h> declares getpagesize.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getpagesize innocuous_getpagesize
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getpagesize (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getpagesize
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getpagesize ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_getpagesize || defined __stub___getpagesize
-choke me
-#endif
-
-int
-main ()
-{
-return getpagesize ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_getpagesize=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       MANTYPE=man
+       ;;
+*-*-hpux*)
+       # first we define all of the options common to all HP-UX releases
+       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
+       IPADDR_IN_DISPLAY=yes
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-       ac_cv_func_getpagesize=no
-fi
+       $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
-echo "${ECHO_T}$ac_cv_func_getpagesize" >&6; }
-if test $ac_cv_func_getpagesize = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPAGESIZE 1
-_ACEOF
+$as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
 
-else
-  { echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5
-echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
+
+
+$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
+
+       maildir="/var/mail"
+       LIBS="$LIBS -lsec"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
+$as_echo_n "checking for t_error in -lxnet... " >&6; }
+if ${ac_cv_lib_xnet_t_error+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lucb  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lxnet  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -19693,1040 +7458,773 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char getpagesize ();
+char t_error ();
 int
 main ()
 {
-return getpagesize ();
+return t_error ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ucb_getpagesize=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_xnet_t_error=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_ucb_getpagesize=no
+  ac_cv_lib_xnet_t_error=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5
-echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6; }
-if test $ac_cv_lib_ucb_getpagesize = yes; then
-  LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETPAGESIZE 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
+$as_echo "$ac_cv_lib_xnet_t_error" >&6; }
+if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXNET 1
 _ACEOF
 
+  LIBS="-lxnet $LIBS"
+
+else
+  as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
 fi
 
 
-fi
+       # next, we define all of the options specific to major releases
+       case "$host" in
+       *-*-hpux10*)
+               if test -z "$GCC"; then
+                       CFLAGS="$CFLAGS -Ae"
+               fi
+               ;;
+       *-*-hpux11*)
 
+$as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
 
-# Check for broken snprintf
-if test "x$ac_cv_func_snprintf" = "xyes" ; then
-       { echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5
-echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
-   { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5
-echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <stdio.h>
-int
-main ()
-{
+$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
 
-       char b[5];
-       snprintf(b,5,"123456789");
-       exit(b[4]!='\0');
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define USE_BTMP 1" >>confdefs.h
 
-( exit $ac_status )
+               check_for_hpux_broken_getaddrinfo=1
+               check_for_conflicting_getspnam=1
+               ;;
+       esac
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+       # lastly, we define options specific to minor releases
+       case "$host" in
+       *-*-hpux10.26)
 
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SNPRINTF 1
-_ACEOF
+$as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
-echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
+               disable_ptmx_check=yes
+               LIBS="$LIBS -lsecpw"
+               ;;
+       esac
+       ;;
+*-*-irix5*)
+       PATH="$PATH:/usr/etc"
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+$as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
 
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-fi
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-# We depend on vsnprintf returning the right thing on overflow: the
-# number of characters it tried to create (as per SUSv3)
-if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
-       { echo "$as_me:$LINENO: checking whether vsnprintf returns correct values on overflow" >&5
-echo $ECHO_N "checking whether vsnprintf returns correct values on overflow... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
-   { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5
-echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdarg.h>
+$as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
 
-int x_snprintf(char *str, size_t count, const char *fmt, ...)
-{
-       size_t ret;
-       va_list ap;
+       $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
 
-       va_start(ap, fmt);
-       ret = vsnprintf(str, count, fmt, ap);
-       va_end(ap);
-       return ret;
-}
+       ;;
+*-*-irix6*)
+       PATH="$PATH:/usr/etc"
 
-int
-main ()
-{
+$as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
 
-char x[1];
-if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
-       return 1;
-if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
-       return 1;
-return 0;
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
 
-( exit $ac_status )
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+$as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SNPRINTF 1
-_ACEOF
+       ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
+if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
 
-                       { echo "$as_me:$LINENO: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
-echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
+$as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
 
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
+       $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
 
-fi
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-# On systems where [v]snprintf is broken, but is declared in stdio,
-# check that the fmt argument is const char * or just char *.
-# This is only useful for when BROKEN_SNPRINTF
-{ echo "$as_me:$LINENO: checking whether snprintf can declare const char *fmt" >&5
-echo $ECHO_N "checking whether snprintf can declare const char *fmt... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-#include <stdio.h>
-int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-int
-main ()
-{
 
-       snprintf(0, 0, 0);
+$as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+       $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define SNPRINTF_CONST const
-_ACEOF
+       $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       ;;
+*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
+       check_for_libcrypt_later=1
+       $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
 
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-    cat >>confdefs.h <<\_ACEOF
-#define SNPRINTF_CONST /* not const */
-_ACEOF
+       $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
 
-fi
+       $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-# Check for missing getpeereid (or equiv) support
-NO_PEERCHECK=""
-if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
-       { echo "$as_me:$LINENO: checking whether system supports SO_PEERCRED getsockopt" >&5
-echo $ECHO_N "checking whether system supports SO_PEERCRED getsockopt... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
 
-#include <sys/types.h>
-#include <sys/socket.h>
-int
-main ()
-{
-int i = SO_PEERCRED;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SO_PEERCRED 1
-_ACEOF
+$as_echo "#define USE_BTMP 1" >>confdefs.h
 
+       ;;
+*-*-linux*)
+       no_dev_ptmx=1
+       use_pie=auto
+       check_for_libcrypt_later=1
+       check_for_openpty_ctty_bug=1
+                       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
 
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               NO_PEERCHECK=1
 
-fi
+$as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+       $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
 
-if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
-{ echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5
-echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
 
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-               cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRICT_MKSTEMP 1
-_ACEOF
+$as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
 
 
+$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       $as_echo "#define USE_BTMP 1" >>confdefs.h
 
-#include <stdlib.h>
 
-int
-main ()
-{
+$as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
 
-       char template[]="conftest.mkstemp-test";
-       if (mkstemp(template) == -1)
-               exit(1);
-       unlink(template);
-       exit(0);
+       inet6_default_4in6=yes
+       case `uname -r` in
+       1.*|2.0.*)
 
-  ;
-  return 0;
-}
+$as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
+
+               ;;
+       esac
+       # tun(4) forwarding compat code
+       for ac_header in linux/if_tun.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LINUX_IF_TUN_H 1
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+fi
+
+done
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
+
+$as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
+
+
+$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
 
-( exit $ac_status )
 
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRICT_MKSTEMP 1
+       fi
+       for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
+done
 
-fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
+$as_echo_n "checking for seccomp architecture... " >&6; }
+       seccomp_audit_arch=
+       case "$host" in
+       x86_64-*)
+               seccomp_audit_arch=AUDIT_ARCH_X86_64
+               ;;
+       i*86-*)
+               seccomp_audit_arch=AUDIT_ARCH_I386
+               ;;
+       arm*-*)
+               seccomp_audit_arch=AUDIT_ARCH_ARM
+               ;;
+       aarch64*-*)
+               seccomp_audit_arch=AUDIT_ARCH_AARCH64
+               ;;
+       s390x-*)
+               seccomp_audit_arch=AUDIT_ARCH_S390X
+               ;;
+       s390-*)
+               seccomp_audit_arch=AUDIT_ARCH_S390
+               ;;
+       powerpc64-*)
+               seccomp_audit_arch=AUDIT_ARCH_PPC64
+               ;;
+       powerpc64le-*)
+               seccomp_audit_arch=AUDIT_ARCH_PPC64LE
+               ;;
+       mips-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPS
+               ;;
+       mipsel-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPSEL
+               ;;
+       mips64-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPS64
+               ;;
+       mips64el-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
+               ;;
+       esac
+       if test "x$seccomp_audit_arch" != "x" ; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
+$as_echo "\"$seccomp_audit_arch\"" >&6; }
 
-if test ! -z "$check_for_openpty_ctty_bug"; then
-       { echo "$as_me:$LINENO: checking if openpty correctly handles controlling tty" >&5
-echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
+cat >>confdefs.h <<_ACEOF
+#define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
+_ACEOF
+
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
+$as_echo "architecture not supported" >&6; }
+       fi
+       ;;
+mips-sony-bsd|mips-sony-newsos4)
+
+$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
+
+       SONY=1
+       ;;
+*-*-netbsd*)
+       check_for_libcrypt_before=1
+       if test "x$withval" != "xno" ; then
+               need_dash_r=1
+       fi
+       CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
 
-                       { echo "$as_me:$LINENO: result: cross-compiling, assuming yes" >&5
-echo "${ECHO_T}cross-compiling, assuming yes" >&6; }
+$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
 
+       ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
 
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#include <stdio.h>
-#include <sys/fcntl.h>
-#include <sys/types.h>
-#include <sys/wait.h>
+$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
 
-int
-main ()
-{
+fi
 
-       pid_t pid;
-       int fd, ptyfd, ttyfd, status;
 
-       pid = fork();
-       if (pid < 0) {          /* failed */
-               exit(1);
-       } else if (pid > 0) {   /* parent */
-               waitpid(pid, &status, 0);
-               if (WIFEXITED(status))
-                       exit(WEXITSTATUS(status));
-               else
-                       exit(2);
-       } else {                /* child */
-               close(0); close(1); close(2);
-               setsid();
-               openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
-               fd = open("/dev/tty", O_RDWR | O_NOCTTY);
-               if (fd >= 0)
-                       exit(3);        /* Acquired ctty: broken */
-               else
-                       exit(0);        /* Did not acquire ctty: OK */
-       }
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+       TEST_MALLOC_OPTIONS="AJRX"
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define BROKEN_READ_COMPARISON 1" >>confdefs.h
 
-( exit $ac_status )
+       ;;
+*-*-freebsd*)
+       check_for_libcrypt_later=1
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                       cat >>confdefs.h <<\_ACEOF
-#define SSHD_ACQUIRES_CTTY 1
-_ACEOF
+$as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
 
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
 
+       ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
 
-fi
+else
 
-if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
-    test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
-       { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
-echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
+$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: cross-compiling, assuming yes" >&5
-echo "${ECHO_T}cross-compiling, assuming yes" >&6; }
+fi
 
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#include <stdio.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <errno.h>
-#include <netinet/in.h>
+$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
 
-#define TEST_PORT "2222"
+       TEST_MALLOC_OPTIONS="AJRX"
+       # Preauth crypto occasionally uses file descriptors for crypto offload
+       # and will crash if they cannot be opened.
 
-int
-main ()
-{
+$as_echo "#define SANDBOX_SKIP_RLIMIT_NOFILE 1" >>confdefs.h
 
-       int err, sock;
-       struct addrinfo *gai_ai, *ai, hints;
-       char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
+       ;;
+*-*-bsdi*)
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-       memset(&hints, 0, sizeof(hints));
-       hints.ai_family = PF_UNSPEC;
-       hints.ai_socktype = SOCK_STREAM;
-       hints.ai_flags = AI_PASSIVE;
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-       err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
-       if (err != 0) {
-               fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
-               exit(1);
-       }
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-       for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
-               if (ai->ai_family != AF_INET6)
-                       continue;
+       ;;
+*-next-*)
+       conf_lastlog_location="/usr/adm/lastlog"
+       conf_utmp_location=/etc/utmp
+       conf_wtmp_location=/usr/adm/wtmp
+       maildir=/usr/spool/mail
 
-               err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
-                   sizeof(ntop), strport, sizeof(strport),
-                   NI_NUMERICHOST|NI_NUMERICSERV);
+$as_echo "#define HAVE_NEXT 1" >>confdefs.h
 
-               if (err != 0) {
-                       if (err == EAI_SYSTEM)
-                               perror("getnameinfo EAI_SYSTEM");
-                       else
-                               fprintf(stderr, "getnameinfo failed: %s\n",
-                                   gai_strerror(err));
-                       exit(2);
-               }
+       $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
 
-               sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
-               if (sock < 0)
-                       perror("socket");
-               if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
-                       if (errno == EBADF)
-                               exit(3);
-               }
-       }
-       exit(0);
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+$as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       ;;
+*-*-openbsd*)
+       use_pie=auto
 
-( exit $ac_status )
+$as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GETADDRINFO 1
-_ACEOF
 
+$as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
+$as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
 
-fi
 
-if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
-    test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
-       { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
-echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
+$as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: cross-compiling, assuming no" >&5
-echo "${ECHO_T}cross-compiling, assuming no" >&6; }
+       TEST_MALLOC_OPTIONS="AFGJPRX"
+       ;;
+*-*-solaris*)
+       if test "x$withval" != "xno" ; then
+               need_dash_r=1
+       fi
+       $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
 
+       $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
 
-#include <stdio.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <errno.h>
-#include <netinet/in.h>
 
-#define TEST_PORT "2222"
+$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
 
-int
-main ()
-{
+       $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
 
-       int err, sock;
-       struct addrinfo *gai_ai, *ai, hints;
-       char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
+       # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
 
-       memset(&hints, 0, sizeof(hints));
-       hints.ai_family = PF_UNSPEC;
-       hints.ai_socktype = SOCK_STREAM;
-       hints.ai_flags = AI_PASSIVE;
+$as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
 
-       err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
-       if (err != 0) {
-               fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
-               exit(1);
-       }
 
-       for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
-               if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
-                       continue;
+$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
 
-               err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
-                   sizeof(ntop), strport, sizeof(strport),
-                   NI_NUMERICHOST|NI_NUMERICSERV);
 
-               if (ai->ai_family == AF_INET && err != 0) {
-                       perror("getnameinfo");
-                       exit(2);
-               }
-       }
-       exit(0);
+$as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+       external_path_file=/etc/default/login
+       # hardwire lastlog location (can't detect it on some versions)
+       conf_lastlog_location="/var/adm/lastlog"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
+$as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
+       sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
+       if test "$sol2ver" -ge 8; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+               $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define AIX_GETNAMEINFO_HACK 1
+$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
+
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
+       for ac_func in setpflags
+do :
+  ac_fn_c_check_func "$LINENO" "setpflags" "ac_cv_func_setpflags"
+if test "x$ac_cv_func_setpflags" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SETPFLAGS 1
 _ACEOF
 
+fi
+done
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       for ac_func in setppriv
+do :
+  ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
+if test "x$ac_cv_func_setppriv" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SETPPRIV 1
+_ACEOF
 
-( exit $ac_status )
+fi
+done
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                       cat >>confdefs.h <<\_ACEOF
-#define BROKEN_GETADDRINFO 1
+       for ac_func in priv_basicset
+do :
+  ac_fn_c_check_func "$LINENO" "priv_basicset" "ac_cv_func_priv_basicset"
+if test "x$ac_cv_func_priv_basicset" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PRIV_BASICSET 1
 _ACEOF
 
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+done
 
+       for ac_header in priv.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
+if test "x$ac_cv_header_priv_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PRIV_H 1
+_ACEOF
 
 fi
 
-if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
-       { echo "$as_me:$LINENO: checking whether AI_NUMERICSERV is declared" >&5
-echo $ECHO_N "checking whether AI_NUMERICSERV is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_AI_NUMERICSERV+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+done
+
+
+# Check whether --with-solaris-contracts was given.
+if test "${with_solaris_contracts+set}" = set; then :
+  withval=$with_solaris_contracts;
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
+$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
+if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcontract  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-            #include <sys/socket.h>
-            #include <netdb.h>
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ct_tmpl_activate ();
 int
 main ()
 {
-#ifndef AI_NUMERICSERV
-  (void) AI_NUMERICSERV;
-#endif
-
+return ct_tmpl_activate ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_AI_NUMERICSERV=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_contract_ct_tmpl_activate=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_AI_NUMERICSERV=no
+  ac_cv_lib_contract_ct_tmpl_activate=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_AI_NUMERICSERV" >&5
-echo "${ECHO_T}$ac_cv_have_decl_AI_NUMERICSERV" >&6; }
-if test $ac_cv_have_decl_AI_NUMERICSERV = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_AI_NUMERICSERV 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_AI_NUMERICSERV 0
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
+$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
+if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
 
+$as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
 
+                         LIBS="$LIBS -lcontract"
+                         SPC_MSG="yes"
 fi
 
 
 fi
 
-if test "x$check_for_conflicting_getspnam" = "x1"; then
-       { echo "$as_me:$LINENO: checking for conflicting getspnam in shadow.h" >&5
-echo $ECHO_N "checking for conflicting getspnam in shadow.h... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+# Check whether --with-solaris-projects was given.
+if test "${with_solaris_projects+set}" = set; then :
+  withval=$with_solaris_projects;
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
+$as_echo_n "checking for setproject in -lproject... " >&6; }
+if ${ac_cv_lib_project_setproject+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lproject  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <shadow.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char setproject ();
 int
 main ()
 {
- exit(0);
+return setproject ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_project_setproject=yes
+else
+  ac_cv_lib_project_setproject=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
+$as_echo "$ac_cv_lib_project_setproject" >&6; }
+if test "x$ac_cv_lib_project_setproject" = xyes; then :
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+$as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
+
+                       LIBS="$LIBS -lproject"
+                       SP_MSG="yes"
+fi
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
+fi
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define GETSPNAM_CONFLICTING_DEFS 1
-_ACEOF
+# Check whether --with-solaris-privs was given.
+if test "${with_solaris_privs+set}" = set; then :
+  withval=$with_solaris_privs;
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/Illumos privilege support" >&5
+$as_echo_n "checking for Solaris/Illumos privilege support... " >&6; }
+               if test "x$ac_cv_func_setppriv" = "xyes" -a \
+                       "x$ac_cv_header_priv_h" = "xyes" ; then
+                       SOLARIS_PRIVS=yes
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
 
+$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
 
 
+$as_echo "#define USE_SOLARIS_PRIVS 1" >>confdefs.h
+
+                       SPP_MSG="yes"
+               else
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+                       as_fn_error $? "*** must have support for Solaris privileges to use --with-solaris-privs" "$LINENO" 5
+               fi
+
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       TEST_SHELL=$SHELL       # let configure find us a capable shell
+       ;;
+*-*-sunos4*)
+       CPPFLAGS="$CPPFLAGS -DSUNOS4"
+       for ac_func in getpwanam
+do :
+  ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
+if test "x$ac_cv_func_getpwanam" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPWANAM 1
+_ACEOF
+
 fi
+done
+
+       $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
+
+       conf_utmp_location=/etc/utmp
+       conf_wtmp_location=/var/adm/wtmp
+       conf_lastlog_location=/var/adm/lastlog
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
+
+       ;;
+*-ncr-sysv*)
+       LIBS="$LIBS -lc89"
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
+
+       $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
+
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
-echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
-if test "${ac_cv_func_getpgrp_void+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
+
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
+
+       ;;
+*-sni-sysv*)
+       # /usr/ucblib MUST NOT be searched on ReliantUNIX
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
+$as_echo_n "checking for dlsym in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlsym+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  # Use it with a single arg.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlsym ();
 int
 main ()
 {
-getpgrp (0);
+return dlsym ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_func_getpgrp_void=no
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlsym=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_getpgrp_void=yes
+  ac_cv_lib_dl_dlsym=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
+$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
+if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  LIBS="-ldl $LIBS"
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
-echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
-if test $ac_cv_func_getpgrp_void = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define GETPGRP_VOID 1
-_ACEOF
+       # -lresolv needs to be at the end of LIBS or DNS lookups break
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
+$as_echo_n "checking for res_query in -lresolv... " >&6; }
+if ${ac_cv_lib_resolv_res_query+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char res_query ();
+int
+main ()
+{
+return res_query ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_resolv_res_query=yes
+else
+  ac_cv_lib_resolv_res_query=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
+$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
+if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
+   LIBS="$LIBS -lresolv"
 fi
 
+       IPADDR_IN_DISPLAY=yes
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-# Search for OpenSSL
-saved_CPPFLAGS="$CPPFLAGS"
-saved_LDFLAGS="$LDFLAGS"
+       $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
 
-# Check whether --with-ssl-dir was given.
-if test "${with_ssl_dir+set}" = set; then
-  withval=$with_ssl_dir;
-               if test "x$openssl" = "xno" ; then
-                       { { echo "$as_me:$LINENO: error: cannot use --with-ssl-dir when OpenSSL disabled" >&5
-echo "$as_me: error: cannot use --with-ssl-dir when OpenSSL disabled" >&2;}
-   { (exit 1); exit 1; }; }
-               fi
-               if test "x$withval" != "xno" ; then
-                       case "$withval" in
-                               # Relative paths
-                               ./*|../*)       withval="`pwd`/$withval"
-                       esac
-                       if test -d "$withval/lib"; then
-                               if test -n "${need_dash_r}"; then
-                                       LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
-                               else
-                                       LDFLAGS="-L${withval}/lib ${LDFLAGS}"
-                               fi
-                       elif test -d "$withval/lib64"; then
-                               if test -n "${need_dash_r}"; then
-                                       LDFLAGS="-L${withval}/lib64 -R${withval}/lib64 ${LDFLAGS}"
-                               else
-                                       LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
-                               fi
-                       else
-                               if test -n "${need_dash_r}"; then
-                                       LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
-                               else
-                                       LDFLAGS="-L${withval} ${LDFLAGS}"
-                               fi
-                       fi
-                       if test -d "$withval/include"; then
-                               CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
-                       else
-                               CPPFLAGS="-I${withval} ${CPPFLAGS}"
-                       fi
-               fi
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-fi
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
+       $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
 
+       external_path_file=/etc/default/login
+       # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
+       # Attention: always take care to bind libsocket and libnsl before libc,
+       # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
+       ;;
+# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
+*-*-sysv4.2*)
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-# Check whether --with-openssl-header-check was given.
-if test "${with_openssl_header_check+set}" = set; then
-  withval=$with_openssl_header_check;
-               if test "x$withval" = "xno" ; then
-                       openssl_check_nonfatal=1
-               fi
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-fi
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
 
-openssl_engine=no
+$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
+
+       $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
+
+       TEST_SHELL=$SHELL       # let configure find us a capable shell
+       ;;
+# UnixWare 7.x, OpenUNIX 8
+*-*-sysv5*)
+       CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
+
+$as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
+
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
+
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
+
+       $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
+
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
+
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-# Check whether --with-ssl-engine was given.
-if test "${with_ssl_engine+set}" = set; then
-  withval=$with_ssl_engine;
-               if test "x$openssl" = "xno" ; then
-                       { { echo "$as_me:$LINENO: error: cannot use --with-ssl-engine when OpenSSL disabled" >&5
-echo "$as_me: error: cannot use --with-ssl-engine when OpenSSL disabled" >&2;}
-   { (exit 1); exit 1; }; }
-               fi
-               if test "x$withval" != "xno" ; then
-                       openssl_engine=yes
-               fi
+       $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
 
+       TEST_SHELL=$SHELL       # let configure find us a capable shell
+       case "$host" in
+       *-*-sysv5SCO_SV*)       # SCO OpenServer 6.x
+               maildir=/var/spool/mail
 
-fi
+$as_echo "#define BROKEN_LIBIAF 1" >>confdefs.h
 
+               $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
 
-if test "x$openssl" = "xyes" ; then
-       LIBS="-lcrypto $LIBS"
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
+$as_echo_n "checking for getluid in -lprot... " >&6; }
+if ${ac_cv_lib_prot_getluid+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lprot  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -20735,687 +8233,295 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char RAND_add ();
+char getluid ();
 int
 main ()
 {
-return RAND_add ();
+return getluid ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPENSSL 1
-_ACEOF
-
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_prot_getluid=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                                               if test -n "${need_dash_r}"; then
-                               LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
-                       else
-                               LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
-                       fi
-                       CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
-                       if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5
-echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  ac_cv_lib_prot_getluid=no
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5
-echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking openssl/opensslv.h usability" >&5
-echo $ECHO_N "checking openssl/opensslv.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <openssl/opensslv.h>
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
+$as_echo "$ac_cv_lib_prot_getluid" >&6; }
+if test "x$ac_cv_lib_prot_getluid" = xyes; then :
+   LIBS="$LIBS -lprot"
+                       for ac_func in getluid setluid
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+                       $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
+
+                       $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking openssl/opensslv.h presence" >&5
-echo $ECHO_N "checking openssl/opensslv.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <openssl/opensslv.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+               ;;
+       *)      $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: openssl/opensslv.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: openssl/opensslv.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: openssl/opensslv.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5
-echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_openssl_opensslv_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5
-echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
+               check_for_libcrypt_later=1
+               ;;
+       esac
+       ;;
+*-*-sysv*)
+       ;;
+# SCO UNIX and OEM versions of SCO UNIX
+*-*-sco3.2v4*)
+       as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
+       ;;
+# SCO OpenServer 5.x
+*-*-sco3.2v5*)
+       if test -z "$GCC"; then
+               CFLAGS="$CFLAGS -belf"
+       fi
+       LIBS="$LIBS -lprot -lx -ltinfo -lm"
+       no_dev_ptmx=1
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-fi
-if test $ac_cv_header_openssl_opensslv_h = yes; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: *** OpenSSL headers missing - please install first or check config.log ***" >&5
-echo "$as_me: error: *** OpenSSL headers missing - please install first or check config.log ***" >&2;}
-   { (exit 1); exit 1; }; }
-fi
+       $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
 
+       $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
 
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char RAND_add ();
-int
-main ()
-{
-return RAND_add ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPENSSL 1
-_ACEOF
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
 
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-                                       { { echo "$as_me:$LINENO: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5
-echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;}
-   { (exit 1); exit 1; }; }
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
+       $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
 
-fi
+       $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
 
+       for ac_func in getluid setluid
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       MANTYPE=man
+       TEST_SHELL=$SHELL       # let configure find us a capable shell
+       SKIP_DISABLE_LASTLOG_DEFINE=yes
+       ;;
+*-*-unicosmk*)
 
-       # Determine OpenSSL header version
-       { echo "$as_me:$LINENO: checking OpenSSL header version" >&5
-echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
+$as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
-echo "$as_me: WARNING: cross compiling: not checking" >&2;}
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-       #include <stdio.h>
-       #include <string.h>
-       #include <openssl/opensslv.h>
-       #define DATA "conftest.sslincver"
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-int
-main ()
-{
+       $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
 
-               FILE *fd;
-               int rc;
+       LDFLAGS="$LDFLAGS"
+       LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
+       MANTYPE=cat
+       ;;
+*-*-unicosmp*)
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-               fd = fopen(DATA,"w");
-               if(fd == NULL)
-                       exit(1);
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-               if ((rc = fprintf(fd ,"%08x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
-                       exit(1);
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-               exit(0);
+       $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-                       ssl_header_ver=`cat conftest.sslincver`
-                       { echo "$as_me:$LINENO: result: $ssl_header_ver" >&5
-echo "${ECHO_T}$ssl_header_ver" >&6; }
+       $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       LDFLAGS="$LDFLAGS"
+       LIBS="$LIBS -lgen -lacid -ldb"
+       MANTYPE=cat
+       ;;
+*-*-unicos*)
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-( exit $ac_status )
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-                       { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5
-echo "$as_me: error: OpenSSL version header not found." >&2;}
-   { (exit 1); exit 1; }; }
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
+       $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
 
+       $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
 
-       # Determine OpenSSL library version
-       { echo "$as_me:$LINENO: checking OpenSSL library version" >&5
-echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
+       LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
+       LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
+       MANTYPE=cat
+       ;;
+*-dec-osf*)
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
+$as_echo_n "checking for Digital Unix SIA... " >&6; }
+       no_osfsia=""
 
-                       { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
-echo "$as_me: WARNING: cross compiling: not checking" >&2;}
+# Check whether --with-osfsia was given.
+if test "${with_osfsia+set}" = set; then :
+  withval=$with_osfsia;
+                       if test "x$withval" = "xno" ; then
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+                               no_osfsia=1
+                       fi
 
+fi
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       if test -z "$no_osfsia" ; then
+               if test -f /etc/sia/matrix.conf; then
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       #include <stdio.h>
-       #include <string.h>
-       #include <openssl/opensslv.h>
-       #include <openssl/crypto.h>
-       #define DATA "conftest.ssllibver"
+$as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
 
-int
-main ()
-{
 
-               FILE *fd;
-               int rc;
+$as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
 
-               fd = fopen(DATA,"w");
-               if(fd == NULL)
-                       exit(1);
+                       $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
 
-               if ((rc = fprintf(fd ,"%08x (%s)\n", SSLeay(),
-                   SSLeay_version(SSLEAY_VERSION))) <0)
-                       exit(1);
+                       LIBS="$LIBS -lsecurity -ldb -lm -laud"
+                       SIA_MSG="yes"
+               else
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-               exit(0);
+$as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+               fi
+       fi
+       $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
 
-                       ssl_library_ver=`cat conftest.ssllibver`
-                       # Check version is supported.
-                       case "$ssl_library_ver" in
-                               0090[0-7]*|009080[0-5]*)
-                                       { { echo "$as_me:$LINENO: error: OpenSSL >= 0.9.8f required (have \"$ssl_library_ver\")" >&5
-echo "$as_me: error: OpenSSL >= 0.9.8f required (have \"$ssl_library_ver\")" >&2;}
-   { (exit 1); exit 1; }; }
-                                       ;;
-                               *) ;;
-                       esac
-                       { echo "$as_me:$LINENO: result: $ssl_library_ver" >&5
-echo "${ECHO_T}$ssl_library_ver" >&6; }
+       $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
 
-( exit $ac_status )
+       $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-                       { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5
-echo "$as_me: error: OpenSSL library not found." >&2;}
-   { (exit 1); exit 1; }; }
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+$as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
 
+       ;;
 
+*-*-nto-qnx*)
+       $as_echo "#define USE_PIPES 1" >>confdefs.h
 
-       # Sanity check OpenSSL headers
-       { echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5
-echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
+       $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
-echo "$as_me: WARNING: cross compiling: not checking" >&2;}
+       $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
 
+       $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-       #include <string.h>
-       #include <openssl/opensslv.h>
+$as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
 
-int
-main ()
-{
+       enable_etc_default_login=no     # has incompatible /etc/default/login
+       case "$host" in
+       *-*-nto-qnx6*)
+               $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
 
-               exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
+               ;;
+       esac
+       ;;
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+*-*-ultrix*)
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
 
-( exit $ac_status )
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                       if test "x$openssl_check_nonfatal" = "x"; then
-                               { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your
-       library. Check config.log for details.
-       If you are sure your installation is consistent, you can disable the check
-       by running \"./configure --without-openssl-header-check\".
-       Also see contrib/findssl.sh for help identifying header/library mismatches.
-       " >&5
-echo "$as_me: error: Your OpenSSL headers do not match your
-       library. Check config.log for details.
-       If you are sure your installation is consistent, you can disable the check
-       by running \"./configure --without-openssl-header-check\".
-       Also see contrib/findssl.sh for help identifying header/library mismatches.
-       " >&2;}
-   { (exit 1); exit 1; }; }
-                       else
-                               { echo "$as_me:$LINENO: WARNING: Your OpenSSL headers do not match your
-       library. Check config.log for details.
-       Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
-echo "$as_me: WARNING: Your OpenSSL headers do not match your
-       library. Check config.log for details.
-       Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
-                       fi
+$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+       ;;
 
+*-*-lynxos)
+       CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
 
+$as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
 
-       { echo "$as_me:$LINENO: checking if programs using OpenSSL functions will link" >&5
-echo $ECHO_N "checking if programs using OpenSSL functions will link... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <openssl/evp.h>
-int
-main ()
-{
- SSLeay_add_all_algorithms();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+       ;;
 esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
+$as_echo_n "checking compiler and flags for sanity... " >&6; }
+if test "$cross_compiling" = yes; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                       saved_LIBS="$LIBS"
-                       LIBS="$LIBS -ldl"
-                       { echo "$as_me:$LINENO: checking if programs using OpenSSL need -ldl" >&5
-echo $ECHO_N "checking if programs using OpenSSL need -ldl... $ECHO_C" >&6; }
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <openssl/evp.h>
+ #include <stdio.h>
 int
 main ()
 {
SSLeay_add_all_algorithms();
exit(0);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-                                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
+if ac_fn_c_try_run "$LINENO"; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                                       LIBS="$saved_LIBS"
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
 
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-
-
 
+# Checks for libraries.
+ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
+if test "x$ac_cv_func_setsockopt" = xyes; then :
 
-
-
-
-
-
-
-for ac_func in  \
-               BN_is_prime_ex \
-               DSA_generate_parameters_ex \
-               EVP_DigestInit_ex \
-               EVP_DigestFinal_ex \
-               EVP_MD_CTX_init \
-               EVP_MD_CTX_cleanup \
-               EVP_MD_CTX_copy_ex \
-               HMAC_CTX_init \
-               RSA_generate_key_ex \
-               RSA_get_default_method \
-
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
+$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_setsockopt+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -21423,337 +8529,219 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char setsockopt ();
 int
 main ()
 {
-return $ac_func ();
+return setsockopt ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_setsockopt=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
+  ac_cv_lib_socket_setsockopt=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
+$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
+if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_LIBSOCKET 1
 _ACEOF
 
-fi
-done
-
-
-       if test "x$openssl_engine" = "xyes" ; then
-               { echo "$as_me:$LINENO: checking for OpenSSL ENGINE support" >&5
-echo $ECHO_N "checking for OpenSSL ENGINE support... $ECHO_C" >&6; }
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  LIBS="-lsocket $LIBS"
 
-       #include <openssl/engine.h>
+fi
 
-int
-main ()
-{
+fi
 
-                               ENGINE_load_builtin_engines();
-                               ENGINE_register_all_complete();
 
-  ;
-  return 0;
-}
+for ac_func in dirname
+do :
+  ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
+if test "x$ac_cv_func_dirname" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DIRNAME 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_OPENSSL_ENGINE 1
+ for ac_header in libgen.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
+if test "x$ac_cv_header_libgen_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGEN_H 1
 _ACEOF
 
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { { echo "$as_me:$LINENO: error: OpenSSL ENGINE support not found" >&5
-echo "$as_me: error: OpenSSL ENGINE support not found" >&2;}
-   { (exit 1); exit 1; }; }
-
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       fi
+done
 
-       # Check for OpenSSL without EVP_aes_{192,256}_cbc
-       { echo "$as_me:$LINENO: checking whether OpenSSL has crippled AES support" >&5
-echo $ECHO_N "checking whether OpenSSL has crippled AES support... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+else
 
-       #include <string.h>
-       #include <openssl/evp.h>
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
+$as_echo_n "checking for dirname in -lgen... " >&6; }
+if ${ac_cv_lib_gen_dirname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dirname ();
 int
 main ()
 {
-
-               exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
-
+return dirname ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gen_dirname=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_LOBOTOMISED_AES 1
-_ACEOF
-
-
-
+  ac_cv_lib_gen_dirname=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
+$as_echo "$ac_cv_lib_gen_dirname" >&6; }
+if test "x$ac_cv_lib_gen_dirname" = xyes; then :
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-       # Check for OpenSSL with EVP_aes_*ctr
-       { echo "$as_me:$LINENO: checking whether OpenSSL has AES CTR via EVP" >&5
-echo $ECHO_N "checking whether OpenSSL has AES CTR via EVP... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-       #include <string.h>
-       #include <openssl/evp.h>
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
+$as_echo_n "checking for broken dirname... " >&6; }
+if ${ac_cv_have_broken_dirname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-int
-main ()
-{
+                       save_LIBS="$LIBS"
+                       LIBS="$LIBS -lgen"
+                       if test "$cross_compiling" = yes; then :
+   ac_cv_have_broken_dirname="no"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-               exit(EVP_aes_128_ctr() == NULL ||
-                   EVP_aes_192_cbc() == NULL ||
-                   EVP_aes_256_cbc() == NULL);
+#include <libgen.h>
+#include <string.h>
 
-  ;
-  return 0;
+int main(int argc, char **argv) {
+    char *s, buf[32];
+
+    strncpy(buf,"/etc", 32);
+    s = dirname(buf);
+    if (!s || strncmp(s, "/", 32) != 0) {
+       exit(1);
+    } else {
+       exit(0);
+    }
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+if ac_fn_c_try_run "$LINENO"; then :
+   ac_cv_have_broken_dirname="no"
+else
+   ac_cv_have_broken_dirname="yes"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+                       LIBS="$save_LIBS"
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
+$as_echo "$ac_cv_have_broken_dirname" >&6; }
+               if test "x$ac_cv_have_broken_dirname" = "xno" ; then
+                       LIBS="$LIBS -lgen"
+                       $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_HAVE_EVPCTR 1
+                       for ac_header in libgen.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
+if test "x$ac_cv_header_libgen_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGEN_H 1
 _ACEOF
 
+fi
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+done
 
+               fi
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+fi
 
 
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 
-       # Check for OpenSSL with EVP_aes_*gcm
-       { echo "$as_me:$LINENO: checking whether OpenSSL has AES GCM via EVP" >&5
-echo $ECHO_N "checking whether OpenSSL has AES GCM via EVP... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
+if test "x$ac_cv_func_getspnam" = xyes; then :
 
-       #include <string.h>
-       #include <openssl/evp.h>
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
+$as_echo_n "checking for getspnam in -lgen... " >&6; }
+if ${ac_cv_lib_gen_getspnam+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getspnam ();
 int
 main ()
 {
-
-               exit(EVP_aes_128_gcm() == NULL ||
-                   EVP_aes_256_gcm() == NULL ||
-                   EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
-                   EVP_CTRL_GCM_IV_GEN == 0 ||
-                   EVP_CTRL_GCM_SET_TAG == 0 ||
-                   EVP_CTRL_GCM_GET_TAG == 0 ||
-                   EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
-
+return getspnam ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_HAVE_EVPGCM 1
-_ACEOF
-
-
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gen_getspnam=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                       unsupported_algorithms="$unsupported_cipers \
-                          aes128-gcm@openssh.com aes256-gcm@openssh.com"
-
-
+  ac_cv_lib_gen_getspnam=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
+$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
+if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
+  LIBS="$LIBS -lgen"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+fi
 
-       { echo "$as_me:$LINENO: checking for library containing EVP_CIPHER_CTX_ctrl" >&5
-echo $ECHO_N "checking for library containing EVP_CIPHER_CTX_ctrl... $ECHO_C" >&6; }
-if test "${ac_cv_search_EVP_CIPHER_CTX_ctrl+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
+$as_echo_n "checking for library containing basename... " >&6; }
+if ${ac_cv_search_basename+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -21762,230 +8750,263 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char EVP_CIPHER_CTX_ctrl ();
+char basename ();
 int
 main ()
 {
-return EVP_CIPHER_CTX_ctrl ();
+return basename ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' crypto; do
+for ac_lib in '' gen; do
   if test -z "$ac_lib"; then
     ac_res="none required"
   else
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_EVP_CIPHER_CTX_ctrl=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_basename=$ac_res
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_EVP_CIPHER_CTX_ctrl+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_basename+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_EVP_CIPHER_CTX_ctrl+set}" = set; then
-  :
+if ${ac_cv_search_basename+:} false; then :
+
 else
-  ac_cv_search_EVP_CIPHER_CTX_ctrl=no
+  ac_cv_search_basename=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_EVP_CIPHER_CTX_ctrl" >&5
-echo "${ECHO_T}$ac_cv_search_EVP_CIPHER_CTX_ctrl" >&6; }
-ac_res=$ac_cv_search_EVP_CIPHER_CTX_ctrl
-if test "$ac_res" != no; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
+$as_echo "$ac_cv_search_basename" >&6; }
+ac_res=$ac_cv_search_basename
+if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_EVP_CIPHER_CTX_CTRL 1
-_ACEOF
+$as_echo "#define HAVE_BASENAME 1" >>confdefs.h
 
 fi
 
 
-       { echo "$as_me:$LINENO: checking if EVP_DigestUpdate returns an int" >&5
-echo $ECHO_N "checking if EVP_DigestUpdate returns an int... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-       #include <string.h>
-       #include <openssl/evp.h>
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+  withval=$with_zlib;  if test "x$withval" = "xno" ; then
+               as_fn_error $? "*** zlib is required ***" "$LINENO" 5
+         elif test "x$withval" != "xyes"; then
+               if test -d "$withval/lib"; then
+                       if test -n "${need_dash_r}"; then
+                               LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+                       else
+                               LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+                       fi
+               else
+                       if test -n "${need_dash_r}"; then
+                               LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
+                       else
+                               LDFLAGS="-L${withval} ${LDFLAGS}"
+                       fi
+               fi
+               if test -d "$withval/include"; then
+                       CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
+               else
+                       CPPFLAGS="-I${withval} ${CPPFLAGS}"
+               fi
+       fi
+
+fi
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+
+else
+  as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
+$as_echo_n "checking for deflate in -lz... " >&6; }
+if ${ac_cv_lib_z_deflate+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char deflate ();
 int
 main ()
 {
+return deflate ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_deflate=yes
+else
+  ac_cv_lib_z_deflate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
+$as_echo "$ac_cv_lib_z_deflate" >&6; }
+if test "x$ac_cv_lib_z_deflate" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
 
-               if(EVP_DigestUpdate(NULL, NULL,0))
-                       exit(0);
+  LIBS="-lz $LIBS"
+
+else
+
+               saved_CPPFLAGS="$CPPFLAGS"
+               saved_LDFLAGS="$LDFLAGS"
+               save_LIBS="$LIBS"
+                               if test -n "${need_dash_r}"; then
+                       LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
+               else
+                       LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
+               fi
+               CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
+               LIBS="$LIBS -lz"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char deflate ();
+int
+main ()
+{
+return deflate ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_link "$LINENO"; then :
+  $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
+                               as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_EVP_DIGESTUPDATE_VOID 1
-_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+
+fi
 
 
 
+# Check whether --with-zlib-version-check was given.
+if test "${with_zlib_version_check+set}" = set; then :
+  withval=$with_zlib_version_check;   if test "x$withval" = "xno" ; then
+               zlib_check_nonfatal=1
+          fi
+
+
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 
-       # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
-       # because the system crypt() is more featureful.
-       if test "x$check_for_libcrypt_before" = "x1"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
+$as_echo_n "checking for possibly buggy zlib... " >&6; }
+if test "$cross_compiling" = yes; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
 
-{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crypt ();
-int
-main ()
-{
-return crypt ();
+#include <stdio.h>
+#include <stdlib.h>
+#include <zlib.h>
+
+int
+main ()
+{
+
+       int a=0, b=0, c=0, d=0, n, v;
+       n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
+       if (n != 3 && n != 4)
+               exit(1);
+       v = a*1000000 + b*10000 + c*100 + d;
+       fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
+
+       /* 1.1.4 is OK */
+       if (a == 1 && b == 1 && c >= 4)
+               exit(0);
+
+       /* 1.2.3 and up are OK */
+       if (v >= 1020300)
+               exit(0);
+
+       exit(2);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_crypt_crypt=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+         if test -z "$zlib_check_nonfatal" ; then
+               as_fn_error $? "*** zlib too old - check config.log ***
+Your reported zlib version has known security problems.  It's possible your
+vendor has fixed these problems without changing the version number.  If you
+are sure this is the case, you can disable the check by running
+\"./configure --without-zlib-version-check\".
+If you are in doubt, upgrade zlib to version 1.2.3 or greater.
+See http://www.gzip.org/zlib/ for details." "$LINENO" 5
+         else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
+$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
+         fi
 
-       ac_cv_lib_crypt_crypt=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
-if test $ac_cv_lib_crypt_crypt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCRYPT 1
-_ACEOF
-
-  LIBS="-lcrypt $LIBS"
 
-fi
 
-       fi
+ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes; then :
 
-       # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
-       # version in OpenSSL.
-       if test "x$check_for_libcrypt_later" = "x1"; then
-               { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
+$as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
+if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lresolv  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -21994,84 +9015,51 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char crypt ();
+char strcasecmp ();
 int
 main ()
 {
-return crypt ();
+return strcasecmp ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_crypt_crypt=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_resolv_strcasecmp=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_crypt_crypt=no
+  ac_cv_lib_resolv_strcasecmp=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
-if test $ac_cv_lib_crypt_crypt = yes; then
-  LIBS="$LIBS -lcrypt"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
+$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
+if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
+  LIBS="$LIBS -lresolv"
 fi
 
-       fi
 
+fi
 
-for ac_func in crypt DES_crypt
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+for ac_func in utimes
+do :
+  ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
+if test "x$ac_cv_func_utimes" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UTIMES 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
+$as_echo_n "checking for utimes in -lc89... " >&6; }
+if ${ac_cv_lib_c89_utimes+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc89  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -22079,96 +9067,58 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char utimes ();
 int
 main ()
 {
-return $ac_func ();
+return utimes ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c89_utimes=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
+  ac_cv_lib_c89_utimes=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
+$as_echo "$ac_cv_lib_c89_utimes" >&6; }
+if test "x$ac_cv_lib_c89_utimes" = xyes; then :
+  $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
 
+                                       LIBS="$LIBS -lc89"
 fi
-done
 
 
-       # Search for SHA256 support in libc and/or OpenSSL
+fi
+done
 
 
-for ac_func in SHA256_Update EVP_sha256
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+for ac_header in bsd/libutil.h libutil.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+done
 
-#undef $ac_func
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
+$as_echo_n "checking for library containing fmt_scaled... " >&6; }
+if ${ac_cv_search_fmt_scaled+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -22176,101 +9126,55 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char fmt_scaled ();
 int
 main ()
 {
-return $ac_func ();
+return fmt_scaled ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
+for ac_lib in '' util bsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_fmt_scaled=$ac_res
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_fmt_scaled+:} false; then :
+  break
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+done
+if ${ac_cv_search_fmt_scaled+:} false; then :
 
 else
-  unsupported_algorithms="$unsupported_algorithms \
-               hmac-sha2-256 hmac-sha2-512 \
-               diffie-hellman-group-exchange-sha256 \
-               hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com"
-
-
+  ac_cv_search_fmt_scaled=no
 fi
-done
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
+$as_echo "$ac_cv_search_fmt_scaled" >&6; }
+ac_res=$ac_cv_search_fmt_scaled
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-       # Search for RIPE-MD support in OpenSSL
+fi
 
-for ac_func in EVP_ripemd160
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
+$as_echo_n "checking for library containing scan_scaled... " >&6; }
+if ${ac_cv_search_scan_scaled+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -22278,392 +9182,349 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char scan_scaled ();
 int
 main ()
 {
-return $ac_func ();
+return scan_scaled ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
+for ac_lib in '' util bsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_scan_scaled=$ac_res
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_scan_scaled+:} false; then :
+  break
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+done
+if ${ac_cv_search_scan_scaled+:} false; then :
 
 else
-  unsupported_algorithms="$unsupported_algorithms \
-               hmac-ripemd160
-               hmac-ripemd160@openssh.com
-               hmac-ripemd160-etm@openssh.com"
-
-
+  ac_cv_search_scan_scaled=no
 fi
-done
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
+$as_echo "$ac_cv_search_scan_scaled" >&6; }
+ac_res=$ac_cv_search_scan_scaled
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+fi
 
-       # Check complete ECC support in OpenSSL
-       { echo "$as_me:$LINENO: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
-echo $ECHO_N "checking whether OpenSSL has NID_X9_62_prime256v1... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
+$as_echo_n "checking for library containing login... " >&6; }
+if ${ac_cv_search_login+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #include <openssl/ec.h>
-       #include <openssl/ecdh.h>
-       #include <openssl/ecdsa.h>
-       #include <openssl/evp.h>
-       #include <openssl/objects.h>
-       #include <openssl/opensslv.h>
-       #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
-       # error "OpenSSL < 0.9.8g has unreliable ECC code"
-       #endif
-
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char login ();
 int
 main ()
 {
-
-               EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
-               const EVP_MD *m = EVP_sha256(); /* We need this too */
-
+return login ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                 enable_nistp256=1
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+for ac_lib in '' util bsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_login=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_login+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_login+:} false; then :
 
+else
+  ac_cv_search_login=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
+$as_echo "$ac_cv_search_login" >&6; }
+ac_res=$ac_cv_search_login
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+fi
 
-       { echo "$as_me:$LINENO: checking whether OpenSSL has NID_secp384r1" >&5
-echo $ECHO_N "checking whether OpenSSL has NID_secp384r1... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
+$as_echo_n "checking for library containing logout... " >&6; }
+if ${ac_cv_search_logout+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #include <openssl/ec.h>
-       #include <openssl/ecdh.h>
-       #include <openssl/ecdsa.h>
-       #include <openssl/evp.h>
-       #include <openssl/objects.h>
-       #include <openssl/opensslv.h>
-       #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
-       # error "OpenSSL < 0.9.8g has unreliable ECC code"
-       #endif
-
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char logout ();
 int
 main ()
 {
-
-               EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1);
-               const EVP_MD *m = EVP_sha384(); /* We need this too */
-
+return logout ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                 enable_nistp384=1
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+for ac_lib in '' util bsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_logout=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_logout+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_logout+:} false; then :
 
+else
+  ac_cv_search_logout=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
+$as_echo "$ac_cv_search_logout" >&6; }
+ac_res=$ac_cv_search_logout
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+fi
 
-       { echo "$as_me:$LINENO: checking whether OpenSSL has NID_secp521r1" >&5
-echo $ECHO_N "checking whether OpenSSL has NID_secp521r1... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
+$as_echo_n "checking for library containing logwtmp... " >&6; }
+if ${ac_cv_search_logwtmp+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #include <openssl/ec.h>
-       #include <openssl/ecdh.h>
-       #include <openssl/ecdsa.h>
-       #include <openssl/evp.h>
-       #include <openssl/objects.h>
-       #include <openssl/opensslv.h>
-       #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
-       # error "OpenSSL < 0.9.8g has unreliable ECC code"
-       #endif
-
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char logwtmp ();
 int
 main ()
 {
-
-               EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
-               const EVP_MD *m = EVP_sha512(); /* We need this too */
-
+return logwtmp ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                 { echo "$as_me:$LINENO: checking if OpenSSL's NID_secp521r1 is functional" >&5
-echo $ECHO_N "checking if OpenSSL's NID_secp521r1 is functional... $ECHO_C" >&6; }
-                 if test "$cross_compiling" = yes; then
-   { echo "$as_me:$LINENO: WARNING: cross-compiling: assuming yes" >&5
-echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;}
-                         enable_nistp521=1
+for ac_lib in '' util bsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_logwtmp=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_logwtmp+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_logwtmp+:} false; then :
 
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  ac_cv_search_logwtmp=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
+$as_echo "$ac_cv_search_logwtmp" >&6; }
+ac_res=$ac_cv_search_logwtmp
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-       #include <openssl/ec.h>
-       #include <openssl/ecdh.h>
-       #include <openssl/ecdsa.h>
-       #include <openssl/evp.h>
-       #include <openssl/objects.h>
-       #include <openssl/opensslv.h>
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
+$as_echo_n "checking for library containing openpty... " >&6; }
+if ${ac_cv_search_openpty+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openpty ();
 int
 main ()
 {
-
-                       EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
-                       const EVP_MD *m = EVP_sha512(); /* We need this too */
-                       exit(e == NULL || m == NULL);
-
+return openpty ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                         enable_nistp521=1
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+for ac_lib in '' util bsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_openpty=$ac_res
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_openpty+:} false; then :
+  break
 fi
-
+done
+if ${ac_cv_search_openpty+:} false; then :
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
+  ac_cv_search_openpty=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
+$as_echo "$ac_cv_search_openpty" >&6; }
+ac_res=$ac_cv_search_openpty
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-       COMMENT_OUT_ECC="#no ecc#"
-       TEST_SSH_ECC=no
-
-       if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \
-           test x$enable_nistp521 = x1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_HAS_ECC 1
-_ACEOF
+fi
 
-       fi
-       if test x$enable_nistp256 = x1; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
+$as_echo_n "checking for library containing updwtmp... " >&6; }
+if ${ac_cv_search_updwtmp+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_HAS_NISTP256 1
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char updwtmp ();
+int
+main ()
+{
+return updwtmp ();
+  ;
+  return 0;
+}
 _ACEOF
+for ac_lib in '' util bsd; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_updwtmp=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_updwtmp+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_updwtmp+:} false; then :
 
-               TEST_SSH_ECC=yes
-               COMMENT_OUT_ECC=""
-       else
-               unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp256 \
-                   ecdh-sha2-nistp256 ecdsa-sha2-nistp256-cert-v01@openssh.com"
-       fi
-       if test x$enable_nistp384 = x1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_HAS_NISTP384 1
-_ACEOF
+else
+  ac_cv_search_updwtmp=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
+$as_echo "$ac_cv_search_updwtmp" >&6; }
+ac_res=$ac_cv_search_updwtmp
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-               TEST_SSH_ECC=yes
-               COMMENT_OUT_ECC=""
-       else
-               unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp384 \
-                   ecdh-sha2-nistp384 ecdsa-sha2-nistp384-cert-v01@openssh.com"
-       fi
-       if test x$enable_nistp521 = x1; then
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_HAS_NISTP521 1
+for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-               TEST_SSH_ECC=yes
-               COMMENT_OUT_ECC=""
-       else
-               unsupported_algorithms="$unsupported_algorithms ecdh-sha2-nistp521 \
-                   ecdsa-sha2-nistp521 ecdsa-sha2-nistp521-cert-v01@openssh.com"
-       fi
-
+fi
+done
 
 
+# On some platforms, inet_ntop and gethostbyname may be found in libresolv
+# or libnsl.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
+$as_echo_n "checking for library containing inet_ntop... " >&6; }
+if ${ac_cv_search_inet_ntop+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-       { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -22672,82 +9533,55 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char crypt ();
+char inet_ntop ();
 int
 main ()
 {
-return crypt ();
+return inet_ntop ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_crypt_crypt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_crypt_crypt=no
+for ac_lib in '' resolv nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_inet_ntop=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_inet_ntop+:} false; then :
+  break
 fi
+done
+if ${ac_cv_search_inet_ntop+:} false; then :
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+else
+  ac_cv_search_inet_ntop=no
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
-if test $ac_cv_lib_crypt_crypt = yes; then
-  LIBS="$LIBS -lcrypt"
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
+$as_echo "$ac_cv_search_inet_ntop" >&6; }
+ac_res=$ac_cv_search_inet_ntop
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+fi
 
-for ac_func in crypt
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
+$as_echo_n "checking for library containing gethostbyname... " >&6; }
+if ${ac_cv_search_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -22755,103 +9589,67 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char gethostbyname ();
 int
 main ()
 {
-return $ac_func ();
+return gethostbyname ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+for ac_lib in '' resolv nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_gethostbyname=$ac_res
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_gethostbyname+:} false; then :
+  break
 fi
 done
+if ${ac_cv_search_gethostbyname+:} false; then :
 
+else
+  ac_cv_search_gethostbyname=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
+$as_echo "$ac_cv_search_gethostbyname" >&6; }
+ac_res=$ac_cv_search_gethostbyname
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+fi
 
 
+for ac_func in strftime
+do :
+  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
 
-
-for ac_func in  \
-       arc4random \
-       arc4random_buf \
-       arc4random_stir \
-       arc4random_uniform \
-
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if ${ac_cv_lib_intl_strftime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -22859,459 +9657,602 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+char strftime ();
 int
 main ()
 {
-return $ac_func ();
+return strftime ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_strftime=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
+  ac_cv_lib_intl_strftime=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = xyes; then :
+  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+LIBS="-lintl $LIBS"
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
 fi
 done
 
 
-saved_LIBS="$LIBS"
-{ echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5
-echo $ECHO_N "checking for ia_openinfo in -liaf... $ECHO_C" >&6; }
-if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liaf  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+# Check for ALTDIRFUNC glob() extension
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
+$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+               #include <glob.h>
+               #ifdef GLOB_ALTDIRFUNC
+               FOUNDIT
+               #endif
+
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "FOUNDIT" >/dev/null 2>&1; then :
+
+
+$as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+fi
+rm -f conftest*
+
+
+# Check for g.gl_matchc glob() extension
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
+$as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+ #include <glob.h>
+int
+main ()
+{
+ glob_t g; g.gl_matchc = 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ia_openinfo ();
+
+$as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+# Check for g.gl_statv glob() extension
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
+$as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <glob.h>
 int
 main ()
 {
-return ia_openinfo ();
+
+#ifndef GLOB_KEEPSTAT
+#error "glob does not support GLOB_KEEPSTAT extension"
+#endif
+glob_t g;
+g.gl_statv = NULL;
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_iaf_ia_openinfo=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+
+
+$as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_iaf_ia_openinfo=no
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
+"
+if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
+_ACEOF
+
+
+ac_fn_c_check_decl "$LINENO" "VIS_ALL" "ac_cv_have_decl_VIS_ALL" "#include <vis.h>
+"
+if test "x$ac_cv_have_decl_VIS_ALL" = xyes; then :
+
+else
+
+$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
+
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_iaf_ia_openinfo" >&5
-echo "${ECHO_T}$ac_cv_lib_iaf_ia_openinfo" >&6; }
-if test $ac_cv_lib_iaf_ia_openinfo = yes; then
 
-       LIBS="$LIBS -liaf"
 
-for ac_func in set_id
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
+$as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
+if test "$cross_compiling" = yes; then :
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
+               $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <sys/types.h>
+#include <dirent.h>
 int
 main ()
 {
-return $ac_func ();
+
+       struct dirent d;
+       exit(sizeof(d.d_name)<=sizeof(char));
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
-fi
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
+
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- SSHDLIBS="$SSHDLIBS -liaf"
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBIAF 1
-_ACEOF
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
+$as_echo_n "checking for /proc/pid/fd directory... " >&6; }
+if test -d "/proc/$$/fd" ; then
+
+$as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-done
 
+# Check whether user wants S/Key support
+SKEY_MSG="no"
 
-fi
+# Check whether --with-skey was given.
+if test "${with_skey+set}" = set; then :
+  withval=$with_skey;
+               if test "x$withval" != "xno" ; then
 
-LIBS="$saved_LIBS"
+                       if test "x$withval" != "xyes" ; then
+                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                               LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       fi
 
-### Configure cryptographic random number support
 
-# Check wheter OpenSSL seeds itself
-if test "x$openssl" = "xyes" ; then
-       { echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5
-echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
+$as_echo "#define SKEY 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
-echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
-                       # This is safe, since we will fatal() at runtime if
-                       # OpenSSL is not seeded correctly.
-                       OPENSSL_SEEDS_ITSELF=yes
+                       LIBS="-lskey $LIBS"
+                       SKEY_MSG="yes"
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s/key support" >&5
+$as_echo_n "checking for s/key support... " >&6; }
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+#include <stdio.h>
+#include <skey.h>
+
+int
+main ()
+{
+
+       char *ff = skey_keyinfo(""); ff="";
+       exit(0);
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                                       as_fn_error $? "** Incomplete or missing s/key libraries." "$LINENO" 5
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if skeychallenge takes 4 arguments" >&5
+$as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; }
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #include <string.h>
-       #include <openssl/rand.h>
+#include <stdio.h>
+#include <skey.h>
 
 int
 main ()
 {
 
-               exit(RAND_status() == 1 ? 0 : 1);
+       (void)skeychallenge(NULL,"name","",0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
 
-                       OPENSSL_SEEDS_ITSELF=yes
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define SKEYCHALLENGE_4ARG 1" >>confdefs.h
 
-( exit $ac_status )
+else
 
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               fi
 
 
 fi
 
-# PRNGD TCP socket
 
-# Check whether --with-prngd-port was given.
-if test "${with_prngd_port+set}" = set; then
-  withval=$with_prngd_port;
-               case "$withval" in
-               no)
-                       withval=""
-                       ;;
-               [0-9]*)
-                       ;;
-               *)
-                       { { echo "$as_me:$LINENO: error: You must specify a numeric port number for --with-prngd-port" >&5
-echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;}
-   { (exit 1); exit 1; }; }
-                       ;;
-               esac
-               if test ! -z "$withval" ; then
-                       PRNGD_PORT="$withval"
+# Check whether user wants to use ldns
+LDNS_MSG="no"
 
-cat >>confdefs.h <<_ACEOF
-#define PRNGD_PORT $PRNGD_PORT
-_ACEOF
+# Check whether --with-ldns was given.
+if test "${with_ldns+set}" = set; then :
+  withval=$with_ldns;
+       ldns=""
+       if test "x$withval" = "xyes" ; then
+               if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ldns-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ldns-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_LDNSCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $LDNSCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LDNSCONFIG="$LDNSCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-               fi
+  ;;
+esac
+fi
+LDNSCONFIG=$ac_cv_path_LDNSCONFIG
+if test -n "$LDNSCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDNSCONFIG" >&5
+$as_echo "$LDNSCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
 fi
+if test -z "$ac_cv_path_LDNSCONFIG"; then
+  ac_pt_LDNSCONFIG=$LDNSCONFIG
+  # Extract the first word of "ldns-config", so it can be a program name with args.
+set dummy ldns-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_LDNSCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_LDNSCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_LDNSCONFIG="$ac_pt_LDNSCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+ac_pt_LDNSCONFIG=$ac_cv_path_ac_pt_LDNSCONFIG
+if test -n "$ac_pt_LDNSCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LDNSCONFIG" >&5
+$as_echo "$ac_pt_LDNSCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-# PRNGD Unix domain socket
+  if test "x$ac_pt_LDNSCONFIG" = x; then
+    LDNSCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LDNSCONFIG=$ac_pt_LDNSCONFIG
+  fi
+else
+  LDNSCONFIG="$ac_cv_path_LDNSCONFIG"
+fi
 
-# Check whether --with-prngd-socket was given.
-if test "${with_prngd_socket+set}" = set; then
-  withval=$with_prngd_socket;
-               case "$withval" in
-               yes)
-                       withval="/var/run/egd-pool"
-                       ;;
-               no)
-                       withval=""
-                       ;;
-               /*)
-                       ;;
-               *)
-                       { { echo "$as_me:$LINENO: error: You must specify an absolute path to the entropy socket" >&5
-echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;}
-   { (exit 1); exit 1; }; }
-                       ;;
-               esac
+               if test "x$PKGCONFIG" = "xno"; then
+                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                       LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       LIBS="-lldns $LIBS"
+                       ldns=yes
+               else
+                       LIBS="$LIBS `$LDNSCONFIG --libs`"
+                       CPPFLAGS="$CPPFLAGS `$LDNSCONFIG --cflags`"
+               fi
+       elif test "x$withval" != "xno" ; then
+                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                       LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       LIBS="-lldns $LIBS"
+                       ldns=yes
+       fi
 
-               if test ! -z "$withval" ; then
-                       if test ! -z "$PRNGD_PORT" ; then
-                               { { echo "$as_me:$LINENO: error: You may not specify both a PRNGD/EGD port and socket" >&5
-echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;}
-   { (exit 1); exit 1; }; }
-                       fi
-                       if test ! -r "$withval" ; then
-                               { echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5
-echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
-                       fi
-                       PRNGD_SOCKET="$withval"
+       # Verify that it works.
+       if test "x$ldns" = "xyes" ; then
 
-cat >>confdefs.h <<_ACEOF
-#define PRNGD_SOCKET "$PRNGD_SOCKET"
-_ACEOF
+$as_echo "#define HAVE_LDNS 1" >>confdefs.h
 
-               fi
+               LDNS_MSG="yes"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
+$as_echo_n "checking for ldns support... " >&6; }
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <ldns/ldns.h>
+int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
 
-else
 
-               # Check for existing socket only if we don't have a random device already
-               if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
-                       { echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
-echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6; }
-                       # Insert other locations here
-                       for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
-                               if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
-                                       PRNGD_SOCKET="$sock"
-                                       cat >>confdefs.h <<_ACEOF
-#define PRNGD_SOCKET "$PRNGD_SOCKET"
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
 
-                                       break;
-                               fi
-                       done
-                       if test ! -z "$PRNGD_SOCKET" ; then
-                               { echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
-echo "${ECHO_T}$PRNGD_SOCKET" >&6; }
-                       else
-                               { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-                       fi
-               fi
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                                       as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       fi
 
+fi
+
+
+# Check whether user wants libedit support
+LIBEDIT_MSG="no"
+
+# Check whether --with-libedit was given.
+if test "${with_libedit+set}" = set; then :
+  withval=$with_libedit;  if test "x$withval" != "xno" ; then
+               if test "x$withval" = "xyes" ; then
+                       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+  ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-# Which randomness source do we use?
-if test ! -z "$PRNGD_PORT" ; then
-       RAND_MSG="PRNGd port $PRNGD_PORT"
-elif test ! -z "$PRNGD_SOCKET" ; then
-       RAND_MSG="PRNGd socket $PRNGD_SOCKET"
-elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL_PRNG_ONLY 1
-_ACEOF
+fi
+if test -z "$ac_cv_path_PKGCONFIG"; then
+  ac_pt_PKGCONFIG=$PKGCONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKGCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-       RAND_MSG="OpenSSL internal ONLY"
-elif test "x$openssl" = "xno" ; then
-       { echo "$as_me:$LINENO: WARNING: OpenSSH will use /dev/urandom as a source of random numbers. It will fail if this device is not supported or accessible" >&5
-echo "$as_me: WARNING: OpenSSH will use /dev/urandom as a source of random numbers. It will fail if this device is not supported or accessible" >&2;}
+  ;;
+esac
+fi
+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
+if test -n "$ac_pt_PKGCONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
+$as_echo "$ac_pt_PKGCONFIG" >&6; }
 else
-       { { echo "$as_me:$LINENO: error: OpenSSH has no source of random numbers. Please configure OpenSSL with an entropy source or re-run configure using one of the --with-prngd-port or --with-prngd-socket options" >&5
-echo "$as_me: error: OpenSSH has no source of random numbers. Please configure OpenSSL with an entropy source or re-run configure using one of the --with-prngd-port or --with-prngd-socket options" >&2;}
-   { (exit 1); exit 1; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-# Check for PAM libs
-PAM_MSG="no"
+  if test "x$ac_pt_PKGCONFIG" = x; then
+    PKGCONFIG="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_pt_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_path_PKGCONFIG"
+fi
 
-# Check whether --with-pam was given.
-if test "${with_pam+set}" = set; then
-  withval=$with_pam;
-               if test "x$withval" != "xno" ; then
-                       if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
-                          test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
-                               { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
-echo "$as_me: error: PAM headers not found" >&2;}
-   { (exit 1); exit 1; }; }
+                       if test "x$PKGCONFIG" != "xno"; then
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
+$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
+                               if "$PKGCONFIG" libedit; then
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                                       use_pkgconfig_for_libedit=yes
+                               else
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                               fi
                        fi
-
-                       saved_LIBS="$LIBS"
-
-{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               else
+                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                       if test -n "${need_dash_r}"; then
+                               LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+                       else
+                               LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+                       fi
+               fi
+               if test "x$use_pkgconfig_for_libedit" = "xyes"; then
+                       LIBEDIT=`$PKGCONFIG --libs libedit`
+                       CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
+               else
+                       LIBEDIT="-ledit -lcurses"
+               fi
+               OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
+$as_echo_n "checking for el_init in -ledit... " >&6; }
+if ${ac_cv_lib_edit_el_init+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-ledit  $OTHERLIBS
+                $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -23320,69 +10261,109 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char dlopen ();
+char el_init ();
 int
 main ()
 {
-return dlopen ();
+return el_init ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_dl_dlopen=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_edit_el_init=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_lib_edit_el_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
+$as_echo "$ac_cv_lib_edit_el_init" >&6; }
+if test "x$ac_cv_lib_edit_el_init" = xyes; then :
+
+$as_echo "#define USE_LIBEDIT 1" >>confdefs.h
+
+                         LIBEDIT_MSG="yes"
+
 
-       ac_cv_lib_dl_dlopen=no
+else
+   as_fn_error $? "libedit not found" "$LINENO" 5
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
+$as_echo_n "checking if libedit version is compatible... " >&6; }
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <histedit.h>
+int
+main ()
+{
+
+       int i = H_SETSIZE;
+       el_init("", NULL, NULL, NULL);
+       exit(0);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                     as_fn_error $? "libedit version is not compatible" "$LINENO" 5
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       fi
+
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
-if test $ac_cv_lib_dl_dlopen = yes; then
+
+
+AUDIT_MODULE=none
+
+# Check whether --with-audit was given.
+if test "${with_audit+set}" = set; then :
+  withval=$with_audit;
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
+$as_echo_n "checking for supported audit module... " >&6; }
+         case "$withval" in
+         bsm)
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
+$as_echo "bsm" >&6; }
+               AUDIT_MODULE=bsm
+                               for ac_header in bsm/audit.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
+#ifdef HAVE_TIME_H
+# include <time.h>
+#endif
+
+
+"
+if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
+#define HAVE_BSM_AUDIT_H 1
 _ACEOF
 
-  LIBS="-ldl $LIBS"
-
+else
+  as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
 fi
 
+done
 
-{ echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5
-echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6; }
-if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
+$as_echo_n "checking for getaudit in -lbsm... " >&6; }
+if ${ac_cv_lib_bsm_getaudit+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpam  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lbsm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -23391,8898 +10372,6445 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char pam_set_item ();
+char getaudit ();
 int
 main ()
 {
-return pam_set_item ();
+return getaudit ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_pam_pam_set_item=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bsm_getaudit=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_pam_pam_set_item=no
+  ac_cv_lib_bsm_getaudit=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5
-echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6; }
-if test $ac_cv_lib_pam_pam_set_item = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
+$as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
+if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPAM 1
+#define HAVE_LIBBSM 1
 _ACEOF
 
-  LIBS="-lpam $LIBS"
+  LIBS="-lbsm $LIBS"
 
 else
-  { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
-echo "$as_me: error: *** libpam missing" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
 fi
 
+               for ac_func in getaudit
+do :
+  ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
+if test "x$ac_cv_func_getaudit" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETAUDIT 1
+_ACEOF
 
-for ac_func in pam_getenvlist
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
+fi
+done
+
+               # These are optional
+               for ac_func in getaudit_addr aug_get_machine
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+fi
+done
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+$as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+               if test "$sol2ver" -ge 11; then
+                       SSHDLIBS="$SSHDLIBS -lscf"
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+$as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
+
+               fi
+               ;;
+         linux)
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
+$as_echo "linux" >&6; }
+               AUDIT_MODULE=linux
+                               for ac_header in libaudit.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
+if test "x$ac_cv_header_libaudit_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBAUDIT_H 1
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+done
+
+               SSHDLIBS="$SSHDLIBS -laudit"
+
+$as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
+
+               ;;
+         debug)
+               AUDIT_MODULE=debug
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
+$as_echo "debug" >&6; }
+
+$as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
+
+               ;;
+         no)
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               ;;
+         *)
+               as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
+               ;;
+       esac
+
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-fi
-done
 
 
-for ac_func in pam_putenv
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
+# Check whether --with-pie was given.
+if test "${with_pie+set}" = set; then :
+  withval=$with_pie;
+       if test "x$withval" = "xno"; then
+               use_pie=no
+       fi
+       if test "x$withval" = "xyes"; then
+               use_pie=yes
+       fi
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+fi
 
-#undef $ac_func
+if test "x$use_pie" = "x"; then
+       use_pie=no
+fi
+if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then
+       # Turn off automatic PIE when toolchain hardening is off.
+       use_pie=no
+fi
+if test "x$use_pie" = "xauto"; then
+       # Automatic PIE requires gcc >= 4.x
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.x" >&5
+$as_echo_n "checking for gcc >= 4.x... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
+#if !defined(__GNUC__) || __GNUC__ < 4
+#error gcc is too old
 #endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+         use_pie=no
 
-       eval "$as_ac_var=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+if test "x$use_pie" != "xno"; then
+       SAVED_CFLAGS="$CFLAGS"
+       SAVED_LDFLAGS="$LDFLAGS"
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fPIE" >&5
+$as_echo_n "checking if $CC supports compile flag -fPIE... " >&6; }
+       saved_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $WERROR -fPIE"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-fPIE"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
+       exit(0);
+}
+
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
+if `grep -i "unrecognized option" conftest.err >/dev/null`
+then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$saved_CFLAGS"
+else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                CFLAGS="$saved_CFLAGS $_define_flag"
 fi
-done
-
-                       LIBS="$saved_LIBS"
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 CFLAGS="$saved_CFLAGS"
 
-                       PAM_MSG="yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+}
+       {
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -pie" >&5
+$as_echo_n "checking if $LD supports link flag -pie... " >&6; }
+       saved_LDFLAGS="$LDFLAGS"
+       LDFLAGS="$LDFLAGS $WERROR -pie"
+       _define_flag=""
+       test "x$_define_flag" = "x" && _define_flag="-pie"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-                       SSHDLIBS="$SSHDLIBS -lpam"
+#include <stdlib.h>
+#include <stdio.h>
+int main(int argc, char **argv) {
+       /* Some math to catch -ftrapv problems in the toolchain */
+       int i = 123 * argc, j = 456 + argc, k = 789 - argc;
+       float l = i * 2.1;
+       double m = l / 0.5;
+       long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
+       long long p = n * o;
+       printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
+       exit(0);
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_PAM 1
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 LDFLAGS="$saved_LDFLAGS $_define_flag"
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                 LDFLAGS="$saved_LDFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+}
+       # We use both -fPIE and -pie or neither.
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether both -fPIE and -pie are supported" >&5
+$as_echo_n "checking whether both -fPIE and -pie are supported... " >&6; }
+       if echo "x $CFLAGS"  | grep ' -fPIE' >/dev/null 2>&1 && \
+          echo "x $LDFLAGS" | grep ' -pie'  >/dev/null 2>&1 ; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               CFLAGS="$SAVED_CFLAGS"
+               LDFLAGS="$SAVED_LDFLAGS"
+       fi
+fi
+
+for ac_func in  \
+       Blowfish_initstate \
+       Blowfish_expandstate \
+       Blowfish_expand0state \
+       Blowfish_stream2word \
+       asprintf \
+       b64_ntop \
+       __b64_ntop \
+       b64_pton \
+       __b64_pton \
+       bcopy \
+       bcrypt_pbkdf \
+       bindresvport_sa \
+       blf_enc \
+       cap_rights_limit \
+       clock \
+       closefrom \
+       dirfd \
+       endgrent \
+       err \
+       errx \
+       explicit_bzero \
+       fchmod \
+       fchown \
+       freeaddrinfo \
+       fstatfs \
+       fstatvfs \
+       futimes \
+       getaddrinfo \
+       getcwd \
+       getgrouplist \
+       getnameinfo \
+       getopt \
+       getpeereid \
+       getpeerucred \
+       getpgid \
+       getpgrp \
+       _getpty \
+       getrlimit \
+       getttyent \
+       glob \
+       group_from_gid \
+       inet_aton \
+       inet_ntoa \
+       inet_ntop \
+       innetgr \
+       llabs \
+       login_getcapbool \
+       md5_crypt \
+       memmove \
+       memset_s \
+       mkdtemp \
+       ngetaddrinfo \
+       nsleep \
+       ogetaddrinfo \
+       openlog_r \
+       pledge \
+       poll \
+       prctl \
+       pstat \
+       readpassphrase \
+       reallocarray \
+       recvmsg \
+       rresvport_af \
+       sendmsg \
+       setdtablesize \
+       setegid \
+       setenv \
+       seteuid \
+       setgroupent \
+       setgroups \
+       setlinebuf \
+       setlogin \
+       setpassent\
+       setpcred \
+       setproctitle \
+       setregid \
+       setreuid \
+       setrlimit \
+       setsid \
+       setvbuf \
+       sigaction \
+       sigvec \
+       snprintf \
+       socketpair \
+       statfs \
+       statvfs \
+       strcasestr \
+       strdup \
+       strerror \
+       strlcat \
+       strlcpy \
+       strmode \
+       strnlen \
+       strnvis \
+       strptime \
+       strtonum \
+       strtoll \
+       strtoul \
+       strtoull \
+       swap32 \
+       sysconf \
+       tcgetpgrp \
+       timingsafe_bcmp \
+       truncate \
+       unsetenv \
+       updwtmpx \
+       user_from_uid \
+       usleep \
+       vasprintf \
+       vsnprintf \
+       waitpid \
+       warn \
 
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
 
-                       if test $ac_cv_lib_dl_dlopen = yes; then
-                               case "$LIBS" in
-                               *-ldl*)
-                                       # libdl already in LIBS
-                                       ;;
-                               *)
-                                       SSHDLIBS="$SSHDLIBS -ldl"
-                                       ;;
-                               esac
-                       fi
-               fi
 
+for ac_func in mblen mbtowc nl_langinfo wcwidth
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 fi
+done
 
 
-# Check for older PAM
-if test "x$PAM_MSG" = "xyes" ; then
-       # Check PAM strerror arguments (old PAM)
-       { echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5
-echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8 locale support" >&5
+$as_echo_n "checking for utf8 locale support... " >&6; }
+if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#include <locale.h>
 #include <stdlib.h>
-#if defined(HAVE_SECURITY_PAM_APPL_H)
-#include <security/pam_appl.h>
-#elif defined (HAVE_PAM_PAM_APPL_H)
-#include <pam/pam_appl.h>
-#endif
 
 int
 main ()
 {
 
-(void)pam_strerror((pam_handle_t *)NULL, -1);
+       char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
+       if (loc != NULL)
+               exit(0);
+       exit(1);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        TEST_SSH_UTF8=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OLD_PAM 1
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <ctype.h>
+int
+main ()
+{
+ return (isblank('a'));
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                       PAM_MSG="yes (old library)"
-
+$as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-case "$host" in
-*-*-cygwin*)
-       SSH_PRIVSEP_USER=CYGWIN_SSH_PRIVSEP_USER
-       ;;
-*)
-       SSH_PRIVSEP_USER=sshd
-       ;;
-esac
-
-# Check whether --with-privsep-user was given.
-if test "${with_privsep_user+set}" = set; then
-  withval=$with_privsep_user;
-               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
-                   test "x${withval}" != "xyes"; then
-                       SSH_PRIVSEP_USER=$withval
+disable_pkcs11=
+# Check whether --enable-pkcs11 was given.
+if test "${enable_pkcs11+set}" = set; then :
+  enableval=$enable_pkcs11;
+               if test "x$enableval" = "xno" ; then
+                       disable_pkcs11=1
                fi
 
 
 fi
 
-if test "x$SSH_PRIVSEP_USER" = "xCYGWIN_SSH_PRIVSEP_USER" ; then
-
-cat >>confdefs.h <<_ACEOF
-#define SSH_PRIVSEP_USER CYGWIN_SSH_PRIVSEP_USER
-_ACEOF
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
-_ACEOF
-
-fi
-
 
-if test "x$have_linux_no_new_privs" = "x1" ; then
-{ echo "$as_me:$LINENO: checking whether SECCOMP_MODE_FILTER is declared" >&5
-echo $ECHO_N "checking whether SECCOMP_MODE_FILTER is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_SECCOMP_MODE_FILTER+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# PKCS11 depends on OpenSSL.
+if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then
+       # PKCS#11 support requires dlopen() and co
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if ${ac_cv_search_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #include <sys/types.h>
-       #include <linux/seccomp.h>
-
-
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
 int
 main ()
 {
-#ifndef SECCOMP_MODE_FILTER
-  (void) SECCOMP_MODE_FILTER;
-#endif
-
+return dlopen ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_SECCOMP_MODE_FILTER=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_SECCOMP_MODE_FILTER=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_SECCOMP_MODE_FILTER" >&5
-echo "${ECHO_T}$ac_cv_have_decl_SECCOMP_MODE_FILTER" >&6; }
-if test $ac_cv_have_decl_SECCOMP_MODE_FILTER = yes; then
-  have_seccomp_filter=1
+for ac_lib in '' dl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_dlopen=$ac_res
 fi
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dlopen+:} false; then :
+  break
 fi
-if test "x$have_seccomp_filter" = "x1" ; then
-{ echo "$as_me:$LINENO: checking kernel for seccomp_filter support" >&5
-echo $ECHO_N "checking kernel for seccomp_filter support... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-               #include <errno.h>
-               #include <elf.h>
-               #include <linux/audit.h>
-               #include <linux/seccomp.h>
-               #include <stdlib.h>
-               #include <sys/prctl.h>
+done
+if ${ac_cv_search_dlopen+:} false; then :
 
-int
-main ()
-{
- int i = $seccomp_audit_arch;
-          errno = 0;
-          prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
-          exit(errno == EFAULT ? 0 : 1);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               # Disable seccomp filter as a target
-               have_seccomp_filter=0
-
-
+  ac_cv_search_dlopen=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-# Decide which sandbox style to use
-sandbox_arg=""
+$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
 
-# Check whether --with-sandbox was given.
-if test "${with_sandbox+set}" = set; then
-  withval=$with_sandbox;
-               if test "x$withval" = "xyes" ; then
-                       sandbox_arg=""
-               else
-                       sandbox_arg="$withval"
-               fi
 
+fi
 
 fi
 
+# IRIX has a const char return value for gai_strerror()
+for ac_func in gai_strerror
+do :
+  ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
+if test "x$ac_cv_func_gai_strerror" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GAI_STRERROR 1
+_ACEOF
 
-# Some platforms (seems to be the ones that have a kernel poll(2)-type
-# function with which they implement select(2)) use an extra file descriptor
-# when calling select(2), which means we can't use the rlimit sandbox.
-{ echo "$as_me:$LINENO: checking if select works with descriptor rlimit" >&5
-echo $ECHO_N "checking if select works with descriptor rlimit... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
-echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
+       $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#include <sys/resource.h>
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+const char *gai_strerror(int);
 
 int
 main ()
 {
 
-       struct rlimit rl_zero;
-       int fd, r;
-       fd_set fds;
-       struct timeval tv;
-
-       fd = open("/dev/null", O_RDONLY);
-       FD_ZERO(&fds);
-       FD_SET(fd, &fds);
-       rl_zero.rlim_cur = rl_zero.rlim_max = 0;
-       setrlimit(RLIMIT_FSIZE, &rl_zero);
-       setrlimit(RLIMIT_NOFILE, &rl_zero);
-       tv.tv_sec = 1;
-       tv.tv_usec = 0;
-       r = select(fd+1, &fds, NULL, NULL, &tv);
-       exit (r == -1 ? 1 : 0);
+       char *str;
+       str = gai_strerror(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-        select_works_with_rlimit=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-        select_works_with_rlimit=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
+$as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+done
 
-{ echo "$as_me:$LINENO: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
-echo $ECHO_N "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
-echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
+$as_echo_n "checking for library containing nanosleep... " >&6; }
+if ${ac_cv_search_nanosleep+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-#include <sys/resource.h>
-#include <errno.h>
-#include <stdlib.h>
-
-int
-main ()
-{
-
-       struct rlimit rl_zero;
-       int fd, r;
-       fd_set fds;
-
-       rl_zero.rlim_cur = rl_zero.rlim_max = 0;
-       r = setrlimit(RLIMIT_NOFILE, &rl_zero);
-       exit (r == -1 ? 1 : 0);
-
+char nanosleep ();
+int
+main ()
+{
+return nanosleep ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-        rlimit_nofile_zero_works=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+for ac_lib in '' rt posix4; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_nanosleep=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_nanosleep+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_nanosleep+:} false; then :
 
-( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-        rlimit_nofile_zero_works=no
+else
+  ac_cv_search_nanosleep=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
+$as_echo "$ac_cv_search_nanosleep" >&6; }
+ac_res=$ac_cv_search_nanosleep
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
 
+fi
 
-{ echo "$as_me:$LINENO: checking if setrlimit RLIMIT_FSIZE works" >&5
-echo $ECHO_N "checking if setrlimit RLIMIT_FSIZE works... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
-echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <stdlib.h>
-
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
 int
 main ()
 {
-
-               struct rlimit rl_zero;
-
-               rl_zero.rlim_cur = rl_zero.rlim_max = 0;
-               exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
-
+return clock_gettime ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_SKIP_RLIMIT_FSIZE 1
-_ACEOF
+for ac_lib in '' rt; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_clock_gettime+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
 
+else
+  ac_cv_search_clock_gettime=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
 
+fi
 
-if test "x$sandbox_arg" = "xsystrace" || \
-   ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
-       test "x$have_systr_policy_kill" != "x1" && \
-               { { echo "$as_me:$LINENO: error: systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" >&5
-echo "$as_me: error: systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" >&2;}
-   { (exit 1); exit 1; }; }
-       SANDBOX_STYLE="systrace"
 
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_SYSTRACE 1
+ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getrusage" = xyes; then :
+  for ac_func in getrusage
+do :
+  ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
+if test "x$ac_cv_func_getrusage" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETRUSAGE 1
 _ACEOF
 
-elif test "x$sandbox_arg" = "xdarwin" || \
-     ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
-       test "x$ac_cv_header_sandbox_h" = "xyes") ; then
-       test "x$ac_cv_func_sandbox_init" != "xyes" -o \
-            "x$ac_cv_header_sandbox_h" != "xyes" && \
-               { { echo "$as_me:$LINENO: error: Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" >&5
-echo "$as_me: error: Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" >&2;}
-   { (exit 1); exit 1; }; }
-       SANDBOX_STYLE="darwin"
+fi
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_DARWIN 1
-_ACEOF
+fi
 
-elif test "x$sandbox_arg" = "xseccomp_filter" || \
-     ( test -z "$sandbox_arg" && \
-       test "x$have_seccomp_filter" = "x1" && \
-       test "x$ac_cv_header_elf_h" = "xyes" && \
-       test "x$ac_cv_header_linux_audit_h" = "xyes" && \
-       test "x$ac_cv_header_linux_filter_h" = "xyes" && \
-       test "x$seccomp_audit_arch" != "x" && \
-       test "x$have_linux_no_new_privs" = "x1" && \
-       test "x$ac_cv_func_prctl" = "xyes" ) ; then
-       test "x$seccomp_audit_arch" = "x" && \
-               { { echo "$as_me:$LINENO: error: seccomp_filter sandbox not supported on $host" >&5
-echo "$as_me: error: seccomp_filter sandbox not supported on $host" >&2;}
-   { (exit 1); exit 1; }; }
-       test "x$have_linux_no_new_privs" != "x1" && \
-               { { echo "$as_me:$LINENO: error: seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" >&5
-echo "$as_me: error: seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" >&2;}
-   { (exit 1); exit 1; }; }
-       test "x$have_seccomp_filter" != "x1" && \
-               { { echo "$as_me:$LINENO: error: seccomp_filter sandbox requires seccomp headers" >&5
-echo "$as_me: error: seccomp_filter sandbox requires seccomp headers" >&2;}
-   { (exit 1); exit 1; }; }
-       test "x$ac_cv_func_prctl" != "xyes" && \
-               { { echo "$as_me:$LINENO: error: seccomp_filter sandbox requires prctl function" >&5
-echo "$as_me: error: seccomp_filter sandbox requires prctl function" >&2;}
-   { (exit 1); exit 1; }; }
-       SANDBOX_STYLE="seccomp_filter"
+ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
 
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_SECCOMP_FILTER 1
+"
+if test "x$ac_cv_have_decl_strsep" = xyes; then :
+  for ac_func in strsep
+do :
+  ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
+if test "x$ac_cv_func_strsep" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRSEP 1
 _ACEOF
 
-elif test "x$sandbox_arg" = "xcapsicum" || \
-     ( test -z "$sandbox_arg" && \
-       test "x$ac_cv_header_sys_capability_h" = "xyes" && \
-       test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then
-       test "x$ac_cv_header_sys_capability_h" != "xyes" && \
-               { { echo "$as_me:$LINENO: error: capsicum sandbox requires sys/capability.h header" >&5
-echo "$as_me: error: capsicum sandbox requires sys/capability.h header" >&2;}
-   { (exit 1); exit 1; }; }
-       test "x$ac_cv_func_cap_rights_limit" != "xyes" && \
-               { { echo "$as_me:$LINENO: error: capsicum sandbox requires cap_rights_limit function" >&5
-echo "$as_me: error: capsicum sandbox requires cap_rights_limit function" >&2;}
-   { (exit 1); exit 1; }; }
-       SANDBOX_STYLE="capsicum"
+fi
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_CAPSICUM 1
-_ACEOF
+fi
 
-elif test "x$sandbox_arg" = "xrlimit" || \
-     ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
-       test "x$select_works_with_rlimit" = "xyes" && \
-       test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
-       test "x$ac_cv_func_setrlimit" != "xyes" && \
-               { { echo "$as_me:$LINENO: error: rlimit sandbox requires setrlimit function" >&5
-echo "$as_me: error: rlimit sandbox requires setrlimit function" >&2;}
-   { (exit 1); exit 1; }; }
-       test "x$select_works_with_rlimit" != "xyes" && \
-               { { echo "$as_me:$LINENO: error: rlimit sandbox requires select to work with rlimit" >&5
-echo "$as_me: error: rlimit sandbox requires select to work with rlimit" >&2;}
-   { (exit 1); exit 1; }; }
-       SANDBOX_STYLE="rlimit"
 
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_RLIMIT 1
-_ACEOF
+ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
 
-elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
-     test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
-       SANDBOX_STYLE="none"
+"
+if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
+  $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define SANDBOX_NULL 1
+else
+  for ac_func in tcsendbreak
+do :
+  ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
+if test "x$ac_cv_func_tcsendbreak" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TCSENDBREAK 1
 _ACEOF
 
-else
-       { { echo "$as_me:$LINENO: error: unsupported --with-sandbox" >&5
-echo "$as_me: error: unsupported --with-sandbox" >&2;}
-   { (exit 1); exit 1; }; }
 fi
+done
 
-# Cheap hack to ensure NEWS-OS libraries are arranged right.
-if test ! -z "$SONY" ; then
-  LIBS="$LIBS -liberty";
 fi
 
-# Check for  long long datatypes
-{ echo "$as_me:$LINENO: checking for long long" >&5
-echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
-if test "${ac_cv_type_long_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-typedef long long ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_long_long=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_type_long_long=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
+"
+if test "x$ac_cv_have_decl_h_errno" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
-echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
-if test $ac_cv_type_long_long = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_LONG 1
+#define HAVE_DECL_H_ERRNO $ac_have_decl
 _ACEOF
 
 
-fi
-{ echo "$as_me:$LINENO: checking for unsigned long long" >&5
-echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6; }
-if test "${ac_cv_type_unsigned_long_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-typedef unsigned long long ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_unsigned_long_long=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_type_unsigned_long_long=no
-fi
+ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
+#include <sys/types.h>
+#include <sys/socket.h>
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+"
+if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
-echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6; }
-if test $ac_cv_type_unsigned_long_long = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_UNSIGNED_LONG_LONG 1
+#define HAVE_DECL_SHUT_RD $ac_have_decl
 _ACEOF
 
 
-fi
-{ echo "$as_me:$LINENO: checking for long double" >&5
-echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
-if test "${ac_cv_type_long_double+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+"
+if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
+  ac_have_decl=1
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-typedef long double ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_O_NONBLOCK $ac_have_decl
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_long_double=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_long_double=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
+
+"
+if test "x$ac_cv_have_decl_writev" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
-echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
-if test $ac_cv_type_long_double = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_DOUBLE 1
+#define HAVE_DECL_WRITEV $ac_have_decl
 _ACEOF
 
 
-fi
-
+ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
+#include <sys/param.h>
 
-# Check datatype sizes
-{ echo "$as_me:$LINENO: checking for short int" >&5
-echo $ECHO_N "checking for short int... $ECHO_C" >&6; }
-if test "${ac_cv_type_short_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+"
+if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
+  ac_have_decl=1
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-typedef short int ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MAXSYMLINKS $ac_have_decl
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_short_int=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_short_int=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5
-echo "${ECHO_T}$ac_cv_type_short_int" >&6; }
+ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
+#include <stddef.h>
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of short int" >&5
-echo $ECHO_N "checking size of short int... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_short_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+"
+if test "x$ac_cv_have_decl_offsetof" = xyes; then :
+  ac_have_decl=1
 else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef short int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
+  ac_have_decl=0
+fi
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_OFFSETOF $ac_have_decl
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef short int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo=`expr $ac_mid + 1`
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
+# extra bits for select(2)
+ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
+#include <sys/param.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
+"
+if test "x$ac_cv_have_decl_howmany" = xyes; then :
+  ac_have_decl=1
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_have_decl=0
+fi
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_HOWMANY $ac_have_decl
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef short int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
+ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
+#include <sys/param.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef short int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
+"
+if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_NFDBITS $ac_have_decl
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
-fi
+ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
+#include <sys/param.h>
+#include <sys/types.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+"
+if test "x$ac_cv_type_fd_mask" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FD_MASK 1
+_ACEOF
 
-       ac_lo= ac_hi=
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef short int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
+for ac_func in setresuid
+do :
+  ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
+if test "x$ac_cv_func_setresuid" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SETRESUID 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
+$as_echo_n "checking if setresuid seems to work... " >&6; }
+       if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_short_int=$ac_lo;;
-'') if test "$ac_cv_type_short_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_short_int=0
-   fi ;;
-esac
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef short int ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
+
 #include <stdlib.h>
+#include <errno.h>
+
 int
 main ()
 {
 
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
+       errno=0;
+       setresuid(0,0,0);
+       if (errno==ENOSYS)
+               exit(1);
+       else
+               exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_short_int=`cat conftest.val`
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-if test "$ac_cv_type_short_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (short int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_short_int=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+$as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
+$as_echo "not implemented" >&6; }
 fi
-rm -f conftest.val
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6; }
 
 
+fi
+done
+
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
+for ac_func in setresgid
+do :
+  ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
+if test "x$ac_cv_func_setresgid" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SETRESGID 1
 _ACEOF
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
+$as_echo_n "checking if setresgid seems to work... " >&6; }
+       if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
 
-{ echo "$as_me:$LINENO: checking for int" >&5
-echo $ECHO_N "checking for int... $ECHO_C" >&6; }
-if test "${ac_cv_type_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-typedef int ac__type_new_;
+
+#include <stdlib.h>
+#include <errno.h>
+
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+
+       errno=0;
+       setresgid(0,0,0);
+       if (errno==ENOSYS)
+               exit(1);
+       else
+               exit(0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_int=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_int=no
+$as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
+$as_echo "not implemented" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
-echo "${ECHO_T}$ac_cv_type_int" >&6; }
+done
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of int" >&5
-echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+for ac_func in realpath
+do :
+  ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
+if test "x$ac_cv_func_realpath" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_REALPATH 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if realpath works with non-existent files" >&5
+$as_echo_n "checking if realpath works with non-existent files... " >&6; }
+       if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming working" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming working" >&2;}
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef int ac__type_sizeof_;
+
+#include <limits.h>
+#include <stdlib.h>
+#include <errno.h>
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
+
+               char buf[PATH_MAX];
+               if (realpath("/opensshnonexistentfilename1234", buf) == NULL)
+                       if (errno == ENOENT)
+                               exit(1);
+               exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo=`expr $ac_mid + 1`
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid + 1`
+$as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
+fi
+done
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
+for ac_func in gettimeofday time
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+for ac_func in endutent getutent getutid getutline pututline setutent
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-       ac_lo= ac_hi=
 fi
+done
+
+for ac_func in utmpname
+do :
+  ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
+if test "x$ac_cv_func_utmpname" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UTMPNAME 1
+_ACEOF
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
+fi
+done
+
+for ac_func in setutxdb setutxent utmpxname
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+for ac_func in getlastlogxbyname
+do :
+  ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
+if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETLASTLOGXBYNAME 1
+_ACEOF
+
+fi
 done
-case $ac_lo in
-?*) ac_cv_sizeof_int=$ac_lo;;
-'') if test "$ac_cv_type_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi ;;
-esac
+
+
+ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
+if test "x$ac_cv_func_daemon" = xyes; then :
+
+$as_echo "#define HAVE_DAEMON 1" >>confdefs.h
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
+$as_echo_n "checking for daemon in -lbsd... " >&6; }
+if ${ac_cv_lib_bsd_daemon+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef int ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
-#include <stdlib.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char daemon ();
 int
 main ()
 {
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
-
+return daemon ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_int=`cat conftest.val`
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bsd_daemon=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi
+  ac_cv_lib_bsd_daemon=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-rm -f conftest.val
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
+$as_echo "$ac_cv_lib_bsd_daemon" >&6; }
+if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
+  LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
+
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
 
 
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
 
+ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = xyes; then :
+
+$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
 
-{ echo "$as_me:$LINENO: checking for long int" >&5
-echo $ECHO_N "checking for long int... $ECHO_C" >&6; }
-if test "${ac_cv_type_long_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
+$as_echo_n "checking for getpagesize in -lucb... " >&6; }
+if ${ac_cv_lib_ucb_getpagesize+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lucb  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-typedef long int ac__type_new_;
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getpagesize ();
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+return getpagesize ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_long_int=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ucb_getpagesize=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_lib_ucb_getpagesize=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
+$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
+if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
+  LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
 
-       ac_cv_type_long_int=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5
-echo "${ECHO_T}$ac_cv_type_long_int" >&6; }
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of long int" >&5
-echo $ECHO_N "checking size of long int... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_long_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+# Check for broken snprintf
+if test "x$ac_cv_func_snprintf" = "xyes" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
+$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
+       if test "$cross_compiling" = yes; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
+$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
+
 else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long int ac__type_sizeof_;
+ #include <stdio.h>
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef long int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
+       char b[5];
+       snprintf(b,5,"123456789");
+       exit(b[4]!='\0');
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo=`expr $ac_mid + 1`
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid + 1`
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
+$as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+# We depend on vsnprintf returning the right thing on overflow: the
+# number of characters it tried to create (as per SUSv3)
+if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
+$as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
+       if test "$cross_compiling" = yes; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
+$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long int ac__type_sizeof_;
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+int x_snprintf(char *str, size_t count, const char *fmt, ...)
+{
+       size_t ret;
+       va_list ap;
+
+       va_start(ap, fmt);
+       ret = vsnprintf(str, count, fmt, ap);
+       va_end(ap);
+       return ret;
+}
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
+
+char x[1];
+if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
+       return 1;
+if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
+       return 1;
+return 0;
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
+$as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+
+# On systems where [v]snprintf is broken, but is declared in stdio,
+# check that the fmt argument is const char * or just char *.
+# This is only useful for when BROKEN_SNPRINTF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
+$as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long int ac__type_sizeof_;
+
+#include <stdio.h>
+int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
+
+       snprintf(0, 0, 0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
-fi
+$as_echo "#define SNPRINTF_CONST const" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
 
-       ac_lo= ac_hi=
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+# Check for missing getpeereid (or equiv) support
+NO_PEERCHECK=""
+if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
+$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long int ac__type_sizeof_;
+
+#include <sys/types.h>
+#include <sys/socket.h>
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
+int i = SO_PEERCRED;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
+
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               NO_PEERCHECK=1
 
-       ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long_int=$ac_lo;;
-'') if test "$ac_cv_type_long_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_int=0
-   fi ;;
-esac
+fi
+
+if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
+$as_echo_n "checking for (overly) strict mkstemp... " >&6; }
+if test "$cross_compiling" = yes; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+               $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
+
+
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long int ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
+
 #include <stdlib.h>
+
 int
 main ()
 {
 
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
+       char template[]="conftest.mkstemp-test";
+       if (mkstemp(template) == -1)
+               exit(1);
+       unlink(template);
+       exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long_int=`cat conftest.val`
+if ac_fn_c_try_run "$LINENO"; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-if test "$ac_cv_type_long_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_int=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
+
+
 fi
-rm -f conftest.val
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; }
 
+fi
 
+if test ! -z "$check_for_openpty_ctty_bug"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
+$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
+       if test "$cross_compiling" = yes; then :
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
-_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
+$as_echo "cross-compiling, assuming yes" >&6; }
 
 
-{ echo "$as_me:$LINENO: checking for long long int" >&5
-echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
-if test "${ac_cv_type_long_long_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-typedef long long int ac__type_new_;
+
+#include <stdio.h>
+#include <sys/fcntl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+
+       pid_t pid;
+       int fd, ptyfd, ttyfd, status;
+
+       pid = fork();
+       if (pid < 0) {          /* failed */
+               exit(1);
+       } else if (pid > 0) {   /* parent */
+               waitpid(pid, &status, 0);
+               if (WIFEXITED(status))
+                       exit(WEXITSTATUS(status));
+               else
+                       exit(2);
+       } else {                /* child */
+               close(0); close(1); close(2);
+               setsid();
+               openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
+               fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+               if (fd >= 0)
+                       exit(3);        /* Acquired ctty: broken */
+               else
+                       exit(0);        /* Did not acquire ctty: OK */
+       }
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_long_long_int=yes
+if ac_fn_c_try_run "$LINENO"; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_long_long_int=no
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
-echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of long long int" >&5
-echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_long_long_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
+    test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
+$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
+       if test "$cross_compiling" = yes; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
+$as_echo "cross-compiling, assuming yes" >&6; }
+
+
 else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long long int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef long long int ac__type_sizeof_;
+#include <stdio.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <errno.h>
+#include <netinet/in.h>
+
+#define TEST_PORT "2222"
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
+
+       int err, sock;
+       struct addrinfo *gai_ai, *ai, hints;
+       char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
+
+       memset(&hints, 0, sizeof(hints));
+       hints.ai_family = PF_UNSPEC;
+       hints.ai_socktype = SOCK_STREAM;
+       hints.ai_flags = AI_PASSIVE;
+
+       err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
+       if (err != 0) {
+               fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
+               exit(1);
+       }
+
+       for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
+               if (ai->ai_family != AF_INET6)
+                       continue;
+
+               err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
+                   sizeof(ntop), strport, sizeof(strport),
+                   NI_NUMERICHOST|NI_NUMERICSERV);
+
+               if (err != 0) {
+                       if (err == EAI_SYSTEM)
+                               perror("getnameinfo EAI_SYSTEM");
+                       else
+                               fprintf(stderr, "getnameinfo failed: %s\n",
+                                   gai_strerror(err));
+                       exit(2);
+               }
+
+               sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+               if (sock < 0)
+                       perror("socket");
+               if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
+                       if (errno == EBADF)
+                               exit(3);
+               }
+       }
+       exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
+if ac_fn_c_try_run "$LINENO"; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo=`expr $ac_mid + 1`
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid + 1`
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-   typedef long long int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
+if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
+    test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
+$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
+       if test "$cross_compiling" = yes; then :
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
+$as_echo "cross-compiling, assuming no" >&6; }
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long long int ac__type_sizeof_;
+
+#include <stdio.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <errno.h>
+#include <netinet/in.h>
+
+#define TEST_PORT "2222"
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
+
+       int err, sock;
+       struct addrinfo *gai_ai, *ai, hints;
+       char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
+
+       memset(&hints, 0, sizeof(hints));
+       hints.ai_family = PF_UNSPEC;
+       hints.ai_socktype = SOCK_STREAM;
+       hints.ai_flags = AI_PASSIVE;
+
+       err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
+       if (err != 0) {
+               fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
+               exit(1);
+       }
+
+       for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
+               if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
+                       continue;
+
+               err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
+                   sizeof(ntop), strport, sizeof(strport),
+                   NI_NUMERICHOST|NI_NUMERICSERV);
+
+               if (ai->ai_family == AF_INET && err != 0) {
+                       perror("getnameinfo");
+                       exit(2);
+               }
+       }
+       exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
+if ac_fn_c_try_run "$LINENO"; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
+
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
 
-       ac_lo= ac_hi=
+if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "AI_NUMERICSERV" "ac_cv_have_decl_AI_NUMERICSERV" "#include <sys/types.h>
+            #include <sys/socket.h>
+            #include <netdb.h>
+"
+if test "x$ac_cv_have_decl_AI_NUMERICSERV" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_AI_NUMERICSERV $ac_have_decl
+_ACEOF
+
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if test "x$check_for_conflicting_getspnam" = "x1"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
+$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long long int ac__type_sizeof_;
+ #include <shadow.h>
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
+ exit(0);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
+if ac_fn_c_try_compile "$LINENO"; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
+
+
 
+fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long_long_int=$ac_lo;;
-'') if test "$ac_cv_type_long_long_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long long int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_long_int=0
-   fi ;;
-esac
+fi
+
+if test "x$ac_cv_func_strnvis" = "xyes"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnvis" >&5
+$as_echo_n "checking for working strnvis... " >&6; }
+       if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming broken" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming broken" >&2;}
+
+$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
+
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-   typedef long long int ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
+
+#include <signal.h>
 #include <stdlib.h>
+#include <string.h>
+#include <vis.h>
+static void sighandler(int sig) { _exit(1); }
+
 int
 main ()
 {
 
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-       return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
+       char dst[16];
+
+       signal(SIGSEGV, sighandler);
+       if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
+               exit(0);
+       exit(1)
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long_long_int=`cat conftest.val`
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
 
-( exit $ac_status )
-if test "$ac_cv_type_long_long_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long long int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_long_int=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.val
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; }
-
 
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
+$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
+if ${ac_cv_func_getpgrp_void+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # Use it with a single arg.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+getpgrp (0);
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_func_getpgrp_void=no
+else
+  ac_cv_func_getpgrp_void=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
+$as_echo "$ac_cv_func_getpgrp_void" >&6; }
+if test $ac_cv_func_getpgrp_void = yes; then
 
+$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
 
-# Sanity check long long for some platforms (AIX)
-if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
-       ac_cv_sizeof_long_long_int=0
 fi
 
-# compute LLONG_MIN and LLONG_MAX if we don't know them.
-if test -z "$have_llong_max"; then
-       { echo "$as_me:$LINENO: checking for max value of long long" >&5
-echo $ECHO_N "checking for max value of long long... $ECHO_C" >&6; }
-       if test "$cross_compiling" = yes; then
-
-                       { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
-echo "$as_me: WARNING: cross compiling: not checking" >&2;}
 
+# Search for OpenSSL
+saved_CPPFLAGS="$CPPFLAGS"
+saved_LDFLAGS="$LDFLAGS"
 
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Check whether --with-ssl-dir was given.
+if test "${with_ssl_dir+set}" = set; then :
+  withval=$with_ssl_dir;
+               if test "x$openssl" = "xno" ; then
+                       as_fn_error $? "cannot use --with-ssl-dir when OpenSSL disabled" "$LINENO" 5
+               fi
+               if test "x$withval" != "xno" ; then
+                       case "$withval" in
+                               # Relative paths
+                               ./*|../*)       withval="`pwd`/$withval"
+                       esac
+                       if test -d "$withval/lib"; then
+                               if test -n "${need_dash_r}"; then
+                                       LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+                               else
+                                       LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+                               fi
+                       elif test -d "$withval/lib64"; then
+                               if test -n "${need_dash_r}"; then
+                                       LDFLAGS="-L${withval}/lib64 -R${withval}/lib64 ${LDFLAGS}"
+                               else
+                                       LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
+                               fi
+                       else
+                               if test -n "${need_dash_r}"; then
+                                       LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
+                               else
+                                       LDFLAGS="-L${withval} ${LDFLAGS}"
+                               fi
+                       fi
+                       if test -d "$withval/include"; then
+                               CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
+                       else
+                               CPPFLAGS="-I${withval} ${CPPFLAGS}"
+                       fi
+               fi
 
-#include <stdio.h>
-/* Why is this so damn hard? */
-#ifdef __GNUC__
-# undef __GNUC__
-#endif
-#define __USE_ISOC99
-#include <limits.h>
-#define DATA "conftest.llminmax"
-#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
 
-/*
- * printf in libc on some platforms (eg old Tru64) does not understand %lld so
- * we do this the hard way.
- */
-static int
-fprint_ll(FILE *f, long long n)
-{
-       unsigned int i;
-       int l[sizeof(long long) * 8];
+fi
 
-       if (n < 0)
-               if (fprintf(f, "-") < 0)
-                       return -1;
-       for (i = 0; n != 0; i++) {
-               l[i] = my_abs(n % 10);
-               n /= 10;
-       }
-       do {
-               if (fprintf(f, "%d", l[--i]) < 0)
-                       return -1;
-       } while (i != 0);
-       if (fprintf(f, " ") < 0)
-               return -1;
-       return 0;
-}
 
-int
-main ()
-{
 
-       FILE *f;
-       long long i, llmin, llmax = 0;
+# Check whether --with-openssl-header-check was given.
+if test "${with_openssl_header_check+set}" = set; then :
+  withval=$with_openssl_header_check;
+               if test "x$withval" = "xno" ; then
+                       openssl_check_nonfatal=1
+               fi
 
-       if((f = fopen(DATA,"w")) == NULL)
-               exit(1);
 
-#if defined(LLONG_MIN) && defined(LLONG_MAX)
-       fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
-       llmin = LLONG_MIN;
-       llmax = LLONG_MAX;
-#else
-       fprintf(stderr, "Calculating  LLONG_MIN and LLONG_MAX\n");
-       /* This will work on one's complement and two's complement */
-       for (i = 1; i > llmax; i <<= 1, i++)
-               llmax = i;
-       llmin = llmax + 1LL;    /* wrap */
-#endif
+fi
 
-       /* Sanity check */
-       if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
-           || llmax - 1 > llmax || llmin == llmax || llmin == 0
-           || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
-               fprintf(f, "unknown unknown\n");
-               exit(2);
-       }
 
-       if (fprint_ll(f, llmin) < 0)
-               exit(3);
-       if (fprint_ll(f, llmax) < 0)
-               exit(4);
-       if (fclose(f) < 0)
-               exit(5);
-       exit(0);
+openssl_engine=no
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+# Check whether --with-ssl-engine was given.
+if test "${with_ssl_engine+set}" = set; then :
+  withval=$with_ssl_engine;
+               if test "x$withval" != "xno" ; then
+                       if test "x$openssl" = "xno" ; then
+                               as_fn_error $? "cannot use --with-ssl-engine when OpenSSL disabled" "$LINENO" 5
+                       fi
+                       openssl_engine=yes
+               fi
 
-                       llong_min=`$AWK '{print $1}' conftest.llminmax`
-                       llong_max=`$AWK '{print $2}' conftest.llminmax`
 
-                       { echo "$as_me:$LINENO: result: $llong_max" >&5
-echo "${ECHO_T}$llong_max" >&6; }
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define LLONG_MAX ${llong_max}LL
-_ACEOF
 
-                       { echo "$as_me:$LINENO: checking for min value of long long" >&5
-echo $ECHO_N "checking for min value of long long... $ECHO_C" >&6; }
-                       { echo "$as_me:$LINENO: result: $llong_min" >&5
-echo "${ECHO_T}$llong_min" >&6; }
+if test "x$openssl" = "xyes" ; then
+       LIBS="-lcrypto $LIBS"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-cat >>confdefs.h <<_ACEOF
-#define LLONG_MIN ${llong_min}LL
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char RAND_add ();
+int
+main ()
+{
+return RAND_add ();
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
+$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
 
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
-                       { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
+                                               if test -n "${need_dash_r}"; then
+                               LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
+                       else
+                               LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
+                       fi
+                       CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
+                       ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
 
+else
+  as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
 fi
 
 
-# More checks for data types
-{ echo "$as_me:$LINENO: checking for u_int type" >&5
-echo $ECHO_N "checking for u_int type... $ECHO_C" >&6; }
-if test "${ac_cv_have_u_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/types.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char RAND_add ();
 int
 main ()
 {
- u_int a; a = 1;
+return RAND_add ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_u_int="yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        ac_cv_have_u_int="no"
+                                       as_fn_error $? "*** Can't find recent OpenSSL libcrypto (see config.log for details) ***" "$LINENO" 5
+
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5
-echo "${ECHO_T}$ac_cv_have_u_int" >&6; }
-if test "x$ac_cv_have_u_int" = "xyes" ; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INT 1
-_ACEOF
+       # Determine OpenSSL header version
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
+$as_echo_n "checking OpenSSL header version... " >&6; }
+       if test "$cross_compiling" = yes; then :
 
-       have_u_int=1
-fi
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
 
-{ echo "$as_me:$LINENO: checking for intXX_t types" >&5
-echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6; }
-if test "${ac_cv_have_intxx_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/types.h>
+
+       #include <stdlib.h>
+       #include <stdio.h>
+       #include <string.h>
+       #include <openssl/opensslv.h>
+       #define DATA "conftest.sslincver"
+
 int
 main ()
 {
- int8_t a; int16_t b; int32_t c; a = b = c = 1;
+
+               FILE *fd;
+               int rc;
+
+               fd = fopen(DATA,"w");
+               if(fd == NULL)
+                       exit(1);
+
+               if ((rc = fprintf(fd, "%08lx (%s)\n",
+                   (unsigned long)OPENSSL_VERSION_NUMBER,
+                    OPENSSL_VERSION_TEXT)) < 0)
+                       exit(1);
+
+               exit(0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_intxx_t="yes"
+if ac_fn_c_try_run "$LINENO"; then :
+
+                       ssl_header_ver=`cat conftest.sslincver`
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
+$as_echo "$ssl_header_ver" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        ac_cv_have_intxx_t="no"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+                       as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
 
 fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5
-echo "${ECHO_T}$ac_cv_have_intxx_t" >&6; }
-if test "x$ac_cv_have_intxx_t" = "xyes" ; then
+       # Determine OpenSSL library version
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
+$as_echo_n "checking OpenSSL library version... " >&6; }
+       if test "$cross_compiling" = yes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INTXX_T 1
-_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
 
-       have_intxx_t=1
-fi
 
-if (test -z "$have_intxx_t" && \
-          test "x$ac_cv_header_stdint_h" = "xyes")
-then
-    { echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5
-echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <stdint.h>
+
+       #include <stdio.h>
+       #include <string.h>
+       #include <openssl/opensslv.h>
+       #include <openssl/crypto.h>
+       #define DATA "conftest.ssllibver"
+
 int
 main ()
 {
- int8_t a; int16_t b; int32_t c; a = b = c = 1;
+
+               FILE *fd;
+               int rc;
+
+               fd = fopen(DATA,"w");
+               if(fd == NULL)
+                       exit(1);
+
+               if ((rc = fprintf(fd, "%08lx (%s)\n", (unsigned long)SSLeay(),
+                   SSLeay_version(SSLEAY_VERSION))) < 0)
+                       exit(1);
+
+               exit(0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_INTXX_T 1
-_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+                       ssl_library_ver=`cat conftest.ssllibver`
+                       # Check version is supported.
+                       case "$ssl_library_ver" in
+                               10000*|0*)
+                                       as_fn_error $? "OpenSSL >= 1.0.1 required (have \"$ssl_library_ver\")" "$LINENO" 5
+                                       ;;
+                               *) ;;
+                       esac
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
+$as_echo "$ssl_library_ver" >&6; }
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+                       as_fn_error $? "OpenSSL library not found." "$LINENO" 5
 
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-{ echo "$as_me:$LINENO: checking for int64_t type" >&5
-echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6; }
-if test "${ac_cv_have_int64_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       # Sanity check OpenSSL headers
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
+$as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
+       if test "$cross_compiling" = yes; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#include <sys/socket.h>
-#ifdef HAVE_SYS_BITYPES_H
-# include <sys/bitypes.h>
-#endif
+       #include <string.h>
+       #include <openssl/opensslv.h>
+       #include <openssl/crypto.h>
 
 int
 main ()
 {
 
-int64_t a; a = 1;
+               exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_int64_t="yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_run "$LINENO"; then :
 
-        ac_cv_have_int64_t="no"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+else
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       if test "x$openssl_check_nonfatal" = "x"; then
+                               as_fn_error $? "Your OpenSSL headers do not match your
+       library. Check config.log for details.
+       If you are sure your installation is consistent, you can disable the check
+       by running \"./configure --without-openssl-header-check\".
+       Also see contrib/findssl.sh for help identifying header/library mismatches.
+       " "$LINENO" 5
+                       else
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
+       library. Check config.log for details.
+       Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
+$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
+       library. Check config.log for details.
+       Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
+                       fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5
-echo "${ECHO_T}$ac_cv_have_int64_t" >&6; }
-if test "x$ac_cv_have_int64_t" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INT64_T 1
-_ACEOF
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-{ echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
-echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6; }
-if test "${ac_cv_have_u_intxx_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
+$as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/types.h>
+ #include <openssl/evp.h>
 int
 main ()
 {
u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
SSLeay_add_all_algorithms();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_u_intxx_t="yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_u_intxx_t="no"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5
-echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6; }
-if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
+if ac_fn_c_try_link "$LINENO"; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INTXX_T 1
-_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       have_u_intxx_t=1
-fi
+else
 
-if test -z "$have_u_intxx_t" ; then
-    { echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5
-echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       saved_LIBS="$LIBS"
+                       LIBS="$LIBS -ldl"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
+$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/socket.h>
+ #include <openssl/evp.h>
 int
 main ()
 {
u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
SSLeay_add_all_algorithms();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INTXX_T 1
-_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                                       LIBS="$saved_LIBS"
+
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-{ echo "$as_me:$LINENO: checking for u_int64_t types" >&5
-echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6; }
-if test "${ac_cv_have_u_int64_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+       for ac_func in  \
+               BN_is_prime_ex \
+               DSA_generate_parameters_ex \
+               EVP_DigestInit_ex \
+               EVP_DigestFinal_ex \
+               EVP_MD_CTX_init \
+               EVP_MD_CTX_cleanup \
+               EVP_MD_CTX_copy_ex \
+               HMAC_CTX_init \
+               RSA_generate_key_ex \
+               RSA_get_default_method \
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+fi
+done
+
+
+       if test "x$openssl_engine" = "xyes" ; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
+$as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/types.h>
+
+       #include <openssl/engine.h>
+
 int
 main ()
 {
- u_int64_t a; a = 1;
+
+                               ENGINE_load_builtin_engines();
+                               ENGINE_register_all_complete();
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_u_int64_t="yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-        ac_cv_have_u_int64_t="no"
+$as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+   as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5
-echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6; }
-if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INT64_T 1
-_ACEOF
+       # Check for OpenSSL without EVP_aes_{192,256}_cbc
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
+$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-       have_u_int64_t=1
-fi
+       #include <string.h>
+       #include <openssl/evp.h>
 
-if (test -z "$have_u_int64_t" && \
-          test "x$ac_cv_header_sys_bitypes_h" = "xyes")
-then
-    { echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5
-echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <sys/bitypes.h>
 int
 main ()
 {
- u_int64_t a; a = 1
+
+               exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INT64_T 1
-_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+$as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
-if test -z "$have_u_intxx_t" ; then
-       { echo "$as_me:$LINENO: checking for uintXX_t types" >&5
-echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6; }
-if test "${ac_cv_have_uintxx_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+       # Check for OpenSSL with EVP_aes_*ctr
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
+$as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
+       #include <string.h>
+       #include <openssl/evp.h>
 
 int
 main ()
 {
 
-       uint8_t a;
-       uint16_t b;
-       uint32_t c;
-       a = b = c = 1;
+               exit(EVP_aes_128_ctr() == NULL ||
+                   EVP_aes_192_cbc() == NULL ||
+                   EVP_aes_256_cbc() == NULL);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_uintxx_t="yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_link "$LINENO"; then :
 
-        ac_cv_have_uintxx_t="no"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+$as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5
-echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6; }
-       if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
+else
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTXX_T 1
-_ACEOF
 
-       fi
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-if (test -z "$have_uintxx_t" && \
-          test "x$ac_cv_header_stdint_h" = "xyes")
-then
-    { echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5
-echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       # Check for OpenSSL with EVP_aes_*gcm
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
+$as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <stdint.h>
+
+       #include <string.h>
+       #include <openssl/evp.h>
+
 int
 main ()
 {
- uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
+
+               exit(EVP_aes_128_gcm() == NULL ||
+                   EVP_aes_256_gcm() == NULL ||
+                   EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
+                   EVP_CTRL_GCM_IV_GEN == 0 ||
+                   EVP_CTRL_GCM_SET_TAG == 0 ||
+                   EVP_CTRL_GCM_GET_TAG == 0 ||
+                   EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_link "$LINENO"; then :
 
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTXX_T 1
-_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       unsupported_algorithms="$unsupported_cipers \
+                          aes128-gcm@openssh.com \
+                          aes256-gcm@openssh.com"
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-if (test -z "$have_uintxx_t" && \
-          test "x$ac_cv_header_inttypes_h" = "xyes")
-then
-    { echo "$as_me:$LINENO: checking for uintXX_t types in inttypes.h" >&5
-echo $ECHO_N "checking for uintXX_t types in inttypes.h... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing EVP_CIPHER_CTX_ctrl" >&5
+$as_echo_n "checking for library containing EVP_CIPHER_CTX_ctrl... " >&6; }
+if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <inttypes.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char EVP_CIPHER_CTX_ctrl ();
 int
 main ()
 {
- uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
+return EVP_CIPHER_CTX_ctrl ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTXX_T 1
-_ACEOF
-
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+for ac_lib in '' crypto; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_EVP_CIPHER_CTX_ctrl=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_search_EVP_CIPHER_CTX_ctrl=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_CIPHER_CTX_ctrl" >&5
+$as_echo "$ac_cv_search_EVP_CIPHER_CTX_ctrl" >&6; }
+ac_res=$ac_cv_search_EVP_CIPHER_CTX_ctrl
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+$as_echo "#define HAVE_EVP_CIPHER_CTX_CTRL 1" >>confdefs.h
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
-if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
-          test "x$ac_cv_header_sys_bitypes_h" = "xyes")
-then
-       { echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
-echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
+$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/bitypes.h>
+       #include <string.h>
+       #include <openssl/evp.h>
 
 int
 main ()
 {
 
-                       int8_t a; int16_t b; int32_t c;
-                       u_int8_t e; u_int16_t f; u_int32_t g;
-                       a = b = c = e = f = g = 1;
+               if(EVP_DigestUpdate(NULL, NULL,0))
+                       exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_link "$LINENO"; then :
 
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_INTXX_T 1
-_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-                       cat >>confdefs.h <<\_ACEOF
-#define HAVE_INTXX_T 1
-_ACEOF
+else
 
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
 
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
 
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-
-{ echo "$as_me:$LINENO: checking for u_char" >&5
-echo $ECHO_N "checking for u_char... $ECHO_C" >&6; }
-if test "${ac_cv_have_u_char+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
+       # because the system crypt() is more featureful.
+       if test "x$check_for_libcrypt_before" = "x1"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
+$as_echo_n "checking for crypt in -lcrypt... " >&6; }
+if ${ac_cv_lib_crypt_crypt+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/types.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char crypt ();
 int
 main ()
 {
- u_char foo; foo = 125;
+return crypt ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_u_char="yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_crypt_crypt=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_u_char="no"
-
+  ac_cv_lib_crypt_crypt=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5
-echo "${ECHO_T}$ac_cv_have_u_char" >&6; }
-if test "x$ac_cv_have_u_char" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_U_CHAR 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
+$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
+if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPT 1
 _ACEOF
 
+  LIBS="-lcrypt $LIBS"
+
 fi
 
-{ echo "$as_me:$LINENO: checking for intmax_t" >&5
-echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_intmax_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       fi
+
+       # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
+       # version in OpenSSL.
+       if test "x$check_for_libcrypt_later" = "x1"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
+$as_echo_n "checking for crypt in -lcrypt... " >&6; }
+if ${ac_cv_lib_crypt_crypt+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <stdint.h>
-
-
-typedef intmax_t ac__type_new_;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char crypt ();
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+return crypt ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_intmax_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_crypt_crypt=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_type_intmax_t=no
+  ac_cv_lib_crypt_crypt=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
+$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
+if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
+  LIBS="$LIBS -lcrypt"
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5
-echo "${ECHO_T}$ac_cv_type_intmax_t" >&6; }
-if test $ac_cv_type_intmax_t = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INTMAX_T 1
+       fi
+       for ac_func in crypt DES_crypt
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-
 fi
-{ echo "$as_me:$LINENO: checking for uintmax_t" >&5
-echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_uintmax_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <stdint.h>
+done
 
 
-typedef uintmax_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
+       # Search for SHA256 support in libc and/or OpenSSL
+       for ac_func in SHA256_Update EVP_sha256
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_uintmax_t=yes
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  unsupported_algorithms="$unsupported_algorithms \
+               hmac-sha2-256 \
+               hmac-sha2-512 \
+               diffie-hellman-group-exchange-sha256 \
+               hmac-sha2-256-etm@openssh.com \
+               hmac-sha2-512-etm@openssh.com"
 
-       ac_cv_type_uintmax_t=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5
-echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6; }
-if test $ac_cv_type_uintmax_t = yes; then
+done
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTMAX_T 1
+       # Search for RIPE-MD support in OpenSSL
+       for ac_func in EVP_ripemd160
+do :
+  ac_fn_c_check_func "$LINENO" "EVP_ripemd160" "ac_cv_func_EVP_ripemd160"
+if test "x$ac_cv_func_EVP_ripemd160" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EVP_RIPEMD160 1
 _ACEOF
 
+else
+  unsupported_algorithms="$unsupported_algorithms \
+               hmac-ripemd160 \
+               hmac-ripemd160@openssh.com \
+               hmac-ripemd160-etm@openssh.com"
 
-fi
 
+fi
+done
 
 
-   { echo "$as_me:$LINENO: checking for socklen_t" >&5
-echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_socklen_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       # Check complete ECC support in OpenSSL
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
+$as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/socket.h>
 
-typedef socklen_t ac__type_new_;
+       #include <openssl/ec.h>
+       #include <openssl/ecdh.h>
+       #include <openssl/ecdsa.h>
+       #include <openssl/evp.h>
+       #include <openssl/objects.h>
+       #include <openssl/opensslv.h>
+       #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
+       # error "OpenSSL < 0.9.8g has unreliable ECC code"
+       #endif
+
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+
+               EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
+               const EVP_MD *m = EVP_sha256(); /* We need this too */
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_socklen_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 enable_nistp256=1
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       ac_cv_type_socklen_t=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
-echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
-if test $ac_cv_type_socklen_t = yes; then
-  :
-else
-
-      { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
-echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; }
-      if test "${curl_cv_socklen_t_equiv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-        # Systems have either "struct sockaddr *" or
-        # "void *" as the second argument to getpeername
-        curl_cv_socklen_t_equiv=
-        for arg2 in "struct sockaddr" void; do
-           for t in int size_t unsigned long "unsigned long"; do
-              cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp384r1" >&5
+$as_echo_n "checking whether OpenSSL has NID_secp384r1... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-                 #include <sys/types.h>
-                 #include <sys/socket.h>
-
-                 int getpeername (int, $arg2 *, $t *);
+       #include <openssl/ec.h>
+       #include <openssl/ecdh.h>
+       #include <openssl/ecdsa.h>
+       #include <openssl/evp.h>
+       #include <openssl/objects.h>
+       #include <openssl/opensslv.h>
+       #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
+       # error "OpenSSL < 0.9.8g has unreliable ECC code"
+       #endif
 
 int
 main ()
 {
 
-                 $t len;
-                 getpeername(0,0,&len);
+               EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1);
+               const EVP_MD *m = EVP_sha384(); /* We need this too */
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-                 curl_cv_socklen_t_equiv="$t"
-                 break
-
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 enable_nistp384=1
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           done
-        done
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp521r1" >&5
+$as_echo_n "checking whether OpenSSL has NID_secp521r1... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-        if test "x$curl_cv_socklen_t_equiv" = x; then
-           { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5
-echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
-   { (exit 1); exit 1; }; }
-        fi
+       #include <openssl/ec.h>
+       #include <openssl/ecdh.h>
+       #include <openssl/ecdsa.h>
+       #include <openssl/evp.h>
+       #include <openssl/objects.h>
+       #include <openssl/opensslv.h>
+       #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
+       # error "OpenSSL < 0.9.8g has unreliable ECC code"
+       #endif
 
-fi
+int
+main ()
+{
 
-      { echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
-echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6; }
+               EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
+               const EVP_MD *m = EVP_sha512(); /* We need this too */
 
-cat >>confdefs.h <<_ACEOF
-#define socklen_t $curl_cv_socklen_t_equiv
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL's NID_secp521r1 is functional" >&5
+$as_echo_n "checking if OpenSSL's NID_secp521r1 is functional... " >&6; }
+                 if test "$cross_compiling" = yes; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: assuming yes" >&5
+$as_echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;}
+                         enable_nistp521=1
 
-fi
-
-
-
-{ echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
-echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_sig_atomic_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <signal.h>
 
-typedef sig_atomic_t ac__type_new_;
+       #include <openssl/ec.h>
+       #include <openssl/ecdh.h>
+       #include <openssl/ecdsa.h>
+       #include <openssl/evp.h>
+       #include <openssl/objects.h>
+       #include <openssl/opensslv.h>
+
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+
+                       EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
+                       const EVP_MD *m = EVP_sha512(); /* We need this too */
+                       exit(e == NULL || m == NULL);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_sig_atomic_t=yes
+if ac_fn_c_try_run "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                         enable_nistp521=1
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_type_sig_atomic_t=no
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
-echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
-if test $ac_cv_type_sig_atomic_t = yes; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIG_ATOMIC_T 1
-_ACEOF
+       COMMENT_OUT_ECC="#no ecc#"
+       TEST_SSH_ECC=no
 
+       if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \
+           test x$enable_nistp521 = x1; then
 
-fi
+$as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
 
-{ echo "$as_me:$LINENO: checking for fsblkcnt_t" >&5
-echo $ECHO_N "checking for fsblkcnt_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_fsblkcnt_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       fi
+       if test x$enable_nistp256 = x1; then
 
-#include <sys/types.h>
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-#ifdef HAVE_SYS_STATFS_H
-#include <sys/statfs.h>
-#endif
-#ifdef HAVE_SYS_STATVFS_H
-#include <sys/statvfs.h>
-#endif
+$as_echo "#define OPENSSL_HAS_NISTP256 1" >>confdefs.h
+
+               TEST_SSH_ECC=yes
+               COMMENT_OUT_ECC=""
+       else
+               unsupported_algorithms="$unsupported_algorithms \
+                       ecdsa-sha2-nistp256 \
+                       ecdh-sha2-nistp256 \
+                       ecdsa-sha2-nistp256-cert-v01@openssh.com"
+       fi
+       if test x$enable_nistp384 = x1; then
 
+$as_echo "#define OPENSSL_HAS_NISTP384 1" >>confdefs.h
 
-typedef fsblkcnt_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_fsblkcnt_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+               TEST_SSH_ECC=yes
+               COMMENT_OUT_ECC=""
+       else
+               unsupported_algorithms="$unsupported_algorithms \
+                       ecdsa-sha2-nistp384 \
+                       ecdh-sha2-nistp384 \
+                       ecdsa-sha2-nistp384-cert-v01@openssh.com"
+       fi
+       if test x$enable_nistp521 = x1; then
 
-       ac_cv_type_fsblkcnt_t=no
-fi
+$as_echo "#define OPENSSL_HAS_NISTP521 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_fsblkcnt_t" >&5
-echo "${ECHO_T}$ac_cv_type_fsblkcnt_t" >&6; }
-if test $ac_cv_type_fsblkcnt_t = yes; then
+               TEST_SSH_ECC=yes
+               COMMENT_OUT_ECC=""
+       else
+               unsupported_algorithms="$unsupported_algorithms \
+                       ecdh-sha2-nistp521 \
+                       ecdsa-sha2-nistp521 \
+                       ecdsa-sha2-nistp521-cert-v01@openssh.com"
+       fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FSBLKCNT_T 1
-_ACEOF
 
 
-fi
-{ echo "$as_me:$LINENO: checking for fsfilcnt_t" >&5
-echo $ECHO_N "checking for fsfilcnt_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_fsfilcnt_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
+$as_echo_n "checking for crypt in -lcrypt... " >&6; }
+if ${ac_cv_lib_crypt_crypt+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-#ifdef HAVE_SYS_STATFS_H
-#include <sys/statfs.h>
-#endif
-#ifdef HAVE_SYS_STATVFS_H
-#include <sys/statvfs.h>
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-
-
-typedef fsfilcnt_t ac__type_new_;
+char crypt ();
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+return crypt ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_fsfilcnt_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_crypt_crypt=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_lib_crypt_crypt=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
+$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
+if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
+  LIBS="$LIBS -lcrypt"
+fi
+
+       for ac_func in crypt
+do :
+  ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
+if test "x$ac_cv_func_crypt" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_CRYPT 1
+_ACEOF
 
-       ac_cv_type_fsfilcnt_t=no
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_fsfilcnt_t" >&5
-echo "${ECHO_T}$ac_cv_type_fsfilcnt_t" >&6; }
-if test $ac_cv_type_fsfilcnt_t = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FSFILCNT_T 1
-_ACEOF
+for ac_func in  \
+       arc4random \
+       arc4random_buf \
+       arc4random_stir \
+       arc4random_uniform \
 
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 fi
+done
 
 
-{ echo "$as_me:$LINENO: checking for in_addr_t" >&5
-echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_in_addr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+saved_LIBS="$LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
+$as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
+if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-liaf  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <netinet/in.h>
 
-typedef in_addr_t ac__type_new_;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ia_openinfo ();
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+return ia_openinfo ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_in_addr_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_iaf_ia_openinfo=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_type_in_addr_t=no
+  ac_cv_lib_iaf_ia_openinfo=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5
-echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6; }
-if test $ac_cv_type_in_addr_t = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
+$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
+if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_IN_ADDR_T 1
+       LIBS="$LIBS -liaf"
+       for ac_func in set_id
+do :
+  ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
+if test "x$ac_cv_func_set_id" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SET_ID 1
 _ACEOF
+ SSHDLIBS="$SSHDLIBS -liaf"
+
+$as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
+
+
+fi
+done
 
 
 fi
-{ echo "$as_me:$LINENO: checking for in_port_t" >&5
-echo $ECHO_N "checking for in_port_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_in_port_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+LIBS="$saved_LIBS"
+
+### Configure cryptographic random number support
+
+# Check wheter OpenSSL seeds itself
+if test "x$openssl" = "xyes" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
+$as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
+       if test "$cross_compiling" = yes; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
+                       # This is safe, since we will fatal() at runtime if
+                       # OpenSSL is not seeded correctly.
+                       OPENSSL_SEEDS_ITSELF=yes
+
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <netinet/in.h>
 
-typedef in_port_t ac__type_new_;
+       #include <string.h>
+       #include <openssl/rand.h>
+
 int
 main ()
 {
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
+
+               exit(RAND_status() == 1 ? 0 : 1);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_in_port_t=yes
+if ac_fn_c_try_run "$LINENO"; then :
+
+                       OPENSSL_SEEDS_ITSELF=yes
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_type_in_port_t=no
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_in_port_t" >&5
-echo "${ECHO_T}$ac_cv_type_in_port_t" >&6; }
-if test $ac_cv_type_in_port_t = yes; then
+
+# PRNGD TCP socket
+
+# Check whether --with-prngd-port was given.
+if test "${with_prngd_port+set}" = set; then :
+  withval=$with_prngd_port;
+               case "$withval" in
+               no)
+                       withval=""
+                       ;;
+               [0-9]*)
+                       ;;
+               *)
+                       as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
+                       ;;
+               esac
+               if test ! -z "$withval" ; then
+                       PRNGD_PORT="$withval"
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_IN_PORT_T 1
+#define PRNGD_PORT $PRNGD_PORT
 _ACEOF
 
+               fi
+
 
 fi
 
 
-{ echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
-if test "${ac_cv_have_size_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# PRNGD Unix domain socket
+
+# Check whether --with-prngd-socket was given.
+if test "${with_prngd_socket+set}" = set; then :
+  withval=$with_prngd_socket;
+               case "$withval" in
+               yes)
+                       withval="/var/run/egd-pool"
+                       ;;
+               no)
+                       withval=""
+                       ;;
+               /*)
+                       ;;
+               *)
+                       as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
+                       ;;
+               esac
+
+               if test ! -z "$withval" ; then
+                       if test ! -z "$PRNGD_PORT" ; then
+                               as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
+                       fi
+                       if test ! -r "$withval" ; then
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
+$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
+                       fi
+                       PRNGD_SOCKET="$withval"
+
+cat >>confdefs.h <<_ACEOF
+#define PRNGD_SOCKET "$PRNGD_SOCKET"
+_ACEOF
+
+               fi
+
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+               # Check for existing socket only if we don't have a random device already
+               if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
+$as_echo_n "checking for PRNGD/EGD socket... " >&6; }
+                       # Insert other locations here
+                       for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
+                               if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
+                                       PRNGD_SOCKET="$sock"
+                                       cat >>confdefs.h <<_ACEOF
+#define PRNGD_SOCKET "$PRNGD_SOCKET"
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+                                       break;
+                               fi
+                       done
+                       if test ! -z "$PRNGD_SOCKET" ; then
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
+$as_echo "$PRNGD_SOCKET" >&6; }
+                       else
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+                       fi
+               fi
+
+
+fi
+
+
+# Which randomness source do we use?
+if test ! -z "$PRNGD_PORT" ; then
+       RAND_MSG="PRNGd port $PRNGD_PORT"
+elif test ! -z "$PRNGD_SOCKET" ; then
+       RAND_MSG="PRNGd socket $PRNGD_SOCKET"
+elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
+
+$as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
+
+       RAND_MSG="OpenSSL internal ONLY"
+elif test "x$openssl" = "xno" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSH will use /dev/urandom as a source of random numbers. It will fail if this device is not supported or accessible" >&5
+$as_echo "$as_me: WARNING: OpenSSH will use /dev/urandom as a source of random numbers. It will fail if this device is not supported or accessible" >&2;}
+else
+       as_fn_error $? "OpenSSH has no source of random numbers. Please configure OpenSSL with an entropy source or re-run configure using one of the --with-prngd-port or --with-prngd-socket options" "$LINENO" 5
+fi
+
+# Check for PAM libs
+PAM_MSG="no"
+
+# Check whether --with-pam was given.
+if test "${with_pam+set}" = set; then :
+  withval=$with_pam;
+               if test "x$withval" != "xno" ; then
+                       if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
+                          test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
+                               as_fn_error $? "PAM headers not found" "$LINENO" 5
+                       fi
+
+                       saved_LIBS="$LIBS"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/types.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
 int
 main ()
-{
- size_t foo; foo = 1235;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_size_t="yes"
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_size_t="no"
-
+  ac_cv_lib_dl_dlopen=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5
-echo "${ECHO_T}$ac_cv_have_size_t" >&6; }
-if test "x$ac_cv_have_size_t" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SIZE_T 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
 _ACEOF
 
+  LIBS="-ldl $LIBS"
+
 fi
 
-{ echo "$as_me:$LINENO: checking for ssize_t" >&5
-echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
-if test "${ac_cv_have_ssize_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
+$as_echo_n "checking for pam_set_item in -lpam... " >&6; }
+if ${ac_cv_lib_pam_pam_set_item+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpam  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <sys/types.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pam_set_item ();
 int
 main ()
 {
- ssize_t foo; foo = 1235;
+return pam_set_item ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_ssize_t="yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pam_pam_set_item=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_lib_pam_pam_set_item=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
+$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
+if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPAM 1
+_ACEOF
 
-        ac_cv_have_ssize_t="no"
+  LIBS="-lpam $LIBS"
 
+else
+  as_fn_error $? "*** libpam missing" "$LINENO" 5
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                       for ac_func in pam_getenvlist
+do :
+  ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
+if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PAM_GETENVLIST 1
+_ACEOF
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5
-echo "${ECHO_T}$ac_cv_have_ssize_t" >&6; }
-if test "x$ac_cv_have_ssize_t" = "xyes" ; then
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SSIZE_T 1
+                       for ac_func in pam_putenv
+do :
+  ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
+if test "x$ac_cv_func_pam_putenv" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PAM_PUTENV 1
 _ACEOF
 
 fi
+done
 
-{ echo "$as_me:$LINENO: checking for clock_t" >&5
-echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; }
-if test "${ac_cv_have_clock_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+                       LIBS="$saved_LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <time.h>
-int
-main ()
-{
- clock_t foo; foo = 1235;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_clock_t="yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+                       PAM_MSG="yes"
 
-        ac_cv_have_clock_t="no"
+                       SSHDLIBS="$SSHDLIBS -lpam"
 
-fi
+$as_echo "#define USE_PAM 1" >>confdefs.h
+
+
+                       if test $ac_cv_lib_dl_dlopen = yes; then
+                               case "$LIBS" in
+                               *-ldl*)
+                                       # libdl already in LIBS
+                                       ;;
+                               *)
+                                       SSHDLIBS="$SSHDLIBS -ldl"
+                                       ;;
+                               esac
+                       fi
+               fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5
-echo "${ECHO_T}$ac_cv_have_clock_t" >&6; }
-if test "x$ac_cv_have_clock_t" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLOCK_T 1
+
+
+# Check whether --with-pam-service was given.
+if test "${with_pam_service+set}" = set; then :
+  withval=$with_pam_service;
+               if test "x$withval" != "xno" && \
+                  test "x$withval" != "xyes" ; then
+
+cat >>confdefs.h <<_ACEOF
+#define SSHD_PAM_SERVICE "$withval"
 _ACEOF
 
+               fi
+
+
 fi
 
-{ echo "$as_me:$LINENO: checking for sa_family_t" >&5
-echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6; }
-if test "${ac_cv_have_sa_family_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+# Check for older PAM
+if test "x$PAM_MSG" = "xyes" ; then
+       # Check PAM strerror arguments (old PAM)
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
+$as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
+#include <stdlib.h>
+#if defined(HAVE_SECURITY_PAM_APPL_H)
+#include <security/pam_appl.h>
+#elif defined (HAVE_PAM_PAM_APPL_H)
+#include <pam/pam_appl.h>
+#endif
 
 int
 main ()
 {
- sa_family_t foo; foo = 1235;
+
+(void)pam_strerror((pam_handle_t *)NULL, -1);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_sa_family_t="yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+$as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
 
-int
-main ()
-{
- sa_family_t foo; foo = 1235;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_sa_family_t="yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                       PAM_MSG="yes (old library)"
 
-        ac_cv_have_sa_family_t="no"
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+case "$host" in
+*-*-cygwin*)
+       SSH_PRIVSEP_USER=CYGWIN_SSH_PRIVSEP_USER
+       ;;
+*)
+       SSH_PRIVSEP_USER=sshd
+       ;;
+esac
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5
-echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6; }
-if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
+# Check whether --with-privsep-user was given.
+if test "${with_privsep_user+set}" = set; then :
+  withval=$with_privsep_user;
+               if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
+                   test "x${withval}" != "xyes"; then
+                       SSH_PRIVSEP_USER=$withval
+               fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SA_FAMILY_T 1
-_ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking for pid_t" >&5
-echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
-if test "${ac_cv_have_pid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+if test "x$SSH_PRIVSEP_USER" = "xCYGWIN_SSH_PRIVSEP_USER" ; then
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <sys/types.h>
-int
-main ()
-{
- pid_t foo; foo = 1235;
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define SSH_PRIVSEP_USER CYGWIN_SSH_PRIVSEP_USER
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_pid_t="yes"
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        ac_cv_have_pid_t="no"
+cat >>confdefs.h <<_ACEOF
+#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
+_ACEOF
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5
-echo "${ECHO_T}$ac_cv_have_pid_t" >&6; }
-if test "x$ac_cv_have_pid_t" = "xyes" ; then
+if test "x$have_linux_no_new_privs" = "x1" ; then
+ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
+       #include <sys/types.h>
+       #include <linux/seccomp.h>
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PID_T 1
-_ACEOF
+"
+if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
+  have_seccomp_filter=1
+fi
 
 fi
+if test "x$have_seccomp_filter" = "x1" ; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
+$as_echo_n "checking kernel for seccomp_filter support... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-{ echo "$as_me:$LINENO: checking for mode_t" >&5
-echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
-if test "${ac_cv_have_mode_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+               #include <errno.h>
+               #include <elf.h>
+               #include <linux/audit.h>
+               #include <linux/seccomp.h>
+               #include <stdlib.h>
+               #include <sys/prctl.h>
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <sys/types.h>
 int
 main ()
 {
- mode_t foo; foo = 1235;
+ int i = $seccomp_audit_arch;
+          errno = 0;
+          prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
+          exit(errno == EFAULT ? 0 : 1);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_mode_t="yes"
+if ac_fn_c_try_link "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        ac_cv_have_mode_t="no"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               # Disable seccomp filter as a target
+               have_seccomp_filter=0
+
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Decide which sandbox style to use
+sandbox_arg=""
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5
-echo "${ECHO_T}$ac_cv_have_mode_t" >&6; }
-if test "x$ac_cv_have_mode_t" = "xyes" ; then
+# Check whether --with-sandbox was given.
+if test "${with_sandbox+set}" = set; then :
+  withval=$with_sandbox;
+               if test "x$withval" = "xyes" ; then
+                       sandbox_arg=""
+               else
+                       sandbox_arg="$withval"
+               fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MODE_T 1
-_ACEOF
 
 fi
 
 
-{ echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
-echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
-if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# Some platforms (seems to be the ones that have a kernel poll(2)-type
+# function with which they implement select(2)) use an extra file descriptor
+# when calling select(2), which means we can't use the rlimit sandbox.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
+$as_echo_n "checking if select works with descriptor rlimit... " >&6; }
+if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/resource.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
 
 int
 main ()
 {
- struct sockaddr_storage s;
+
+       struct rlimit rl_zero;
+       int fd, r;
+       fd_set fds;
+       struct timeval tv;
+
+       fd = open("/dev/null", O_RDONLY);
+       FD_ZERO(&fds);
+       FD_SET(fd, &fds);
+       rl_zero.rlim_cur = rl_zero.rlim_max = 0;
+       setrlimit(RLIMIT_FSIZE, &rl_zero);
+       setrlimit(RLIMIT_NOFILE, &rl_zero);
+       tv.tv_sec = 1;
+       tv.tv_usec = 0;
+       r = select(fd+1, &fds, NULL, NULL, &tv);
+       exit (r == -1 ? 1 : 0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_struct_sockaddr_storage="yes"
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        select_works_with_rlimit=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_struct_sockaddr_storage="no"
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        select_works_with_rlimit=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5
-echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6; }
-if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-_ACEOF
 
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
+$as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
+if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
 
-{ echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
-echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
-if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <netinet/in.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/resource.h>
+#include <errno.h>
+#include <stdlib.h>
 
 int
 main ()
 {
- struct sockaddr_in6 s; s.sin6_family = 0;
+
+       struct rlimit rl_zero;
+       int fd, r;
+       fd_set fds;
+
+       rl_zero.rlim_cur = rl_zero.rlim_max = 0;
+       r = setrlimit(RLIMIT_NOFILE, &rl_zero);
+       exit (r == -1 ? 1 : 0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_struct_sockaddr_in6="yes"
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        rlimit_nofile_zero_works=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_struct_sockaddr_in6="no"
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        rlimit_nofile_zero_works=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5
-echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6; }
-if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_SOCKADDR_IN6 1
-_ACEOF
 
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
+$as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
+if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
+$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
 
-{ echo "$as_me:$LINENO: checking for struct in6_addr" >&5
-echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6; }
-if test "${ac_cv_have_struct_in6_addr+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <netinet/in.h>
+#include <sys/resource.h>
+#include <stdlib.h>
 
 int
 main ()
 {
- struct in6_addr s; s.s6_addr[0] = 0;
+
+               struct rlimit rl_zero;
+
+               rl_zero.rlim_cur = rl_zero.rlim_max = 0;
+               exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_struct_in6_addr="yes"
+if ac_fn_c_try_run "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-        ac_cv_have_struct_in6_addr="no"
+$as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
 
 fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5
-echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6; }
-if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
+if test "x$sandbox_arg" = "xpledge" || \
+   ( test -z "$sandbox_arg" && test "x$ac_cv_func_pledge" = "xyes" ) ; then
+       test "x$ac_cv_func_pledge" != "xyes" && \
+               as_fn_error $? "pledge sandbox requires pledge(2) support" "$LINENO" 5
+       SANDBOX_STYLE="pledge"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_IN6_ADDR 1
-_ACEOF
+$as_echo "#define SANDBOX_PLEDGE 1" >>confdefs.h
 
+elif test "x$sandbox_arg" = "xsystrace" || \
+   ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
+       test "x$have_systr_policy_kill" != "x1" && \
+               as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
+       SANDBOX_STYLE="systrace"
 
-       { echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5
-echo $ECHO_N "checking for struct sockaddr_in6.sin6_scope_id... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_sockaddr_in6_sin6_scope_id+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+$as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <netinet/in.h>
+elif test "x$sandbox_arg" = "xdarwin" || \
+     ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
+       test "x$ac_cv_header_sandbox_h" = "xyes") ; then
+       test "x$ac_cv_func_sandbox_init" != "xyes" -o \
+            "x$ac_cv_header_sandbox_h" != "xyes" && \
+               as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
+       SANDBOX_STYLE="darwin"
 
+$as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
 
-int
-main ()
-{
-static struct sockaddr_in6 ac_aggr;
-if (ac_aggr.sin6_scope_id)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+elif test "x$sandbox_arg" = "xseccomp_filter" || \
+     ( test -z "$sandbox_arg" && \
+       test "x$have_seccomp_filter" = "x1" && \
+       test "x$ac_cv_header_elf_h" = "xyes" && \
+       test "x$ac_cv_header_linux_audit_h" = "xyes" && \
+       test "x$ac_cv_header_linux_filter_h" = "xyes" && \
+       test "x$seccomp_audit_arch" != "x" && \
+       test "x$have_linux_no_new_privs" = "x1" && \
+       test "x$ac_cv_func_prctl" = "xyes" ) ; then
+       test "x$seccomp_audit_arch" = "x" && \
+               as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
+       test "x$have_linux_no_new_privs" != "x1" && \
+               as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
+       test "x$have_seccomp_filter" != "x1" && \
+               as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
+       test "x$ac_cv_func_prctl" != "xyes" && \
+               as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
+       SANDBOX_STYLE="seccomp_filter"
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+$as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <netinet/in.h>
+elif test "x$sandbox_arg" = "xcapsicum" || \
+     ( test -z "$sandbox_arg" && \
+       test "x$ac_cv_header_sys_capability_h" = "xyes" && \
+       test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then
+       test "x$ac_cv_header_sys_capability_h" != "xyes" && \
+               as_fn_error $? "capsicum sandbox requires sys/capability.h header" "$LINENO" 5
+       test "x$ac_cv_func_cap_rights_limit" != "xyes" && \
+               as_fn_error $? "capsicum sandbox requires cap_rights_limit function" "$LINENO" 5
+       SANDBOX_STYLE="capsicum"
 
+$as_echo "#define SANDBOX_CAPSICUM 1" >>confdefs.h
 
-int
-main ()
-{
-static struct sockaddr_in6 ac_aggr;
-if (sizeof ac_aggr.sin6_scope_id)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+elif test "x$sandbox_arg" = "xrlimit" || \
+     ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
+       test "x$select_works_with_rlimit" = "xyes" && \
+       test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
+       test "x$ac_cv_func_setrlimit" != "xyes" && \
+               as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
+       test "x$select_works_with_rlimit" != "xyes" && \
+               as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
+       SANDBOX_STYLE="rlimit"
 
-       ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no
-fi
+$as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+elif test "x$sandbox_arg" = "xsolaris" || \
+   ( test -z "$sandbox_arg" && test "x$SOLARIS_PRIVS" = "xyes" ) ; then
+       SANDBOX_STYLE="solaris"
+
+$as_echo "#define SANDBOX_SOLARIS 1" >>confdefs.h
+
+elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
+     test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
+       SANDBOX_STYLE="none"
+
+$as_echo "#define SANDBOX_NULL 1" >>confdefs.h
+
+else
+       as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Cheap hack to ensure NEWS-OS libraries are arranged right.
+if test ! -z "$SONY" ; then
+  LIBS="$LIBS -liberty";
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5
-echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6; }
-if test $ac_cv_member_struct_sockaddr_in6_sin6_scope_id = yes; then
+
+# Check for  long long datatypes
+ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
+if test "x$ac_cv_type_long_long" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
+#define HAVE_LONG_LONG 1
 _ACEOF
 
 
 fi
+ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
+if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UNSIGNED_LONG_LONG 1
+_ACEOF
 
-{ echo "$as_me:$LINENO: checking for struct addrinfo" >&5
-echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
-if test "${ac_cv_have_struct_addrinfo+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+fi
+ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
+if test "x$ac_cv_type_long_double" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LONG_DOUBLE 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
 
-int
-main ()
-{
- struct addrinfo s; s.ai_flags = AI_PASSIVE;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_struct_addrinfo="yes"
+fi
+
+
+# Check datatype sizes
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
+$as_echo_n "checking size of short int... " >&6; }
+if ${ac_cv_sizeof_short_int+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int"        "$ac_includes_default"; then :
 
-        ac_cv_have_struct_addrinfo="no"
+else
+  if test "$ac_cv_type_short_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_short_int=0
+   fi
+fi
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
+$as_echo "$ac_cv_sizeof_short_int" >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5
-echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6; }
-if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_ADDRINFO 1
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
 _ACEOF
 
-fi
 
-{ echo "$as_me:$LINENO: checking for struct timeval" >&5
-echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
-if test "${ac_cv_have_struct_timeval+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
- #include <sys/time.h>
-int
-main ()
-{
- struct timeval tv; tv.tv_sec = 1;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_struct_timeval="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_struct_timeval="no"
+  if test "$ac_cv_type_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_int=0
+   fi
+fi
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5
-echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6; }
-if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_TIMEVAL 1
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
 _ACEOF
 
-       have_struct_timeval=1
-fi
 
-{ echo "$as_me:$LINENO: checking for struct timespec" >&5
-echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6; }
-if test "${ac_cv_type_struct_timespec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
+$as_echo_n "checking size of long int... " >&6; }
+if ${ac_cv_sizeof_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-typedef struct timespec ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_long_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_long_int=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
+$as_echo "$ac_cv_sizeof_long_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_type_struct_timespec=yes
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
+$as_echo_n "checking size of long long int... " >&6; }
+if ${ac_cv_sizeof_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int"        "$ac_includes_default"; then :
 
-       ac_cv_type_struct_timespec=no
+else
+  if test "$ac_cv_type_long_long_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_long_long_int=0
+   fi
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5
-echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6; }
-if test $ac_cv_type_struct_timespec = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
+$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
+
+
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_TIMESPEC 1
+#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
 _ACEOF
 
 
+
+# Sanity check long long for some platforms (AIX)
+if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
+       ac_cv_sizeof_long_long_int=0
 fi
 
+# compute LLONG_MIN and LLONG_MAX if we don't know them.
+if test -z "$have_llong_max"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
+$as_echo_n "checking for max value of long long... " >&6; }
+       if test "$cross_compiling" = yes; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
 
-# We need int64_t or else certian parts of the compile will fail.
-if test "x$ac_cv_have_int64_t" = "xno" && \
-       test "x$ac_cv_sizeof_long_int" != "x8" && \
-       test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
-       echo "OpenSSH requires int64_t support.  Contact your vendor or install"
-       echo "an alternative compiler (I.E., GCC) before continuing."
-       echo ""
-       exit 1;
-else
-       if test "$cross_compiling" = yes; then
-  { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5
-echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
 
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <stdio.h>
-#include <string.h>
-#ifdef HAVE_SNPRINTF
-main()
-{
-       char buf[50];
-       char expected_out[50];
-       int mazsize = 50 ;
-#if (SIZEOF_LONG_INT == 8)
-       long int num = 0x7fffffffffffffff;
-#else
-       long long num = 0x7fffffffffffffffll;
+/* Why is this so damn hard? */
+#ifdef __GNUC__
+# undef __GNUC__
 #endif
-       strcpy(expected_out, "9223372036854775807");
-       snprintf(buf, mazsize, "%lld", num);
-       if(strcmp(buf, expected_out) != 0)
-               exit(1);
-       exit(0);
+#define __USE_ISOC99
+#include <limits.h>
+#define DATA "conftest.llminmax"
+#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
+
+/*
+ * printf in libc on some platforms (eg old Tru64) does not understand %lld so
+ * we do this the hard way.
+ */
+static int
+fprint_ll(FILE *f, long long n)
+{
+       unsigned int i;
+       int l[sizeof(long long) * 8];
+
+       if (n < 0)
+               if (fprintf(f, "-") < 0)
+                       return -1;
+       for (i = 0; n != 0; i++) {
+               l[i] = my_abs(n % 10);
+               n /= 10;
+       }
+       do {
+               if (fprintf(f, "%d", l[--i]) < 0)
+                       return -1;
+       } while (i != 0);
+       if (fprintf(f, " ") < 0)
+               return -1;
+       return 0;
 }
+
+int
+main ()
+{
+
+       FILE *f;
+       long long i, llmin, llmax = 0;
+
+       if((f = fopen(DATA,"w")) == NULL)
+               exit(1);
+
+#if defined(LLONG_MIN) && defined(LLONG_MAX)
+       fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
+       llmin = LLONG_MIN;
+       llmax = LLONG_MAX;
 #else
-main() { exit(0); }
+       fprintf(stderr, "Calculating  LLONG_MIN and LLONG_MAX\n");
+       /* This will work on one's complement and two's complement */
+       for (i = 1; i > llmax; i <<= 1, i++)
+               llmax = i;
+       llmin = llmax + 1LL;    /* wrap */
 #endif
 
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-   true
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       /* Sanity check */
+       if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
+           || llmax - 1 > llmax || llmin == llmax || llmin == 0
+           || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
+               fprintf(f, "unknown unknown\n");
+               exit(2);
+       }
 
-( exit $ac_status )
- cat >>confdefs.h <<\_ACEOF
-#define BROKEN_SNPRINTF 1
-_ACEOF
+       if (fprint_ll(f, llmin) < 0)
+               exit(3);
+       if (fprint_ll(f, llmax) < 0)
+               exit(4);
+       if (fclose(f) < 0)
+               exit(5);
+       exit(0);
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
 
+                       llong_min=`$AWK '{print $1}' conftest.llminmax`
+                       llong_max=`$AWK '{print $2}' conftest.llminmax`
 
-fi
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
+$as_echo "$llong_max" >&6; }
 
+cat >>confdefs.h <<_ACEOF
+#define LLONG_MAX ${llong_max}LL
+_ACEOF
 
-# look for field 'ut_host' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
-       { echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5
-echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
+$as_echo_n "checking for min value of long long... " >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
+$as_echo "$llong_min" >&6; }
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define LLONG_MIN ${llong_min}LL
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmp.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_host" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
 
-fi
+else
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HOST_IN_UTMP 1
-_ACEOF
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+fi
 
 
-# look for field 'ut_host' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
-       { echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5
-echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# More checks for data types
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
+$as_echo_n "checking for u_int type... " >&6; }
+if ${ac_cv_have_u_int+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <utmpx.h>
-
+ #include <sys/types.h>
+int
+main ()
+{
+ u_int a; a = 1;
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_host" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_u_int="yes"
 else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
+   ac_cv_have_u_int="no"
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HOST_IN_UTMPX 1
-_ACEOF
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
+$as_echo "$ac_cv_have_u_int" >&6; }
+if test "x$ac_cv_have_u_int" = "xyes" ; then
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+$as_echo "#define HAVE_U_INT 1" >>confdefs.h
 
+       have_u_int=1
+fi
 
-# look for field 'syslen' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
-       { echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5
-echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
+$as_echo_n "checking for intXX_t types... " >&6; }
+if ${ac_cv_have_intxx_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <utmpx.h>
-
+ #include <sys/types.h>
+int
+main ()
+{
+ int8_t a; int16_t b; int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "syslen" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_intxx_t="yes"
 else
-                       eval "$ossh_varname=no"
+   ac_cv_have_intxx_t="no"
+
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
+$as_echo "$ac_cv_have_intxx_t" >&6; }
+if test "x$ac_cv_have_intxx_t" = "xyes" ; then
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+$as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYSLEN_IN_UTMPX 1
+       have_intxx_t=1
+fi
+
+if (test -z "$have_intxx_t" && \
+          test "x$ac_cv_header_stdint_h" = "xyes")
+then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
+$as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <stdint.h>
+int
+main ()
+{
+ int8_t a; int16_t b; int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+                       $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-# look for field 'ut_pid' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
-       { echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5
-echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmp.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_pid" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
 fi
-rm -f conftest*
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PID_IN_UTMP 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
+$as_echo_n "checking for int64_t type... " >&6; }
+if ${ac_cv_have_int64_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <sys/types.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <sys/socket.h>
+#ifdef HAVE_SYS_BITYPES_H
+# include <sys/bitypes.h>
+#endif
 
-# look for field 'ut_type' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
-       { echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5
-echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+int
+main ()
+{
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmp.h>
+int64_t a; a = 1;
 
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_type" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_int64_t="yes"
 else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
+   ac_cv_have_int64_t="no"
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TYPE_IN_UTMP 1
-_ACEOF
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
+$as_echo "$ac_cv_have_int64_t" >&6; }
+if test "x$ac_cv_have_int64_t" = "xyes" ; then
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
 
+fi
 
-# look for field 'ut_type' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
-       { echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5
-echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
+$as_echo_n "checking for u_intXX_t types... " >&6; }
+if ${ac_cv_have_u_intxx_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <utmpx.h>
-
+ #include <sys/types.h>
+int
+main ()
+{
+ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_type" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_u_intxx_t="yes"
 else
-                       eval "$ossh_varname=no"
+   ac_cv_have_u_intxx_t="no"
+
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
+$as_echo "$ac_cv_have_u_intxx_t" >&6; }
+if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+$as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TYPE_IN_UTMPX 1
+       have_u_intxx_t=1
+fi
+
+if test -z "$have_u_intxx_t" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
+$as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sys/socket.h>
+int
+main ()
+{
+ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+                       $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-# look for field 'ut_tv' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
-       { echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5
-echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmp.h>
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
+$as_echo_n "checking for u_int64_t types... " >&6; }
+if ${ac_cv_have_u_int64_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sys/types.h>
+int
+main ()
+{
+ u_int64_t a; a = 1;
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_tv" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_u_int64_t="yes"
 else
-                       eval "$ossh_varname=no"
+   ac_cv_have_u_int64_t="no"
+
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
+$as_echo "$ac_cv_have_u_int64_t" >&6; }
+if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+$as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
+
+       have_u_int64_t=1
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TV_IN_UTMP 1
+if (test -z "$have_u_int64_t" && \
+          test "x$ac_cv_header_sys_bitypes_h" = "xyes")
+then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
+$as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sys/bitypes.h>
+int
+main ()
+{
+ u_int64_t a; a = 1
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+                       $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-# look for field 'ut_id' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
-       { echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5
-echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test -z "$have_u_intxx_t" ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
+$as_echo_n "checking for uintXX_t types... " >&6; }
+if ${ac_cv_have_uintxx_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <utmp.h>
 
+#include <sys/types.h>
+
+int
+main ()
+{
+
+       uint8_t a;
+       uint16_t b;
+       uint32_t c;
+       a = b = c = 1;
+
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_id" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_uintxx_t="yes"
 else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
+   ac_cv_have_uintxx_t="no"
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
+$as_echo "$ac_cv_have_uintxx_t" >&6; }
+       if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ID_IN_UTMP 1
-_ACEOF
+$as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
        fi
+fi
 
+if (test -z "$have_uintxx_t" && \
+          test "x$ac_cv_header_stdint_h" = "xyes")
+then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
+$as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <stdint.h>
+int
+main ()
+{
+ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-# look for field 'ut_id' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
-       { echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5
-echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+                       $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmpx.h>
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_id" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
 else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ID_IN_UTMPX 1
+if (test -z "$have_uintxx_t" && \
+          test "x$ac_cv_header_inttypes_h" = "xyes")
+then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in inttypes.h" >&5
+$as_echo_n "checking for uintXX_t types in inttypes.h... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <inttypes.h>
+int
+main ()
+{
+ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+                       $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-# look for field 'ut_addr' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
-       { echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5
-echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
+          test "x$ac_cv_header_sys_bitypes_h" = "xyes")
+then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
+$as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <utmp.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_addr" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
+#include <sys/bitypes.h>
 
-fi
+int
+main ()
+{
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+                       int8_t a; int16_t b; int32_t c;
+                       u_int8_t e; u_int16_t f; u_int32_t g;
+                       a = b = c = e = f = g = 1;
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ADDR_IN_UTMP 1
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+                       $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
 
+                       $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-# look for field 'ut_addr' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
-       { echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5
-echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmpx.h>
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
+$as_echo_n "checking for u_char... " >&6; }
+if ${ac_cv_have_u_char+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sys/types.h>
+int
+main ()
+{
+ u_char foo; foo = 125;
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_addr" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_u_char="yes"
 else
-                       eval "$ossh_varname=no"
+   ac_cv_have_u_char="no"
+
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
+$as_echo "$ac_cv_have_u_char" >&6; }
+if test "x$ac_cv_have_u_char" = "xyes" ; then
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+$as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "
+#include <sys/types.h>
+#include <stdint.h>
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ADDR_IN_UTMPX 1
+"
+if test "x$ac_cv_type_intmax_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTMAX_T 1
 _ACEOF
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
 
+fi
+ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "
+#include <sys/types.h>
+#include <stdint.h>
 
-# look for field 'ut_addr_v6' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
-       { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5
-echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+"
+if test "x$ac_cv_type_uintmax_t" = xyes; then :
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTMAX_T 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmp.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_addr_v6" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
 
 fi
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ADDR_V6_IN_UTMP 1
-_ACEOF
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+   ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
+#include <sys/socket.h>
+"
+if test "x$ac_cv_type_socklen_t" = xyes; then :
 
+else
 
-# look for field 'ut_addr_v6' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
-       { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5
-echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
+$as_echo_n "checking for socklen_t equivalent... " >&6; }
+      if ${curl_cv_socklen_t_equiv+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+        # Systems have either "struct sockaddr *" or
+        # "void *" as the second argument to getpeername
+        curl_cv_socklen_t_equiv=
+        for arg2 in "struct sockaddr" void; do
+           for t in int size_t unsigned long "unsigned long"; do
+              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <utmpx.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_addr_v6" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
+                 #include <sys/types.h>
+                 #include <sys/socket.h>
 
-fi
+                 int getpeername (int, $arg2 *, $t *);
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+int
+main ()
+{
+
+                 $t len;
+                 getpeername(0,0,&len);
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ADDR_V6_IN_UTMPX 1
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+                 curl_cv_socklen_t_equiv="$t"
+                 break
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           done
+        done
 
-# look for field 'ut_exit' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
-       { echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5
-echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+        if test "x$curl_cv_socklen_t_equiv" = x; then
+           as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
+        fi
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmp.h>
+fi
 
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
+$as_echo "$curl_cv_socklen_t_equiv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define socklen_t $curl_cv_socklen_t_equiv
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_exit" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
 
 fi
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_EXIT_IN_UTMP 1
+
+ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
+"
+if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIG_ATOMIC_T 1
 _ACEOF
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
 
+fi
+
+ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
+#include <sys/types.h>
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
 
-# look for field 'ut_time' in header 'utmp.h'
-               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
-       { echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5
-echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+"
+if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FSBLKCNT_T 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmp.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_time" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
 
 fi
+ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
+#include <sys/types.h>
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+"
+if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIME_IN_UTMP 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FSFILCNT_T 1
 _ACEOF
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
 
+fi
 
-# look for field 'ut_time' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
-       { echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5
-echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <utmpx.h>
+ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
+#include <netinet/in.h>
+"
+if test "x$ac_cv_type_in_addr_t" = xyes; then :
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_IN_ADDR_T 1
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_time" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
-else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
 
-fi
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
+fi
+ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
+#include <netinet/in.h>
+"
+if test "x$ac_cv_type_in_port_t" = xyes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIME_IN_UTMPX 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_IN_PORT_T 1
 _ACEOF
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
 
+fi
 
-# look for field 'ut_tv' in header 'utmpx.h'
-               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
-               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
-       { echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5
-echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6; }
-       if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
+if ${ac_cv_have_size_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <utmpx.h>
-
+ #include <sys/types.h>
+int
+main ()
+{
+ size_t foo; foo = 1235;
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ut_tv" >/dev/null 2>&1; then
-                       eval "$ossh_varname=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_size_t="yes"
 else
-                       eval "$ossh_varname=no"
-fi
-rm -f conftest*
+   ac_cv_have_size_t="no"
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-       ossh_result=`eval 'echo $'"$ossh_varname"`
-       if test -n "`echo $ossh_varname`"; then
-               { echo "$as_me:$LINENO: result: $ossh_result" >&5
-echo "${ECHO_T}$ossh_result" >&6; }
-               if test "x$ossh_result" = "xyes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TV_IN_UTMPX 1
-_ACEOF
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
+$as_echo "$ac_cv_have_size_t" >&6; }
+if test "x$ac_cv_have_size_t" = "xyes" ; then
 
-               fi
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-       fi
+$as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
 
+fi
 
-{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
-echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if ${ac_cv_have_ssize_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+ #include <sys/types.h>
 int
 main ()
 {
-static struct stat ac_aggr;
-if (ac_aggr.st_blksize)
-return 0;
+ ssize_t foo; foo = 1235;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_stat_st_blksize=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_ssize_t="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_ssize_t="no"
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
+$as_echo "$ac_cv_have_ssize_t" >&6; }
+if test "x$ac_cv_have_ssize_t" = "xyes" ; then
+
+$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
+$as_echo_n "checking for clock_t... " >&6; }
+if ${ac_cv_have_clock_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+ #include <time.h>
 int
 main ()
 {
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_blksize)
-return 0;
+ clock_t foo; foo = 1235;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_stat_st_blksize=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_clock_t="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_clock_t="no"
 
-       ac_cv_member_struct_stat_st_blksize=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
-if test $ac_cv_member_struct_stat_st_blksize = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
+$as_echo "$ac_cv_have_clock_t" >&6; }
+if test "x$ac_cv_have_clock_t" = "xyes" ; then
 
+$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
 
 fi
 
-{ echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
-echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
+$as_echo_n "checking for sa_family_t... " >&6; }
+if ${ac_cv_have_sa_family_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <pwd.h>
-
+#include <sys/socket.h>
 
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (ac_aggr.pw_gecos)
-return 0;
+ sa_family_t foo; foo = 1235;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_gecos=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_sa_family_t="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <pwd.h>
-
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (sizeof ac_aggr.pw_gecos)
-return 0;
+ sa_family_t foo; foo = 1235;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_gecos=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_sa_family_t="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_sa_family_t="no"
 
-       ac_cv_member_struct_passwd_pw_gecos=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
+$as_echo "$ac_cv_have_sa_family_t" >&6; }
+if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
+
+$as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
-echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6; }
-if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_PASSWD_PW_GECOS 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
+$as_echo_n "checking for pid_t... " >&6; }
+if ${ac_cv_have_pid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sys/types.h>
+int
+main ()
+{
+ pid_t foo; foo = 1235;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_pid_t="yes"
+else
+   ac_cv_have_pid_t="no"
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ echo "$as_me:$LINENO: checking for struct passwd.pw_class" >&5
-echo $ECHO_N "checking for struct passwd.pw_class... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_passwd_pw_class+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
+$as_echo "$ac_cv_have_pid_t" >&6; }
+if test "x$ac_cv_have_pid_t" = "xyes" ; then
 
-#include <sys/types.h>
-#include <pwd.h>
+$as_echo "#define HAVE_PID_T 1" >>confdefs.h
+
+fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
+$as_echo_n "checking for mode_t... " >&6; }
+if ${ac_cv_have_mode_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sys/types.h>
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (ac_aggr.pw_class)
-return 0;
+ mode_t foo; foo = 1235;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_class=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_mode_t="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_mode_t="no"
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
+$as_echo "$ac_cv_have_mode_t" >&6; }
+if test "x$ac_cv_have_mode_t" = "xyes" ; then
+
+$as_echo "#define HAVE_MODE_T 1" >>confdefs.h
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
+$as_echo_n "checking for struct sockaddr_storage... " >&6; }
+if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <pwd.h>
-
+#include <sys/socket.h>
 
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (sizeof ac_aggr.pw_class)
-return 0;
+ struct sockaddr_storage s;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_class=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_struct_sockaddr_storage="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_struct_sockaddr_storage="no"
 
-       ac_cv_member_struct_passwd_pw_class=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_class" >&5
-echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_class" >&6; }
-if test $ac_cv_member_struct_passwd_pw_class = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_PASSWD_PW_CLASS 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
+$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
+if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
 
+$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
 
 fi
-{ echo "$as_me:$LINENO: checking for struct passwd.pw_change" >&5
-echo $ECHO_N "checking for struct passwd.pw_change... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_passwd_pw_change+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
+$as_echo_n "checking for struct sockaddr_in6... " >&6; }
+if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <pwd.h>
-
+#include <netinet/in.h>
 
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (ac_aggr.pw_change)
-return 0;
+ struct sockaddr_in6 s; s.sin6_family = 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_change=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_struct_sockaddr_in6="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_struct_sockaddr_in6="no"
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
+$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
+if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
+$as_echo_n "checking for struct in6_addr... " >&6; }
+if ${ac_cv_have_struct_in6_addr+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <pwd.h>
-
+#include <netinet/in.h>
 
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (sizeof ac_aggr.pw_change)
-return 0;
+ struct in6_addr s; s.s6_addr[0] = 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_change=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_struct_in6_addr="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_struct_in6_addr="no"
 
-       ac_cv_member_struct_passwd_pw_change=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_change" >&5
-echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_change" >&6; }
-if test $ac_cv_member_struct_passwd_pw_change = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
+$as_echo "$ac_cv_have_struct_in6_addr" >&6; }
+if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
+
+
+       ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <netinet/in.h>
+
+"
+if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_PASSWD_PW_CHANGE 1
+#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
 _ACEOF
 
 
 fi
-{ echo "$as_me:$LINENO: checking for struct passwd.pw_expire" >&5
-echo $ECHO_N "checking for struct passwd.pw_expire... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_passwd_pw_expire+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
+$as_echo_n "checking for struct addrinfo... " >&6; }
+if ${ac_cv_have_struct_addrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <pwd.h>
-
+#include <sys/socket.h>
+#include <netdb.h>
 
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (ac_aggr.pw_expire)
-return 0;
+ struct addrinfo s; s.ai_flags = AI_PASSIVE;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_expire=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_struct_addrinfo="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_struct_addrinfo="no"
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-#include <sys/types.h>
-#include <pwd.h>
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
+$as_echo "$ac_cv_have_struct_addrinfo" >&6; }
+if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
+
+$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
+
+fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if ${ac_cv_have_struct_timeval+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sys/time.h>
 int
 main ()
 {
-static struct passwd ac_aggr;
-if (sizeof ac_aggr.pw_expire)
-return 0;
+ struct timeval tv; tv.tv_sec = 1;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_passwd_pw_expire=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_struct_timeval="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_struct_timeval="no"
 
-       ac_cv_member_struct_passwd_pw_expire=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
+$as_echo "$ac_cv_have_struct_timeval" >&6; }
+if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+$as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
+
+       have_struct_timeval=1
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_expire" >&5
-echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_expire" >&6; }
-if test $ac_cv_member_struct_passwd_pw_expire = yes; then
+
+ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
+if test "x$ac_cv_type_struct_timespec" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
+#define HAVE_STRUCT_TIMESPEC 1
 _ACEOF
 
 
 fi
 
 
-{ echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5
-echo $ECHO_N "checking for struct __res_state.retrans... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# We need int64_t or else certian parts of the compile will fail.
+if test "x$ac_cv_have_int64_t" = "xno" && \
+       test "x$ac_cv_sizeof_long_int" != "x8" && \
+       test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
+       echo "OpenSSH requires int64_t support.  Contact your vendor or install"
+       echo "an alternative compiler (I.E., GCC) before continuing."
+       echo ""
+       exit 1;
+else
+       if test "$cross_compiling" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
+$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-
-
-int
-main ()
+#include <string.h>
+#ifdef HAVE_SNPRINTF
+main()
 {
-static struct __res_state ac_aggr;
-if (ac_aggr.retrans)
-return 0;
-  ;
-  return 0;
+       char buf[50];
+       char expected_out[50];
+       int mazsize = 50 ;
+#if (SIZEOF_LONG_INT == 8)
+       long int num = 0x7fffffffffffffff;
+#else
+       long long num = 0x7fffffffffffffffll;
+#endif
+       strcpy(expected_out, "9223372036854775807");
+       snprintf(buf, mazsize, "%lld", num);
+       if(strcmp(buf, expected_out) != 0)
+               exit(1);
+       exit(0);
 }
+#else
+main() { exit(0); }
+#endif
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct___res_state_retrans=yes
+if ac_fn_c_try_run "$LINENO"; then :
+   true
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+
+
+# look for field 'ut_host' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
+$as_echo_n "checking for ut_host field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <utmp.h>
 
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_host" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
+else
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
+
+$as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
+
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
+
+
+# look for field 'ut_host' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
+$as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <utmpx.h>
 
-int
-main ()
-{
-static struct __res_state ac_aggr;
-if (sizeof ac_aggr.retrans)
-return 0;
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct___res_state_retrans=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_host" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
+else
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
+
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
+
+$as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
+
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
+
+
+# look for field 'syslen' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
+$as_echo_n "checking for syslen field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_member_struct___res_state_retrans=no
-fi
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <utmpx.h>
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "syslen" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
+else
+                       eval "$ossh_varname=no"
 fi
+rm -f conftest*
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct___res_state_retrans" >&5
-echo "${ECHO_T}$ac_cv_member_struct___res_state_retrans" >&6; }
-if test $ac_cv_member_struct___res_state_retrans = yes; then
-  :
-else
 
-cat >>confdefs.h <<\_ACEOF
-#define __res_state state
-_ACEOF
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
+$as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
+
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
 
-{ echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
-echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6; }
-if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_pid' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
+$as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <utmp.h>
 
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int
-main ()
-{
- struct sockaddr_storage s; s.ss_family = 1;
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_ss_family_in_struct_ss="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_pid" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
-        ac_cv_have_ss_family_in_struct_ss="no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
-echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6; }
-if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+$as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SS_FAMILY_IN_SS 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
-echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6; }
-if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_type' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
+$as_echo_n "checking for ut_type field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <utmp.h>
 
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int
-main ()
-{
- struct sockaddr_storage s; s.__ss_family = 1;
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have___ss_family_in_struct_ss="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_type" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have___ss_family_in_struct_ss="no"
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
-echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6; }
-if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+$as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___SS_FAMILY_IN_SS 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
-echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6; }
-if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_type' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
+$as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <utmpx.h>
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-
-int
-main ()
-{
-
-#ifdef msg_accrights
-#error "msg_accrights is a macro"
-exit(1);
-#endif
-struct msghdr m;
-m.msg_accrights = 0;
-exit(0);
-
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_accrights_in_msghdr="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_type" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_accrights_in_msghdr="no"
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
-echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6; }
-if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
+$as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ACCRIGHTS_IN_MSGHDR 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking if struct statvfs.f_fsid is integral type" >&5
-echo $ECHO_N "checking if struct statvfs.f_fsid is integral type... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# look for field 'ut_tv' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
+$as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-#include <sys/param.h>
-#include <sys/stat.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#ifdef HAVE_SYS_STATVFS_H
-#include <sys/statvfs.h>
-#endif
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <utmp.h>
 
-int
-main ()
-{
- struct statvfs s; s.f_fsid = 0;
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_tv" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+fi
 
-       { echo "$as_me:$LINENO: checking if fsid_t has member val" >&5
-echo $ECHO_N "checking if fsid_t has member val... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-#include <sys/types.h>
-#include <sys/statvfs.h>
+$as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
 
-int
-main ()
-{
- fsid_t t; t.val[0] = 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-cat >>confdefs.h <<\_ACEOF
-#define FSID_HAS_VAL 1
-_ACEOF
 
+# look for field 'ut_id' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
+$as_echo_n "checking for ut_id field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <utmp.h>
 
-       { echo "$as_me:$LINENO: checking if f_fsid has member __val" >&5
-echo $ECHO_N "checking if f_fsid has member __val... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_id" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
+else
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
-#include <sys/types.h>
-#include <sys/statvfs.h>
+fi
 
-int
-main ()
-{
- fsid_t t; t.__val[0] = 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
+
+$as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
+
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-cat >>confdefs.h <<\_ACEOF
-#define FSID_HAS___VAL 1
-_ACEOF
 
+# look for field 'ut_id' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
+$as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <utmpx.h>
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_id" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
+else
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
-echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; }
-if test "${ac_cv_have_control_in_msghdr+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+$as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
 
-int
-main ()
-{
+# look for field 'ut_addr' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
+$as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-#ifdef msg_control
-#error "msg_control is a macro"
-exit(1);
-#endif
-struct msghdr m;
-m.msg_control = 0;
-exit(0);
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <utmp.h>
 
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   ac_cv_have_control_in_msghdr="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_addr" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_control_in_msghdr="no"
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
-echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
-if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
+$as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONTROL_IN_MSGHDR 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking if libc defines __progname" >&5
-echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6; }
-if test "${ac_cv_libc_defines___progname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_addr' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
+$as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <utmpx.h>
 
-int
-main ()
-{
- extern char *__progname; printf("%s", __progname);
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_libc_defines___progname="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_addr" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_libc_defines___progname="no"
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
-echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6; }
-if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
+$as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___PROGNAME 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
-echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6; }
-if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_addr_v6' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
+$as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <stdio.h>
-int
-main ()
-{
- printf("%s", __FUNCTION__);
-  ;
-  return 0;
-}
+#include <utmp.h>
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_cc_implements___FUNCTION__="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_cc_implements___FUNCTION__="no"
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5
-echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6; }
-if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
+$as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___FUNCTION__ 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
-echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6; }
-if test "${ac_cv_cc_implements___func__+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_addr_v6' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
+$as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <stdio.h>
-int
-main ()
-{
- printf("%s", __func__);
-  ;
-  return 0;
-}
+#include <utmpx.h>
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_cc_implements___func__="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_cc_implements___func__="no"
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5
-echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6; }
-if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
+$as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___func__ 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking whether va_copy exists" >&5
-echo $ECHO_N "checking whether va_copy exists... $ECHO_C" >&6; }
-if test "${ac_cv_have_va_copy+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_exit' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
+$as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <utmp.h>
 
-#include <stdarg.h>
-va_list x,y;
-
-int
-main ()
-{
- va_copy(x,y);
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_have_va_copy="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_exit" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_va_copy="no"
-
+                       eval "$ossh_varname=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5
-echo "${ECHO_T}$ac_cv_have_va_copy" >&6; }
-if test "x$ac_cv_have_va_copy" = "xyes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_VA_COPY 1
-_ACEOF
 
-fi
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-{ echo "$as_me:$LINENO: checking whether __va_copy exists" >&5
-echo $ECHO_N "checking whether __va_copy exists... $ECHO_C" >&6; }
-if test "${ac_cv_have___va_copy+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+$as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-#include <stdarg.h>
-va_list x,y;
 
-int
-main ()
-{
- __va_copy(x,y);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_have___va_copy="yes"
+# look for field 'ut_time' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
+$as_echo_n "checking for ut_time field in utmp.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        ac_cv_have___va_copy="no"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <utmp.h>
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_time" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
+else
+                       eval "$ossh_varname=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5
-echo "${ECHO_T}$ac_cv_have___va_copy" >&6; }
-if test "x$ac_cv_have___va_copy" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___VA_COPY 1
-_ACEOF
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
+
+$as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
+
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5
-echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6; }
-if test "${ac_cv_have_getopt_optreset+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_time' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
+$as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <getopt.h>
-int
-main ()
-{
- extern int optreset; optreset = 0;
-  ;
-  return 0;
-}
+#include <utmpx.h>
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_have_getopt_optreset="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_time" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_have_getopt_optreset="no"
+                       eval "$ossh_varname=no"
+fi
+rm -f conftest*
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5
-echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6; }
-if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
+$as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETOPT_OPTRESET 1
-_ACEOF
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-fi
 
-{ echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5
-echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6; }
-if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# look for field 'ut_tv' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
+$as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
+       if eval \${$ossh_varname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <utmpx.h>
 
-int
-main ()
-{
- extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_libc_defines_sys_errlist="yes"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "ut_tv" >/dev/null 2>&1; then :
+                       eval "$ossh_varname=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        ac_cv_libc_defines_sys_errlist="no"
-
+                       eval "$ossh_varname=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5
-echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6; }
-if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_ERRLIST 1
-_ACEOF
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
+$as_echo "$ossh_result" >&6; }
+               if test "x$ossh_result" = "xyes"; then
 
-fi
+$as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
 
+               fi
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       fi
 
-{ echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5
-echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6; }
-if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
 
-int
-main ()
-{
- extern int sys_nerr; printf("%i", sys_nerr);
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-   ac_cv_libc_defines_sys_nerr="yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-        ac_cv_libc_defines_sys_nerr="no"
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
+#include <sys/types.h>
+#include <pwd.h>
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5
-echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6; }
-if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
+"
+if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_NERR 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_GECOS 1
 _ACEOF
 
+
 fi
+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
+#include <sys/types.h>
+#include <pwd.h>
 
-# Check libraries needed by DNS fingerprint support
-{ echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5
-echo $ECHO_N "checking for library containing getrrsetbyname... $ECHO_C" >&6; }
-if test "${ac_cv_search_getrrsetbyname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+"
+if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getrrsetbyname ();
-int
-main ()
-{
-return getrrsetbyname ();
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_CLASS 1
 _ACEOF
-for ac_lib in '' resolv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_getrrsetbyname=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
+#include <sys/types.h>
+#include <pwd.h>
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_getrrsetbyname+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_getrrsetbyname+set}" = set; then
-  :
-else
-  ac_cv_search_getrrsetbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5
-echo "${ECHO_T}$ac_cv_search_getrrsetbyname" >&6; }
-ac_res=$ac_cv_search_getrrsetbyname
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+"
+if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETRRSETBYNAME 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_CHANGE 1
 _ACEOF
 
-else
 
-               # Needed by our getrrsetbyname()
-               { echo "$as_me:$LINENO: checking for library containing res_query" >&5
-echo $ECHO_N "checking for library containing res_query... $ECHO_C" >&6; }
-if test "${ac_cv_search_res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+fi
+ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
+#include <sys/types.h>
+#include <pwd.h>
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_query ();
-int
-main ()
-{
-return res_query ();
-  ;
-  return 0;
-}
+"
+if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
 _ACEOF
-for ac_lib in '' resolv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_res_query=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_res_query+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_res_query+set}" = set; then
-  :
+
+ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+
+"
+if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
+
 else
-  ac_cv_search_res_query=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5
-echo "${ECHO_T}$ac_cv_search_res_query" >&6; }
-ac_res=$ac_cv_search_res_query
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define __res_state state" >>confdefs.h
 
 fi
 
-               { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
-echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
-if test "${ac_cv_search_dn_expand+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
+$as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
+if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dn_expand ();
+#include <sys/types.h>
+#include <sys/socket.h>
+
 int
 main ()
 {
-return dn_expand ();
+ struct sockaddr_storage s; s.ss_family = 1;
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' resolv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_search_dn_expand=$ac_res
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_ss_family_in_struct_ss="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+   ac_cv_have_ss_family_in_struct_ss="no"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_dn_expand+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_dn_expand+set}" = set; then
-  :
-else
-  ac_cv_search_dn_expand=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
-echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
-ac_res=$ac_cv_search_dn_expand
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
+$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
+if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+
+$as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
 
 fi
 
-               { echo "$as_me:$LINENO: checking if res_query will link" >&5
-echo $ECHO_N "checking if res_query will link... $ECHO_C" >&6; }
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
+$as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
+if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
+#include <sys/socket.h>
 
 int
 main ()
 {
-
-       res_query (0, 0, 0, 0, 0);
-
+ struct sockaddr_storage s; s.__ss_family = 1;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have___ss_family_in_struct_ss="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have___ss_family_in_struct_ss="no"
 
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                   saved_LIBS="$LIBS"
-                   LIBS="$LIBS -lresolv"
-                   { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
-echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
-                   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
+$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
+if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+
+$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
+$as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
+if ${ac_cv_have_accrights_in_msghdr+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
 
 int
 main ()
 {
 
-       res_query (0, 0, 0, 0, 0);
+#ifdef msg_accrights
+#error "msg_accrights is a macro"
+exit(1);
+#endif
+struct msghdr m;
+m.msg_accrights = 0;
+exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_accrights_in_msghdr="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_accrights_in_msghdr="no"
 
-       LIBS="$saved_LIBS"
-                        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
+$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
+if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+$as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
 
+fi
 
-for ac_func in _getshort _getlong
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
+$as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
 #endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
 #endif
 
 int
 main ()
 {
-return $ac_func ();
+ struct statvfs s; s.f_fsid = 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       eval "$as_ac_var=no"
-fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
+$as_echo_n "checking if fsid_t has member val... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#include <sys/types.h>
+#include <sys/statvfs.h>
+
+int
+main ()
+{
+ fsid_t t; t.val[0] = 0;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-done
+$as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
 
-               { echo "$as_me:$LINENO: checking whether _getshort is declared" >&5
-echo $ECHO_N "checking whether _getshort is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl__getshort+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
+$as_echo_n "checking if f_fsid has member __val... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <sys/types.h>
-                   #include <arpa/nameser.h>
+#include <sys/statvfs.h>
 
 int
 main ()
 {
-#ifndef _getshort
-  (void) _getshort;
-#endif
-
+ fsid_t t; t.__val[0] = 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl__getshort=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       ac_cv_have_decl__getshort=no
-fi
+$as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5
-echo "${ECHO_T}$ac_cv_have_decl__getshort" >&6; }
-if test $ac_cv_have_decl__getshort = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL__GETSHORT 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
+$as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
+if ${ac_cv_have_control_in_msghdr+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL__GETSHORT 0
-_ACEOF
-
 
-fi
-{ echo "$as_me:$LINENO: checking whether _getlong is declared" >&5
-echo $ECHO_N "checking whether _getlong is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl__getlong+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <sys/types.h>
-                   #include <arpa/nameser.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
 
 int
 main ()
 {
-#ifndef _getlong
-  (void) _getlong;
+
+#ifdef msg_control
+#error "msg_control is a macro"
+exit(1);
 #endif
+struct msghdr m;
+m.msg_control = 0;
+exit(0);
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl__getlong=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_have_control_in_msghdr="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_have_control_in_msghdr="no"
 
-       ac_cv_have_decl__getlong=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5
-echo "${ECHO_T}$ac_cv_have_decl__getlong" >&6; }
-if test $ac_cv_have_decl__getlong = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL__GETLONG 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL__GETLONG 0
-_ACEOF
-
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
+$as_echo "$ac_cv_have_control_in_msghdr" >&6; }
+if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
 
+$as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
 
-               { echo "$as_me:$LINENO: checking for HEADER.ad" >&5
-echo $ECHO_N "checking for HEADER.ad... $ECHO_C" >&6; }
-if test "${ac_cv_member_HEADER_ad+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <arpa/nameser.h>
-
-int
-main ()
-{
-static HEADER ac_aggr;
-if (ac_aggr.ad)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_HEADER_ad=yes
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
+$as_echo_n "checking if libc defines __progname... " >&6; }
+if ${ac_cv_libc_defines___progname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <arpa/nameser.h>
 
 int
 main ()
 {
-static HEADER ac_aggr;
-if (sizeof ac_aggr.ad)
-return 0;
+ extern char *__progname; printf("%s", __progname);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_HEADER_ad=yes
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_libc_defines___progname="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_HEADER_ad=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+   ac_cv_libc_defines___progname="no"
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5
-echo "${ECHO_T}$ac_cv_member_HEADER_ad" >&6; }
-if test $ac_cv_member_HEADER_ad = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HEADER_AD 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
+$as_echo "$ac_cv_libc_defines___progname" >&6; }
+if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
 
+$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
+$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
+if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-{ echo "$as_me:$LINENO: checking if struct __res_state _res is an extern" >&5
-echo $ECHO_N "checking if struct __res_state _res is an extern... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-extern struct __res_state _res;
-
+ #include <stdio.h>
 int
 main ()
 {
-
+ printf("%s", __FUNCTION__);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE__RES_EXTERN 1
-_ACEOF
-
-
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_cc_implements___FUNCTION__="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+   ac_cv_cc_implements___FUNCTION__="no"
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-# Check whether user wants SELinux support
-SELINUX_MSG="no"
-LIBSELINUX=""
-
-# Check whether --with-selinux was given.
-if test "${with_selinux+set}" = set; then
-  withval=$with_selinux;  if test "x$withval" != "xno" ; then
-               save_LIBS="$LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
+$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
+if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define WITH_SELINUX 1
-_ACEOF
+$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
 
-               SELINUX_MSG="yes"
-               if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
+$as_echo_n "checking whether $CC implements __func__... " >&6; }
+if ${ac_cv_cc_implements___func__+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
-echo $ECHO_N "checking selinux/selinux.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <selinux/selinux.h>
+ #include <stdio.h>
+int
+main ()
+{
+ printf("%s", __func__);
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_cc_implements___func__="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_cc_implements___func__="no"
 
-       ac_header_compiler=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
-echo $ECHO_N "checking selinux/selinux.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <selinux/selinux.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
+$as_echo "$ac_cv_cc_implements___func__" >&6; }
+if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+$as_echo "#define HAVE___func__ 1" >>confdefs.h
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: selinux/selinux.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: selinux/selinux.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_selinux_selinux_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
 
-fi
-if test $ac_cv_header_selinux_selinux_h = yes; then
-  :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
+$as_echo_n "checking whether va_copy exists... " >&6; }
+if ${ac_cv_have_va_copy+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  { { echo "$as_me:$LINENO: error: SELinux support requires selinux.h header" >&5
-echo "$as_me: error: SELinux support requires selinux.h header" >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-
-               { echo "$as_me:$LINENO: checking for setexeccon in -lselinux" >&5
-echo $ECHO_N "checking for setexeccon in -lselinux... $ECHO_C" >&6; }
-if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lselinux  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char setexeccon ();
+#include <stdarg.h>
+va_list x,y;
+
 int
 main ()
 {
-return setexeccon ();
+ va_copy(x,y);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_selinux_setexeccon=yes
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_have_va_copy="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_selinux_setexeccon=no
-fi
+   ac_cv_have_va_copy="no"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_setexeccon" >&5
-echo "${ECHO_T}$ac_cv_lib_selinux_setexeccon" >&6; }
-if test $ac_cv_lib_selinux_setexeccon = yes; then
-   LIBSELINUX="-lselinux"
-                         LIBS="$LIBS -lselinux"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-else
-  { { echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5
-echo "$as_me: error: SELinux support requires libselinux library" >&2;}
-   { (exit 1); exit 1; }; }
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
+$as_echo "$ac_cv_have_va_copy" >&6; }
+if test "x$ac_cv_have_va_copy" = "xyes" ; then
 
-               SSHLIBS="$SSHLIBS $LIBSELINUX"
-               SSHDLIBS="$SSHDLIBS $LIBSELINUX"
+$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
 
+fi
 
-for ac_func in getseuserbyname get_default_context_with_level
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
+$as_echo_n "checking whether __va_copy exists... " >&6; }
+if ${ac_cv_have___va_copy+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+#include <stdarg.h>
+va_list x,y;
 
 int
 main ()
 {
-return $ac_func ();
+ __va_copy(x,y);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_have___va_copy="yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
+   ac_cv_have___va_copy="no"
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
 fi
-done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
+$as_echo "$ac_cv_have___va_copy" >&6; }
+if test "x$ac_cv_have___va_copy" = "xyes" ; then
 
-               LIBS="$save_LIBS"
-       fi
+$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
+$as_echo_n "checking whether getopt has optreset support... " >&6; }
+if ${ac_cv_have_getopt_optreset+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-
-
-# Check whether user wants Kerberos 5 support
-KRB5_MSG="no"
-
-# Check whether --with-kerberos5 was given.
-if test "${with_kerberos5+set}" = set; then
-  withval=$with_kerberos5;  if test "x$withval" != "xno" ; then
-               if test "x$withval" = "xyes" ; then
-                       KRB5ROOT="/usr/local"
-               else
-                       KRB5ROOT=${withval}
-               fi
-
-
-cat >>confdefs.h <<\_ACEOF
-#define KRB5 1
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <getopt.h>
+int
+main ()
+{
+ extern int optreset; optreset = 0;
+  ;
+  return 0;
+}
 _ACEOF
-
-               KRB5_MSG="yes"
-
-               # Extract the first word of "krb5-config", so it can be a program name with args.
-set dummy krb5-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_KRB5CONF+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_have_getopt_optreset="yes"
 else
-  case $KRB5CONF in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$KRB5ROOT/bin:$PATH"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+   ac_cv_have_getopt_optreset="no"
 
-  test -z "$ac_cv_path_KRB5CONF" && ac_cv_path_KRB5CONF="$KRB5ROOT/bin/krb5-config"
-  ;;
-esac
-fi
-KRB5CONF=$ac_cv_path_KRB5CONF
-if test -n "$KRB5CONF"; then
-  { echo "$as_me:$LINENO: result: $KRB5CONF" >&5
-echo "${ECHO_T}$KRB5CONF" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
+$as_echo "$ac_cv_have_getopt_optreset" >&6; }
+if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
 
-               if test -x $KRB5CONF ; then
-                       K5CFLAGS="`$KRB5CONF --cflags`"
-                       K5LIBS="`$KRB5CONF --libs`"
-                       CPPFLAGS="$CPPFLAGS $K5CFLAGS"
+$as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
 
-                       { echo "$as_me:$LINENO: checking for gssapi support" >&5
-echo $ECHO_N "checking for gssapi support... $ECHO_C" >&6; }
-                       if $KRB5CONF | grep gssapi >/dev/null ; then
-                               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define GSSAPI 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
+$as_echo_n "checking if libc defines sys_errlist... " >&6; }
+if ${ac_cv_libc_defines_sys_errlist+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-                               GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
-                               GSSLIBS="`$KRB5CONF --libs gssapi`"
-                               CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
-                       else
-                               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                       fi
-                       { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
-echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <krb5.h>
 
 int
 main ()
 {
char *tmp = heimdal_version;
extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_libc_defines_sys_errlist="yes"
+else
+   ac_cv_libc_defines_sys_errlist="no"
 
-cat >>confdefs.h <<\_ACEOF
-#define HEIMDAL 1
-_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
+$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
+if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
 
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-               else
-                       CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
-                       LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
-                       { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
-echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
-                       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
+$as_echo_n "checking if libc defines sys_nerr... " >&6; }
+if ${ac_cv_libc_defines_sys_nerr+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- #include <krb5.h>
 
 int
 main ()
 {
char *tmp = heimdal_version;
extern int sys_nerr; printf("%i", sys_nerr);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-                                        cat >>confdefs.h <<\_ACEOF
-#define HEIMDAL 1
-_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_libc_defines_sys_nerr="yes"
+else
+   ac_cv_libc_defines_sys_nerr="no"
 
-                                        K5LIBS="-lkrb5"
-                                        K5LIBS="$K5LIBS -lcom_err -lasn1"
-                                        { echo "$as_me:$LINENO: checking for net_write in -lroken" >&5
-echo $ECHO_N "checking for net_write in -lroken... $ECHO_C" >&6; }
-if test "${ac_cv_lib_roken_net_write+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
+$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
+if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
+
+$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
+
+fi
+
+# Check libraries needed by DNS fingerprint support
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
+$as_echo_n "checking for library containing getrrsetbyname... " >&6; }
+if ${ac_cv_search_getrrsetbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lroken  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -32291,63 +16819,57 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char net_write ();
+char getrrsetbyname ();
 int
 main ()
 {
-return net_write ();
+return getrrsetbyname ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_roken_net_write=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_roken_net_write=no
+for ac_lib in '' resolv; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_getrrsetbyname=$ac_res
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_getrrsetbyname+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_getrrsetbyname+:} false; then :
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+else
+  ac_cv_search_getrrsetbyname=no
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_roken_net_write" >&5
-echo "${ECHO_T}$ac_cv_lib_roken_net_write" >&6; }
-if test $ac_cv_lib_roken_net_write = yes; then
-  K5LIBS="$K5LIBS -lroken"
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
+$as_echo "$ac_cv_search_getrrsetbyname" >&6; }
+ac_res=$ac_cv_search_getrrsetbyname
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
 
-                                        { echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
-echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
-if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+               # Needed by our getrrsetbyname()
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
+$as_echo_n "checking for library containing res_query... " >&6; }
+if ${ac_cv_search_res_query+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -32356,75 +16878,54 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char des_cbc_encrypt ();
+char res_query ();
 int
 main ()
 {
-return des_cbc_encrypt ();
+return res_query ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_des_des_cbc_encrypt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_des_des_cbc_encrypt=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+for ac_lib in '' resolv; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_res_query=$ac_res
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
-echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
-if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
-  K5LIBS="$K5LIBS -ldes"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_res_query+:} false; then :
+  break
 fi
-
+done
+if ${ac_cv_search_res_query+:} false; then :
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                                        K5LIBS="-lkrb5 -lk5crypto -lcom_err"
-
+  ac_cv_search_res_query=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
+$as_echo "$ac_cv_search_res_query" >&6; }
+ac_res=$ac_cv_search_res_query
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                       { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
-echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
-if test "${ac_cv_search_dn_expand+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
+$as_echo_n "checking for library containing dn_expand... " >&6; }
+if ${ac_cv_search_dn_expand+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -32449,203 +16950,212 @@ for ac_lib in '' resolv; do
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_search_dn_expand=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_dn_expand+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dn_expand+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_dn_expand+set}" = set; then
-  :
+if ${ac_cv_search_dn_expand+:} false; then :
+
 else
   ac_cv_search_dn_expand=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
-echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
+$as_echo "$ac_cv_search_dn_expand" >&6; }
 ac_res=$ac_cv_search_dn_expand
-if test "$ac_res" != no; then
+if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 fi
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
+$as_echo_n "checking if res_query will link... " >&6; }
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-                       { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi_krb5" >&5
-echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6; }
-if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgssapi_krb5  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
+#include <resolv.h>
+
+int
+main ()
+{
+
+       res_query (0, 0, 0, 0, 0);
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                   saved_LIBS="$LIBS"
+                   LIBS="$LIBS -lresolv"
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
+$as_echo_n "checking for res_query in -lresolv... " >&6; }
+                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gss_init_sec_context ();
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
+#include <resolv.h>
+
 int
 main ()
 {
-return gss_init_sec_context ();
+
+       res_query (0, 0, 0, 0, 0);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
+  LIBS="$saved_LIBS"
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
-echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
-if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then
-   cat >>confdefs.h <<\_ACEOF
-#define GSSAPI 1
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               for ac_func in _getshort _getlong
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-                                 GSSLIBS="-lgssapi_krb5"
+fi
+done
+
+               ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
+                   #include <arpa/nameser.h>
+"
+if test "x$ac_cv_have_decl__getshort" = xyes; then :
+  ac_have_decl=1
 else
-   { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi" >&5
-echo $ECHO_N "checking for gss_init_sec_context in -lgssapi... $ECHO_C" >&6; }
-if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__GETSHORT $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
+                   #include <arpa/nameser.h>
+"
+if test "x$ac_cv_have_decl__getlong" = xyes; then :
+  ac_have_decl=1
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgssapi  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__GETLONG $ac_have_decl
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+               ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
+"
+if test "x$ac_cv_member_HEADER_ad" = xyes; then :
+
+$as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
+
+fi
+
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
+$as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
 #endif
-char gss_init_sec_context ();
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+extern struct __res_state _res;
+
 int
 main ()
 {
-return gss_init_sec_context ();
+
+struct __res_state *volatile p = &_res;  /* force resolution of _res */
+return 0;
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_gssapi_gss_init_sec_context=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
+
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       ac_cv_lib_gssapi_gss_init_sec_context=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
-echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
-if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then
-   cat >>confdefs.h <<\_ACEOF
-#define GSSAPI 1
-_ACEOF
+# Check whether user wants SELinux support
+SELINUX_MSG="no"
+LIBSELINUX=""
+
+# Check whether --with-selinux was given.
+if test "${with_selinux+set}" = set; then :
+  withval=$with_selinux;  if test "x$withval" != "xno" ; then
+               save_LIBS="$LIBS"
+
+$as_echo "#define WITH_SELINUX 1" >>confdefs.h
+
+               SELINUX_MSG="yes"
+               ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
 
-                                         GSSLIBS="-lgssapi"
 else
-   { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgss" >&5
-echo $ECHO_N "checking for gss_init_sec_context in -lgss... $ECHO_C" >&6; }
-if test "${ac_cv_lib_gss_gss_init_sec_context+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
+fi
+
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
+$as_echo_n "checking for setexeccon in -lselinux... " >&6; }
+if ${ac_cv_lib_selinux_setexeccon+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgss  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+LIBS="-lselinux  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -32654,935 +17164,602 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char gss_init_sec_context ();
+char setexeccon ();
 int
 main ()
 {
-return gss_init_sec_context ();
+return setexeccon ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_gss_gss_init_sec_context=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_selinux_setexeccon=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_gss_gss_init_sec_context=no
+  ac_cv_lib_selinux_setexeccon=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
-echo "${ECHO_T}$ac_cv_lib_gss_gss_init_sec_context" >&6; }
-if test $ac_cv_lib_gss_gss_init_sec_context = yes; then
-   cat >>confdefs.h <<\_ACEOF
-#define GSSAPI 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
+$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
+if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
+   LIBSELINUX="-lselinux"
+                         LIBS="$LIBS -lselinux"
 
-                                                 GSSLIBS="-lgss"
 else
-  { echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
-echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
+  as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
 fi
 
+               SSHLIBS="$SSHLIBS $LIBSELINUX"
+               SSHDLIBS="$SSHDLIBS $LIBSELINUX"
+               for ac_func in getseuserbyname get_default_context_with_level
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 fi
+done
 
+               LIBS="$save_LIBS"
+       fi
 
 fi
 
 
-                       if test "${ac_cv_header_gssapi_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for gssapi.h" >&5
-echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_gssapi_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
-echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
-echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gssapi.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+# Check whether user wants Kerberos 5 support
+KRB5_MSG="no"
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
-echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Check whether --with-kerberos5 was given.
+if test "${with_kerberos5+set}" = set; then :
+  withval=$with_kerberos5;  if test "x$withval" != "xno" ; then
+               if test "x$withval" = "xyes" ; then
+                       KRB5ROOT="/usr/local"
+               else
+                       KRB5ROOT=${withval}
+               fi
 
-  ac_header_preproc=no
-fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+$as_echo "#define KRB5 1" >>confdefs.h
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: gssapi.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: gssapi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
+               KRB5_MSG="yes"
+
+               if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_KRB5CONF+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $KRB5CONF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$KRB5ROOT/bin:$PATH"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
 esac
-{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
-echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_gssapi_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+KRB5CONF=$ac_cv_path_KRB5CONF
+if test -n "$KRB5CONF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
+$as_echo "$KRB5CONF" >&6; }
 else
-  ac_cv_header_gssapi_h=$ac_header_preproc
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
-echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
+
 
 fi
-if test $ac_cv_header_gssapi_h = yes; then
-  :
+if test -z "$ac_cv_path_KRB5CONF"; then
+  ac_pt_KRB5CONF=$KRB5CONF
+  # Extract the first word of "krb5-config", so it can be a program name with args.
+set dummy krb5-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_KRB5CONF+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-   unset ac_cv_header_gssapi_h
-                                 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
-
-for ac_header in gssapi.h
+  case $ac_pt_KRB5CONF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_KRB5CONF="$ac_pt_KRB5CONF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$KRB5ROOT/bin:$PATH"
+for as_dir in $as_dummy
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_pt_KRB5CONF=$ac_cv_path_ac_pt_KRB5CONF
+if test -n "$ac_pt_KRB5CONF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5CONF" >&5
+$as_echo "$ac_pt_KRB5CONF" >&6; }
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_KRB5CONF" = x; then
+    KRB5CONF="$KRB5ROOT/bin/krb5-config"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    KRB5CONF=$ac_pt_KRB5CONF
+  fi
+else
+  KRB5CONF="$ac_cv_path_KRB5CONF"
+fi
+
+               if test -x $KRB5CONF ; then
+                       K5CFLAGS="`$KRB5CONF --cflags`"
+                       K5LIBS="`$KRB5CONF --libs`"
+                       CPPFLAGS="$CPPFLAGS $K5CFLAGS"
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
+$as_echo_n "checking for gssapi support... " >&6; }
+                       if $KRB5CONF | grep gssapi >/dev/null ; then
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define GSSAPI 1" >>confdefs.h
+
+                               GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
+                               GSSLIBS="`$KRB5CONF --libs gssapi`"
+                               CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
+                       else
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       fi
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
+$as_echo_n "checking whether we are using Heimdal... " >&6; }
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+ #include <krb5.h>
+
+int
+main ()
+{
+ char *tmp = heimdal_version;
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HEIMDAL 1" >>confdefs.h
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       ac_header_compiler=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+               else
+                       CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
+                       LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
+$as_echo_n "checking whether we are using Heimdal... " >&6; }
+                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <krb5.h>
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+int
+main ()
+{
+ char *tmp = heimdal_version;
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                                        $as_echo "#define HEIMDAL 1" >>confdefs.h
+
+                                        K5LIBS="-lkrb5"
+                                        K5LIBS="$K5LIBS -lcom_err -lasn1"
+                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
+$as_echo_n "checking for net_write in -lroken... " >&6; }
+if ${ac_cv_lib_roken_net_write+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lroken  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char net_write ();
+int
+main ()
+{
+return net_write ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_roken_net_write=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
+  ac_cv_lib_roken_net_write=no
 fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
+$as_echo "$ac_cv_lib_roken_net_write" >&6; }
+if test "x$ac_cv_lib_roken_net_write" = xyes; then :
+  K5LIBS="$K5LIBS -lroken"
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
+                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
+$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
+if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  { echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
-echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char des_cbc_encrypt ();
+int
+main ()
+{
+return des_cbc_encrypt ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_des_des_cbc_encrypt=yes
+else
+  ac_cv_lib_des_des_cbc_encrypt=no
 fi
-
-done
-
-
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
+if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
+  K5LIBS="$K5LIBS -ldes"
 fi
 
 
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                                        K5LIBS="-lkrb5 -lk5crypto -lcom_err"
 
-                       oldCPP="$CPPFLAGS"
-                       CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
-                       if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
-echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
-echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
+$as_echo_n "checking for library containing dn_expand... " >&6; }
+if ${ac_cv_search_dn_expand+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5
-echo $ECHO_N "checking gssapi_krb5.h usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <gssapi_krb5.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dn_expand ();
+int
+main ()
+{
+return dn_expand ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' resolv; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_dn_expand=$ac_res
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dn_expand+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_dn_expand+:} false; then :
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5
-echo $ECHO_N "checking gssapi_krb5.h presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gssapi_krb5.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_search_dn_expand=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
+$as_echo "$ac_cv_search_dn_expand" >&6; }
+ac_res=$ac_cv_search_dn_expand
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-  ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: gssapi_krb5.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: gssapi_krb5.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: gssapi_krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
-echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
+$as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
+if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_gssapi_krb5_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
-echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi_krb5  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-fi
-if test $ac_cv_header_gssapi_krb5_h = yes; then
-  :
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gss_init_sec_context ();
+int
+main ()
+{
+return gss_init_sec_context ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
 else
-   CPPFLAGS="$oldCPP"
+  ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
 fi
-
-
-
-               fi
-               if test ! -z "$need_dash_r" ; then
-                       LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
-               fi
-               if test ! -z "$blibpath" ; then
-                       blibpath="$blibpath:${KRB5ROOT}/lib"
-               fi
-
-
-
-for ac_header in gssapi.h gssapi/gssapi.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
+$as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
+if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
+   $as_echo "#define GSSAPI 1" >>confdefs.h
+
+                                 GSSLIBS="-lgssapi_krb5"
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
+$as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
+if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gss_init_sec_context ();
+int
+main ()
+{
+return gss_init_sec_context ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gssapi_gss_init_sec_context=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
+  ac_cv_lib_gssapi_gss_init_sec_context=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
+$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
+if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
+   $as_echo "#define GSSAPI 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+                                         GSSLIBS="-lgssapi"
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
+$as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
+if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <$ac_header>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gss_init_sec_context ();
+int
+main ()
+{
+return gss_init_sec_context ();
+  ;
+  return 0;
+}
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gss_gss_init_sec_context=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
+  ac_cv_lib_gss_gss_init_sec_context=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
+$as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
+if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
+   $as_echo "#define GSSAPI 1" >>confdefs.h
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                                                 GSSLIBS="-lgss"
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
+$as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
 fi
 
-done
 
+fi
 
 
-for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_gssapi_h" = xyes; then :
+
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+   unset ac_cv_header_gssapi_h
+                                 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
+                                 for ac_header in gssapi.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
+if test "x$ac_cv_header_gssapi_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GSSAPI_H 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
+$as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
 
-       ac_header_compiler=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+done
+
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+                       oldCPP="$CPPFLAGS"
+                       CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
+                       ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
+if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
 
+else
+   CPPFLAGS="$oldCPP"
 fi
 
-done
 
 
+               fi
+               if test ! -z "$need_dash_r" ; then
+                       LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
+               fi
+               if test ! -z "$blibpath" ; then
+                       blibpath="$blibpath:${KRB5ROOT}/lib"
+               fi
 
-for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+               for ac_header in gssapi.h gssapi/gssapi.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+done
 
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
+               for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------------------- ##
-## Report this to openssh-unix-dev@mindrot.org ##
-## ------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+done
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+               for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 done
 
 
-               { echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5
-echo $ECHO_N "checking for library containing k_hasafs... $ECHO_C" >&6; }
-if test "${ac_cv_search_k_hasafs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
+$as_echo_n "checking for library containing k_hasafs... " >&6; }
+if ${ac_cv_search_k_hasafs+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -33625,71 +17798,35 @@ for ac_lib in '' kafs; do
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
+  if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_search_k_hasafs=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_k_hasafs+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_k_hasafs+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_k_hasafs+set}" = set; then
-  :
+if ${ac_cv_search_k_hasafs+:} false; then :
+
 else
   ac_cv_search_k_hasafs=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5
-echo "${ECHO_T}$ac_cv_search_k_hasafs" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
+$as_echo "$ac_cv_search_k_hasafs" >&6; }
 ac_res=$ac_cv_search_k_hasafs
-if test "$ac_res" != no; then
+if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_AFS 1
-_ACEOF
+$as_echo "#define USE_AFS 1" >>confdefs.h
 
 fi
 
 
-               { echo "$as_me:$LINENO: checking whether GSS_C_NT_HOSTBASED_SERVICE is declared" >&5
-echo $ECHO_N "checking whether GSS_C_NT_HOSTBASED_SERVICE is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+               ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
 #ifdef HAVE_GSSAPI_H
 # include <gssapi.h>
 #elif defined(HAVE_GSSAPI_GSSAPI_H)
@@ -33702,156 +17839,26 @@ cat >>conftest.$ac_ext <<_ACEOF
 # include <gssapi/gssapi_generic.h>
 #endif
 
-
-int
-main ()
-{
-#ifndef GSS_C_NT_HOSTBASED_SERVICE
-  (void) GSS_C_NT_HOSTBASED_SERVICE;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE=yes
+"
+if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
+  ac_have_decl=1
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE=no
+  ac_have_decl=0
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&5
-echo "${ECHO_T}$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&6; }
-if test $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE = yes; then
-
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE 0
+#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
 _ACEOF
 
-
-fi
-
-
                saved_LIBS="$LIBS"
                LIBS="$LIBS $K5LIBS"
-
-
-
-for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+               for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -33872,7 +17879,7 @@ fi
 PRIVSEP_PATH=/var/empty
 
 # Check whether --with-privsep-path was given.
-if test "${with_privsep_path+set}" = set; then
+if test "${with_privsep_path+set}" = set; then :
   withval=$with_privsep_path;
                if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
                    test "x${withval}" != "xyes"; then
@@ -33886,7 +17893,7 @@ fi
 
 
 # Check whether --with-xauth was given.
-if test "${with_xauth+set}" = set; then
+if test "${with_xauth+set}" = set; then :
   withval=$with_xauth;
                if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
                    test "x${withval}" != "xyes"; then
@@ -33902,10 +17909,10 @@ else
                TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
                # Extract the first word of "xauth", so it can be a program name with args.
 set dummy xauth; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_xauth_path+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_xauth_path+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $xauth_path in
   [\\/]* | ?:[\\/]*)
@@ -33917,14 +17924,14 @@ for as_dir in $TestPath
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
   ;;
@@ -33932,11 +17939,11 @@ esac
 fi
 xauth_path=$ac_cv_path_xauth_path
 if test -n "$xauth_path"; then
-  { echo "$as_me:$LINENO: result: $xauth_path" >&5
-echo "${ECHO_T}$xauth_path" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
+$as_echo "$xauth_path" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -33950,7 +17957,7 @@ fi
 
 STRIP_OPT=-s
 # Check whether --enable-strip was given.
-if test "${enable_strip+set}" = set; then
+if test "${enable_strip+set}" = set; then :
   enableval=$enable_strip;
                if test "x$enableval" = "xno" ; then
                        STRIP_OPT=
@@ -33977,7 +17984,7 @@ fi
 # Check for mail directory
 
 # Check whether --with-maildir was given.
-if test "${with_maildir+set}" = set; then
+if test "${with_maildir+set}" = set; then :
   withval=$with_maildir;
        if test "X$withval" != X  &&  test "x$withval" != xno  &&  \
            test "x${withval}" != xyes; then
@@ -33996,20 +18003,16 @@ else
 _ACEOF
 
        else
-           { echo "$as_me:$LINENO: checking Discovering system mail directory" >&5
-echo $ECHO_N "checking Discovering system mail directory... $ECHO_C" >&6; }
-           if test "$cross_compiling" = yes; then
+           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
+$as_echo_n "checking Discovering system mail directory... " >&6; }
+           if test "$cross_compiling" = yes; then :
 
-                       { echo "$as_me:$LINENO: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
-echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
+$as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
 
 
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <stdio.h>
@@ -34052,32 +18055,13 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
 
-                   maildir_what=`awk -F: '{print $1}' conftest.maildir`
+                   maildir_what=`awk -F: '{print $1}' conftest.maildir`
                    maildir=`awk -F: '{print $2}' conftest.maildir \
                        | sed 's|/$||'`
-                   { echo "$as_me:$LINENO: result: Using: $maildir from $maildir_what" >&5
-echo "${ECHO_T}Using: $maildir from $maildir_what" >&6; }
+                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
+$as_echo "Using: $maildir from $maildir_what" >&6; }
                    if test "x$maildir_what" != "x_PATH_MAILDIR"; then
                        cat >>confdefs.h <<_ACEOF
 #define MAIL_DIRECTORY "$maildir"
@@ -34086,30 +18070,25 @@ _ACEOF
                    fi
 
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
 
                    if test "X$ac_status" = "X2";then
 # our test program didn't find it. Default to /var/spool/mail
-                       { echo "$as_me:$LINENO: result: Using: default value of /var/spool/mail" >&5
-echo "${ECHO_T}Using: default value of /var/spool/mail" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
+$as_echo "Using: default value of /var/spool/mail" >&6; }
                        cat >>confdefs.h <<_ACEOF
 #define MAIL_DIRECTORY "/var/spool/mail"
 _ACEOF
 
                     else
-                       { echo "$as_me:$LINENO: result: *** not found ***" >&5
-echo "${ECHO_T}*** not found ***" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
+$as_echo "*** not found ***" >&6; }
                     fi
 
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
        fi
 
 
  # maildir
 
 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
-       { echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
-echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
+$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
        disable_ptmx_check=yes
 fi
 if test -z "$no_dev_ptmx" ; then
        if test "x$disable_ptmx_check" != "xyes" ; then
-               { echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5
-echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6; }
-if test "${ac_cv_file___dev_ptmx_+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
+$as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
+if eval \${$as_ac_File+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
 if test -r ""/dev/ptmx""; then
-  ac_cv_file___dev_ptmx_=yes
+  eval "$as_ac_File=yes"
 else
-  ac_cv_file___dev_ptmx_=no
+  eval "$as_ac_File=no"
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5
-echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6; }
-if test $ac_cv_file___dev_ptmx_ = yes; then
+eval ac_res=\$$as_ac_File
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
 
 
 cat >>confdefs.h <<_ACEOF
 fi
 
 if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
-       { echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5
-echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6; }
-if test "${ac_cv_file___dev_ptc_+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
+$as_echo_n "checking for \"/dev/ptc\"... " >&6; }
+if eval \${$as_ac_File+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
 if test -r ""/dev/ptc""; then
-  ac_cv_file___dev_ptc_=yes
+  eval "$as_ac_File=yes"
 else
-  ac_cv_file___dev_ptc_=no
+  eval "$as_ac_File=no"
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5
-echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6; }
-if test $ac_cv_file___dev_ptc_ = yes; then
+eval ac_res=\$$as_ac_File
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
 
 
 cat >>confdefs.h <<_ACEOF
@@ -34186,23 +18165,21 @@ _ACEOF
 fi
 
 else
-       { echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptc test" >&5
-echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
+$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
 fi
 
 # Options from here on. Some of these are preset by platform above
 
 # Check whether --with-mantype was given.
-if test "${with_mantype+set}" = set; then
+if test "${with_mantype+set}" = set; then :
   withval=$with_mantype;
                case "$withval" in
                man|cat|doc)
                        MANTYPE=$withval
                        ;;
                *)
-                       { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5
-echo "$as_me: error: invalid man type: $withval" >&2;}
-   { (exit 1); exit 1; }; }
+                       as_fn_error $? "invalid man type: $withval" "$LINENO" 5
                        ;;
                esac
 
@@ -34215,10 +18192,10 @@ if test -z "$MANTYPE"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_NROFF+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_NROFF+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $NROFF in
   [\\/]* | ?:[\\/]*)
@@ -34230,14 +18207,14 @@ for as_dir in $TestPath
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
   ;;
@@ -34245,11 +18222,11 @@ esac
 fi
 NROFF=$ac_cv_path_NROFF
 if test -n "$NROFF"; then
-  { echo "$as_me:$LINENO: result: $NROFF" >&5
-echo "${ECHO_T}$NROFF" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
+$as_echo "$NROFF" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 MD5_MSG="no"
 
 # Check whether --with-md5-passwords was given.
-if test "${with_md5_passwords+set}" = set; then
+if test "${with_md5_passwords+set}" = set; then :
   withval=$with_md5_passwords;
                if test "x$withval" != "xno" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MD5_PASSWORDS 1
-_ACEOF
+$as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
 
                        MD5_MSG="yes"
                fi
 # Whether to disable shadow password support
 
 # Check whether --with-shadow was given.
-if test "${with_shadow+set}" = set; then
+if test "${with_shadow+set}" = set; then :
   withval=$with_shadow;
                if test "x$withval" = "xno" ; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_SHADOW 1
-_ACEOF
+                       $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
 
                        disable_shadow=yes
                fi
 
 
 if test -z "$disable_shadow" ; then
-       { echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5
-echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
+$as_echo_n "checking if the systems has expire shadow information... " >&6; }
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34331,45 +18300,20 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
    sp_expire_available=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
        if test "x$sp_expire_available" = "xyes" ; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_SHADOW_EXPIRE 1
-_ACEOF
+$as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
 
        else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
        fi
 fi
 
 if test ! -z "$IPADDR_IN_DISPLAY" ; then
        DISPLAY_HACK_MSG="yes"
 
-cat >>confdefs.h <<\_ACEOF
-#define IPADDR_IN_DISPLAY 1
-_ACEOF
+$as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
 
 else
        DISPLAY_HACK_MSG="no"
 
 # Check whether --with-ipaddr-display was given.
-if test "${with_ipaddr_display+set}" = set; then
+if test "${with_ipaddr_display+set}" = set; then :
   withval=$with_ipaddr_display;
                        if test "x$withval" != "xno" ; then
-                               cat >>confdefs.h <<\_ACEOF
-#define IPADDR_IN_DISPLAY 1
-_ACEOF
+                               $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
 
                                DISPLAY_HACK_MSG="yes"
                        fi
 
 # check for /etc/default/login and use it if present.
 # Check whether --enable-etc-default-login was given.
-if test "${enable_etc_default_login+set}" = set; then
+if test "${enable_etc_default_login+set}" = set; then :
   enableval=$enable_etc_default_login;  if test "x$enableval" = "xno"; then
-               { echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5
-echo "$as_me: /etc/default/login handling disabled" >&6;}
+               { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
+$as_echo "$as_me: /etc/default/login handling disabled" >&6;}
                etc_default_login=no
          else
                etc_default_login=yes
@@ -34413,8 +18353,8 @@ echo "$as_me: /etc/default/login handling disabled" >&6;}
 else
    if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
          then
-               { echo "$as_me:$LINENO: WARNING: cross compiling: not checking /etc/default/login" >&5
-echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
+$as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
                etc_default_login=no
          else
                etc_default_login=yes
 
 
 if test "x$etc_default_login" != "xno"; then
-       { echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5
-echo $ECHO_N "checking for \"/etc/default/login\"... $ECHO_C" >&6; }
-if test "${ac_cv_file___etc_default_login_+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
+$as_echo_n "checking for \"/etc/default/login\"... " >&6; }
+if eval \${$as_ac_File+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
 if test -r ""/etc/default/login""; then
-  ac_cv_file___etc_default_login_=yes
+  eval "$as_ac_File=yes"
 else
-  ac_cv_file___etc_default_login_=no
+  eval "$as_ac_File=no"
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_file___etc_default_login_" >&5
-echo "${ECHO_T}$ac_cv_file___etc_default_login_" >&6; }
-if test $ac_cv_file___etc_default_login_ = yes; then
+eval ac_res=\$$as_ac_File
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
    external_path_file=/etc/default/login
 fi
 
        if test "x$external_path_file" = "x/etc/default/login"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ETC_DEFAULT_LOGIN 1
-_ACEOF
+$as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
 
        fi
 fi
 SERVER_PATH_MSG="(default)"
 
 # Check whether --with-default-path was given.
-if test "${with_default_path+set}" = set; then
+if test "${with_default_path+set}" = set; then :
   withval=$with_default_path;
                if test "x$external_path_file" = "x/etc/login.conf" ; then
-                       { echo "$as_me:$LINENO: WARNING:
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
 --with-default-path=PATH has no effect on this system.
 Edit /etc/login.conf instead." >&5
-echo "$as_me: WARNING:
+$as_echo "$as_me: WARNING:
 --with-default-path=PATH has no effect on this system.
 Edit /etc/login.conf instead." >&2;}
                elif test "x$withval" != "xno" ; then
                        if test ! -z "$external_path_file" ; then
-                               { echo "$as_me:$LINENO: WARNING:
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
 --with-default-path=PATH will only be used if PATH is not defined in
 $external_path_file ." >&5
-echo "$as_me: WARNING:
+$as_echo "$as_me: WARNING:
 --with-default-path=PATH will only be used if PATH is not defined in
 $external_path_file ." >&2;}
                        fi
@@ -34487,26 +18425,22 @@ $external_path_file ." >&2;}
 
 else
    if test "x$external_path_file" = "x/etc/login.conf" ; then
-               { echo "$as_me:$LINENO: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
-echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
+$as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
        else
                if test ! -z "$external_path_file" ; then
-                       { echo "$as_me:$LINENO: WARNING:
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
 If PATH is defined in $external_path_file, ensure the path to scp is included,
 otherwise scp will not work." >&5
-echo "$as_me: WARNING:
+$as_echo "$as_me: WARNING:
 If PATH is defined in $external_path_file, ensure the path to scp is included,
 otherwise scp will not work." >&2;}
                fi
-               if test "$cross_compiling" = yes; then
+               if test "$cross_compiling" = yes; then :
    user_path="/usr/bin:/bin:/usr/sbin:/sbin"
 
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* find out what STDPATH is */
@@ -34546,39 +18480,15 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
    user_path=`cat conftest.stdpath`
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
- user_path="/usr/bin:/bin:/usr/sbin:/sbin"
+   user_path="/usr/bin:/bin:/usr/sbin:/sbin"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 # make sure $bindir is in USER_PATH so scp will work
                t_bindir="${bindir}"
                while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
@@ -34595,8 +18505,8 @@ fi
                        echo $user_path | grep "^$t_bindir"  > /dev/null 2>&1
                        if test $? -ne 0  ; then
                                user_path=$user_path:$t_bindir
-                               { echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5
-echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6; }
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
+$as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
                        fi
                fi
        fi
@@ -34615,7 +18525,7 @@ fi
 # Set superuser path separately to user path
 
 # Check whether --with-superuser-path was given.
-if test "${with_superuser_path+set}" = set; then
+if test "${with_superuser_path+set}" = set; then :
   withval=$with_superuser_path;
                if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
                    test "x${withval}" != "xyes"; then
 
 
 
-{ echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
-echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
+$as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
 IPV4_IN6_HACK_MSG="no"
 
 # Check whether --with-4in6 was given.
-if test "${with_4in6+set}" = set; then
+if test "${with_4in6+set}" = set; then :
   withval=$with_4in6;
                if test "x$withval" != "xno" ; then
-                       { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define IPV4_IN_IPV6 1
-_ACEOF
+$as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
 
                        IPV4_IN6_HACK_MSG="yes"
                else
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
                fi
 
 else
 
                if test "x$inet6_default_4in6" = "xyes"; then
-                       { echo "$as_me:$LINENO: result: yes (default)" >&5
-echo "${ECHO_T}yes (default)" >&6; }
-                       cat >>confdefs.h <<\_ACEOF
-#define IPV4_IN_IPV6 1
-_ACEOF
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
+$as_echo "yes (default)" >&6; }
+                       $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
 
                        IPV4_IN6_HACK_MSG="yes"
                else
-                       { echo "$as_me:$LINENO: result: no (default)" >&5
-echo "${ECHO_T}no (default)" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
+$as_echo "no (default)" >&6; }
                fi
 
 
 BSD_AUTH_MSG=no
 
 # Check whether --with-bsd-auth was given.
-if test "${with_bsd_auth+set}" = set; then
+if test "${with_bsd_auth+set}" = set; then :
   withval=$with_bsd_auth;
                if test "x$withval" != "xno" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define BSD_AUTH 1
-_ACEOF
+$as_echo "#define BSD_AUTH 1" >>confdefs.h
 
                        BSD_AUTH_MSG=yes
                fi
 
 
 # Check whether --with-pid-dir was given.
-if test "${with_pid_dir+set}" = set; then
+if test "${with_pid_dir+set}" = set; then :
   withval=$with_pid_dir;
                if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
                    test "x${withval}" != "xyes"; then
                        piddir=$withval
                        if test ! -d $piddir ; then
-                       { echo "$as_me:$LINENO: WARNING: ** no $piddir directory on this system **" >&5
-echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
+$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
                        fi
                fi
 
@@ -34726,12 +18630,10 @@ _ACEOF
 
 
 # Check whether --enable-lastlog was given.
-if test "${enable_lastlog+set}" = set; then
+if test "${enable_lastlog+set}" = set; then :
   enableval=$enable_lastlog;
                if test "x$enableval" = "xno" ; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_LASTLOG 1
-_ACEOF
+                       $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
 
                fi
 
@@ -34739,12 +18641,10 @@ _ACEOF
 fi
 
 # Check whether --enable-utmp was given.
-if test "${enable_utmp+set}" = set; then
+if test "${enable_utmp+set}" = set; then :
   enableval=$enable_utmp;
                if test "x$enableval" = "xno" ; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UTMP 1
-_ACEOF
+                       $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
 
                fi
 
@@ -34752,13 +18652,11 @@ _ACEOF
 fi
 
 # Check whether --enable-utmpx was given.
-if test "${enable_utmpx+set}" = set; then
+if test "${enable_utmpx+set}" = set; then :
   enableval=$enable_utmpx;
                if test "x$enableval" = "xno" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UTMPX 1
-_ACEOF
+$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
 
                fi
 
@@ -34766,12 +18664,10 @@ _ACEOF
 fi
 
 # Check whether --enable-wtmp was given.
-if test "${enable_wtmp+set}" = set; then
+if test "${enable_wtmp+set}" = set; then :
   enableval=$enable_wtmp;
                if test "x$enableval" = "xno" ; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_WTMP 1
-_ACEOF
+                       $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
 
                fi
 
@@ -34779,13 +18675,11 @@ _ACEOF
 fi
 
 # Check whether --enable-wtmpx was given.
-if test "${enable_wtmpx+set}" = set; then
+if test "${enable_wtmpx+set}" = set; then :
   enableval=$enable_wtmpx;
                if test "x$enableval" = "xno" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_WTMPX 1
-_ACEOF
+$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
 
                fi
 
@@ -34793,12 +18687,10 @@ _ACEOF
 fi
 
 # Check whether --enable-libutil was given.
-if test "${enable_libutil+set}" = set; then
+if test "${enable_libutil+set}" = set; then :
   enableval=$enable_libutil;
                if test "x$enableval" = "xno" ; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_LOGIN 1
-_ACEOF
+                       $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
 
                fi
 
@@ -34806,13 +18698,11 @@ _ACEOF
 fi
 
 # Check whether --enable-pututline was given.
-if test "${enable_pututline+set}" = set; then
+if test "${enable_pututline+set}" = set; then :
   enableval=$enable_pututline;
                if test "x$enableval" = "xno" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_PUTUTLINE 1
-_ACEOF
+$as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
 
                fi
 
@@ -34820,13 +18710,11 @@ _ACEOF
 fi
 
 # Check whether --enable-pututxline was given.
-if test "${enable_pututxline+set}" = set; then
+if test "${enable_pututxline+set}" = set; then :
   enableval=$enable_pututxline;
                if test "x$enableval" = "xno" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define DISABLE_PUTUTXLINE 1
-_ACEOF
+$as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
 
                fi
 
 
 
 # Check whether --with-lastlog was given.
-if test "${with_lastlog+set}" = set; then
+if test "${with_lastlog+set}" = set; then :
   withval=$with_lastlog;
                if test "x$withval" = "xno" ; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_LASTLOG 1
-_ACEOF
+                       $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
 
                elif test -n "$withval"  &&  test "x${withval}" != "xyes"; then
                        conf_lastlog_location=$withval
 
 
 
-{ echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5
-echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
+$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34880,39 +18762,16 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               { echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5
-echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6; }
-               cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
+$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -34932,40 +18791,19 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-
-                       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
                        system_lastlog_path=no
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 if test -z "$conf_lastlog_location"; then
@@ -34976,8 +18814,8 @@ if test -z "$conf_lastlog_location"; then
                                fi
                done
                if test -z "$conf_lastlog_location"; then
-                       { echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5
-echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
+$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
                                        fi
        fi
 fi
@@ -34990,13 +18828,9 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5
-echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
+$as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -35013,35 +18847,15 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
          system_utmp_path=no
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 if test -z "$conf_utmp_location"; then
        if test x"$system_utmp_path" = x"no" ; then
@@ -35051,9 +18865,7 @@ if test -z "$conf_utmp_location"; then
                        fi
                done
                if test -z "$conf_utmp_location"; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UTMP 1
-_ACEOF
+                       $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
 
                fi
        fi
@@ -35066,13 +18878,9 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5
-echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
+$as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -35089,35 +18897,15 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
          system_wtmp_path=no
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 if test -z "$conf_wtmp_location"; then
        if test x"$system_wtmp_path" = x"no" ; then
@@ -35127,9 +18915,7 @@ if test -z "$conf_wtmp_location"; then
                        fi
                done
                if test -z "$conf_wtmp_location"; then
-                       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_WTMP 1
-_ACEOF
+                       $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
 
                fi
        fi
@@ -35142,13 +18928,9 @@ _ACEOF
 
 fi
 
-{ echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5
-echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
+$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -35168,41 +18950,19 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
          system_wtmpx_path=no
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 if test -z "$conf_wtmpx_location"; then
        if test x"$system_wtmpx_path" = x"no" ; then
-               cat >>confdefs.h <<\_ACEOF
-#define DISABLE_WTMPX 1
-_ACEOF
+               $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
 
        fi
 else
 
 if test ! -z "$blibpath" ; then
        LDFLAGS="$LDFLAGS $blibflags$blibpath"
-       { echo "$as_me:$LINENO: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
-echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
+$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
 fi
 
-{ echo "$as_me:$LINENO: checking for struct lastlog.ll_line" >&5
-echo $ECHO_N "checking for struct lastlog.ll_line... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_lastlog_ll_line+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UTMP_H
-#include <utmp.h>
-#endif
-#ifdef HAVE_UTMPX_H
-#include <utmpx.h>
-#endif
-#ifdef HAVE_LASTLOG_H
-#include <lastlog.h>
-#endif
-
-
-int
-main ()
-{
-static struct lastlog ac_aggr;
-if (ac_aggr.ll_line)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_lastlog_ll_line=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -35298,128 +18994,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 #include <lastlog.h>
 #endif
 
+"
+if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
 
-int
-main ()
-{
-static struct lastlog ac_aggr;
-if (sizeof ac_aggr.ll_line)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_lastlog_ll_line=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_struct_lastlog_ll_line=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_lastlog_ll_line" >&5
-echo "${ECHO_T}$ac_cv_member_struct_lastlog_ll_line" >&6; }
-if test $ac_cv_member_struct_lastlog_ll_line = yes; then
-  :
 else
 
     if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_LASTLOG 1
-_ACEOF
+       $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
 
     fi
 
 fi
 
 
-{ echo "$as_me:$LINENO: checking for struct utmp.ut_line" >&5
-echo $ECHO_N "checking for struct utmp.ut_line... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_utmp_ut_line+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UTMP_H
-#include <utmp.h>
-#endif
-#ifdef HAVE_UTMPX_H
-#include <utmpx.h>
-#endif
-#ifdef HAVE_LASTLOG_H
-#include <lastlog.h>
-#endif
-
-
-int
-main ()
-{
-static struct utmp ac_aggr;
-if (ac_aggr.ut_line)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_utmp_ut_line=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -35433,60 +19021,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 #include <lastlog.h>
 #endif
 
+"
+if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
 
-int
-main ()
-{
-static struct utmp ac_aggr;
-if (sizeof ac_aggr.ut_line)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_utmp_ut_line=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_member_struct_utmp_ut_line=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_utmp_ut_line" >&5
-echo "${ECHO_T}$ac_cv_member_struct_utmp_ut_line" >&6; }
-if test $ac_cv_member_struct_utmp_ut_line = yes; then
-  :
 else
 
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_UTMP 1
-_ACEOF
+       $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
 
-       cat >>confdefs.h <<\_ACEOF
-#define DISABLE_WTMP 1
-_ACEOF
+       $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
 
 
 fi
@@ -35499,64 +19041,15 @@ if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
 else
        TEST_SSH_IPV6=yes
 fi
-{ echo "$as_me:$LINENO: checking whether BROKEN_GETADDRINFO is declared" >&5
-echo $ECHO_N "checking whether BROKEN_GETADDRINFO is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_BROKEN_GETADDRINFO+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef BROKEN_GETADDRINFO
-  (void) BROKEN_GETADDRINFO;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_BROKEN_GETADDRINFO=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_BROKEN_GETADDRINFO=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_BROKEN_GETADDRINFO" >&5
-echo "${ECHO_T}$ac_cv_have_decl_BROKEN_GETADDRINFO" >&6; }
-if test $ac_cv_have_decl_BROKEN_GETADDRINFO = yes; then
+ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
+if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
   TEST_SSH_IPV6=no
 fi
 
 TEST_SSH_IPV6=$TEST_SSH_IPV6
 
+TEST_SSH_UTF8=$TEST_SSH_UTF8
+
 TEST_MALLOC_OPTIONS=$TEST_MALLOC_OPTIONS
 
 UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
@@ -35592,12 +19085,13 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -35605,8 +19099,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
   (set) 2>&1 |
     case $as_nl`(ac_space=' '; set) 2>&1` in #(
     *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      # `set' does not quote correctly, so add quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -35628,13 +19122,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
@@ -35647,14 +19152,15 @@ DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
   #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
@@ -35662,12 +19168,15 @@ LTLIBOBJS=$ac_ltlibobjs
 
 
 
-: ${CONFIG_STATUS=./config.status}
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 #! $SHELL
 # Generated by $as_me.
 # Run this file to recreate the current configuration.
@@ -35677,59 +19186,79 @@ cat >$CONFIG_STATUS <<_ACEOF
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
   else
-    PATH_SEPARATOR=:
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
   fi
-  rm -f conf$$.sh
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -35762,32 +19290,111 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-done
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
 
-# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -35801,13 +19408,17 @@ else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
            s//\1/
            q
@@ -35822,131 +19433,118 @@ echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -35956,13 +19554,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
-# Save the log message, to keep $[0] and so on meaningful, and to
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 This file was extended by OpenSSH $as_me Portable, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -35975,29 +19579,41 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<_ACEOF
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # Files that config.status was made for.
 config_files="$ac_config_files"
 config_headers="$ac_config_headers"
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      do not print progress messages
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-                  instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-                  instantiate the configuration header FILE
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
@@ -36005,36 +19621,43 @@ $config_files
 Configuration headers:
 $config_headers
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <openssh-unix-dev@mindrot.org>."
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 OpenSSH config.status Portable
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
 INSTALL='$INSTALL'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
 ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
   --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
+    $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
-  *) ac_config_targets="$ac_config_targets $1"
+  *) as_fn_append ac_config_targets " $1"
      ac_need_defaults=false ;;
 
   esac
@@ -36089,30 +19719,32 @@ if $ac_cs_silent; then
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  CONFIG_SHELL=$SHELL
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
   export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  exec "\$@"
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 exec 5>>config.log
 {
   echo
   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 ## Running $as_me. ##
 _ASBOX
-  echo "$ac_log"
+  $as_echo "$ac_log"
 } >&5
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
 # Handling of arguments.
 for ac_config_target in $ac_config_targets
@@ -36127,9 +19759,7 @@ do
     "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
     "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
 
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
+  trap 'as_fn_exit 1' 1 2 13 15
 }
 # Create a (secure) tmp directory for tmp files.
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
 if test -n "$CONFIG_FILES"; then
 
-_ACEOF
 
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
 
 
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-AWK!$AWK$ac_delim
-RANLIB!$RANLIB$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-AR!$AR$ac_delim
-ac_ct_AR!$ac_ct_AR$ac_delim
-CAT!$CAT$ac_delim
-KILL!$KILL$ac_delim
-PERL!$PERL$ac_delim
-SED!$SED$ac_delim
-ENT!$ENT$ac_delim
-TEST_MINUS_S_SH!$TEST_MINUS_S_SH$ac_delim
-SH!$SH$ac_delim
-GROFF!$GROFF$ac_delim
-NROFF!$NROFF$ac_delim
-MANDOC!$MANDOC$ac_delim
-TEST_SHELL!$TEST_SHELL$ac_delim
-MANFMT!$MANFMT$ac_delim
-PATH_GROUPADD_PROG!$PATH_GROUPADD_PROG$ac_delim
-PATH_USERADD_PROG!$PATH_USERADD_PROG$ac_delim
-MAKE_PACKAGE_SUPPORTED!$MAKE_PACKAGE_SUPPORTED$ac_delim
-STARTUP_SCRIPT_SHELL!$STARTUP_SCRIPT_SHELL$ac_delim
-LOGIN_PROGRAM_FALLBACK!$LOGIN_PROGRAM_FALLBACK$ac_delim
-PATH_PASSWD_PROG!$PATH_PASSWD_PROG$ac_delim
-LD!$LD$ac_delim
-PKGCONFIG!$PKGCONFIG$ac_delim
-LIBEDIT!$LIBEDIT$ac_delim
-TEST_SSH_ECC!$TEST_SSH_ECC$ac_delim
-COMMENT_OUT_ECC!$COMMENT_OUT_ECC$ac_delim
-SSH_PRIVSEP_USER!$SSH_PRIVSEP_USER$ac_delim
-SSHLIBS!$SSHLIBS$ac_delim
-SSHDLIBS!$SSHDLIBS$ac_delim
-KRB5CONF!$KRB5CONF$ac_delim
-GSSLIBS!$GSSLIBS$ac_delim
-K5LIBS!$K5LIBS$ac_delim
-PRIVSEP_PATH!$PRIVSEP_PATH$ac_delim
-xauth_path!$xauth_path$ac_delim
-STRIP_OPT!$STRIP_OPT$ac_delim
-XAUTH_PATH!$XAUTH_PATH$ac_delim
-MANTYPE!$MANTYPE$ac_delim
-mansubdir!$mansubdir$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
 done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
 fi
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
 _ACEOF
 
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
 
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
 ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-user_path!$user_path$ac_delim
-piddir!$piddir$ac_delim
-TEST_SSH_IPV6!$TEST_SSH_IPV6$ac_delim
-TEST_MALLOC_OPTIONS!$TEST_MALLOC_OPTIONS$ac_delim
-UNSUPPORTED_ALGORITHMS!$UNSUPPORTED_ALGORITHMS$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
 done
 
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[    ]*#[    ]*define[       ][      ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
 _ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
 
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
+shift
+for ac_tag
 do
   case $ac_tag in
   :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-   { (exit 1); exit 1; }; };;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -36419,7 +20095,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
         # (if the path is not absolute).  The absolute path cannot be DOS-style,
         # because $ac_f cannot contain `:'.
@@ -36428,26 +20104,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
     # use $as_me), people would be surprised to read:
     #    /* config.h.  Generated by config.status.  */
-    configure_input="Generated from "`IFS=:
-         echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
     fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -36457,42 +20141,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -36510,20 +20159,15 @@ echo X"$as_dir" |
            q
          }
          s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+  as_dir="$ac_dir"; as_fn_mkdir_p
   ac_builddir=.
 
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -36563,12 +20207,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
   esac
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # If the template does not know about datarootdir, expand it.
 # FIXME: This hack should be removed a few years after 2.60.
 ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
   p
   q
 }
@@ -36576,36 +20220,37 @@ case `sed -n '/datarootdir/ {
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   ac_datarootdir_hack='
   s&@datadir@&$datadir&g
   s&@docdir@&$docdir&g
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
 # Neutralize VPATH when `$srcdir' = `.'.
 # Shell code in configure.ac might set extrasub.
 # FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
 $extrasub
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
+s|@configure_input@|$ac_sed_conf_input|;t t
 s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
 s&@srcdir@&$ac_srcdir&;t t
 s&@abs_srcdir@&$ac_abs_srcdir&;t t
 s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -36615,119 +20260,49 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
 $ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
   # CONFIG_HEADER
   #
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status.  If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless.  But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([  #]*\\)[^        ]*\\([  ]*'
-ac_dB='\\)[     (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
-  sed -n '
-       t rset
-       :rset
-       s/^[     ]*#[    ]*define[       ][      ]*//
-       t ok
-       d
-       :ok
-       s/[\\&,]/\\&/g
-       s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
-       s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
-  ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[    #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is:         sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is:        sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be:    sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
-  # Write a here document:
-    cat >>$CONFIG_STATUS <<_ACEOF
-    # First, check the format of the line:
-    cat >"\$tmp/defines.sed" <<\\CEOF
-/^[     ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
-/^[     ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
-b
-:def
-_ACEOF
-  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
-  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
-  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
-  grep . conftest.tail >/dev/null || break
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
-
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
   if test x"$ac_file" != x-; then
-    echo "/* $configure_input  */" >"$tmp/config.h"
-    cat "$ac_result" >>"$tmp/config.h"
-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
-  rm -f "$tmp/out12"
  ;;
 
 
@@ -36736,11 +20311,13 @@ echo "$as_me: $ac_file is unchanged" >&6;}
 done # for ac_tag
 
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
 _ACEOF
-chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -36760,7 +20337,11 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
 
@@ -36809,8 +20390,10 @@ echo "                 Smartcard support: $SCARD_MSG"
 echo "                     S/KEY support: $SKEY_MSG"
 echo "              MD5 password support: $MD5_MSG"
 echo "                   libedit support: $LIBEDIT_MSG"
+echo "                   libldns support: $LDNS_MSG"
 echo "  Solaris process contract support: $SPC_MSG"
 echo "           Solaris project support: $SP_MSG"
+echo "         Solaris privilege support: $SPP_MSG"
 echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
 echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
 echo "                  BSD Auth support: $BSD_AUTH_MSG"
index 9b05c30..c2878e3 100644 (file)
@@ -79,19 +79,6 @@ if test -z "$AR" ; then
        AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
 fi
 
-# Use LOGIN_PROGRAM from environment if possible
-if test ! -z "$LOGIN_PROGRAM" ; then
-       AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM"],
-               [If your header files don't define LOGIN_PROGRAM,
-               then use this (detected) from environment and PATH])
-else
-       # Search for login
-       AC_PATH_PROG([LOGIN_PROGRAM_FALLBACK], [login])
-       if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
-               AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM_FALLBACK"])
-       fi
-fi
-
 AC_PATH_PROG([PATH_PASSWD_PROG], [passwd])
 if test ! -z "$PATH_PASSWD_PROG" ; then
        AC_DEFINE_UNQUOTED([_PATH_PASSWD_PROG], ["$PATH_PASSWD_PROG"],
@@ -123,6 +110,7 @@ AC_CHECK_DECL([PR_SET_NO_NEW_PRIVS], [have_linux_no_new_privs=1], , [
 
 openssl=yes
 ssh1=no
+COMMENT_OUT_RSA1="#no ssh1#"
 AC_ARG_WITH([openssl],
        [  --without-openssl       Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL** ],
        [  if test "x$withval" = "xno" ; then
@@ -140,13 +128,14 @@ else
 fi
 
 AC_ARG_WITH([ssh1],
-       [  --without-ssh1          Enable support for SSH protocol 1],
+       [  --with-ssh1             Enable support for SSH protocol 1],
        [
                if test "x$withval" = "xyes" ; then
                        if test "x$openssl" = "xno" ; then
                                AC_MSG_ERROR([Cannot enable SSH protocol 1 with OpenSSL disabled])
                        fi
                        ssh1=yes
+                       COMMENT_OUT_RSA1=""
                elif test "x$withval" = "xno" ; then
                        ssh1=no
                else
@@ -158,6 +147,7 @@ AC_MSG_CHECKING([whether SSH protocol 1 support is enabled])
 if test "x$ssh1" = "xyes" ; then
        AC_MSG_RESULT([yes])
        AC_DEFINE_UNQUOTED([WITH_SSH1], [1], [include SSH protocol version 1 support])
+       AC_SUBST([COMMENT_OUT_RSA1])
 else
        AC_MSG_RESULT([no])
 fi
@@ -373,6 +363,7 @@ AC_CHECK_HEADERS([ \
        dirent.h \
        endian.h \
        elf.h \
+       err.h \
        features.h \
        fcntl.h \
        floatingpoint.h \
@@ -381,6 +372,7 @@ AC_CHECK_HEADERS([ \
        ia.h \
        iaf.h \
        inttypes.h \
+       langinfo.h \
        limits.h \
        locale.h \
        login.h \
@@ -413,6 +405,7 @@ AC_CHECK_HEADERS([ \
        sys/poll.h \
        sys/prctl.h \
        sys/pstat.h \
+       sys/ptrace.h \
        sys/select.h \
        sys/stat.h \
        sys/stream.h \
@@ -433,6 +426,7 @@ AC_CHECK_HEADERS([ \
        utmp.h \
        utmpx.h \
        vis.h \
+       wchar.h \
 ])
 
 # lastlog.h requires sys/time.h to be included first on Solaris
@@ -469,6 +463,11 @@ AC_CHECK_HEADERS([sys/un.h], [], [], [
 SIA_MSG="no"
 SPC_MSG="no"
 SP_MSG="no"
+SPP_MSG="no"
+
+# Support for Solaris/Illumos privileges (this test is used by both
+# the --with-solaris-privs option and --with-sandbox=solaris).
+SOLARIS_PRIVS="no"
 
 # Check for some target-specific stuff
 case "$host" in
@@ -575,13 +574,12 @@ case "$host" in
        LIBS="$LIBS /usr/lib/textreadmode.o"
        AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin])
        AC_DEFINE([USE_PIPES], [1], [Use PIPES instead of a socketpair()])
+       AC_DEFINE([NO_UID_RESTORATION_TEST], [1],
+               [Define to disable UID restoration test])
        AC_DEFINE([DISABLE_SHADOW], [1],
                [Define if you want to disable shadow passwords])
        AC_DEFINE([NO_X11_UNIX_SOCKETS], [1],
                [Define if X11 doesn't support AF_UNIX sockets on that system])
-       AC_DEFINE([NO_IPPORT_RESERVED_CONCEPT], [1],
-               [Define if the concept of ports only accessible to
-               superusers isn't known])
        AC_DEFINE([DISABLE_FD_PASSING], [1],
                [Define if your platform needs to skip post auth
                file descriptor passing])
@@ -626,7 +624,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
        AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
            [Prepend the address family to IP tunnel traffic])
        m4_pattern_allow([AU_IPv])
-       AC_CHECK_DECL([AU_IPv4], [], 
+       AC_CHECK_DECL([AU_IPv4], [],
            AC_DEFINE([AU_IPv4], [0], [System only supports IPv4 audit records])
            [#include <bsm/audit.h>]
        AC_DEFINE([LASTLOG_WRITE_PUTUTXLINE], [1],
@@ -637,24 +635,25 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
                supported by bsd-setproctitle.c])
        AC_CHECK_FUNCS([sandbox_init])
        AC_CHECK_HEADERS([sandbox.h])
+       AC_CHECK_LIB([sandbox], [sandbox_apply], [
+           SSHDLIBS="$SSHDLIBS -lsandbox"
+       ])
        ;;
 *-*-dragonfly*)
        SSHDLIBS="$SSHDLIBS -lcrypt"
        TEST_MALLOC_OPTIONS="AFGJPRX"
        ;;
-*-*-haiku*) 
-    LIBS="$LIBS -lbsd "
-    AC_CHECK_LIB([network], [socket])
-    AC_DEFINE([HAVE_U_INT64_T])
-    MANTYPE=man 
-    ;; 
+*-*-haiku*)
+       LIBS="$LIBS -lbsd "
+       AC_CHECK_LIB([network], [socket])
+       AC_DEFINE([HAVE_U_INT64_T])
+       MANTYPE=man
+       ;;
 *-*-hpux*)
        # first we define all of the options common to all HP-UX releases
        CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
        IPADDR_IN_DISPLAY=yes
        AC_DEFINE([USE_PIPES])
-       AC_DEFINE([LOGIN_NO_ENDOPT], [1],
-           [Define if your login program cannot handle end of options ("--")])
        AC_DEFINE([LOGIN_NEEDS_UTMPX])
        AC_DEFINE([LOCKED_PASSWD_STRING], ["*"],
                [String used in /etc/passwd to denote locked account])
@@ -741,6 +740,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
        use_pie=auto
        check_for_libcrypt_later=1
        check_for_openpty_ctty_bug=1
+       dnl Target SUSv3/POSIX.1-2001 plus BSD specifics.
+       dnl _DEFAULT_SOURCE is the new name for _BSD_SOURCE
+       CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
        AC_DEFINE([PAM_TTY_KLUDGE], [1],
                [Work around problematic Linux PAM modules handling of PAM_TTY])
        AC_DEFINE([LOCKED_PASSWD_PREFIX], ["!"],
@@ -771,7 +773,6 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
        fi
        AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
            [], [#include <linux/types.h>])
-       AC_CHECK_FUNCS([prctl])
        AC_MSG_CHECKING([for seccomp architecture])
        seccomp_audit_arch=
        case "$host" in
@@ -787,6 +788,30 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
        aarch64*-*)
                seccomp_audit_arch=AUDIT_ARCH_AARCH64
                ;;
+       s390x-*)
+               seccomp_audit_arch=AUDIT_ARCH_S390X
+               ;;
+       s390-*)
+               seccomp_audit_arch=AUDIT_ARCH_S390
+               ;;
+       powerpc64-*)
+               seccomp_audit_arch=AUDIT_ARCH_PPC64
+               ;;
+       powerpc64le-*)
+               seccomp_audit_arch=AUDIT_ARCH_PPC64LE
+               ;;
+       mips-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPS
+               ;;
+       mipsel-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPSEL
+               ;;
+       mips64-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPS64
+               ;;
+       mips64el-*)
+               seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
+               ;;
        esac
        if test "x$seccomp_audit_arch" != "x" ; then
                AC_MSG_RESULT(["$seccomp_audit_arch"])
@@ -805,14 +830,13 @@ mips-sony-bsd|mips-sony-newsos4)
        if test "x$withval" != "xno" ; then
                need_dash_r=1
        fi
+       CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
        AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
        AC_CHECK_HEADER([net/if_tap.h], ,
            AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
        AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
            [Prepend the address family to IP tunnel traffic])
        TEST_MALLOC_OPTIONS="AJRX"
-       AC_DEFINE([BROKEN_STRNVIS], [1],
-           [NetBSD strnvis argument order is swapped compared to OpenBSD])
        AC_DEFINE([BROKEN_READ_COMPARISON], [1],
            [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it])
        ;;
@@ -823,8 +847,6 @@ mips-sony-bsd|mips-sony-newsos4)
        AC_CHECK_HEADER([net/if_tap.h], ,
            AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
        AC_DEFINE([BROKEN_GLOB], [1], [FreeBSD glob does not do what we need])
-       AC_DEFINE([BROKEN_STRNVIS], [1],
-           [FreeBSD strnvis argument order is swapped compared to OpenBSD])
        TEST_MALLOC_OPTIONS="AJRX"
        # Preauth crypto occasionally uses file descriptors for crypto offload
        # and will crash if they cannot be opened.
@@ -861,9 +883,6 @@ mips-sony-bsd|mips-sony-newsos4)
        fi
        AC_DEFINE([PAM_SUN_CODEBASE])
        AC_DEFINE([LOGIN_NEEDS_UTMPX])
-       AC_DEFINE([LOGIN_NEEDS_TERM], [1],
-               [Some versions of /bin/login need the TERM supplied
-               on the commandline])
        AC_DEFINE([PAM_TTY_KLUDGE])
        AC_DEFINE([SSHPAM_CHAUTHTOK_NEEDS_RUID], [1],
                [Define if pam_chauthtok wants real uid set
@@ -889,13 +908,17 @@ mips-sony-bsd|mips-sony-newsos4)
        else
                AC_MSG_RESULT([no])
        fi
+       AC_CHECK_FUNCS([setpflags])
+       AC_CHECK_FUNCS([setppriv])
+       AC_CHECK_FUNCS([priv_basicset])
+       AC_CHECK_HEADERS([priv.h])
        AC_ARG_WITH([solaris-contracts],
                [  --with-solaris-contracts Enable Solaris process contracts (experimental)],
                [
                AC_CHECK_LIB([contract], [ct_tmpl_activate],
                        [ AC_DEFINE([USE_SOLARIS_PROCESS_CONTRACTS], [1],
                                [Define if you have Solaris process contracts])
-                         SSHDLIBS="$SSHDLIBS -lcontract"
+                         LIBS="$LIBS -lcontract"
                          SPC_MSG="yes" ], )
                ],
        )
@@ -905,10 +928,29 @@ mips-sony-bsd|mips-sony-newsos4)
                AC_CHECK_LIB([project], [setproject],
                        [ AC_DEFINE([USE_SOLARIS_PROJECTS], [1],
                                [Define if you have Solaris projects])
-                       SSHDLIBS="$SSHDLIBS -lproject"
+                       LIBS="$LIBS -lproject"
                        SP_MSG="yes" ], )
                ],
        )
+       AC_ARG_WITH([solaris-privs],
+               [  --with-solaris-privs    Enable Solaris/Illumos privileges (experimental)],
+               [
+               AC_MSG_CHECKING([for Solaris/Illumos privilege support])
+               if test "x$ac_cv_func_setppriv" = "xyes" -a \
+                       "x$ac_cv_header_priv_h" = "xyes" ; then
+                       SOLARIS_PRIVS=yes
+                       AC_MSG_RESULT([found])
+                       AC_DEFINE([NO_UID_RESTORATION_TEST], [1],
+                               [Define to disable UID restoration test])
+                       AC_DEFINE([USE_SOLARIS_PRIVS], [1],
+                               [Define if you have Solaris privileges])
+                       SPP_MSG="yes"
+               else
+                       AC_MSG_RESULT([not found])
+                       AC_MSG_ERROR([*** must have support for Solaris privileges to use --with-solaris-privs])
+               fi
+               ],
+       )
        TEST_SHELL=$SHELL       # let configure find us a capable shell
        ;;
 *-*-sunos4*)
@@ -1099,15 +1141,15 @@ mips-sony-bsd|mips-sony-newsos4)
 
 *-*-ultrix*)
        AC_DEFINE([BROKEN_GETGROUPS], [1], [getgroups(0,NULL) will return -1])
-       AC_DEFINE([BROKEN_MMAP], [1], [Ultrix mmap can't map files])
        AC_DEFINE([NEED_SETPGRP])
        AC_DEFINE([HAVE_SYS_SYSLOG_H], [1], [Force use of sys/syslog.h on Ultrix])
        ;;
 
 *-*-lynxos)
-        CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
-        AC_DEFINE([BROKEN_SETVBUF], [1], [LynxOS has broken setvbuf() implementation])
-        ;;
+       CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
+       AC_DEFINE([BROKEN_SETVBUF], [1],
+           [LynxOS has broken setvbuf() implementation])
+       ;;
 esac
 
 AC_MSG_CHECKING([compiler and flags for sanity])
@@ -1122,7 +1164,6 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])],
 
 dnl Checks for header files.
 # Checks for libraries.
-AC_CHECK_FUNC([yp_match], , [AC_CHECK_LIB([nsl], [yp_match])])
 AC_CHECK_FUNC([setsockopt], , [AC_CHECK_LIB([socket], [setsockopt])])
 
 dnl IRIX and Solaris 2.5.1 have dirname() in libgen
@@ -1286,8 +1327,10 @@ AC_SEARCH_LIBS([openpty], [util bsd])
 AC_SEARCH_LIBS([updwtmp], [util bsd])
 AC_CHECK_FUNCS([fmt_scaled scan_scaled login logout openpty updwtmp logwtmp])
 
-# On some platforms, inet_ntop may be found in libresolv or libnsl.
+# On some platforms, inet_ntop and gethostbyname may be found in libresolv
+# or libnsl.
 AC_SEARCH_LIBS([inet_ntop], [resolv nsl])
+AC_SEARCH_LIBS([gethostbyname], [resolv nsl])
 
 AC_FUNC_STRFTIME
 
@@ -1345,6 +1388,9 @@ g.gl_statv = NULL;
 
 AC_CHECK_DECLS([GLOB_NOMATCH], , , [#include <glob.h>])
 
+AC_CHECK_DECL([VIS_ALL], ,
+    AC_DEFINE(BROKEN_STRNVIS, 1, [missing VIS_ALL]), [#include <vis.h>])
+
 AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
 AC_RUN_IFELSE(
        [AC_LANG_PROGRAM([[
@@ -1405,7 +1451,7 @@ AC_ARG_WITH([skey],
                                        AC_MSG_RESULT([no])
                                        AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
                                ])
-                       AC_MSG_CHECKING([if skeychallenge takes 4 arguments])
+                       AC_MSG_CHECKING([if skeychallenge takes 4 arguments])
                        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
 #include <skey.h>
@@ -1428,36 +1474,47 @@ AC_ARG_WITH([skey],
 LDNS_MSG="no"
 AC_ARG_WITH(ldns,
        [  --with-ldns[[=PATH]]      Use ldns for DNSSEC support (optionally in PATH)],
-    [
-        if test "x$withval" != "xno" ; then
-
-                       if test "x$withval" != "xyes" ; then
-                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
-                               LDFLAGS="$LDFLAGS -L${withval}/lib"
-                       fi
-
-            AC_DEFINE(HAVE_LDNS, 1, [Define if you want ldns support])
-            LIBS="-lldns $LIBS"
-            LDNS_MSG="yes"
+       [
+       ldns=""
+       if test "x$withval" = "xyes" ; then
+               AC_PATH_TOOL([LDNSCONFIG], [ldns-config], [no])
+               if test "x$PKGCONFIG" = "xno"; then
+                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                       LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       LIBS="-lldns $LIBS"
+                       ldns=yes
+               else
+                       LIBS="$LIBS `$LDNSCONFIG --libs`"
+                       CPPFLAGS="$CPPFLAGS `$LDNSCONFIG --cflags`"
+               fi
+       elif test "x$withval" != "xno" ; then
+                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                       LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       LIBS="-lldns $LIBS"
+                       ldns=yes
+       fi
 
-            AC_MSG_CHECKING([for ldns support])
-            AC_LINK_IFELSE(
-                [AC_LANG_SOURCE([[
+       # Verify that it works.
+       if test "x$ldns" = "xyes" ; then
+               AC_DEFINE(HAVE_LDNS, 1, [Define if you want ldns support])
+               LDNS_MSG="yes"
+               AC_MSG_CHECKING([for ldns support])
+               AC_LINK_IFELSE(
+                       [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
 #include <ldns/ldns.h>
 int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
-                                ]])
-                ],
-                               [AC_MSG_RESULT(yes)],
+                       ]])
+               ],
+                       [AC_MSG_RESULT(yes)],
                                [
                                        AC_MSG_RESULT(no)
                                        AC_MSG_ERROR([** Incomplete or missing ldns libraries.])
                                ])
-        fi
-    ]
-)
+       fi
+])
 
 # Check whether user wants libedit support
 LIBEDIT_MSG="no"
@@ -1468,7 +1525,7 @@ AC_ARG_WITH([libedit],
                        AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
                        if test "x$PKGCONFIG" != "xno"; then
                                AC_MSG_CHECKING([if $PKGCONFIG knows about libedit])
-                               if "$PKGCONFIG" libedit; then
+                               if "$PKGCONFIG" libedit; then
                                        AC_MSG_RESULT([yes])
                                        use_pkgconfig_for_libedit=yes
                                else
@@ -1539,9 +1596,9 @@ AC_ARG_WITH([audit],
                AC_CHECK_FUNCS([getaudit_addr aug_get_machine])
                AC_DEFINE([USE_BSM_AUDIT], [1], [Use BSM audit module])
                if test "$sol2ver" -ge 11; then
-                       SSHDLIBS="$SSHDLIBS -lscf"
-                       AC_DEFINE([BROKEN_BSM_API], [1], 
-                                 [The system has incomplete BSM API])
+                       SSHDLIBS="$SSHDLIBS -lscf"
+                       AC_DEFINE([BROKEN_BSM_API], [1],
+                               [The system has incomplete BSM API])
                fi
                ;;
          linux)
@@ -1633,6 +1690,8 @@ AC_CHECK_FUNCS([ \
        closefrom \
        dirfd \
        endgrent \
+       err \
+       errx \
        explicit_bzero \
        fchmod \
        fchown \
@@ -1658,17 +1717,17 @@ AC_CHECK_FUNCS([ \
        inet_ntoa \
        inet_ntop \
        innetgr \
+       llabs \
        login_getcapbool \
-       mblen \
        md5_crypt \
        memmove \
        memset_s \
        mkdtemp \
-       mmap \
        ngetaddrinfo \
        nsleep \
        ogetaddrinfo \
        openlog_r \
+       pledge \
        poll \
        prctl \
        pstat \
@@ -1699,6 +1758,7 @@ AC_CHECK_FUNCS([ \
        socketpair \
        statfs \
        statvfs \
+       strcasestr \
        strdup \
        strerror \
        strlcat \
@@ -1723,8 +1783,30 @@ AC_CHECK_FUNCS([ \
        vasprintf \
        vsnprintf \
        waitpid \
+       warn \
 ])
 
+dnl Wide character support.
+AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
+
+TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
+AC_MSG_CHECKING([for utf8 locale support])
+AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM([[
+#include <locale.h>
+#include <stdlib.h>
+       ]], [[
+       char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
+       if (loc != NULL)
+               exit(0);
+       exit(1);
+       ]])],
+       AC_MSG_RESULT(yes),
+       [AC_MSG_RESULT(no)
+        TEST_SSH_UTF8=no],
+       AC_MSG_WARN([cross compiling: assuming yes])
+)
+
 AC_LINK_IFELSE(
         [AC_LANG_PROGRAM(
            [[ #include <ctype.h> ]],
@@ -1732,8 +1814,18 @@ AC_LINK_IFELSE(
        [AC_DEFINE([HAVE_ISBLANK], [1], [Define if you have isblank(3C).])
 ])
 
+disable_pkcs11=
+AC_ARG_ENABLE([pkcs11],
+       [  --disable-pkcs11        disable PKCS#11 support code [no]],
+       [
+               if test "x$enableval" = "xno" ; then
+                       disable_pkcs11=1
+               fi
+       ]
+)
+
 # PKCS11 depends on OpenSSL.
-if test "x$openssl" = "xyes" ; then
+if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then
        # PKCS#11 support requires dlopen() and co
        AC_SEARCH_LIBS([dlopen], [dl],
            [AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support])]
@@ -1948,7 +2040,7 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then
                [[
        char b[5];
        snprintf(b,5,"123456789");
-       exit(b[4]!='\0'); 
+       exit(b[4]!='\0');
                ]])],
                [AC_MSG_RESULT([yes])],
                [
@@ -2252,6 +2344,41 @@ if test "x$check_for_conflicting_getspnam" = "x1"; then
        )
 fi
 
+dnl NetBSD added an strnvis and unfortunately made it incompatible with the
+dnl existing one in OpenBSD and Linux's libbsd (the former having existed
+dnl for over ten years). Despite this incompatibility being reported during
+dnl development (see http://gnats.netbsd.org/44977) they still shipped it.
+dnl Even more unfortunately FreeBSD and later MacOS picked up this incompatible
+dnl implementation.  Try to detect this mess, and assume the only safe option
+dnl if we're cross compiling.
+dnl
+dnl OpenBSD, 2001: strnvis(char *dst, const char *src, size_t dlen, int flag);
+dnl NetBSD: 2012,  strnvis(char *dst, size_t dlen, const char *src, int flag);
+if test "x$ac_cv_func_strnvis" = "xyes"; then
+       AC_MSG_CHECKING([for working strnvis])
+       AC_RUN_IFELSE(
+               [AC_LANG_PROGRAM([[
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <vis.h>
+static void sighandler(int sig) { _exit(1); }
+               ]], [[
+       char dst[16];
+
+       signal(SIGSEGV, sighandler);
+       if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
+               exit(0);
+       exit(1)
+               ]])],
+               [AC_MSG_RESULT([yes])],
+               [AC_MSG_RESULT([no])
+                AC_DEFINE([BROKEN_STRNVIS], [1], [strnvis detected broken])],
+               [AC_MSG_WARN([cross compiling: assuming broken])
+                AC_DEFINE([BROKEN_STRNVIS], [1], [strnvis assumed broken])]
+       )
+fi
+
 AC_FUNC_GETPGRP
 
 # Search for OpenSSL
@@ -2309,10 +2436,10 @@ openssl_engine=no
 AC_ARG_WITH([ssl-engine],
        [  --with-ssl-engine       Enable OpenSSL (hardware) ENGINE support ],
        [
-               if test "x$openssl" = "xno" ; then
-                       AC_MSG_ERROR([cannot use --with-ssl-engine when OpenSSL disabled])
-               fi
                if test "x$withval" != "xno" ; then
+                       if test "x$openssl" = "xno" ; then
+                               AC_MSG_ERROR([cannot use --with-ssl-engine when OpenSSL disabled])
+                       fi
                        openssl_engine=yes
                fi
        ]
@@ -2345,6 +2472,7 @@ if test "x$openssl" = "xyes" ; then
        AC_MSG_CHECKING([OpenSSL header version])
        AC_RUN_IFELSE(
                [AC_LANG_PROGRAM([[
+       #include <stdlib.h>
        #include <stdio.h>
        #include <string.h>
        #include <openssl/opensslv.h>
@@ -2357,7 +2485,9 @@ if test "x$openssl" = "xyes" ; then
                if(fd == NULL)
                        exit(1);
 
-               if ((rc = fprintf(fd ,"%08x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
+               if ((rc = fprintf(fd, "%08lx (%s)\n",
+                   (unsigned long)OPENSSL_VERSION_NUMBER,
+                    OPENSSL_VERSION_TEXT)) < 0)
                        exit(1);
 
                exit(0);
@@ -2392,8 +2522,8 @@ if test "x$openssl" = "xyes" ; then
                if(fd == NULL)
                        exit(1);
 
-               if ((rc = fprintf(fd ,"%08x (%s)\n", SSLeay(),
-                   SSLeay_version(SSLEAY_VERSION))) <0)
+               if ((rc = fprintf(fd, "%08lx (%s)\n", (unsigned long)SSLeay(),
+                   SSLeay_version(SSLEAY_VERSION))) < 0)
                        exit(1);
 
                exit(0);
@@ -2402,8 +2532,8 @@ if test "x$openssl" = "xyes" ; then
                        ssl_library_ver=`cat conftest.ssllibver`
                        # Check version is supported.
                        case "$ssl_library_ver" in
-                               0090[[0-7]]*|009080[[0-5]]*)
-                                       AC_MSG_ERROR([OpenSSL >= 0.9.8f required (have "$ssl_library_ver")])
+                               10000*|0*)
+                                       AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
                                        ;;
                                *) ;;
                        esac
@@ -2424,6 +2554,7 @@ if test "x$openssl" = "xyes" ; then
                [AC_LANG_PROGRAM([[
        #include <string.h>
        #include <openssl/opensslv.h>
+       #include <openssl/crypto.h>
                ]], [[
                exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
                ]])],
@@ -2567,7 +2698,8 @@ if test "x$openssl" = "xyes" ; then
                [
                        AC_MSG_RESULT([no])
                        unsupported_algorithms="$unsupported_cipers \
-                          aes128-gcm@openssh.com aes256-gcm@openssh.com"
+                          aes128-gcm@openssh.com \
+                          aes256-gcm@openssh.com"
                ]
        )
 
@@ -2610,16 +2742,18 @@ if test "x$openssl" = "xyes" ; then
        # Search for SHA256 support in libc and/or OpenSSL
        AC_CHECK_FUNCS([SHA256_Update EVP_sha256], ,
            [unsupported_algorithms="$unsupported_algorithms \
-               hmac-sha2-256 hmac-sha2-512 \
+               hmac-sha2-256 \
+               hmac-sha2-512 \
                diffie-hellman-group-exchange-sha256 \
-               hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com"
+               hmac-sha2-256-etm@openssh.com \
+               hmac-sha2-512-etm@openssh.com"
             ]
        )
        # Search for RIPE-MD support in OpenSSL
        AC_CHECK_FUNCS([EVP_ripemd160], ,
            [unsupported_algorithms="$unsupported_algorithms \
-               hmac-ripemd160
-               hmac-ripemd160@openssh.com
+               hmac-ripemd160 \
+               hmac-ripemd160@openssh.com \
                hmac-ripemd160-etm@openssh.com"
             ]
        )
@@ -2720,24 +2854,30 @@ if test "x$openssl" = "xyes" ; then
                TEST_SSH_ECC=yes
                COMMENT_OUT_ECC=""
        else
-               unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp256 \
-                   ecdh-sha2-nistp256 ecdsa-sha2-nistp256-cert-v01@openssh.com"
+               unsupported_algorithms="$unsupported_algorithms \
+                       ecdsa-sha2-nistp256 \
+                       ecdh-sha2-nistp256 \
+                       ecdsa-sha2-nistp256-cert-v01@openssh.com"
        fi
        if test x$enable_nistp384 = x1; then
                AC_DEFINE([OPENSSL_HAS_NISTP384], [1], [libcrypto has NID_secp384r1])
                TEST_SSH_ECC=yes
                COMMENT_OUT_ECC=""
        else
-               unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp384 \
-                   ecdh-sha2-nistp384 ecdsa-sha2-nistp384-cert-v01@openssh.com"
+               unsupported_algorithms="$unsupported_algorithms \
+                       ecdsa-sha2-nistp384 \
+                       ecdh-sha2-nistp384 \
+                       ecdsa-sha2-nistp384-cert-v01@openssh.com"
        fi
        if test x$enable_nistp521 = x1; then
                AC_DEFINE([OPENSSL_HAS_NISTP521], [1], [libcrypto has NID_secp521r1])
                TEST_SSH_ECC=yes
                COMMENT_OUT_ECC=""
        else
-               unsupported_algorithms="$unsupported_algorithms ecdh-sha2-nistp521 \
-                   ecdsa-sha2-nistp521 ecdsa-sha2-nistp521-cert-v01@openssh.com"
+               unsupported_algorithms="$unsupported_algorithms \
+                       ecdh-sha2-nistp521 \
+                       ecdsa-sha2-nistp521 \
+                       ecdsa-sha2-nistp521-cert-v01@openssh.com"
        fi
 
        AC_SUBST([TEST_SSH_ECC])
@@ -2759,7 +2899,7 @@ AC_CHECK_LIB([iaf], [ia_openinfo], [
        LIBS="$LIBS -liaf"
        AC_CHECK_FUNCS([set_id], [SSHDLIBS="$SSHDLIBS -liaf"
                                AC_DEFINE([HAVE_LIBIAF], [1],
-                       [Define if system has libiaf that supports set_id])
+                       [Define if system has libiaf that supports set_id])
                                ])
 ])
 LIBS="$saved_LIBS"
@@ -2918,6 +3058,17 @@ AC_ARG_WITH([pam],
        ]
 )
 
+AC_ARG_WITH([pam-service],
+       [  --with-pam-service=name Specify PAM service name ],
+       [
+               if test "x$withval" != "xno" && \
+                  test "x$withval" != "xyes" ; then
+                       AC_DEFINE_UNQUOTED([SSHD_PAM_SERVICE],
+                               ["$withval"], [sshd PAM service name])
+               fi
+       ]
+)
+
 # Check for older PAM
 if test "x$PAM_MSG" = "xyes" ; then
        # Check PAM strerror arguments (old PAM)
@@ -2998,7 +3149,7 @@ fi
 # Decide which sandbox style to use
 sandbox_arg=""
 AC_ARG_WITH([sandbox],
-       [  --with-sandbox=style    Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter, capsicum)],
+       [  --with-sandbox=style    Specify privilege separation sandbox (no, capsicum, darwin, rlimit, seccomp_filter, systrace, pledge)],
        [
                if test "x$withval" = "xyes" ; then
                        sandbox_arg=""
@@ -3094,7 +3245,13 @@ AC_RUN_IFELSE(
        [AC_MSG_WARN([cross compiling: assuming yes])]
 )
 
-if test "x$sandbox_arg" = "xsystrace" || \
+if test "x$sandbox_arg" = "xpledge" || \
+   ( test -z "$sandbox_arg" && test "x$ac_cv_func_pledge" = "xyes" ) ; then
+       test "x$ac_cv_func_pledge" != "xyes" && \
+               AC_MSG_ERROR([pledge sandbox requires pledge(2) support])
+       SANDBOX_STYLE="pledge"
+       AC_DEFINE([SANDBOX_PLEDGE], [1], [Sandbox using pledge(2)])
+elif test "x$sandbox_arg" = "xsystrace" || \
    ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
        test "x$have_systr_policy_kill" != "x1" && \
                AC_MSG_ERROR([systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support])
@@ -3147,6 +3304,10 @@ elif test "x$sandbox_arg" = "xrlimit" || \
                AC_MSG_ERROR([rlimit sandbox requires select to work with rlimit])
        SANDBOX_STYLE="rlimit"
        AC_DEFINE([SANDBOX_RLIMIT], [1], [Sandbox using setrlimit(2)])
+elif test "x$sandbox_arg" = "xsolaris" || \
+   ( test -z "$sandbox_arg" && test "x$SOLARIS_PRIVS" = "xyes" ) ; then
+       SANDBOX_STYLE="solaris"
+       AC_DEFINE([SANDBOX_SOLARIS], [1], [Sandbox using Solaris/Illumos privileges])
 elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
      test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
        SANDBOX_STYLE="none"
@@ -3275,7 +3436,7 @@ fi
 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ u_int a; a = 1;]])],
-       [ ac_cv_have_u_int="yes" ], [ ac_cv_have_u_int="no" 
+       [ ac_cv_have_u_int="yes" ], [ ac_cv_have_u_int="no"
        ])
 ])
 if test "x$ac_cv_have_u_int" = "xyes" ; then
@@ -3286,7 +3447,7 @@ fi
 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ int8_t a; int16_t b; int32_t c; a = b = c = 1;]])],
-       [ ac_cv_have_intxx_t="yes" ], [ ac_cv_have_intxx_t="no" 
+       [ ac_cv_have_intxx_t="yes" ], [ ac_cv_have_intxx_t="no"
        ])
 ])
 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
@@ -3303,7 +3464,7 @@ then
                [
                        AC_DEFINE([HAVE_INTXX_T])
                        AC_MSG_RESULT([yes])
-               ], [ AC_MSG_RESULT([no]) 
+               ], [ AC_MSG_RESULT([no])
        ])
 fi
 
@@ -3320,7 +3481,7 @@ AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
                ]], [[
 int64_t a; a = 1;
                ]])],
-       [ ac_cv_have_int64_t="yes" ], [ ac_cv_have_int64_t="no" 
+       [ ac_cv_have_int64_t="yes" ], [ ac_cv_have_int64_t="no"
        ])
 ])
 if test "x$ac_cv_have_int64_t" = "xyes" ; then
@@ -3330,7 +3491,7 @@ fi
 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;]])],
-       [ ac_cv_have_u_intxx_t="yes" ], [ ac_cv_have_u_intxx_t="no" 
+       [ ac_cv_have_u_intxx_t="yes" ], [ ac_cv_have_u_intxx_t="no"
        ])
 ])
 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
@@ -3345,14 +3506,14 @@ if test -z "$have_u_intxx_t" ; then
                [
                        AC_DEFINE([HAVE_U_INTXX_T])
                        AC_MSG_RESULT([yes])
-               ], [ AC_MSG_RESULT([no]) 
+               ], [ AC_MSG_RESULT([no])
        ])
 fi
 
 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ u_int64_t a; a = 1;]])],
-       [ ac_cv_have_u_int64_t="yes" ], [ ac_cv_have_u_int64_t="no" 
+       [ ac_cv_have_u_int64_t="yes" ], [ ac_cv_have_u_int64_t="no"
        ])
 ])
 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
@@ -3369,7 +3530,7 @@ then
                [
                        AC_DEFINE([HAVE_U_INT64_T])
                        AC_MSG_RESULT([yes])
-               ], [ AC_MSG_RESULT([no]) 
+               ], [ AC_MSG_RESULT([no])
        ])
 fi
 
@@ -3383,7 +3544,7 @@ if test -z "$have_u_intxx_t" ; then
        uint32_t c;
        a = b = c = 1;
                        ]])],
-               [ ac_cv_have_uintxx_t="yes" ], [ ac_cv_have_uintxx_t="no" 
+               [ ac_cv_have_uintxx_t="yes" ], [ ac_cv_have_uintxx_t="no"
                ])
        ])
        if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
@@ -3401,7 +3562,7 @@ then
                [
                        AC_DEFINE([HAVE_UINTXX_T])
                        AC_MSG_RESULT([yes])
-               ], [ AC_MSG_RESULT([no]) 
+               ], [ AC_MSG_RESULT([no])
        ])
 fi
 
@@ -3414,7 +3575,7 @@ then
                [
                        AC_DEFINE([HAVE_UINTXX_T])
                        AC_MSG_RESULT([yes])
-               ], [ AC_MSG_RESULT([no]) 
+               ], [ AC_MSG_RESULT([no])
        ])
 fi
 
@@ -3441,7 +3602,7 @@ fi
 AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ u_char foo; foo = 125; ]])],
-       [ ac_cv_have_u_char="yes" ], [ ac_cv_have_u_char="no" 
+       [ ac_cv_have_u_char="yes" ], [ ac_cv_have_u_char="no"
        ])
 ])
 if test "x$ac_cv_have_u_char" = "xyes" ; then
@@ -3476,7 +3637,7 @@ AC_CHECK_TYPES([in_addr_t, in_port_t], , ,
 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ size_t foo; foo = 1235; ]])],
-       [ ac_cv_have_size_t="yes" ], [ ac_cv_have_size_t="no" 
+       [ ac_cv_have_size_t="yes" ], [ ac_cv_have_size_t="no"
        ])
 ])
 if test "x$ac_cv_have_size_t" = "xyes" ; then
@@ -3486,7 +3647,7 @@ fi
 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ ssize_t foo; foo = 1235; ]])],
-       [ ac_cv_have_ssize_t="yes" ], [ ac_cv_have_ssize_t="no" 
+       [ ac_cv_have_ssize_t="yes" ], [ ac_cv_have_ssize_t="no"
        ])
 ])
 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
@@ -3496,7 +3657,7 @@ fi
 AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <time.h> ]],
        [[ clock_t foo; foo = 1235; ]])],
-       [ ac_cv_have_clock_t="yes" ], [ ac_cv_have_clock_t="no" 
+       [ ac_cv_have_clock_t="yes" ], [ ac_cv_have_clock_t="no"
        ])
 ])
 if test "x$ac_cv_have_clock_t" = "xyes" ; then
@@ -3527,7 +3688,7 @@ fi
 AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ pid_t foo; foo = 1235; ]])],
-       [ ac_cv_have_pid_t="yes" ], [ ac_cv_have_pid_t="no" 
+       [ ac_cv_have_pid_t="yes" ], [ ac_cv_have_pid_t="no"
        ])
 ])
 if test "x$ac_cv_have_pid_t" = "xyes" ; then
@@ -3537,7 +3698,7 @@ fi
 AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
        [[ mode_t foo; foo = 1235; ]])],
-       [ ac_cv_have_mode_t="yes" ], [ ac_cv_have_mode_t="no" 
+       [ ac_cv_have_mode_t="yes" ], [ ac_cv_have_mode_t="no"
        ])
 ])
 if test "x$ac_cv_have_mode_t" = "xyes" ; then
@@ -3551,7 +3712,7 @@ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage
 #include <sys/socket.h>
                ]], [[ struct sockaddr_storage s; ]])],
        [ ac_cv_have_struct_sockaddr_storage="yes" ],
-       [ ac_cv_have_struct_sockaddr_storage="no" 
+       [ ac_cv_have_struct_sockaddr_storage="no"
        ])
 ])
 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
@@ -3565,7 +3726,7 @@ AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
 #include <netinet/in.h>
                ]], [[ struct sockaddr_in6 s; s.sin6_family = 0; ]])],
        [ ac_cv_have_struct_sockaddr_in6="yes" ],
-       [ ac_cv_have_struct_sockaddr_in6="no" 
+       [ ac_cv_have_struct_sockaddr_in6="no"
        ])
 ])
 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
@@ -3579,7 +3740,7 @@ AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
 #include <netinet/in.h>
                ]], [[ struct in6_addr s; s.s6_addr[0] = 0; ]])],
        [ ac_cv_have_struct_in6_addr="yes" ],
-       [ ac_cv_have_struct_in6_addr="no" 
+       [ ac_cv_have_struct_in6_addr="no"
        ])
 ])
 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
@@ -3603,7 +3764,7 @@ AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
 #include <netdb.h>
                ]], [[ struct addrinfo s; s.ai_flags = AI_PASSIVE; ]])],
        [ ac_cv_have_struct_addrinfo="yes" ],
-       [ ac_cv_have_struct_addrinfo="no" 
+       [ ac_cv_have_struct_addrinfo="no"
        ])
 ])
 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
@@ -3615,7 +3776,7 @@ AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/time.h> ]],
        [[ struct timeval tv; tv.tv_sec = 1;]])],
        [ ac_cv_have_struct_timeval="yes" ],
-       [ ac_cv_have_struct_timeval="no" 
+       [ ac_cv_have_struct_timeval="no"
        ])
 ])
 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
@@ -3723,7 +3884,7 @@ AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
 #include <sys/socket.h>
                ]], [[ struct sockaddr_storage s; s.__ss_family = 1; ]])],
        [ ac_cv_have___ss_family_in_struct_ss="yes" ],
-       [ ac_cv_have___ss_family_in_struct_ss="no" 
+       [ ac_cv_have___ss_family_in_struct_ss="no"
        ])
 ])
 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
@@ -3822,7 +3983,7 @@ AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
                [[ extern char *__progname; printf("%s", __progname); ]])],
        [ ac_cv_libc_defines___progname="yes" ],
-       [ ac_cv_libc_defines___progname="no" 
+       [ ac_cv_libc_defines___progname="no"
        ])
 ])
 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
@@ -3833,7 +3994,7 @@ AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNC
        AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
                [[ printf("%s", __FUNCTION__); ]])],
        [ ac_cv_cc_implements___FUNCTION__="yes" ],
-       [ ac_cv_cc_implements___FUNCTION__="no" 
+       [ ac_cv_cc_implements___FUNCTION__="no"
        ])
 ])
 if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
@@ -3845,7 +4006,7 @@ AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__,
        AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
                [[ printf("%s", __func__); ]])],
        [ ac_cv_cc_implements___func__="yes" ],
-       [ ac_cv_cc_implements___func__="no" 
+       [ ac_cv_cc_implements___func__="no"
        ])
 ])
 if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
@@ -3858,7 +4019,7 @@ AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [
 va_list x,y;
                ]], [[ va_copy(x,y); ]])],
        [ ac_cv_have_va_copy="yes" ],
-       [ ac_cv_have_va_copy="no" 
+       [ ac_cv_have_va_copy="no"
        ])
 ])
 if test "x$ac_cv_have_va_copy" = "xyes" ; then
@@ -3870,7 +4031,7 @@ AC_CACHE_CHECK([whether __va_copy exists], ac_cv_have___va_copy, [
 #include <stdarg.h>
 va_list x,y;
                ]], [[ __va_copy(x,y); ]])],
-       [ ac_cv_have___va_copy="yes" ], [ ac_cv_have___va_copy="no" 
+       [ ac_cv_have___va_copy="yes" ], [ ac_cv_have___va_copy="no"
        ])
 ])
 if test "x$ac_cv_have___va_copy" = "xyes" ; then
@@ -3882,7 +4043,7 @@ AC_CACHE_CHECK([whether getopt has optreset support],
        AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <getopt.h> ]],
                [[ extern int optreset; optreset = 0; ]])],
        [ ac_cv_have_getopt_optreset="yes" ],
-       [ ac_cv_have_getopt_optreset="no" 
+       [ ac_cv_have_getopt_optreset="no"
        ])
 ])
 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
@@ -3894,7 +4055,7 @@ AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
 [[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])],
        [ ac_cv_libc_defines_sys_errlist="yes" ],
-       [ ac_cv_libc_defines_sys_errlist="no" 
+       [ ac_cv_libc_defines_sys_errlist="no"
        ])
 ])
 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
@@ -3907,7 +4068,7 @@ AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
 [[ extern int sys_nerr; printf("%i", sys_nerr);]])],
        [ ac_cv_libc_defines_sys_nerr="yes" ],
-       [ ac_cv_libc_defines_sys_nerr="no" 
+       [ ac_cv_libc_defines_sys_nerr="no"
        ])
 ])
 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
@@ -3970,7 +4131,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <arpa/nameser.h>
 #include <resolv.h>
 extern struct __res_state _res;
-               ]], [[ ]])],
+               ]], [[
+struct __res_state *volatile p = &_res;  /* force resolution of _res */
+return 0;
+               ]],)],
                [AC_MSG_RESULT([yes])
                 AC_DEFINE([HAVE__RES_EXTERN], [1],
                    [Define if you have struct __res_state _res as an extern])
@@ -4018,7 +4182,7 @@ AC_ARG_WITH([kerberos5],
                AC_DEFINE([KRB5], [1], [Define if you want Kerberos 5 support])
                KRB5_MSG="yes"
 
-               AC_PATH_PROG([KRB5CONF], [krb5-config],
+               AC_PATH_TOOL([KRB5CONF], [krb5-config],
                             [$KRB5ROOT/bin/krb5-config],
                             [$KRB5ROOT/bin:$PATH])
                if test -x $KRB5CONF ; then
@@ -4063,7 +4227,6 @@ AC_ARG_WITH([kerberos5],
                                           [K5LIBS="$K5LIBS -ldes"])
                                       ], [ AC_MSG_RESULT([no])
                                         K5LIBS="-lkrb5 -lk5crypto -lcom_err"
-                                      
                        ])
                        AC_SEARCH_LIBS([dn_expand], [resolv])
 
@@ -4246,7 +4409,7 @@ AC_ARG_WITH([maildir],
        exit(0);
                ]])],
                [
-                   maildir_what=`awk -F: '{print $1}' conftest.maildir`
+                   maildir_what=`awk -F: '{print $1}' conftest.maildir`
                    maildir=`awk -F: '{print $2}' conftest.maildir \
                        | sed 's|/$||'`
                    AC_MSG_RESULT([Using: $maildir from $maildir_what])
@@ -4591,7 +4754,7 @@ AC_ARG_WITH([pid-dir],
        ]
 )
 
-AC_DEFINE_UNQUOTED([_PATH_SSH_PIDDIR], ["$piddir"], 
+AC_DEFINE_UNQUOTED([_PATH_SSH_PIDDIR], ["$piddir"],
        [Specify location of ssh.pid])
 AC_SUBST([piddir])
 
@@ -4749,7 +4912,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
        ]], [[ char *utmp = UTMP_FILE; ]])],
        [ AC_MSG_RESULT([yes]) ],
        [ AC_MSG_RESULT([no])
-         system_utmp_path=no 
+         system_utmp_path=no
 ])
 if test -z "$conf_utmp_location"; then
        if test x"$system_utmp_path" = x"no" ; then
@@ -4779,7 +4942,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
        ]], [[ char *wtmp = WTMP_FILE; ]])],
        [ AC_MSG_RESULT([yes]) ],
        [ AC_MSG_RESULT([no])
-         system_wtmp_path=no 
+         system_wtmp_path=no
 ])
 if test -z "$conf_wtmp_location"; then
        if test x"$system_wtmp_path" = x"no" ; then
@@ -4812,7 +4975,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
        ]], [[ char *wtmpx = WTMPX_FILE; ]])],
        [ AC_MSG_RESULT([yes]) ],
        [ AC_MSG_RESULT([no])
-         system_wtmpx_path=no 
+         system_wtmpx_path=no
 ])
 if test -z "$conf_wtmpx_location"; then
        if test x"$system_wtmpx_path" = x"no" ; then
@@ -4877,6 +5040,7 @@ else
 fi
 AC_CHECK_DECL([BROKEN_GETADDRINFO],  [TEST_SSH_IPV6=no])
 AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
+AC_SUBST([TEST_SSH_UTF8], [$TEST_SSH_UTF8])
 AC_SUBST([TEST_MALLOC_OPTIONS], [$TEST_MALLOC_OPTIONS])
 AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
 
@@ -4931,8 +5095,10 @@ echo "                 Smartcard support: $SCARD_MSG"
 echo "                     S/KEY support: $SKEY_MSG"
 echo "              MD5 password support: $MD5_MSG"
 echo "                   libedit support: $LIBEDIT_MSG"
+echo "                   libldns support: $LDNS_MSG"
 echo "  Solaris process contract support: $SPC_MSG"
 echo "           Solaris project support: $SP_MSG"
+echo "         Solaris privilege support: $SPP_MSG"
 echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
 echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
 echo "                  BSD Auth support: $BSD_AUTH_MSG"
index eaf7fe2..3a36387 100644 (file)
@@ -13,5 +13,10 @@ gnome-ssh-askpass2: gnome-ssh-askpass2.c
                gnome-ssh-askpass2.c -o gnome-ssh-askpass2 \
                `$(PKG_CONFIG) --libs gtk+-2.0 x11`
 
+gnome-ssh-askpass3: gnome-ssh-askpass2.c
+       $(CC) $(CFLAGS) `$(PKG_CONFIG) --cflags gtk+-3.0` \
+               gnome-ssh-askpass2.c -o gnome-ssh-askpass3 \
+               `$(PKG_CONFIG) --libs gtk+-3.0 x11`
+
 clean:
-       rm -f *.o gnome-ssh-askpass1 gnome-ssh-askpass2 gnome-ssh-askpass
+       rm -f *.o gnome-ssh-askpass gnome-ssh-askpass[123]
index 1396d99..a73a0f6 100644 (file)
@@ -25,6 +25,7 @@ Options:
     --yes    -y            Answer all questions with "yes" automatically.
     --no     -n            Answer all questions with "no" automatically.
     --cygwin -c <options>  Use "options" as value for CYGWIN environment var.
+    --name   -N <name>     sshd windows service name.
     --port   -p <n>        sshd listens on port n.
     --user   -u <account>  privileged user for service, default 'cyg_server'.
     --pwd    -w <passwd>   Use "pwd" as password for privileged user.
index d934d09..db6aaa0 100644 (file)
@@ -63,7 +63,6 @@ sshd_config_configured=no
 port_number=22
 service_name=sshd
 strictmodes=yes
-privsep_used=yes
 cygwin_value=""
 user_account=
 password_value=
@@ -140,33 +139,21 @@ sshd_strictmodes() {
 
 # ======================================================================
 # Routine: sshd_privsep
-#  MODIFIES: privsep_used
+# Try to create ssshd user account
 # ======================================================================
 sshd_privsep() {
   local ret=0
 
   if [ "${sshd_config_configured}" != "yes" ]
   then
-    echo
-    csih_inform "Privilege separation is set to 'sandbox' by default since"
-    csih_inform "OpenSSH 6.1.  This is unsupported by Cygwin and has to be set"
-    csih_inform "to 'yes' or 'no'."
-    csih_inform "However, using privilege separation requires a non-privileged account"
-    csih_inform "called 'sshd'."
-    csih_inform "For more info on privilege separation read /usr/share/doc/openssh/README.privsep."
-    if csih_request "Should privilege separation be used?"
+    if ! csih_create_unprivileged_user sshd
     then
-      privsep_used=yes
-      if ! csih_create_unprivileged_user sshd
-      then
-       csih_error_recoverable "Couldn't create user 'sshd'!"
-       csih_error_recoverable "Privilege separation set to 'no' again!"
-       csih_error_recoverable "Check your ${SYSCONFDIR}/sshd_config file!"
-       let ++ret
-       privsep_used=no
-      fi
-    else
-      privsep_used=no
+      csih_error_recoverable "Could not create user 'sshd'!"
+      csih_error_recoverable "You will not be able to run an sshd service"
+      csih_error_recoverable "under a privileged account successfully."
+      csih_error_recoverable "Make sure to create a non-privileged user 'sshd'"
+      csih_error_recoverable "manually before trying to run the service!"
+      let ++ret
     fi
   fi
   return $ret
@@ -202,18 +189,6 @@ sshd_config_tweak() {
       let ++ret
     fi
   fi
-  if [ "${sshd_config_configured}" != "yes" ]
-  then
-    /usr/bin/sed -i -e "
-      s/^#\?UsePrivilegeSeparation .*/UsePrivilegeSeparation ${privsep_used}/" \
-      ${SYSCONFDIR}/sshd_config
-    if [ $? -ne 0 ]
-    then
-      csih_warning "Setting privilege separation failed!"
-      csih_warning "Check your ${SYSCONFDIR}/sshd_config file!"
-      let ++ret
-    fi
-  fi
   return $ret
 } # --- End of sshd_config_tweak --- #
 
@@ -693,7 +668,7 @@ then
   fi
 fi
 
-# handle sshd_config (and privsep)
+# handle sshd_config
 csih_install_config "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults" || let ++warning_cnt
 if ! /usr/bin/cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1
 then
index 9d97c30..535a692 100644 (file)
 #include <gdk/gdkx.h>
 
 static void
-report_failed_grab (const char *what)
+report_failed_grab (GtkWidget *parent_window, const char *what)
 {
        GtkWidget *err;
 
-       err = gtk_message_dialog_new(NULL, 0,
+       err = gtk_message_dialog_new(GTK_WINDOW(parent_window), 0,
                                     GTK_MESSAGE_ERROR,
                                     GTK_BUTTONS_CLOSE,
                                     "Could not grab %s. "
                                     "A malicious client may be eavesdropping "
                                     "on your session.", what);
        gtk_window_set_position(GTK_WINDOW(err), GTK_WIN_POS_CENTER);
-       gtk_label_set_line_wrap(GTK_LABEL((GTK_MESSAGE_DIALOG(err))->label),
-                               TRUE);
 
        gtk_dialog_run(GTK_DIALOG(err));
 
@@ -89,22 +87,27 @@ passphrase_dialog(char *message)
        const char *failed;
        char *passphrase, *local;
        int result, grab_tries, grab_server, grab_pointer;
-       GtkWidget *dialog, *entry;
+       GtkWidget *parent_window, *dialog, *entry;
        GdkGrabStatus status;
 
        grab_server = (getenv("GNOME_SSH_ASKPASS_GRAB_SERVER") != NULL);
        grab_pointer = (getenv("GNOME_SSH_ASKPASS_GRAB_POINTER") != NULL);
        grab_tries = 0;
 
-       dialog = gtk_message_dialog_new(NULL, 0,
+       /* Create an invisible parent window so that GtkDialog doesn't
+        * complain.  */
+       parent_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+       dialog = gtk_message_dialog_new(GTK_WINDOW(parent_window), 0,
                                        GTK_MESSAGE_QUESTION,
                                        GTK_BUTTONS_OK_CANCEL,
                                        "%s",
                                        message);
 
        entry = gtk_entry_new();
-       gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), entry, FALSE,
-           FALSE, 0);
+       gtk_box_pack_start(
+           GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), entry,
+           FALSE, FALSE, 0);
        gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
        gtk_widget_grab_focus(entry);
        gtk_widget_show(entry);
@@ -112,8 +115,6 @@ passphrase_dialog(char *message)
        gtk_window_set_title(GTK_WINDOW(dialog), "OpenSSH");
        gtk_window_set_position (GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
        gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
-       gtk_label_set_line_wrap(GTK_LABEL((GTK_MESSAGE_DIALOG(dialog))->label),
-                               TRUE);
 
        /* Make <enter> close dialog */
        gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
@@ -127,8 +128,8 @@ passphrase_dialog(char *message)
        if (grab_pointer) {
                for(;;) {
                        status = gdk_pointer_grab(
-                          (GTK_WIDGET(dialog))->window, TRUE, 0, NULL,
-                          NULL, GDK_CURRENT_TIME);
+                           (gtk_widget_get_window(GTK_WIDGET(dialog))), TRUE,
+                           0, NULL, NULL, GDK_CURRENT_TIME);
                        if (status == GDK_GRAB_SUCCESS)
                                break;
                        usleep(GRAB_WAIT * 1000);
@@ -139,8 +140,9 @@ passphrase_dialog(char *message)
                }
        }
        for(;;) {
-               status = gdk_keyboard_grab((GTK_WIDGET(dialog))->window,
-                  FALSE, GDK_CURRENT_TIME);
+               status = gdk_keyboard_grab(
+                   gtk_widget_get_window(GTK_WIDGET(dialog)), FALSE,
+                   GDK_CURRENT_TIME);
                if (status == GDK_GRAB_SUCCESS)
                        break;
                usleep(GRAB_WAIT * 1000);
@@ -157,7 +159,7 @@ passphrase_dialog(char *message)
 
        /* Ungrab */
        if (grab_server)
-               XUngrabServer(GDK_DISPLAY());
+               XUngrabServer(gdk_x11_get_default_xdisplay());
        if (grab_pointer)
                gdk_pointer_ungrab(GDK_CURRENT_TIME);
        gdk_keyboard_ungrab(GDK_CURRENT_TIME);
@@ -193,10 +195,10 @@ passphrase_dialog(char *message)
        gdk_pointer_ungrab(GDK_CURRENT_TIME);
  nograb:
        if (grab_server)
-               XUngrabServer(GDK_DISPLAY());
+               XUngrabServer(gdk_x11_get_default_xdisplay());
        gtk_widget_destroy(dialog);
        
-       report_failed_grab(failed);
+       report_failed_grab(parent_window, failed);
 
        return (-1);
 }
index 4c55227..7de4545 100644 (file)
@@ -1,4 +1,4 @@
-%define ver 7.1p2
+%define ver 7.5p1
 %define rel 1
 
 # OpenSSH privilege separation requires a user & group ID
@@ -72,8 +72,8 @@ Release: %{rel}rescue
 %else
 Release: %{rel}
 %endif
-URL: http://www.openssh.com/portable.html
-Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
+URL: https://www.openssh.com/portable.html
+Source0: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
 %if ! %{no_x11_askpass}
 Source1: http://www.jmknoble.net/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
 %endif
@@ -89,7 +89,7 @@ Requires: initscripts >= 5.20
 BuildRequires: perl, openssl-devel
 BuildRequires: /bin/login
 %if ! %{build6x}
-BuildPreReq: glibc-devel, pam
+BuildRequires: glibc-devel, pam
 %else
 BuildRequires: /usr/include/security/pam_appl.h
 %endif
@@ -184,7 +184,7 @@ CFLAGS="$RPM_OPT_FLAGS -Os"; export CFLAGS
 %endif
 
 %if %{kerberos5}
-K5DIR=`rpm -ql krb5-devel | grep include/krb5.h | sed 's,\/include\/krb5.h,,'`
+K5DIR=`rpm -ql krb5-devel | grep 'include/krb5\.h' | sed 's,\/include\/krb5.h,,'`
 echo K5DIR=$K5DIR
 %endif
 
@@ -192,7 +192,6 @@ echo K5DIR=$K5DIR
        --sysconfdir=%{_sysconfdir}/ssh \
        --libexecdir=%{_libexecdir}/openssh \
        --datadir=%{_datadir}/openssh \
-       --with-rsh=%{_bindir}/rsh \
        --with-default-path=/usr/local/bin:/bin:/usr/bin \
        --with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \
        --with-privsep-path=%{_var}/empty/sshd \
@@ -359,8 +358,6 @@ fi
 %attr(0644,root,root) %{_mandir}/man1/ssh.1*
 %attr(0644,root,root) %{_mandir}/man5/ssh_config.5*
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
-%attr(-,root,root) %{_bindir}/slogin
-%attr(-,root,root) %{_mandir}/man1/slogin.1*
 %if ! %{rescue}
 %attr(2755,root,nobody) %{_bindir}/ssh-agent
 %attr(0755,root,root) %{_bindir}/ssh-add
index ae88e99..bef5c95 100644 (file)
@@ -56,10 +56,13 @@ then
   fi
 fi
 
-DEFAULT_PUB_ID_FILE=$(ls -t ${HOME}/.ssh/id*.pub 2>/dev/null | grep -v -- '-cert.pub$' | head -n 1)
+DEFAULT_PUB_ID_FILE="$HOME/$(cd "$HOME" ; ls -t .ssh/id*.pub 2>/dev/null | grep -v -- '-cert.pub$' | head -n 1)"
 
 usage () {
-  printf 'Usage: %s [-h|-?|-n] [-i [identity_file]] [-p port] [[-o <ssh -o options>] ...] [user@]hostname\n' "$0" >&2
+  printf 'Usage: %s [-h|-?|-f|-n] [-i [identity_file]] [-p port] [[-o <ssh -o options>] ...] [user@]hostname\n' "$0" >&2
+  printf '\t-f: force mode -- copy keys without trying to check if they are already installed\n' >&2
+  printf '\t-n: dry run    -- no keys are actually copied\n' >&2
+  printf '\t-h|-?: print this help\n' >&2
   exit 1
 }
 
@@ -77,15 +80,18 @@ use_id_file() {
     PUB_ID_FILE="$L_ID_FILE.pub"
   fi
 
-  PRIV_ID_FILE=$(dirname "$PUB_ID_FILE")/$(basename "$PUB_ID_FILE" .pub)
+  [ "$FORCED" ] || PRIV_ID_FILE=$(dirname "$PUB_ID_FILE")/$(basename "$PUB_ID_FILE" .pub)
 
   # check that the files are readable
-  for f in $PUB_ID_FILE $PRIV_ID_FILE ; do
-    ErrMSG=$( { : < $f ; } 2>&1 ) || {
-      printf "\n%s: ERROR: failed to open ID file '%s': %s\n\n" "$0" "$f" "$(printf "%s\n" "$ErrMSG" | sed -e 's/.*: *//')"
+  for f in "$PUB_ID_FILE" ${PRIV_ID_FILE:+"$PRIV_ID_FILE"} ; do
+    ErrMSG=$( { : < "$f" ; } 2>&1 ) || {
+      local L_PRIVMSG=""
+      [ "$f" = "$PRIV_ID_FILE" ] && L_PRIVMSG="        (to install the contents of '$PUB_ID_FILE' anyway, look at the -f option)"
+      printf "\n%s: ERROR: failed to open ID file '%s': %s\n" "$0" "$f" "$(printf "%s\n%s\n" "$ErrMSG" "$L_PRIVMSG" | sed -e 's/.*: *//')"
       exit 1
     }
   done
+  printf '%s: INFO: Source of key(s) to be installed: "%s"\n' "$0" "$PUB_ID_FILE" >&2
   GET_ID="cat \"$PUB_ID_FILE\""
 }
 
@@ -121,7 +127,7 @@ do
       }
       shift
       ;;
-    -n|-h|-\?)
+    -f|-n|-h|-\?)
       OPT="$1"
       OPTARG=
       shift
@@ -154,6 +160,9 @@ do
     -o|-p)
       SSH_OPTS="${SSH_OPTS:+$SSH_OPTS }$OPT '$(quote "$OPTARG")'"
       ;;
+    -f)
+      FORCED=1
+      ;;
     -n)
       DRY_RUN=1
       ;;
@@ -194,56 +203,65 @@ fi
 populate_new_ids() {
   local L_SUCCESS="$1"
 
+  if [ "$FORCED" ] ; then
+    NEW_IDS=$(eval $GET_ID)
+    return
+  fi
+
   # repopulate "$@" inside this function 
   eval set -- "$SSH_OPTS"
 
   umask 0177
   local L_TMP_ID_FILE=$(mktemp ~/.ssh/ssh-copy-id_id.XXXXXXXXXX)
   if test $? -ne 0 || test "x$L_TMP_ID_FILE" = "x" ; then
-    echo "mktemp failed" 1>&2
+    printf '%s: ERROR: mktemp failed\n' "$0" >&2
     exit 1
   fi
-  trap "rm -f $L_TMP_ID_FILE ${L_TMP_ID_FILE}.pub" EXIT TERM INT QUIT
+  local L_CLEANUP="rm -f \"$L_TMP_ID_FILE\" \"${L_TMP_ID_FILE}.stderr\""
+  trap "$L_CLEANUP" EXIT TERM INT QUIT
   printf '%s: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n' "$0" >&2
   NEW_IDS=$(
     eval $GET_ID | {
-      while read ID ; do
-        printf '%s\n' "$ID" > $L_TMP_ID_FILE
+      while read ID || [ "$ID" ] ; do
+        printf '%s\n' "$ID" > "$L_TMP_ID_FILE"
 
         # the next line assumes $PRIV_ID_FILE only set if using a single id file - this
         # assumption will break if we implement the possibility of multiple -i options.
         # The point being that if file based, ssh needs the private key, which it cannot
         # find if only given the contents of the .pub file in an unrelated tmpfile
         ssh -i "${PRIV_ID_FILE:-$L_TMP_ID_FILE}" \
+            -o ControlPath=none \
+            -o LogLevel=INFO \
             -o PreferredAuthentications=publickey \
-            -o IdentitiesOnly=yes "$@" exit 2>$L_TMP_ID_FILE.stderr </dev/null
+            -o IdentitiesOnly=yes "$@" exit 2>"$L_TMP_ID_FILE.stderr" </dev/null
         if [ "$?" = "$L_SUCCESS" ] ; then
-          : > $L_TMP_ID_FILE
+          : > "$L_TMP_ID_FILE"
         else
-          grep 'Permission denied' $L_TMP_ID_FILE.stderr >/dev/null || {
-            sed -e 's/^/ERROR: /' <$L_TMP_ID_FILE.stderr >$L_TMP_ID_FILE
+          grep 'Permission denied' "$L_TMP_ID_FILE.stderr" >/dev/null || {
+            sed -e 's/^/ERROR: /' <"$L_TMP_ID_FILE.stderr" >"$L_TMP_ID_FILE"
             cat >/dev/null #consume the other keys, causing loop to end
           }
         fi
 
-        cat $L_TMP_ID_FILE
+        cat "$L_TMP_ID_FILE"
       done
     }
   )
-  rm -f $L_TMP_ID_FILE* && trap - EXIT TERM INT QUIT
+  eval "$L_CLEANUP" && trap - EXIT TERM INT QUIT
 
   if expr "$NEW_IDS" : "^ERROR: " >/dev/null ; then
     printf '\n%s: %s\n\n' "$0" "$NEW_IDS" >&2
     exit 1
   fi
   if [ -z "$NEW_IDS" ] ; then
-    printf '\n%s: WARNING: All keys were skipped because they already exist on the remote system.\n\n' "$0" >&2
+    printf '\n%s: WARNING: All keys were skipped because they already exist on the remote system.\n' "$0" >&2
+    printf '\t\t(if you think this is a mistake, you may want to use -f option)\n\n' "$0" >&2
     exit 0
   fi
   printf '%s: INFO: %d key(s) remain to be installed -- if you are prompted now it is to install the new keys\n' "$0" "$(printf '%s\n' "$NEW_IDS" | wc -l)" >&2
 }
 
-REMOTE_VERSION=$(ssh -v -o PreferredAuthentications=',' "$@" 2>&1 |
+REMOTE_VERSION=$(ssh -v -o PreferredAuthentications=',' -o ControlPath=none "$@" 2>&1 |
                  sed -ne 's/.*remote software version //p')
 
 case "$REMOTE_VERSION" in
@@ -269,10 +287,9 @@ case "$REMOTE_VERSION" in
   *)
     # Assuming that the remote host treats ~/.ssh/authorized_keys as one might expect
     populate_new_ids 0
-    [ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | ssh "$@" "
-               umask 077 ;
-               mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ;
-               if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" \
+    # in ssh below - to defend against quirky remote shells: use 'exec sh -c' to get POSIX; 'cd' to be at $HOME; and all on one line, because tcsh.
+    [ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | \
+      ssh "$@" "exec sh -c 'cd ; umask 077 ; mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ; if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi'" \
       || exit 1
     ADDED=$(printf '%s\n' "$NEW_IDS" | wc -l)
     ;;
index 67a59e4..8850cce 100644 (file)
@@ -29,6 +29,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .Nd use locally available keys to authorise logins on a remote machine
 .Sh SYNOPSIS
 .Nm
+.Op Fl f
 .Op Fl n
 .Op Fl i Op Ar identity_file
 .Op Fl p Ar port
@@ -76,6 +77,10 @@ is used.
 Note that this can be used to ensure that the keys copied have the
 comment one prefers and/or extra options applied, by ensuring that the
 key file has these set as preferred before the copy is attempted.
+.It Fl f
+Forced mode: doesn't check if the keys are present on the remote server.
+This means that it does not need the private key.  Of course, this can result
+in more than one copy of the key being installed on the remote system.
 .It Fl n
 do a dry-run.  Instead of installing keys on the remote system simply
 prints the key(s) that would have been installed.
index 3ee5268..e62be39 100644 (file)
@@ -13,8 +13,8 @@
 
 Summary:       OpenSSH, a free Secure Shell (SSH) protocol implementation
 Name:          openssh
-Version:       7.1p2
-URL:           http://www.openssh.com/
+Version:       7.5p1
+URL:           https://www.openssh.com/
 Release:       1
 Source0:       openssh-%{version}.tar.gz
 Source1:       x11-ssh-askpass-%{xversion}.tar.gz
@@ -202,7 +202,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0755,root,root) %{_bindir}/ssh-keygen
 %attr(0755,root,root) %{_bindir}/scp
 %attr(0755,root,root) %{_bindir}/ssh
-%attr(-,root,root) %{_bindir}/slogin
 %attr(0755,root,root) %{_bindir}/ssh-agent
 %attr(0755,root,root) %{_bindir}/ssh-add
 %attr(0755,root,root) %{_bindir}/ssh-keyscan
@@ -214,7 +213,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0755,root,root) %{_libdir}/ssh/ssh-pkcs11-helper
 %attr(0644,root,root) %doc %{_mandir}/man1/scp.1*
 %attr(0644,root,root) %doc %{_mandir}/man1/sftp.1*
-%attr(-,root,root) %doc %{_mandir}/man1/slogin.1*
 %attr(0644,root,root) %doc %{_mandir}/man1/ssh.1*
 %attr(0644,root,root) %doc %{_mandir}/man1/ssh-add.1*
 %attr(0644,root,root) %doc %{_mandir}/man1/ssh-agent.1*
index fa0ccba..c89f85a 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -25,9 +25,6 @@
 #ifndef _DEFINES_H
 #define _DEFINES_H
 
-/* $Id: defines.h,v 1.183 2014/09/02 19:33:26 djm Exp $ */
-
-
 /* Constants */
 
 #if defined(HAVE_DECL_SHUT_RD) && HAVE_DECL_SHUT_RD == 0
@@ -43,6 +40,19 @@ enum
 #endif
 
 /*
+ * Cygwin doesn't really have a notion of reserved ports.  It is still
+ * is useful on the client side so for compatibility it defines as 1024 via
+ * netinet/in.h inside an enum.  We * don't actually want that restriction
+ * so we want to set that to zero, but we can't do it direct in config.h
+ * because it'll cause a conflicting definition the first time we include
+ * netinet/in.h.
+ */
+
+#ifdef HAVE_CYGWIN
+#define IPPORT_RESERVED 0
+#endif
+
+/*
  * Definitions for IP type of service (ip_tos)
  */
 #include <netinet/in_systm.h>
@@ -823,6 +833,13 @@ struct winsize {
 #endif
 
 /*
+ * We want functions in openbsd-compat, if enabled, to override system ones.
+ * We no-op out the weak symbol definition rather than remove it to reduce
+ * future sync problems.
+ */
+#define DEF_WEAK(x)
+
+/*
  * Platforms that have arc4random_uniform() and not arc4random_stir()
  * shouldn't need the latter.
  */
@@ -850,4 +867,11 @@ struct winsize {
 # endif /* gcc version */
 #endif /* __predict_true */
 
+#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
+    defined(GLOB_HAS_GL_MATCHC) && defined(GLOB_HAS_GL_STATV) && \
+    defined(HAVE_DECL_GLOB_NOMATCH) &&  HAVE_DECL_GLOB_NOMATCH != 0 && \
+    !defined(BROKEN_GLOB)
+# define USE_SYSTEM_GLOB
+#endif
+
 #endif /* _DEFINES_H */
diff --git a/dh.c b/dh.c
index 981f63e..56caacd 100644 (file)
--- a/dh.c
+++ b/dh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.c,v 1.57 2015/05/27 23:39:18 dtucker Exp $ */
+/* $OpenBSD: dh.c,v 1.62 2016/12/15 21:20:41 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Niels Provos.  All rights reserved.
  *
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN */
 
 #include <openssl/bn.h>
 #include <openssl/dh.h>
 
+#include <errno.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -151,10 +151,9 @@ choose_dh(int min, int wantbits, int max)
        int linenum;
        struct dhgroup dhg;
 
-       if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL &&
-           (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) {
-               logit("WARNING: %s does not exist, using fixed modulus",
-                   _PATH_DH_MODULI);
+       if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL) {
+               logit("WARNING: could not open %s (%s), using fixed modulus",
+                   _PATH_DH_MODULI, strerror(errno));
                return (dh_new_group_fallback(max));
        }
 
@@ -182,7 +181,7 @@ choose_dh(int min, int wantbits, int max)
 
        if (bestcount == 0) {
                fclose(f);
-               logit("WARNING: no suitable primes in %s", _PATH_DH_PRIMES);
+               logit("WARNING: no suitable primes in %s", _PATH_DH_MODULI);
                return (dh_new_group_fallback(max));
        }
 
@@ -203,7 +202,7 @@ choose_dh(int min, int wantbits, int max)
        fclose(f);
        if (linenum != which+1) {
                logit("WARNING: line %d disappeared in %s, giving up",
-                   which, _PATH_DH_PRIMES);
+                   which, _PATH_DH_MODULI);
                return (dh_new_group_fallback(max));
        }
 
@@ -246,12 +245,15 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub)
                        bits_set++;
        debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p));
 
-       /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */
-       if (bits_set > 1)
-               return 1;
-
-       logit("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p));
-       return 0;
+       /*
+        * if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial
+        */
+       if (bits_set < 4) {
+               logit("invalid public DH value (%d/%d)",
+                  bits_set, BN_num_bits(dh->p));
+               return 0;
+       }
+       return 1;
 }
 
 int
@@ -263,11 +265,17 @@ dh_gen_key(DH *dh, int need)
            (pbits = BN_num_bits(dh->p)) <= 0 ||
            need > INT_MAX / 2 || 2 * need > pbits)
                return SSH_ERR_INVALID_ARGUMENT;
-#if !defined(OPENSSL_IS_BORINGSSL)
+       if (need < 256)
+               need = 256;
+       /*
+        * Pollard Rho, Big step/Little Step attacks are O(sqrt(n)),
+        * so double requested need here.
+        */
+#if !defined(ANDROID) || !defined(OPENSSL_IS_BORINGSSL)
        /* BoringSSL renamed |length| to |priv_length| to better reflect its
         * actual use. Also, BoringSSL recognises common groups and chooses the
         * length of the private exponent accoringly. */
-       dh->length = MIN(need * 2, pbits - 1);
+       dh->length = MINIMUM(need * 2, pbits - 1);
 #endif
        if (DH_generate_key(dh) == 0 ||
            !dh_pub_is_valid(dh, dh->pub_key)) {
@@ -310,6 +318,7 @@ dh_new_group(BIGNUM *gen, BIGNUM *modulus)
        return (dh);
 }
 
+/* rfc2409 "Second Oakley Group" (1024 bits) */
 DH *
 dh_new_group1(void)
 {
@@ -324,6 +333,7 @@ dh_new_group1(void)
        return (dh_new_group_asc(gen, group1));
 }
 
+/* rfc3526 group 14 "2048-bit MODP Group" */
 DH *
 dh_new_group14(void)
 {
@@ -343,12 +353,9 @@ dh_new_group14(void)
        return (dh_new_group_asc(gen, group14));
 }
 
-/*
- * 4k bit fallback group used by DH-GEX if moduli file cannot be read.
- * Source: MODP group 16 from RFC3526.
- */
+/* rfc3526 group 16 "4096-bit MODP Group" */
 DH *
-dh_new_group_fallback(int max)
+dh_new_group16(void)
 {
        static char *gen = "2", *group16 =
            "FFFFFFFF" "FFFFFFFF" "C90FDAA2" "2168C234" "C4C6628B" "80DC1CD1"
@@ -374,12 +381,75 @@ dh_new_group_fallback(int max)
            "93B4EA98" "8D8FDDC1" "86FFB7DC" "90A6C08F" "4DF435C9" "34063199"
            "FFFFFFFF" "FFFFFFFF";
 
-       if (max < 4096) {
-               debug3("requested max size %d, using 2k bit group 14", max);
+       return (dh_new_group_asc(gen, group16));
+}
+
+/* rfc3526 group 18 "8192-bit MODP Group" */
+DH *
+dh_new_group18(void)
+{
+       static char *gen = "2", *group16 =
+           "FFFFFFFF" "FFFFFFFF" "C90FDAA2" "2168C234" "C4C6628B" "80DC1CD1"
+           "29024E08" "8A67CC74" "020BBEA6" "3B139B22" "514A0879" "8E3404DD"
+           "EF9519B3" "CD3A431B" "302B0A6D" "F25F1437" "4FE1356D" "6D51C245"
+           "E485B576" "625E7EC6" "F44C42E9" "A637ED6B" "0BFF5CB6" "F406B7ED"
+           "EE386BFB" "5A899FA5" "AE9F2411" "7C4B1FE6" "49286651" "ECE45B3D"
+           "C2007CB8" "A163BF05" "98DA4836" "1C55D39A" "69163FA8" "FD24CF5F"
+           "83655D23" "DCA3AD96" "1C62F356" "208552BB" "9ED52907" "7096966D"
+           "670C354E" "4ABC9804" "F1746C08" "CA18217C" "32905E46" "2E36CE3B"
+           "E39E772C" "180E8603" "9B2783A2" "EC07A28F" "B5C55DF0" "6F4C52C9"
+           "DE2BCBF6" "95581718" "3995497C" "EA956AE5" "15D22618" "98FA0510"
+           "15728E5A" "8AAAC42D" "AD33170D" "04507A33" "A85521AB" "DF1CBA64"
+           "ECFB8504" "58DBEF0A" "8AEA7157" "5D060C7D" "B3970F85" "A6E1E4C7"
+           "ABF5AE8C" "DB0933D7" "1E8C94E0" "4A25619D" "CEE3D226" "1AD2EE6B"
+           "F12FFA06" "D98A0864" "D8760273" "3EC86A64" "521F2B18" "177B200C"
+           "BBE11757" "7A615D6C" "770988C0" "BAD946E2" "08E24FA0" "74E5AB31"
+           "43DB5BFC" "E0FD108E" "4B82D120" "A9210801" "1A723C12" "A787E6D7"
+           "88719A10" "BDBA5B26" "99C32718" "6AF4E23C" "1A946834" "B6150BDA"
+           "2583E9CA" "2AD44CE8" "DBBBC2DB" "04DE8EF9" "2E8EFC14" "1FBECAA6"
+           "287C5947" "4E6BC05D" "99B2964F" "A090C3A2" "233BA186" "515BE7ED"
+           "1F612970" "CEE2D7AF" "B81BDD76" "2170481C" "D0069127" "D5B05AA9"
+           "93B4EA98" "8D8FDDC1" "86FFB7DC" "90A6C08F" "4DF435C9" "34028492"
+           "36C3FAB4" "D27C7026" "C1D4DCB2" "602646DE" "C9751E76" "3DBA37BD"
+           "F8FF9406" "AD9E530E" "E5DB382F" "413001AE" "B06A53ED" "9027D831"
+           "179727B0" "865A8918" "DA3EDBEB" "CF9B14ED" "44CE6CBA" "CED4BB1B"
+           "DB7F1447" "E6CC254B" "33205151" "2BD7AF42" "6FB8F401" "378CD2BF"
+           "5983CA01" "C64B92EC" "F032EA15" "D1721D03" "F482D7CE" "6E74FEF6"
+           "D55E702F" "46980C82" "B5A84031" "900B1C9E" "59E7C97F" "BEC7E8F3"
+           "23A97A7E" "36CC88BE" "0F1D45B7" "FF585AC5" "4BD407B2" "2B4154AA"
+           "CC8F6D7E" "BF48E1D8" "14CC5ED2" "0F8037E0" "A79715EE" "F29BE328"
+           "06A1D58B" "B7C5DA76" "F550AA3D" "8A1FBFF0" "EB19CCB1" "A313D55C"
+           "DA56C9EC" "2EF29632" "387FE8D7" "6E3C0468" "043E8F66" "3F4860EE"
+           "12BF2D5B" "0B7474D6" "E694F91E" "6DBE1159" "74A3926F" "12FEE5E4"
+           "38777CB6" "A932DF8C" "D8BEC4D0" "73B931BA" "3BC832B6" "8D9DD300"
+           "741FA7BF" "8AFC47ED" "2576F693" "6BA42466" "3AAB639C" "5AE4F568"
+           "3423B474" "2BF1C978" "238F16CB" "E39D652D" "E3FDB8BE" "FC848AD9"
+           "22222E04" "A4037C07" "13EB57A8" "1A23F0C7" "3473FC64" "6CEA306B"
+           "4BCBC886" "2F8385DD" "FA9D4B7F" "A2C087E8" "79683303" "ED5BDD3A"
+           "062B3CF5" "B3A278A6" "6D2A13F8" "3F44F82D" "DF310EE0" "74AB6A36"
+           "4597E899" "A0255DC1" "64F31CC5" "0846851D" "F9AB4819" "5DED7EA1"
+           "B1D510BD" "7EE74D73" "FAF36BC3" "1ECFA268" "359046F4" "EB879F92"
+           "4009438B" "481C6CD7" "889A002E" "D5EE382B" "C9190DA6" "FC026E47"
+           "9558E447" "5677E9AA" "9E3050E2" "765694DF" "C81F56E8" "80B96E71"
+           "60C980DD" "98EDD3DF" "FFFFFFFF" "FFFFFFFF";
+
+       return (dh_new_group_asc(gen, group16));
+}
+
+/* Select fallback group used by DH-GEX if moduli file cannot be read. */
+DH *
+dh_new_group_fallback(int max)
+{
+       debug3("%s: requested max size %d", __func__, max);
+       if (max < 3072) {
+               debug3("using 2k bit group 14");
                return dh_new_group14();
+       } else if (max < 6144) {
+               debug3("using 4k bit group 16");
+               return dh_new_group16();
        }
-       debug3("using 4k bit group 16");
-       return (dh_new_group_asc(gen, group16));
+       debug3("using 8k bit group 18");
+       return dh_new_group18();
 }
 
 /*
@@ -389,7 +459,6 @@ dh_new_group_fallback(int max)
  * Management Part 1 (rev 3) limited by the recommended maximum value
  * from RFC4419 section 3.
  */
-
 u_int
 dh_estimate(int bits)
 {
diff --git a/dh.h b/dh.h
index 6546953..bcd485c 100644 (file)
--- a/dh.h
+++ b/dh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.h,v 1.13 2015/05/27 23:39:18 dtucker Exp $ */
+/* $OpenBSD: dh.h,v 1.15 2016/05/02 10:26:04 djm Exp $ */
 
 /*
  * Copyright (c) 2000 Niels Provos.  All rights reserved.
@@ -37,6 +37,8 @@ DH    *dh_new_group_asc(const char *, const char *);
 DH     *dh_new_group(BIGNUM *, BIGNUM *);
 DH     *dh_new_group1(void);
 DH     *dh_new_group14(void);
+DH     *dh_new_group16(void);
+DH     *dh_new_group18(void);
 DH     *dh_new_group_fallback(int);
 
 int     dh_gen_key(DH *, int);
@@ -44,8 +46,11 @@ int   dh_pub_is_valid(DH *, BIGNUM *);
 
 u_int   dh_estimate(int);
 
-/* Min and max values from RFC4419. */
-#define DH_GRP_MIN     1024
+/*
+ * Max value from RFC4419.
+ * Miniumum increased in light of DH precomputation attacks.
+ */
+#define DH_GRP_MIN     2048
 #define DH_GRP_MAX     8192
 
 /*
index 13b63c2..c55ceb9 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: digest-openssl.c,v 1.5 2014/12/21 22:27:56 djm Exp $ */
+/* $OpenBSD: digest-openssl.c,v 1.6 2017/03/10 02:59:51 dtucker Exp $ */
 /*
  * Copyright (c) 2013 Damien Miller <djm@mindrot.org>
  *
@@ -158,7 +158,7 @@ ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
        const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg);
        u_int l = dlen;
 
-       if (dlen > UINT_MAX)
+       if (digest == NULL || dlen > UINT_MAX)
                return SSH_ERR_INVALID_ARGUMENT;
        if (dlen < digest->digest_len) /* No truncation allowed */
                return SSH_ERR_INVALID_ARGUMENT;
index c3d78db..9d5285b 100644 (file)
--- a/entropy.h
+++ b/entropy.h
@@ -22,8 +22,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* $Id: entropy.h,v 1.6 2011/09/09 01:29:41 dtucker Exp $ */
-
 #ifndef _RANDOMS_H
 #define _RANDOMS_H
 
index d617d60..62559ed 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: gss-genr.c,v 1.23 2015/01/20 23:14:00 deraadt Exp $ */
+/* $OpenBSD: gss-genr.c,v 1.24 2016/09/12 01:22:38 deraadt Exp $ */
 
 /*
  * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
@@ -29,7 +29,6 @@
 #ifdef GSSAPI
 
 #include <sys/types.h>
-#include <sys/param.h>
 
 #include <limits.h>
 #include <stdarg.h>
index 2850a47..e23faa9 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostfile.c,v 1.66 2015/05/04 06:10:48 djm Exp $ */
+/* $OpenBSD: hostfile.c,v 1.68 2017/03/10 04:26:06 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -123,14 +123,13 @@ host_hash(const char *host, const char *name_from_hostfile, u_int src_len)
        u_char salt[256], result[256];
        char uu_salt[512], uu_result[512];
        static char encoded[1024];
-       u_int i, len;
+       u_int len;
 
        len = ssh_digest_bytes(SSH_DIGEST_SHA1);
 
        if (name_from_hostfile == NULL) {
                /* Create new salt */
-               for (i = 0; i < len; i++)
-                       salt[i] = arc4random();
+               arc4random_buf(salt, len);
        } else {
                /* Extract salt from known host entry */
                if (extract_salt(name_from_hostfile, src_len, salt,
@@ -420,19 +419,24 @@ write_host_entry(FILE *f, const char *host, const char *ip,
     const struct sshkey *key, int store_hash)
 {
        int r, success = 0;
-       char *hashed_host = NULL;
+       char *hashed_host = NULL, *lhost;
+
+       lhost = xstrdup(host);
+       lowercase(lhost);
 
        if (store_hash) {
-               if ((hashed_host = host_hash(host, NULL, 0)) == NULL) {
+               if ((hashed_host = host_hash(lhost, NULL, 0)) == NULL) {
                        error("%s: host_hash failed", __func__);
+                       free(lhost);
                        return 0;
                }
                fprintf(f, "%s ", hashed_host);
        } else if (ip != NULL)
-               fprintf(f, "%s,%s ", host, ip);
-       else
-               fprintf(f, "%s ", host);
-
+               fprintf(f, "%s,%s ", lhost, ip);
+       else {
+               fprintf(f, "%s ", lhost);
+       }
+       free(lhost);
        if ((r = sshkey_write(key, f)) == 0)
                success = 1;
        else
index 2893a54..497a038 100644 (file)
 #ifdef HAVE_BSTRING_H
 # include <bstring.h>
 #endif
-#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
-    defined(GLOB_HAS_GL_MATCHC) && defined(GLOB_HAS_GL_STATV) && \
-    defined(HAVE_DECL_GLOB_NOMATCH) &&  HAVE_DECL_GLOB_NOMATCH != 0 && \
-    !defined(BROKEN_GLOB)
-# include <glob.h>
-#endif
 #ifdef HAVE_ENDIAN_H
 # include <endian.h>
 #endif
diff --git a/kex.c b/kex.c
index ae93cfa..cf4ac0d 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.109 2015/07/30 00:01:34 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.131 2017/03/15 07:07:39 markus Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  *
@@ -25,7 +25,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MAX roundup */
 
 #include <signal.h>
 #include <stdarg.h>
@@ -50,7 +49,6 @@
 #include "misc.h"
 #include "dispatch.h"
 #include "monitor.h"
-#include "roaming.h"
 
 #include "ssherr.h"
 #include "sshbuf.h"
@@ -68,6 +66,19 @@ extern const EVP_MD *evp_ssh_sha256(void);
 static int kex_choose_conf(struct ssh *);
 static int kex_input_newkeys(int, u_int32_t, void *);
 
+static const char *proposal_names[PROPOSAL_MAX] = {
+       "KEX algorithms",
+       "host key algorithms",
+       "ciphers ctos",
+       "ciphers stoc",
+       "MACs ctos",
+       "MACs stoc",
+       "compression ctos",
+       "compression stoc",
+       "languages ctos",
+       "languages stoc",
+};
+
 struct kexalg {
        char *name;
        u_int type;
@@ -77,7 +88,10 @@ struct kexalg {
 static const struct kexalg kexalgs[] = {
 #ifdef WITH_OPENSSL
        { KEX_DH1, KEX_DH_GRP1_SHA1, 0, SSH_DIGEST_SHA1 },
-       { KEX_DH14, KEX_DH_GRP14_SHA1, 0, SSH_DIGEST_SHA1 },
+       { KEX_DH14_SHA1, KEX_DH_GRP14_SHA1, 0, SSH_DIGEST_SHA1 },
+       { KEX_DH14_SHA256, KEX_DH_GRP14_SHA256, 0, SSH_DIGEST_SHA256 },
+       { KEX_DH16_SHA512, KEX_DH_GRP16_SHA512, 0, SSH_DIGEST_SHA512 },
+       { KEX_DH18_SHA512, KEX_DH_GRP18_SHA512, 0, SSH_DIGEST_SHA512 },
        { KEX_DHGEX_SHA1, KEX_DH_GEX_SHA1, 0, SSH_DIGEST_SHA1 },
 #ifdef HAVE_EVP_SHA256
        { KEX_DHGEX_SHA256, KEX_DH_GEX_SHA256, 0, SSH_DIGEST_SHA256 },
@@ -95,6 +109,7 @@ static const struct kexalg kexalgs[] = {
 #endif /* WITH_OPENSSL */
 #if defined(HAVE_EVP_SHA256) || !defined(WITH_OPENSSL)
        { KEX_CURVE25519_SHA256, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
+       { KEX_CURVE25519_SHA256_OLD, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
 #endif /* HAVE_EVP_SHA256 || !WITH_OPENSSL */
        { NULL, -1, -1, -1},
 };
@@ -163,7 +178,7 @@ kex_names_valid(const char *names)
 char *
 kex_names_cat(const char *a, const char *b)
 {
-       char *ret = NULL, *tmp = NULL, *cp, *p;
+       char *ret = NULL, *tmp = NULL, *cp, *p, *m;
        size_t len;
 
        if (a == NULL || *a == '\0')
@@ -180,8 +195,10 @@ kex_names_cat(const char *a, const char *b)
        }
        strlcpy(ret, a, len);
        for ((p = strsep(&cp, ",")); p && *p != '\0'; (p = strsep(&cp, ","))) {
-               if (match_list(ret, p, NULL) != NULL)
+               if ((m = match_list(ret, p, NULL)) != NULL) {
+                       free(m);
                        continue; /* Algorithm already present */
+               }
                if (strlcat(ret, ",", len) >= len ||
                    strlcat(ret, p, len) >= len) {
                        free(tmp);
@@ -196,7 +213,8 @@ kex_names_cat(const char *a, const char *b)
 /*
  * Assemble a list of algorithms from a default list and a string from a
  * configuration file. The user-provided string may begin with '+' to
- * indicate that it should be appended to the default.
+ * indicate that it should be appended to the default or '-' that the
+ * specified names should be removed.
  */
 int
 kex_assemble_names(const char *def, char **list)
@@ -207,14 +225,18 @@ kex_assemble_names(const char *def, char **list)
                *list = strdup(def);
                return 0;
        }
-       if (**list != '+') {
-               return 0;
+       if (**list == '+') {
+               if ((ret = kex_names_cat(def, *list + 1)) == NULL)
+                       return SSH_ERR_ALLOC_FAIL;
+               free(*list);
+               *list = ret;
+       } else if (**list == '-') {
+               if ((ret = match_filter_list(def, *list + 1)) == NULL)
+                       return SSH_ERR_ALLOC_FAIL;
+               free(*list);
+               *list = ret;
        }
 
-       if ((ret = kex_names_cat(def, *list + 1)) == NULL)
-               return SSH_ERR_ALLOC_FAIL;
-       free(*list);
-       *list = ret;
        return 0;
 }
 
@@ -268,7 +290,7 @@ kex_buf2prop(struct sshbuf *raw, int *first_kex_follows, char ***propp)
        for (i = 0; i < PROPOSAL_MAX; i++) {
                if ((r = sshbuf_get_cstring(b, &(proposal[i]), NULL)) != 0)
                        goto out;
-               debug2("kex_parse_kexinit: %s", proposal[i]);
+               debug2("%s: %s", proposal_names[i], proposal[i]);
        }
        /* first kex follows / reserved */
        if ((r = sshbuf_get_u8(b, &v)) != 0 ||  /* first_kex_follows */
@@ -303,7 +325,14 @@ kex_prop_free(char **proposal)
 static int
 kex_protocol_error(int type, u_int32_t seq, void *ctxt)
 {
-       error("Hm, kex protocol error: type %d seq %u", type, seq);
+       struct ssh *ssh = active_state; /* XXX */
+       int r;
+
+       error("kex protocol error: type %d seq %u", type, seq);
+       if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 ||
+           (r = sshpkt_put_u32(ssh, seq)) != 0 ||
+           (r = sshpkt_send(ssh)) != 0)
+               return r;
        return 0;
 }
 
@@ -312,7 +341,27 @@ kex_reset_dispatch(struct ssh *ssh)
 {
        ssh_dispatch_range(ssh, SSH2_MSG_TRANSPORT_MIN,
            SSH2_MSG_TRANSPORT_MAX, &kex_protocol_error);
-       ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_input_kexinit);
+}
+
+static int
+kex_send_ext_info(struct ssh *ssh)
+{
+       int r;
+       char *algs;
+
+       if ((algs = sshkey_alg_list(0, 1, 1, ',')) == NULL)
+               return SSH_ERR_ALLOC_FAIL;
+       if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 ||
+           (r = sshpkt_put_u32(ssh, 1)) != 0 ||
+           (r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 ||
+           (r = sshpkt_put_cstring(ssh, algs)) != 0 ||
+           (r = sshpkt_send(ssh)) != 0)
+               goto out;
+       /* success */
+       r = 0;
+ out:
+       free(algs);
+       return r;
 }
 
 int
@@ -327,9 +376,51 @@ kex_send_newkeys(struct ssh *ssh)
        debug("SSH2_MSG_NEWKEYS sent");
        debug("expecting SSH2_MSG_NEWKEYS");
        ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_input_newkeys);
+       if (ssh->kex->ext_info_c)
+               if ((r = kex_send_ext_info(ssh)) != 0)
+                       return r;
        return 0;
 }
 
+int
+kex_input_ext_info(int type, u_int32_t seq, void *ctxt)
+{
+       struct ssh *ssh = ctxt;
+       struct kex *kex = ssh->kex;
+       u_int32_t i, ninfo;
+       char *name, *val, *found;
+       int r;
+
+       debug("SSH2_MSG_EXT_INFO received");
+       ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_protocol_error);
+       if ((r = sshpkt_get_u32(ssh, &ninfo)) != 0)
+               return r;
+       for (i = 0; i < ninfo; i++) {
+               if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0)
+                       return r;
+               if ((r = sshpkt_get_cstring(ssh, &val, NULL)) != 0) {
+                       free(name);
+                       return r;
+               }
+               debug("%s: %s=<%s>", __func__, name, val);
+               if (strcmp(name, "server-sig-algs") == 0) {
+                       found = match_list("rsa-sha2-256", val, NULL);
+                       if (found) {
+                               kex->rsa_sha2 = 256;
+                               free(found);
+                       }
+                       found = match_list("rsa-sha2-512", val, NULL);
+                       if (found) {
+                               kex->rsa_sha2 = 512;
+                               free(found);
+                       }
+               }
+               free(name);
+               free(val);
+       }
+       return sshpkt_get_end(ssh);
+}
+
 static int
 kex_input_newkeys(int type, u_int32_t seq, void *ctxt)
 {
@@ -339,8 +430,11 @@ kex_input_newkeys(int type, u_int32_t seq, void *ctxt)
 
        debug("SSH2_MSG_NEWKEYS received");
        ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_protocol_error);
+       ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_input_kexinit);
        if ((r = sshpkt_get_end(ssh)) != 0)
                return r;
+       if ((r = ssh_set_newkeys(ssh, MODE_IN)) != 0)
+               return r;
        kex->done = 1;
        sshbuf_reset(kex->peer);
        /* sshbuf_reset(kex->my); */
@@ -394,6 +488,7 @@ kex_input_kexinit(int type, u_int32_t seq, void *ctxt)
        if (kex == NULL)
                return SSH_ERR_INVALID_ARGUMENT;
 
+       ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
        ptr = sshpkt_ptr(ssh, &dlen);
        if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
                return r;
@@ -450,6 +545,7 @@ kex_new(struct ssh *ssh, char *proposal[PROPOSAL_MAX], struct kex **kexp)
                goto out;
        kex->done = 0;
        kex_reset_dispatch(ssh);
+       ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_input_kexinit);
        r = 0;
        *kexp = kex;
  out:
@@ -469,7 +565,7 @@ kex_free_newkeys(struct newkeys *newkeys)
                newkeys->enc.key = NULL;
        }
        if (newkeys->enc.iv) {
-               explicit_bzero(newkeys->enc.iv, newkeys->enc.block_size);
+               explicit_bzero(newkeys->enc.iv, newkeys->enc.iv_len);
                free(newkeys->enc.iv);
                newkeys->enc.iv = NULL;
        }
@@ -512,6 +608,8 @@ kex_free(struct kex *kex)
        free(kex->client_version_string);
        free(kex->server_version_string);
        free(kex->failed_choice);
+       free(kex->hostkey_alg);
+       free(kex->name);
        free(kex);
 }
 
@@ -530,6 +628,25 @@ kex_setup(struct ssh *ssh, char *proposal[PROPOSAL_MAX])
        return 0;
 }
 
+/*
+ * Request key re-exchange, returns 0 on success or a ssherr.h error
+ * code otherwise. Must not be called if KEX is incomplete or in-progress.
+ */
+int
+kex_start_rekex(struct ssh *ssh)
+{
+       if (ssh->kex == NULL) {
+               error("%s: no kex", __func__);
+               return SSH_ERR_INTERNAL_ERROR;
+       }
+       if (ssh->kex->done == 0) {
+               error("%s: requested twice", __func__);
+               return SSH_ERR_INTERNAL_ERROR;
+       }
+       ssh->kex->done = 0;
+       return kex_send_kexinit(ssh);
+}
+
 static int
 choose_enc(struct sshenc *enc, char *client, char *server)
 {
@@ -537,8 +654,10 @@ choose_enc(struct sshenc *enc, char *client, char *server)
 
        if (name == NULL)
                return SSH_ERR_NO_CIPHER_ALG_MATCH;
-       if ((enc->cipher = cipher_by_name(name)) == NULL)
+       if ((enc->cipher = cipher_by_name(name)) == NULL) {
+               free(name);
                return SSH_ERR_INTERNAL_ERROR;
+       }
        enc->name = name;
        enc->enabled = 0;
        enc->iv = NULL;
@@ -556,8 +675,10 @@ choose_mac(struct ssh *ssh, struct sshmac *mac, char *client, char *server)
 
        if (name == NULL)
                return SSH_ERR_NO_MAC_ALG_MATCH;
-       if (mac_setup(mac, name) < 0)
+       if (mac_setup(mac, name) < 0) {
+               free(name);
                return SSH_ERR_INTERNAL_ERROR;
+       }
        /* truncate the key */
        if (ssh->compat & SSH_BUG_HMAC)
                mac->key_len = 16;
@@ -581,6 +702,7 @@ choose_comp(struct sshcomp *comp, char *client, char *server)
        } else if (strcmp(name, "none") == 0) {
                comp->type = COMP_NONE;
        } else {
+               free(name);
                return SSH_ERR_INTERNAL_ERROR;
        }
        comp->name = name;
@@ -594,6 +716,7 @@ choose_kex(struct kex *k, char *client, char *server)
 
        k->name = match_list(client, server, NULL);
 
+       debug("kex: algorithm: %s", k->name ? k->name : "(no match)");
        if (k->name == NULL)
                return SSH_ERR_NO_KEX_ALG_MATCH;
        if ((kexalg = kex_alg_by_name(k->name)) == NULL)
@@ -607,15 +730,16 @@ choose_kex(struct kex *k, char *client, char *server)
 static int
 choose_hostkeyalg(struct kex *k, char *client, char *server)
 {
-       char *hostkeyalg = match_list(client, server, NULL);
+       k->hostkey_alg = match_list(client, server, NULL);
 
-       if (hostkeyalg == NULL)
+       debug("kex: host key algorithm: %s",
+           k->hostkey_alg ? k->hostkey_alg : "(no match)");
+       if (k->hostkey_alg == NULL)
                return SSH_ERR_NO_HOSTKEY_ALG_MATCH;
-       k->hostkey_type = sshkey_type_from_name(hostkeyalg);
+       k->hostkey_type = sshkey_type_from_name(k->hostkey_alg);
        if (k->hostkey_type == KEY_UNSPEC)
                return SSH_ERR_INTERNAL_ERROR;
-       k->hostkey_nid = sshkey_ecdsa_nid_from_name(hostkeyalg);
-       free(hostkeyalg);
+       k->hostkey_nid = sshkey_ecdsa_nid_from_name(k->hostkey_alg);
        return 0;
 }
 
@@ -654,8 +778,11 @@ kex_choose_conf(struct ssh *ssh)
        u_int mode, ctos, need, dh_need, authlen;
        int r, first_kex_follows;
 
-       if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0 ||
-           (r = kex_buf2prop(kex->peer, &first_kex_follows, &peer)) != 0)
+       debug2("local %s KEXINIT proposal", kex->server ? "server" : "client");
+       if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0)
+               goto out;
+       debug2("peer %s KEXINIT proposal", kex->server ? "client" : "server");
+       if ((r = kex_buf2prop(kex->peer, &first_kex_follows, &peer)) != 0)
                goto out;
 
        if (kex->server) {
@@ -666,18 +793,28 @@ kex_choose_conf(struct ssh *ssh)
                sprop=peer;
        }
 
-       /* Check whether server offers roaming */
-       if (!kex->server) {
-               char *roaming = match_list(KEX_RESUME,
-                   peer[PROPOSAL_KEX_ALGS], NULL);
+       /* Check whether client supports ext_info_c */
+       if (kex->server) {
+               char *ext;
 
-               if (roaming) {
-                       kex->roaming = 1;
-                       free(roaming);
-               }
+               ext = match_list("ext-info-c", peer[PROPOSAL_KEX_ALGS], NULL);
+               kex->ext_info_c = (ext != NULL);
+               free(ext);
        }
 
        /* Algorithm Negotiation */
+       if ((r = choose_kex(kex, cprop[PROPOSAL_KEX_ALGS],
+           sprop[PROPOSAL_KEX_ALGS])) != 0) {
+               kex->failed_choice = peer[PROPOSAL_KEX_ALGS];
+               peer[PROPOSAL_KEX_ALGS] = NULL;
+               goto out;
+       }
+       if ((r = choose_hostkeyalg(kex, cprop[PROPOSAL_SERVER_HOST_KEY_ALGS],
+           sprop[PROPOSAL_SERVER_HOST_KEY_ALGS])) != 0) {
+               kex->failed_choice = peer[PROPOSAL_SERVER_HOST_KEY_ALGS];
+               peer[PROPOSAL_SERVER_HOST_KEY_ALGS] = NULL;
+               goto out;
+       }
        for (mode = 0; mode < MODE_MAX; mode++) {
                if ((newkeys = calloc(1, sizeof(*newkeys))) == NULL) {
                        r = SSH_ERR_ALLOC_FAIL;
@@ -710,35 +847,23 @@ kex_choose_conf(struct ssh *ssh)
                        peer[ncomp] = NULL;
                        goto out;
                }
-               debug("kex: %s %s %s %s",
+               debug("kex: %s cipher: %s MAC: %s compression: %s",
                    ctos ? "client->server" : "server->client",
                    newkeys->enc.name,
                    authlen == 0 ? newkeys->mac.name : "<implicit>",
                    newkeys->comp.name);
        }
-       if ((r = choose_kex(kex, cprop[PROPOSAL_KEX_ALGS],
-           sprop[PROPOSAL_KEX_ALGS])) != 0) {
-               kex->failed_choice = peer[PROPOSAL_KEX_ALGS];
-               peer[PROPOSAL_KEX_ALGS] = NULL;
-               goto out;
-       }
-       if ((r = choose_hostkeyalg(kex, cprop[PROPOSAL_SERVER_HOST_KEY_ALGS],
-           sprop[PROPOSAL_SERVER_HOST_KEY_ALGS])) != 0) {
-               kex->failed_choice = peer[PROPOSAL_SERVER_HOST_KEY_ALGS];
-               peer[PROPOSAL_SERVER_HOST_KEY_ALGS] = NULL;
-               goto out;
-       }
        need = dh_need = 0;
        for (mode = 0; mode < MODE_MAX; mode++) {
                newkeys = kex->newkeys[mode];
-               need = MAX(need, newkeys->enc.key_len);
-               need = MAX(need, newkeys->enc.block_size);
-               need = MAX(need, newkeys->enc.iv_len);
-               need = MAX(need, newkeys->mac.key_len);
-               dh_need = MAX(dh_need, cipher_seclen(newkeys->enc.cipher));
-               dh_need = MAX(dh_need, newkeys->enc.block_size);
-               dh_need = MAX(dh_need, newkeys->enc.iv_len);
-               dh_need = MAX(dh_need, newkeys->mac.key_len);
+               need = MAXIMUM(need, newkeys->enc.key_len);
+               need = MAXIMUM(need, newkeys->enc.block_size);
+               need = MAXIMUM(need, newkeys->enc.iv_len);
+               need = MAXIMUM(need, newkeys->mac.key_len);
+               dh_need = MAXIMUM(dh_need, cipher_seclen(newkeys->enc.cipher));
+               dh_need = MAXIMUM(dh_need, newkeys->enc.block_size);
+               dh_need = MAXIMUM(dh_need, newkeys->enc.iv_len);
+               dh_need = MAXIMUM(dh_need, newkeys->mac.key_len);
        }
        /* XXX need runden? */
        kex->we_need = need;
@@ -769,7 +894,7 @@ derive_key(struct ssh *ssh, int id, u_int need, u_char *hash, u_int hashlen,
 
        if ((mdsz = ssh_digest_bytes(kex->hash_alg)) == 0)
                return SSH_ERR_INVALID_ARGUMENT;
-       if ((digest = calloc(1, roundup(need, mdsz))) == NULL) {
+       if ((digest = calloc(1, ROUNDUP(need, mdsz))) == NULL) {
                r = SSH_ERR_ALLOC_FAIL;
                goto out;
        }
@@ -813,8 +938,7 @@ derive_key(struct ssh *ssh, int id, u_int need, u_char *hash, u_int hashlen,
        digest = NULL;
        r = 0;
  out:
-       if (digest)
-               free(digest);
+       free(digest);
        ssh_digest_free(hashctx);
        return r;
 }
diff --git a/kex.h b/kex.h
index d71b532..3794f21 100644 (file)
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.h,v 1.73 2015/07/30 00:01:34 djm Exp $ */
+/* $OpenBSD: kex.h,v 1.81 2016/09/28 21:44:52 djm Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
 
 #define KEX_COOKIE_LEN 16
 
-#define        KEX_DH1                 "diffie-hellman-group1-sha1"
-#define        KEX_DH14                "diffie-hellman-group14-sha1"
-#define        KEX_DHGEX_SHA1          "diffie-hellman-group-exchange-sha1"
-#define        KEX_DHGEX_SHA256        "diffie-hellman-group-exchange-sha256"
-#define        KEX_RESUME              "resume@appgate.com"
-#define        KEX_ECDH_SHA2_NISTP256  "ecdh-sha2-nistp256"
-#define        KEX_ECDH_SHA2_NISTP384  "ecdh-sha2-nistp384"
-#define        KEX_ECDH_SHA2_NISTP521  "ecdh-sha2-nistp521"
-#define        KEX_CURVE25519_SHA256   "curve25519-sha256@libssh.org"
+#define        KEX_DH1                         "diffie-hellman-group1-sha1"
+#define        KEX_DH14_SHA1                   "diffie-hellman-group14-sha1"
+#define        KEX_DH14_SHA256                 "diffie-hellman-group14-sha256"
+#define        KEX_DH16_SHA512                 "diffie-hellman-group16-sha512"
+#define        KEX_DH18_SHA512                 "diffie-hellman-group18-sha512"
+#define        KEX_DHGEX_SHA1                  "diffie-hellman-group-exchange-sha1"
+#define        KEX_DHGEX_SHA256                "diffie-hellman-group-exchange-sha256"
+#define        KEX_ECDH_SHA2_NISTP256          "ecdh-sha2-nistp256"
+#define        KEX_ECDH_SHA2_NISTP384          "ecdh-sha2-nistp384"
+#define        KEX_ECDH_SHA2_NISTP521          "ecdh-sha2-nistp521"
+#define        KEX_CURVE25519_SHA256           "curve25519-sha256"
+#define        KEX_CURVE25519_SHA256_OLD       "curve25519-sha256@libssh.org"
 
 #define COMP_NONE      0
 #define COMP_ZLIB      1
@@ -89,6 +92,9 @@ enum kex_modes {
 enum kex_exchange {
        KEX_DH_GRP1_SHA1,
        KEX_DH_GRP14_SHA1,
+       KEX_DH_GRP14_SHA256,
+       KEX_DH_GRP16_SHA512,
+       KEX_DH_GRP18_SHA512,
        KEX_DH_GEX_SHA1,
        KEX_DH_GEX_SHA256,
        KEX_ECDH_SHA2,
@@ -129,10 +135,12 @@ struct kex {
        u_int   dh_need;
        int     server;
        char    *name;
+       char    *hostkey_alg;
        int     hostkey_type;
        int     hostkey_nid;
        u_int   kex_type;
-       int     roaming;
+       int     rsa_sha2;
+       int     ext_info_c;
        struct sshbuf *my;
        struct sshbuf *peer;
        sig_atomic_t done;
@@ -146,8 +154,8 @@ struct kex {
        struct sshkey *(*load_host_public_key)(int, int, struct ssh *);
        struct sshkey *(*load_host_private_key)(int, int, struct ssh *);
        int     (*host_key_index)(struct sshkey *, int, struct ssh *);
-       int     (*sign)(struct sshkey *, struct sshkey *,
-           u_char **, size_t *, const u_char *, size_t, u_int);
+       int     (*sign)(struct sshkey *, struct sshkey *, u_char **, size_t *,
+           const u_char *, size_t, const char *, u_int);
        int     (*kex[KEX_MAX])(struct ssh *);
        /* kex specific state */
        DH      *dh;                    /* DH */
@@ -174,9 +182,11 @@ void        kex_prop_free(char **);
 
 int     kex_send_kexinit(struct ssh *);
 int     kex_input_kexinit(int, u_int32_t, void *);
+int     kex_input_ext_info(int, u_int32_t, void *);
 int     kex_derive_keys(struct ssh *, u_char *, u_int, const struct sshbuf *);
 int     kex_derive_keys_bn(struct ssh *, u_char *, u_int, const BIGNUM *);
 int     kex_send_newkeys(struct ssh *);
+int     kex_start_rekex(struct ssh *);
 
 int     kexdh_client(struct ssh *);
 int     kexdh_server(struct ssh *);
@@ -187,7 +197,7 @@ int  kexecdh_server(struct ssh *);
 int     kexc25519_client(struct ssh *);
 int     kexc25519_server(struct ssh *);
 
-int     kex_dh_hash(const char *, const char *,
+int     kex_dh_hash(int, const char *, const char *,
     const u_char *, size_t, const u_char *, size_t, const u_char *, size_t,
     const BIGNUM *, const BIGNUM *, const BIGNUM *, u_char *, size_t *);
 
@@ -202,8 +212,9 @@ int kex_ecdh_hash(int, const EC_GROUP *, const char *, const char *,
     const u_char *, size_t, const u_char *, size_t, const u_char *, size_t,
     const EC_POINT *, const EC_POINT *, const BIGNUM *, u_char *, size_t *);
 
-int     kex_c25519_hash(int, const char *, const char *, const char *, size_t,
-    const char *, size_t, const u_char *, size_t, const u_char *, const u_char *,
+int     kex_c25519_hash(int, const char *, const char *,
+    const u_char *, size_t, const u_char *, size_t,
+    const u_char *, size_t, const u_char *, const u_char *,
     const u_char *, size_t, u_char *, size_t *);
 
 void   kexc25519_keygen(u_char key[CURVE25519_SIZE], u_char pub[CURVE25519_SIZE])
index 8d8cd4a..0897b8c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexc25519.c,v 1.9 2015/03/26 07:00:04 djm Exp $ */
+/* $OpenBSD: kexc25519.c,v 1.10 2016/05/02 08:49:03 djm Exp $ */
 /*
  * Copyright (c) 2001, 2013 Markus Friedl.  All rights reserved.
  * Copyright (c) 2010 Damien Miller.  All rights reserved.
@@ -86,8 +86,8 @@ kex_c25519_hash(
     int hash_alg,
     const char *client_version_string,
     const char *server_version_string,
-    const char *ckexinit, size_t ckexinitlen,
-    const char *skexinit, size_t skexinitlen,
+    const u_char *ckexinit, size_t ckexinitlen,
+    const u_char *skexinit, size_t skexinitlen,
     const u_char *serverhostkeyblob, size_t sbloblen,
     const u_char client_dh_pub[CURVE25519_SIZE],
     const u_char server_dh_pub[CURVE25519_SIZE],
index 2402725..4e77622 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexc25519s.c,v 1.9 2015/04/27 00:37:53 dtucker Exp $ */
+/* $OpenBSD: kexc25519s.c,v 1.10 2015/12/04 16:41:28 markus Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2010 Damien Miller.  All rights reserved.
@@ -134,8 +134,8 @@ input_kex_c25519_init(int type, u_int32_t seq, void *ctxt)
        }
 
        /* sign H */
-       if ((r = kex->sign(server_host_private, server_host_public,
-           &signature, &slen, hash, hashlen, ssh->compat)) < 0)
+       if ((r = kex->sign(server_host_private, server_host_public, &signature,
+            &slen, hash, hashlen, kex->hostkey_alg, ssh->compat)) < 0)
                goto out;
 
        /* send server hostkey, ECDH pubkey 'Q_S' and signed H */
diff --git a/kexdh.c b/kexdh.c
index feea669..0bf0dc1 100644 (file)
--- a/kexdh.c
+++ b/kexdh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexdh.c,v 1.25 2015/01/19 20:16:15 markus Exp $ */
+/* $OpenBSD: kexdh.c,v 1.26 2016/05/02 10:26:04 djm Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -43,6 +43,7 @@
 
 int
 kex_dh_hash(
+    int hash_alg,
     const char *client_version_string,
     const char *server_version_string,
     const u_char *ckexinit, size_t ckexinitlen,
@@ -56,7 +57,7 @@ kex_dh_hash(
        struct sshbuf *b;
        int r;
 
-       if (*hashlen < ssh_digest_bytes(SSH_DIGEST_SHA1))
+       if (*hashlen < ssh_digest_bytes(hash_alg))
                return SSH_ERR_INVALID_ARGUMENT;
        if ((b = sshbuf_new()) == NULL)
                return SSH_ERR_ALLOC_FAIL;
@@ -79,12 +80,12 @@ kex_dh_hash(
 #ifdef DEBUG_KEX
        sshbuf_dump(b, stderr);
 #endif
-       if (ssh_digest_buffer(SSH_DIGEST_SHA1, b, hash, *hashlen) != 0) {
+       if (ssh_digest_buffer(hash_alg, b, hash, *hashlen) != 0) {
                sshbuf_free(b);
                return SSH_ERR_LIBCRYPTO_ERROR;
        }
        sshbuf_free(b);
-       *hashlen = ssh_digest_bytes(SSH_DIGEST_SHA1);
+       *hashlen = ssh_digest_bytes(hash_alg);
 #ifdef DEBUG_KEX
        dump_digest("hash", hash, *hashlen);
 #endif
index af259f1..ad3975f 100644 (file)
--- a/kexdhc.c
+++ b/kexdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexdhc.c,v 1.18 2015/01/26 06:10:03 djm Exp $ */
+/* $OpenBSD: kexdhc.c,v 1.19 2016/05/02 10:26:04 djm Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -63,8 +63,15 @@ kexdh_client(struct ssh *ssh)
                kex->dh = dh_new_group1();
                break;
        case KEX_DH_GRP14_SHA1:
+       case KEX_DH_GRP14_SHA256:
                kex->dh = dh_new_group14();
                break;
+       case KEX_DH_GRP16_SHA512:
+               kex->dh = dh_new_group16();
+               break;
+       case KEX_DH_GRP18_SHA512:
+               kex->dh = dh_new_group18();
+               break;
        default:
                r = SSH_ERR_INVALID_ARGUMENT;
                goto out;
@@ -164,6 +171,7 @@ input_kex_dh(int type, u_int32_t seq, void *ctxt)
        /* calc and verify H */
        hashlen = sizeof(hash);
        if ((r = kex_dh_hash(
+           kex->hash_alg,
            kex->client_version_string,
            kex->server_version_string,
            sshbuf_ptr(kex->my), sshbuf_len(kex->my),
index de7c05b..108f664 100644 (file)
--- a/kexdhs.c
+++ b/kexdhs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexdhs.c,v 1.22 2015/01/26 06:10:03 djm Exp $ */
+/* $OpenBSD: kexdhs.c,v 1.24 2016/05/02 10:26:04 djm Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -63,8 +63,15 @@ kexdh_server(struct ssh *ssh)
                kex->dh = dh_new_group1();
                break;
        case KEX_DH_GRP14_SHA1:
+       case KEX_DH_GRP14_SHA256:
                kex->dh = dh_new_group14();
                break;
+       case KEX_DH_GRP16_SHA512:
+               kex->dh = dh_new_group16();
+               break;
+       case KEX_DH_GRP18_SHA512:
+               kex->dh = dh_new_group18();
+               break;
        default:
                r = SSH_ERR_INVALID_ARGUMENT;
                goto out;
@@ -158,6 +165,7 @@ input_kex_dh_init(int type, u_int32_t seq, void *ctxt)
        /* calc H */
        hashlen = sizeof(hash);
        if ((r = kex_dh_hash(
+           kex->hash_alg,
            kex->client_version_string,
            kex->server_version_string,
            sshbuf_ptr(kex->peer), sshbuf_len(kex->peer),
@@ -181,8 +189,8 @@ input_kex_dh_init(int type, u_int32_t seq, void *ctxt)
        }
 
        /* sign H */
-       if ((r = kex->sign(server_host_private, server_host_public,
-           &signature, &slen, hash, hashlen, ssh->compat)) < 0)
+       if ((r = kex->sign(server_host_private, server_host_public, &signature,
+            &slen, hash, hashlen, kex->hostkey_alg, ssh->compat)) < 0)
                goto out;
 
        /* destroy_sensitive_data(); */
index 0adb80e..ccdbf70 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexecdhs.c,v 1.14 2015/01/26 06:10:03 djm Exp $ */
+/* $OpenBSD: kexecdhs.c,v 1.15 2015/12/04 16:41:28 markus Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2010 Damien Miller.  All rights reserved.
@@ -169,8 +169,8 @@ input_kex_ecdh_init(int type, u_int32_t seq, void *ctxt)
        }
 
        /* sign H */
-       if ((r = kex->sign(server_host_private, server_host_public,
-           &signature, &slen, hash, hashlen, ssh->compat)) < 0)
+       if ((r = kex->sign(server_host_private, server_host_public, &signature,
+            &slen, hash, hashlen, kex->hostkey_alg, ssh->compat)) < 0)
                goto out;
 
        /* destroy_sensitive_data(); */
index 71ff133..ad0d1c8 100644 (file)
--- a/kexgexc.c
+++ b/kexgexc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexgexc.c,v 1.22 2015/05/26 23:23:40 dtucker Exp $ */
+/* $OpenBSD: kexgexc.c,v 1.23 2016/09/12 01:22:38 deraadt Exp $ */
 /*
  * Copyright (c) 2000 Niels Provos.  All rights reserved.
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
@@ -28,7 +28,6 @@
 
 #ifdef WITH_OPENSSL
 
-#include <sys/param.h>
 #include <sys/types.h>
 
 #include <openssl/dh.h>
@@ -50,6 +49,7 @@
 #include "dispatch.h"
 #include "ssherr.h"
 #include "sshbuf.h"
+#include "misc.h"
 
 static int input_kex_dh_gex_group(int, u_int32_t, void *);
 static int input_kex_dh_gex_reply(int, u_int32_t, void *);
@@ -67,7 +67,7 @@ kexgex_client(struct ssh *ssh)
        kex->max = DH_GRP_MAX;
        kex->nbits = nbits;
        if (datafellows & SSH_BUG_DHGEX_LARGE)
-               kex->nbits = MIN(kex->nbits, 4096);
+               kex->nbits = MINIMUM(kex->nbits, 4096);
        /* New GEX request */
        if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST)) != 0 ||
            (r = sshpkt_put_u32(ssh, kex->min)) != 0 ||
index ff6c687..4496035 100644 (file)
--- a/kexgexs.c
+++ b/kexgexs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexgexs.c,v 1.25 2015/04/13 02:04:08 djm Exp $ */
+/* $OpenBSD: kexgexs.c,v 1.30 2016/09/12 01:22:38 deraadt Exp $ */
 /*
  * Copyright (c) 2000 Niels Provos.  All rights reserved.
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
@@ -28,7 +28,6 @@
 
 #ifdef WITH_OPENSSL
 
-#include <sys/param.h> /* MIN MAX */
 
 #include <stdarg.h>
 #include <stdio.h>
@@ -53,6 +52,7 @@
 #include "dispatch.h"
 #include "ssherr.h"
 #include "sshbuf.h"
+#include "misc.h"
 
 static int input_kex_dh_gex_request(int, u_int32_t, void *);
 static int input_kex_dh_gex_init(int, u_int32_t, void *);
@@ -83,13 +83,13 @@ input_kex_dh_gex_request(int type, u_int32_t seq, void *ctxt)
        kex->nbits = nbits;
        kex->min = min;
        kex->max = max;
-       min = MAX(DH_GRP_MIN, min);
-       max = MIN(DH_GRP_MAX, max);
-       nbits = MAX(DH_GRP_MIN, nbits);
-       nbits = MIN(DH_GRP_MAX, nbits);
+       min = MAXIMUM(DH_GRP_MIN, min);
+       max = MINIMUM(DH_GRP_MAX, max);
+       nbits = MAXIMUM(DH_GRP_MIN, nbits);
+       nbits = MINIMUM(DH_GRP_MAX, nbits);
 
        if (kex->max < kex->min || kex->nbits < kex->min ||
-           kex->max < kex->nbits) {
+           kex->max < kex->nbits || kex->max < DH_GRP_MIN) {
                r = SSH_ERR_DH_GEX_OUT_OF_RANGE;
                goto out;
        }
@@ -220,8 +220,8 @@ input_kex_dh_gex_init(int type, u_int32_t seq, void *ctxt)
        }
 
        /* sign H */
-       if ((r = kex->sign(server_host_private, server_host_public,
-           &signature, &slen, hash, hashlen, ssh->compat)) < 0)
+       if ((r = kex->sign(server_host_private, server_host_public, &signature,
+            &slen, hash, hashlen, kex->hostkey_alg, ssh->compat)) < 0)
                goto out;
 
        /* destroy_sensitive_data(); */
diff --git a/key.c b/key.c
index 0ba98b6..93f4ccb 100644 (file)
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.128 2015/07/03 03:43:18 djm Exp $ */
+/* $OpenBSD: key.c,v 1.130 2016/05/02 09:36:42 djm Exp $ */
 /*
  * placed in the public domain
  */
@@ -132,7 +132,7 @@ key_to_blob(const Key *key, u_char **blobp, u_int *lenp)
 
 int
 key_sign(const Key *key, u_char **sigp, u_int *lenp,
-    const u_char *data, u_int datalen)
+    const u_char *data, u_int datalen, const char *alg)
 {
        int r;
        u_char *sig;
@@ -143,7 +143,7 @@ key_sign(const Key *key, u_char **sigp, u_int *lenp,
        if (lenp != NULL)
                *lenp = 0;
        if ((r = sshkey_sign(key, &sig, &siglen,
-           data, datalen, datafellows)) != 0) {
+           data, datalen, alg, datafellows)) != 0) {
                fatal_on_fatal_errors(r, __func__, 0);
                error("%s: %s", __func__, ssh_err(r));
                return -1;
@@ -214,7 +214,7 @@ key_certify(Key *k, Key *ca)
 {
        int r;
 
-       if ((r = sshkey_certify(k, ca)) != 0) {
+       if ((r = sshkey_certify(k, ca, NULL)) != 0) {
                fatal_on_fatal_errors(r, __func__, 0);
                error("%s: %s", __func__, ssh_err(r));
                return -1;
diff --git a/key.h b/key.h
index 903bdf6..2e501a9 100644 (file)
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.h,v 1.48 2015/07/03 03:43:18 djm Exp $ */
+/* $OpenBSD: key.h,v 1.50 2016/09/12 23:31:27 djm Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
@@ -74,7 +74,6 @@ int    key_certify(Key *, Key *);
 void    key_cert_copy(const Key *, Key *);
 int     key_cert_check_authority(const Key *, int, int, const char *,
            const char **);
-char   *key_alg_list(int, int);
 
 #if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
 int     key_ec_validate_public(const EC_GROUP *, const EC_POINT *);
@@ -84,7 +83,8 @@ int    key_ec_validate_private(const EC_KEY *);
 Key    *key_from_blob(const u_char *, u_int);
 int     key_to_blob(const Key *, u_char **, u_int *);
 
-int     key_sign(const Key *, u_char **, u_int *, const u_char *, u_int);
+int     key_sign(const Key *, u_char **, u_int *, const u_char *, u_int,
+    const char *);
 int     key_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
 
 void     key_private_serialize(const Key *, struct sshbuf *);
diff --git a/krl.c b/krl.c
index 4075df8..3f28178 100644 (file)
--- a/krl.c
+++ b/krl.c
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $OpenBSD: krl.c,v 1.33 2015/07/03 03:43:18 djm Exp $ */
+/* $OpenBSD: krl.c,v 1.39 2017/03/10 07:18:32 dtucker Exp $ */
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN */
 #include <sys/types.h>
 #include <openbsd-compat/sys-tree.h>
 #include <openbsd-compat/sys-queue.h>
@@ -121,7 +120,7 @@ blob_cmp(struct revoked_blob *a, struct revoked_blob *b)
        int r;
 
        if (a->len != b->len) {
-               if ((r = memcmp(a->blob, b->blob, MIN(a->len, b->len))) != 0)
+               if ((r = memcmp(a->blob, b->blob, MINIMUM(a->len, b->len))) != 0)
                        return r;
                return a->len > b->len ? 1 : -1;
        } else
@@ -458,9 +457,9 @@ choose_next_state(int current_state, u_int64_t contig, int final,
         * Avoid unsigned overflows.
         * The limits are high enough to avoid confusing the calculations.
         */
-       contig = MIN(contig, 1ULL<<31);
-       last_gap = MIN(last_gap, 1ULL<<31);
-       next_gap = MIN(next_gap, 1ULL<<31);
+       contig = MINIMUM(contig, 1ULL<<31);
+       last_gap = MINIMUM(last_gap, 1ULL<<31);
+       next_gap = MINIMUM(next_gap, 1ULL<<31);
 
        /*
         * Calculate the cost to switch from the current state to candidates.
@@ -486,8 +485,8 @@ choose_next_state(int current_state, u_int64_t contig, int final,
        /* Estimate base cost in bits of each section type */
        cost_list += 64 * contig + (final ? 0 : 8+64);
        cost_range += (2 * 64) + (final ? 0 : 8+64);
-       cost_bitmap += last_gap + contig + (final ? 0 : MIN(next_gap, 8+64));
-       cost_bitmap_restart += contig + (final ? 0 : MIN(next_gap, 8+64));
+       cost_bitmap += last_gap + contig + (final ? 0 : MINIMUM(next_gap, 8+64));
+       cost_bitmap_restart += contig + (final ? 0 : MINIMUM(next_gap, 8+64));
 
        /* Convert to byte costs for actual comparison */
        cost_list = (cost_list + 7) / 8;
@@ -723,7 +722,7 @@ ssh_krl_to_blob(struct ssh_krl *krl, struct sshbuf *buf,
        if ((r = sshbuf_put(buf, KRL_MAGIC, sizeof(KRL_MAGIC) - 1)) != 0 ||
            (r = sshbuf_put_u32(buf, KRL_FORMAT_VERSION)) != 0 ||
            (r = sshbuf_put_u64(buf, krl->krl_version)) != 0 ||
-           (r = sshbuf_put_u64(buf, krl->generated_date) != 0) ||
+           (r = sshbuf_put_u64(buf, krl->generated_date)) != 0 ||
            (r = sshbuf_put_u64(buf, krl->flags)) != 0 ||
            (r = sshbuf_put_string(buf, NULL, 0)) != 0 ||
            (r = sshbuf_put_cstring(buf, krl->comment)) != 0)
@@ -772,7 +771,7 @@ ssh_krl_to_blob(struct ssh_krl *krl, struct sshbuf *buf,
                        goto out;
 
                if ((r = sshkey_sign(sign_keys[i], &sblob, &slen,
-                   sshbuf_ptr(buf), sshbuf_len(buf), 0)) != 0)
+                   sshbuf_ptr(buf), sshbuf_len(buf), NULL, 0)) != 0)
                        goto out;
                KRL_DBG(("%s: signature sig len %zu", __func__, slen));
                if ((r = sshbuf_put_string(buf, sblob, slen)) != 0)
@@ -826,10 +825,8 @@ parse_revoked_certs(struct sshbuf *buf, struct ssh_krl *krl)
                goto out;
 
        while (sshbuf_len(buf) > 0) {
-               if (subsect != NULL) {
-                       sshbuf_free(subsect);
-                       subsect = NULL;
-               }
+               sshbuf_free(subsect);
+               subsect = NULL;
                if ((r = sshbuf_get_u8(buf, &type)) != 0 ||
                    (r = sshbuf_froms(buf, &subsect)) != 0)
                        goto out;
@@ -1017,7 +1014,7 @@ ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp,
                }
                /* Check signature over entire KRL up to this point */
                if ((r = sshkey_verify(key, blob, blen,
-                   sshbuf_ptr(buf), sshbuf_len(buf) - sig_off, 0)) != 0)
+                   sshbuf_ptr(buf), sig_off, 0)) != 0)
                        goto out;
                /* Check if this key has already signed this KRL */
                for (i = 0; i < nca_used; i++) {
@@ -1038,7 +1035,6 @@ ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp,
                ca_used = tmp_ca_used;
                ca_used[nca_used++] = key;
                key = NULL;
-               break;
        }
 
        if (sshbuf_len(copy) != 0) {
@@ -1059,10 +1055,8 @@ ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp,
        if ((r = sshbuf_consume(copy, sects_off)) != 0)
                goto out;
        while (sshbuf_len(copy) > 0) {
-               if (sect != NULL) {
-                       sshbuf_free(sect);
-                       sect = NULL;
-               }
+               sshbuf_free(sect);
+               sect = NULL;
                if ((r = sshbuf_get_u8(copy, &type)) != 0 ||
                    (r = sshbuf_froms(copy, &sect)) != 0)
                        goto out;
@@ -1095,7 +1089,7 @@ ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp,
                        break;
                case KRL_SECTION_SIGNATURE:
                        /* Handled above, but still need to stay in synch */
-                       sshbuf_reset(sect);
+                       sshbuf_free(sect);
                        sect = NULL;
                        if ((r = sshbuf_skip_string(copy)) != 0)
                                goto out;
@@ -1105,7 +1099,7 @@ ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp,
                        r = SSH_ERR_INVALID_FORMAT;
                        goto out;
                }
-               if (sshbuf_len(sect) > 0) {
+               if (sect != NULL && sshbuf_len(sect) > 0) {
                        error("KRL section contains unparsed data");
                        r = SSH_ERR_INVALID_FORMAT;
                        goto out;
@@ -1294,7 +1288,8 @@ ssh_krl_file_contains_key(const char *path, const struct sshkey *key)
        debug2("%s: checking KRL %s", __func__, path);
        r = ssh_krl_check_key(krl, key);
  out:
-       close(fd);
+       if (fd != -1)
+               close(fd);
        sshbuf_free(krlbuf);
        ssh_krl_free(krl);
        if (r != 0)
diff --git a/krl.h b/krl.h
index 4e12bef..675496c 100644 (file)
--- a/krl.h
+++ b/krl.h
@@ -14,7 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $OpenBSD: krl.h,v 1.4 2015/01/13 19:06:49 djm Exp $ */
+/* $OpenBSD: krl.h,v 1.5 2015/12/30 23:46:14 djm Exp $ */
 
 #ifndef _KRL_H
 #define _KRL_H
@@ -43,7 +43,6 @@ struct ssh_krl;
 struct ssh_krl *ssh_krl_init(void);
 void ssh_krl_free(struct ssh_krl *krl);
 void ssh_krl_set_version(struct ssh_krl *krl, u_int64_t version);
-void ssh_krl_set_sign_key(struct ssh_krl *krl, const struct sshkey *sign_key);
 int ssh_krl_set_comment(struct ssh_krl *krl, const char *comment);
 int ssh_krl_revoke_cert_by_serial(struct ssh_krl *krl,
     const struct sshkey *ca_key, u_int64_t serial);
diff --git a/log.c b/log.c
index ad12930..d0f86cf 100644 (file)
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.46 2015/07/08 19:04:21 markus Exp $ */
+/* $OpenBSD: log.c,v 1.49 2017/03/10 03:15:58 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -176,6 +176,16 @@ sigdie(const char *fmt,...)
        _exit(1);
 }
 
+void
+logdie(const char *fmt,...)
+{
+       va_list args;
+
+       va_start(args, fmt);
+       do_log(SYSLOG_LEVEL_INFO, fmt, args);
+       va_end(args);
+       cleanup_exit(255);
+}
 
 /* Log this message (information that usually should go to the log). */
 
@@ -342,7 +352,7 @@ log_change_level(LogLevel new_log_level)
 int
 log_is_on_stderr(void)
 {
-       return log_on_stderr;
+       return log_on_stderr && log_stderr_fd == STDERR_FILENO;
 }
 
 /* redirect what would usually get written to stderr to specified file */
@@ -443,7 +453,8 @@ do_log(LogLevel level, const char *fmt, va_list args)
                tmp_handler(level, fmtbuf, log_handler_ctx);
                log_handler = tmp_handler;
        } else if (log_on_stderr) {
-               snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf);
+               snprintf(msgbuf, sizeof msgbuf, "%.*s\r\n",
+                   (int)sizeof msgbuf - 3, fmtbuf);
                (void)write(log_stderr_fd, msgbuf, strlen(msgbuf));
        } else {
 #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT)
diff --git a/log.h b/log.h
index ae7df25..434b7c8 100644 (file)
--- a/log.h
+++ b/log.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.h,v 1.20 2013/04/07 02:10:33 dtucker Exp $ */
+/* $OpenBSD: log.h,v 1.21 2016/07/15 05:01:58 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -63,6 +63,8 @@ void     fatal(const char *, ...) __attribute__((noreturn))
 void     error(const char *, ...) __attribute__((format(printf, 1, 2)));
 void     sigdie(const char *, ...)  __attribute__((noreturn))
     __attribute__((format(printf, 1, 2)));
+void     logdie(const char *, ...) __attribute__((noreturn))
+    __attribute__((format(printf, 1, 2)));
 void     logit(const char *, ...) __attribute__((format(printf, 1, 2)));
 void     verbose(const char *, ...) __attribute__((format(printf, 1, 2)));
 void     debug(const char *, ...) __attribute__((format(printf, 1, 2)));
index 94ae81d..788553e 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
 
 #include <netinet/in.h>
 
diff --git a/mac.c b/mac.c
index 64c3aa1..5ba7fae 100644 (file)
--- a/mac.c
+++ b/mac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mac.c,v 1.32 2015/01/15 18:32:54 naddy Exp $ */
+/* $OpenBSD: mac.c,v 1.33 2016/07/08 03:44:42 djm Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -64,7 +64,7 @@ static const struct macalg macs[] = {
 #endif
        { "hmac-md5",                           SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 0 },
        { "hmac-md5-96",                        SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 0 },
-#if defined(HAVE_EVP_RIPEMD)
+#ifdef HAVE_EVP_RIPEMD160
        { "hmac-ripemd160",                     SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
        { "hmac-ripemd160@openssh.com",         SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 0 },
 #endif
@@ -80,7 +80,9 @@ static const struct macalg macs[] = {
 #endif
        { "hmac-md5-etm@openssh.com",           SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 1 },
        { "hmac-md5-96-etm@openssh.com",        SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 1 },
+#ifdef HAVE_EVP_RIPEMD160
        { "hmac-ripemd160-etm@openssh.com",     SSH_DIGEST, SSH_DIGEST_RIPEMD160, 0, 0, 0, 1 },
+#endif
        { "umac-64-etm@openssh.com",            SSH_UMAC, 0, 0, 128, 64, 1 },
        { "umac-128-etm@openssh.com",           SSH_UMAC128, 0, 0, 128, 128, 1 },
 
@@ -169,7 +171,8 @@ mac_init(struct sshmac *mac)
 }
 
 int
-mac_compute(struct sshmac *mac, u_int32_t seqno, const u_char *data, int datalen,
+mac_compute(struct sshmac *mac, u_int32_t seqno,
+    const u_char *data, int datalen,
     u_char *digest, size_t dlen)
 {
        static union {
@@ -213,6 +216,24 @@ mac_compute(struct sshmac *mac, u_int32_t seqno, const u_char *data, int datalen
        return 0;
 }
 
+int
+mac_check(struct sshmac *mac, u_int32_t seqno,
+    const u_char *data, size_t dlen,
+    const u_char *theirmac, size_t mlen)
+{
+       u_char ourmac[SSH_DIGEST_MAX_LENGTH];
+       int r;
+
+       if (mac->mac_len > mlen)
+               return SSH_ERR_INVALID_ARGUMENT;
+       if ((r = mac_compute(mac, seqno, data, dlen,
+           ourmac, sizeof(ourmac))) != 0)
+               return r;
+       if (timingsafe_bcmp(ourmac, theirmac, mac->mac_len) != 0)
+               return SSH_ERR_MAC_INVALID;
+       return 0;
+}
+
 void
 mac_clear(struct sshmac *mac)
 {
diff --git a/mac.h b/mac.h
index e5f6b84..0b119d7 100644 (file)
--- a/mac.h
+++ b/mac.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mac.h,v 1.9 2015/01/13 19:31:40 markus Exp $ */
+/* $OpenBSD: mac.h,v 1.10 2016/07/08 03:44:42 djm Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -46,6 +46,8 @@ int    mac_setup(struct sshmac *, char *);
 int     mac_init(struct sshmac *);
 int     mac_compute(struct sshmac *, u_int32_t, const u_char *, int,
     u_char *, size_t);
+int     mac_check(struct sshmac *, u_int32_t, const u_char *, size_t,
+    const u_char *, size_t);
 void    mac_clear(struct sshmac *);
 
 #endif /* SSHMAC_H */
diff --git a/match.c b/match.c
index 913b6ba..3cf4030 100644 (file)
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.30 2015/05/04 06:10:48 djm Exp $ */
+/* $OpenBSD: match.c,v 1.37 2017/03/10 04:24:55 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "xmalloc.h"
 #include "match.h"
+#include "misc.h"
 
 /*
  * Returns true if the given string matches the pattern (which may contain ?
@@ -145,7 +147,7 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
                if (subi >= sizeof(sub) - 1)
                        return 0;
 
-               /* If the subpattern was terminated by a comma, skip the comma. */
+               /* If the subpattern was terminated by a comma, then skip it. */
                if (i < len && pattern[i] == ',')
                        i++;
 
@@ -177,7 +179,13 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
 int
 match_hostname(const char *host, const char *pattern)
 {
-       return match_pattern_list(host, pattern, 1);
+       char *hostcopy = xstrdup(host);
+       int r;
+
+       lowercase(hostcopy);
+       r = match_pattern_list(hostcopy, pattern, 1);
+       free(hostcopy);
+       return r;
 }
 
 /*
@@ -191,11 +199,10 @@ match_host_and_ip(const char *host, const char *ipaddr,
 {
        int mhost, mip;
 
-       /* error in ipaddr match */
        if ((mip = addr_match_list(ipaddr, patterns)) == -2)
-               return -1;
-       else if (mip == -1) /* negative ip address match */
-               return 0;
+               return -1; /* error in ipaddr match */
+       else if (host == NULL || ipaddr == NULL || mip == -1)
+               return 0; /* negative ip address match, or testing pattern */
 
        /* negative hostname match */
        if ((mhost = match_hostname(host, patterns)) == -1)
@@ -207,7 +214,9 @@ match_host_and_ip(const char *host, const char *ipaddr,
 }
 
 /*
- * match user, user@host_or_ip, user@host_or_ip_list against pattern
+ * Match user, user@host_or_ip, user@host_or_ip_list against pattern.
+ * If user, host and ipaddr are all NULL then validate pattern/
+ * Returns -1 on invalid pattern, 0 on no match, 1 on match.
  */
 int
 match_user(const char *user, const char *host, const char *ipaddr,
@@ -216,6 +225,14 @@ match_user(const char *user, const char *host, const char *ipaddr,
        char *p, *pat;
        int ret;
 
+       /* test mode */
+       if (user == NULL && host == NULL && ipaddr == NULL) {
+               if ((p = strchr(pattern, '@')) != NULL &&
+                   match_host_and_ip(NULL, NULL, p + 1) < 0)
+                       return -1;
+               return 0;
+       }
+
        if ((p = strchr(pattern,'@')) == NULL)
                return match_pattern(user, pattern);
 
@@ -275,3 +292,35 @@ match_list(const char *client, const char *server, u_int *next)
        free(s);
        return NULL;
 }
+
+/*
+ * Filters a comma-separated list of strings, excluding any entry matching
+ * the 'filter' pattern list. Caller must free returned string.
+ */
+char *
+match_filter_list(const char *proposal, const char *filter)
+{
+       size_t len = strlen(proposal) + 1;
+       char *fix_prop = malloc(len);
+       char *orig_prop = strdup(proposal);
+       char *cp, *tmp;
+
+       if (fix_prop == NULL || orig_prop == NULL) {
+               free(orig_prop);
+               free(fix_prop);
+               return NULL;
+       }
+
+       tmp = orig_prop;
+       *fix_prop = '\0';
+       while ((cp = strsep(&tmp, ",")) != NULL) {
+               if (match_pattern_list(cp, filter, 0) != 1) {
+                       if (*fix_prop != '\0')
+                               strlcat(fix_prop, ",", len);
+                       strlcat(fix_prop, cp, len);
+               }
+       }
+       free(orig_prop);
+       return fix_prop;
+}
+
diff --git a/match.h b/match.h
index db97ca8..937ba04 100644 (file)
--- a/match.h
+++ b/match.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.h,v 1.16 2015/05/04 06:10:48 djm Exp $ */
+/* $OpenBSD: match.h,v 1.17 2017/02/03 23:01:19 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -20,6 +20,7 @@ int    match_hostname(const char *, const char *);
 int     match_host_and_ip(const char *, const char *, const char *);
 int     match_user(const char *, const char *, const char *, const char *);
 char   *match_list(const char *, const char *, u_int *);
+char   *match_filter_list(const char *, const char *);
 
 /* addrmatch.c */
 int     addr_match_list(const char *, const char *);
index 2341e2c..978e579 100644 (file)
@@ -7,8 +7,6 @@
  * ----------------------------------------------------------------------------
  */
 
-/* $Id: md5crypt.h,v 1.4 2003/05/18 14:46:46 djm Exp $ */
-
 #ifndef _MD5CRYPT_H
 #define _MD5CRYPT_H
 
index 80e8d5f..3e87254 100644 (file)
@@ -321,6 +321,8 @@ function add(str) {
       w=nwords
     } else if(match(words[w],"^El$")) {
       optlist=oldoptlist
+      if(!optlist)
+        add(".PP")
     } else if(match(words[w],"^Bk$")) {
       if(match(words[w+1],"-words")) {
        w++
diff --git a/misc.c b/misc.c
index 9c9b54e..cfd3272 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.97 2015/04/24 01:36:00 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.109 2017/03/14 00:55:37 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2005,2006 Damien Miller.  All rights reserved.
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
+#include <sys/time.h>
 #include <sys/un.h>
 
 #include <limits.h>
@@ -83,9 +84,9 @@ set_nonblock(int fd)
 {
        int val;
 
-       val = fcntl(fd, F_GETFL, 0);
+       val = fcntl(fd, F_GETFL);
        if (val < 0) {
-               error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno));
+               error("fcntl(%d, F_GETFL): %s", fd, strerror(errno));
                return (-1);
        }
        if (val & O_NONBLOCK) {
@@ -107,9 +108,9 @@ unset_nonblock(int fd)
 {
        int val;
 
-       val = fcntl(fd, F_GETFL, 0);
+       val = fcntl(fd, F_GETFL);
        if (val < 0) {
-               error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno));
+               error("fcntl(%d, F_GETFL): %s", fd, strerror(errno));
                return (-1);
        }
        if (!(val & O_NONBLOCK)) {
@@ -207,7 +208,7 @@ pwcopy(struct passwd *pw)
        struct passwd *copy = xcalloc(1, sizeof(*copy));
 
        copy->pw_name = xstrdup(pw->pw_name);
-       copy->pw_passwd = pw->pw_passwd ? xstrdup(pw->pw_passwd) : NULL;
+       copy->pw_passwd = xstrdup(pw->pw_passwd);
 #ifdef HAVE_STRUCT_PASSWD_PW_GECOS
        copy->pw_gecos = xstrdup(pw->pw_gecos);
 #endif
@@ -305,7 +306,7 @@ a2tun(const char *s, int *remote)
 long
 convtime(const char *s)
 {
-       long total, secs;
+       long total, secs, multiplier = 1;
        const char *p;
        char *endp;
 
@@ -332,23 +333,28 @@ convtime(const char *s)
                        break;
                case 'm':
                case 'M':
-                       secs *= MINUTES;
+                       multiplier = MINUTES;
                        break;
                case 'h':
                case 'H':
-                       secs *= HOURS;
+                       multiplier = HOURS;
                        break;
                case 'd':
                case 'D':
-                       secs *= DAYS;
+                       multiplier = DAYS;
                        break;
                case 'w':
                case 'W':
-                       secs *= WEEKS;
+                       multiplier = WEEKS;
                        break;
                default:
                        return -1;
                }
+               if (secs >= LONG_MAX / multiplier)
+                       return -1;
+               secs *= multiplier;
+               if  (total >= LONG_MAX - secs)
+                       return -1;
                total += secs;
                if (total < 0)
                        return -1;
@@ -450,6 +456,67 @@ colon(char *cp)
        return NULL;
 }
 
+/*
+ * Parse a [user@]host[:port] string.
+ * Caller must free returned user and host.
+ * Any of the pointer return arguments may be NULL (useful for syntax checking).
+ * If user was not specified then *userp will be set to NULL.
+ * If port was not specified then *portp will be -1.
+ * Returns 0 on success, -1 on failure.
+ */
+int
+parse_user_host_port(const char *s, char **userp, char **hostp, int *portp)
+{
+       char *sdup, *cp, *tmp;
+       char *user = NULL, *host = NULL;
+       int port = -1, ret = -1;
+
+       if (userp != NULL)
+               *userp = NULL;
+       if (hostp != NULL)
+               *hostp = NULL;
+       if (portp != NULL)
+               *portp = -1;
+
+       if ((sdup = tmp = strdup(s)) == NULL)
+               return -1;
+       /* Extract optional username */
+       if ((cp = strchr(tmp, '@')) != NULL) {
+               *cp = '\0';
+               if (*tmp == '\0')
+                       goto out;
+               if ((user = strdup(tmp)) == NULL)
+                       goto out;
+               tmp = cp + 1;
+       }
+       /* Extract mandatory hostname */
+       if ((cp = hpdelim(&tmp)) == NULL || *cp == '\0')
+               goto out;
+       host = xstrdup(cleanhostname(cp));
+       /* Convert and verify optional port */
+       if (tmp != NULL && *tmp != '\0') {
+               if ((port = a2port(tmp)) <= 0)
+                       goto out;
+       }
+       /* Success */
+       if (userp != NULL) {
+               *userp = user;
+               user = NULL;
+       }
+       if (hostp != NULL) {
+               *hostp = host;
+               host = NULL;
+       }
+       if (portp != NULL)
+               *portp = port;
+       ret = 0;
+ out:
+       free(sdup);
+       free(user);
+       free(host);
+       return ret;
+}
+
 /* function to assist building execv() arguments */
 void
 addargs(arglist *args, char *fmt, ...)
@@ -604,6 +671,8 @@ percent_expand(const char *string, ...)
                /* %% case */
                if (*string == '%')
                        goto append;
+               if (*string == '\0')
+                       fatal("%s: invalid format", __func__);
                for (j = 0; j < num_keys; j++) {
                        if (strchr(keys[j].key, *string) != NULL) {
                                i = strlcat(buf, keys[j].repl, sizeof(buf));
@@ -653,62 +722,63 @@ tun_open(int tun, int mode)
        struct ifreq ifr;
        char name[100];
        int fd = -1, sock;
+       const char *tunbase = "tun";
+
+       if (mode == SSH_TUNMODE_ETHERNET)
+               tunbase = "tap";
 
        /* Open the tunnel device */
        if (tun <= SSH_TUNID_MAX) {
-               snprintf(name, sizeof(name), "/dev/tun%d", tun);
+               snprintf(name, sizeof(name), "/dev/%s%d", tunbase, tun);
                fd = open(name, O_RDWR);
        } else if (tun == SSH_TUNID_ANY) {
                for (tun = 100; tun >= 0; tun--) {
-                       snprintf(name, sizeof(name), "/dev/tun%d", tun);
+                       snprintf(name, sizeof(name), "/dev/%s%d",
+                           tunbase, tun);
                        if ((fd = open(name, O_RDWR)) >= 0)
                                break;
                }
        } else {
                debug("%s: invalid tunnel %u", __func__, tun);
-               return (-1);
+               return -1;
        }
 
        if (fd < 0) {
-               debug("%s: %s open failed: %s", __func__, name, strerror(errno));
-               return (-1);
+               debug("%s: %s open: %s", __func__, name, strerror(errno));
+               return -1;
        }
 
        debug("%s: %s mode %d fd %d", __func__, name, mode, fd);
 
-       /* Set the tunnel device operation mode */
-       snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "tun%d", tun);
+       /* Bring interface up if it is not already */
+       snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s%d", tunbase, tun);
        if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) == -1)
                goto failed;
 
-       if (ioctl(sock, SIOCGIFFLAGS, &ifr) == -1)
-               goto failed;
-
-       /* Set interface mode */
-       ifr.ifr_flags &= ~IFF_UP;
-       if (mode == SSH_TUNMODE_ETHERNET)
-               ifr.ifr_flags |= IFF_LINK0;
-       else
-               ifr.ifr_flags &= ~IFF_LINK0;
-       if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1)
+       if (ioctl(sock, SIOCGIFFLAGS, &ifr) == -1) {
+               debug("%s: get interface %s flags: %s", __func__,
+                   ifr.ifr_name, strerror(errno));
                goto failed;
+       }
 
-       /* Bring interface up */
-       ifr.ifr_flags |= IFF_UP;
-       if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1)
-               goto failed;
+       if (!(ifr.ifr_flags & IFF_UP)) {
+               ifr.ifr_flags |= IFF_UP;
+               if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1) {
+                       debug("%s: activate interface %s: %s", __func__,
+                           ifr.ifr_name, strerror(errno));
+                       goto failed;
+               }
+       }
 
        close(sock);
-       return (fd);
+       return fd;
 
  failed:
        if (fd >= 0)
                close(fd);
        if (sock >= 0)
                close(sock);
-       debug("%s: failed to set %s mode %d: %s", __func__, name,
-           mode, strerror(errno));
-       return (-1);
+       return -1;
 #else
        error("Tunnel interfaces are not supported on this platform");
        return (-1);
@@ -725,16 +795,16 @@ sanitise_stdfd(void)
                    strerror(errno));
                exit(1);
        }
-       while (++dupfd <= 2) {
-               /* Only clobber closed fds */
-               if (fcntl(dupfd, F_GETFL, 0) >= 0)
-                       continue;
-               if (dup2(nullfd, dupfd) == -1) {
-                       fprintf(stderr, "dup2: %s\n", strerror(errno));
-                       exit(1);
+       while (++dupfd <= STDERR_FILENO) {
+               /* Only populate closed fds. */
+               if (fcntl(dupfd, F_GETFL) == -1 && errno == EBADF) {
+                       if (dup2(nullfd, dupfd) == -1) {
+                               fprintf(stderr, "dup2: %s\n", strerror(errno));
+                               exit(1);
+                       }
                }
        }
-       if (nullfd > 2)
+       if (nullfd > STDERR_FILENO)
                close(nullfd);
 }
 
@@ -905,6 +975,31 @@ monotime(void)
        return time(NULL);
 }
 
+double
+monotime_double(void)
+{
+#if defined(HAVE_CLOCK_GETTIME) && \
+    (defined(CLOCK_MONOTONIC) || defined(CLOCK_BOOTTIME))
+       struct timespec ts;
+       static int gettime_failed = 0;
+
+       if (!gettime_failed) {
+#if defined(CLOCK_BOOTTIME)
+               if (clock_gettime(CLOCK_BOOTTIME, &ts) == 0)
+                       return (ts.tv_sec + (double)ts.tv_nsec / 1000000000);
+#endif
+#if defined(CLOCK_MONOTONIC)
+               if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
+                       return (ts.tv_sec + (double)ts.tv_nsec / 1000000000);
+#endif
+               debug3("clock_gettime: %s", strerror(errno));
+               gettime_failed = 1;
+       }
+#endif /* HAVE_CLOCK_GETTIME && (CLOCK_MONOTONIC || CLOCK_BOOTTIME */
+
+       return (double)time(NULL);
+}
+
 void
 bandwidth_limit_init(struct bwlimit *bw, u_int64_t kbps, size_t buflen)
 {
@@ -1107,7 +1202,7 @@ unix_listener(const char *path, int backlog, int unlink_first)
 void
 sock_set_v6only(int s)
 {
-#ifdef IPV6_V6ONLY
+#if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
        int on = 1;
 
        debug3("%s: set socket %d IPV6_V6ONLY", __func__, s);
@@ -1115,3 +1210,67 @@ sock_set_v6only(int s)
                error("setsockopt IPV6_V6ONLY: %s", strerror(errno));
 #endif
 }
+
+/*
+ * Compares two strings that maybe be NULL. Returns non-zero if strings
+ * are both NULL or are identical, returns zero otherwise.
+ */
+static int
+strcmp_maybe_null(const char *a, const char *b)
+{
+       if ((a == NULL && b != NULL) || (a != NULL && b == NULL))
+               return 0;
+       if (a != NULL && strcmp(a, b) != 0)
+               return 0;
+       return 1;
+}
+
+/*
+ * Compare two forwards, returning non-zero if they are identical or
+ * zero otherwise.
+ */
+int
+forward_equals(const struct Forward *a, const struct Forward *b)
+{
+       if (strcmp_maybe_null(a->listen_host, b->listen_host) == 0)
+               return 0;
+       if (a->listen_port != b->listen_port)
+               return 0;
+       if (strcmp_maybe_null(a->listen_path, b->listen_path) == 0)
+               return 0;
+       if (strcmp_maybe_null(a->connect_host, b->connect_host) == 0)
+               return 0;
+       if (a->connect_port != b->connect_port)
+               return 0;
+       if (strcmp_maybe_null(a->connect_path, b->connect_path) == 0)
+               return 0;
+       /* allocated_port and handle are not checked */
+       return 1;
+}
+
+/* returns 1 if bind to specified port by specified user is permitted */
+int
+bind_permitted(int port, uid_t uid)
+{
+       if (port < IPPORT_RESERVED && uid != 0)
+               return 0;
+       return 1;
+}
+
+/* returns 1 if process is already daemonized, 0 otherwise */
+int
+daemonized(void)
+{
+       int fd;
+
+       if ((fd = open(_PATH_TTY, O_RDONLY | O_NOCTTY)) >= 0) {
+               close(fd);
+               return 0;       /* have controlling terminal */
+       }
+       if (getppid() != 1)
+               return 0;       /* parent is not init */
+       if (getsid(0) != getpid())
+               return 0;       /* not session leader */
+       debug3("already daemonized");
+       return 1;
+}
diff --git a/misc.h b/misc.h
index 374c33c..c242f90 100644 (file)
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.54 2014/07/15 15:54:14 millert Exp $ */
+/* $OpenBSD: misc.h,v 1.61 2016/11/30 00:28:31 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -15,6 +15,8 @@
 #ifndef _MISC_H
 #define _MISC_H
 
+#include <sys/time.h>
+
 /* Data structure for representing a forwarding request. */
 struct Forward {
        char     *listen_host;          /* Host (address) to listen on. */
@@ -27,6 +29,10 @@ struct Forward {
        int       handle;               /* Handle for dynamic listen ports */
 };
 
+int forward_equals(const struct Forward *, const struct Forward *);
+int bind_permitted(int, uid_t);
+int daemonized(void);
+
 /* Common server and client forwarding options. */
 struct ForwardOptions {
        int      gateway_ports; /* Allow remote connects to forwarded ports. */
@@ -47,6 +53,7 @@ char  *put_host_port(const char *, u_short);
 char   *hpdelim(char **);
 char   *cleanhostname(char *);
 char   *colon(char *);
+int     parse_user_host_port(const char *, char **, char **, int *);
 long    convtime(const char *);
 char   *tilde_expand_filename(const char *, uid_t);
 char   *percent_expand(const char *, ...) __attribute__((__sentinel__));
@@ -55,6 +62,7 @@ void   sanitise_stdfd(void);
 void    ms_subtract_diff(struct timeval *, int *);
 void    ms_to_timeval(struct timeval *, int);
 time_t  monotime(void);
+double  monotime_double(void);
 void    lowercase(char *s);
 int     unix_listener(const char *, int, int);
 
@@ -135,4 +143,8 @@ char        *read_passphrase(const char *, int);
 int     ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
 int     read_keyfile_line(FILE *, const char *, char *, size_t, u_long *);
 
+#define MINIMUM(a, b)  (((a) < (b)) ? (a) : (b))
+#define MAXIMUM(a, b)  (((a) > (b)) ? (a) : (b))
+#define ROUNDUP(x, y)   ((((x)+((y)-1))/(y))*(y))
+
 #endif /* _MISC_H */
diff --git a/moduli b/moduli
index 426a58f..00b5a69 100644 (file)
--- a/moduli
+++ b/moduli
-#    $OpenBSD: moduli,v 1.14 2015/07/22 02:34:59 dtucker Exp $
+#    $OpenBSD: moduli,v 1.18 2016/08/11 01:42:11 dtucker Exp $
 # Time Type Tests Tries Size Generator Modulus
-20150522025931 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAD18DA1F
-20150522025936 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAD3763B3
-20150522025942 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAD702B8B
-20150522025943 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAD77C283
-20150522025947 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAD96C25B
-20150522025953 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DADD9B3DB
-20150522025956 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DADE84F07
-20150522025957 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DADEC1DB3
-20150522030001 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE0E297F
-20150522030004 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE2A1E23
-20150522030005 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE2ADE53
-20150522030008 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE47B9F7
-20150522030009 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE4E1343
-20150522030014 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE715CBB
-20150522030016 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE7BC9EF
-20150522030018 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE84579B
-20150522030019 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAE8A564B
-20150522030023 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAEAF7AD7
-20150522030025 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAEB9DC53
-20150522030027 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAECD976F
-20150522030034 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF07F063
-20150522030034 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF08ACBB
-20150522030037 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF192C07
-20150522030039 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF241333
-20150522030040 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF255B3B
-20150522030044 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF3DEC37
-20150522030048 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF60F05B
-20150522030049 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF6255DF
-20150522030055 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAF8EE01F
-20150522030059 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAFAD237B
-20150522030104 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAFD13587
-20150522030105 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAFD2BE6F
-20150522030108 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAFECF32F
-20150522030112 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DAFFDEED7
-20150522030115 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB01CAA63
-20150522030116 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB01F3647
-20150522030119 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB034B30F
-20150522030122 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB04822EF
-20150522030124 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB0528867
-20150522030131 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB08D3CAB
-20150522030136 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB0B10C6F
-20150522030138 2 6 100 1535 5 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB0C688A7
-20150522030140 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB0CCDF9B
-20150522030141 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB0CFD81B
-20150522030145 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB0F59763
-20150522030148 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB10339FB
-20150522030149 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB10E3ACB
-20150522030150 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB11127F3
-20150522030159 2 6 100 1535 2 F4EE15F22E5F49997A027769656DF0240598C9470C7D67A7D7DA2777883C1C243A6F3D04E1CFA6A0350B165ECABE89A684C11ABB7E5B93B54FD6EAC85BBA9F23C6306E485BB9AC5515ABC739CE9B1A79F7DEF6D00B643856DB903E23E7F985EDCAFF867FE15498E7EF6A91057DE337A9AAEDE941C934E65243AC7888A33C78FB2490BBA2BA06F18ECC51DE9AA54BADD061CC5BE1EA060CC3217CA11E26772BD088898D2882CB49A9FF40168E49AE6A90EE1F61132E1B6E4E7F99797DB15B8BDB
-20150522030634 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8ADB54257
-20150522030715 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8AE6EF847
-20150522030737 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8AEC5D76B
-20150522030739 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8AECB604F
-20150522030742 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8AECF538B
-20150522030756 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8AF04851B
-20150522030828 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8AF867683
-20150522030905 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B01F7E27
-20150522030909 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B02AFB8F
-20150522030918 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B048739F
-20150522030930 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B07661CB
-20150522030938 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B091EC43
-20150522030955 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B0D50D0F
-20150522031007 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B1023673
-20150522031015 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B119500F
-20150522031036 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B177EE9F
-20150522031056 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B1D0030B
-20150522031103 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B1ECC193
-20150522031125 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B24C9CF7
-20150522031136 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B2774773
-20150522031208 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B2FC9617
-20150522031220 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B32FE6CF
-20150522031228 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B345AC93
-20150522031248 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B392E18F
-20150522031256 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B3B32FCF
-20150522031300 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B3BF5B2B
-20150522031311 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B3E840CB
-20150522031316 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B3F5F9D7
-20150522031334 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B439F28B
-20150522031337 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B44025D3
-20150522031339 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B442AC0B
-20150522031353 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B4788613
-20150522031356 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B47F8FDB
-20150522031401 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B48EAEFB
-20150522031407 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B4A1CE0B
-20150522031420 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B4D73D93
-20150522031425 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B4E9937F
-20150522031428 2 6 100 2047 5 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B4EFD4BF
-20150522031436 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B507149B
-20150522031452 2 6 100 2047 2 DB36277B45EA5615C782C08BF6A290A3D61E6B9690E4A147042113FC1BFC0AEEC5FB0FF82FC1FEA86E273F667EC387FEF3421FFFC617A70C34B1987986C6B35C715713914AB75932A3D1942ECC0F324D81BF00D59916B3BFDC7BA432AF5C5DFCF30BF4A2C80B8CA52A9B80E989D3A852BD81A8BD3ADC97497F43C6F0A90882D9CFA165CF1F735C96428BF9BC32A58B71CF1D4FD48A6D2C616E91BB6E07C5CB0DF0C59DAF79D659C6E53007843497BBEE5B341D27DE2E2543B8DFEB4DDAE6328EAD441C3F36509C1FA689FE494B0426ADCAF9E567A1C5A3301689C5CCC55EC4002FAA5D254C2F3C0F8636BEA7019D1CD212B74EE4F273E0B9997720E8B54A3243
-20150522032348 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF98368C951B
-20150522033023 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9838C4B4F7
-20150522033224 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9839729F67
-20150522033330 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9839CF938B
-20150522033506 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983A5AA27B
-20150522033539 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983A849987
-20150522033610 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983AAC8A5F
-20150522033839 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983B7F9067
-20150522033952 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983BE385D7
-20150522034001 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983BEA4367
-20150522034055 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983C305BC3
-20150522034123 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983C516EB3
-20150522034146 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983C6D1017
-20150522034241 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983CB6A553
-20150522034528 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983DA8F54F
-20150522034544 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983DB92AEB
-20150522034719 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983E32A87B
-20150522034748 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983E589F5B
-20150522035227 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF983FE4EA2B
-20150522035328 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9840340683
-20150522035522 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9840D77183
-20150522035721 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF98417632BF
-20150522035808 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9841B795AB
-20150522035847 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9841E9F357
-20150522040046 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9842863803
-20150522040057 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF98428F98CF
-20150522040128 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9842B68EA3
-20150522040136 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9842BA209B
-20150522040232 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF984303E883
-20150522040546 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9844117EF3
-20150522040607 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9844276407
-20150522040733 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF984499981B
-20150522040850 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF984502ECCF
-20150522041059 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9845BB3AD7
-20150522041141 2 6 100 3071 5 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF9845F34747
-20150522041538 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF98473F522B
-20150522041645 2 6 100 3071 2 E409DD3E1471472B9A1A2C64FDDC0EB822C4485590288E209141916DF6C51125FCF17ED5F4226F63928FD7E9C60DEC3B0A82C6DF10C33E0CDA2E200004C3B89C7BD872CF9572374C7590F8960C97E1A995319ECABF60C00DAC39A8A4A4196638FB338F47445310F2424518C4ED9C789D17D591DF7B2CB11FC320AD7C84376EF838077C5C81BBEE2BDF38F8716E94F756919654AD5BC8FDF9CD644F0B1F604DFB7CF28B8AD55576458DB547348E74101FA39ADD0D5675E2BA2FA074C2BEC53DCA68A1F49E3F5EBBE9069C7BB20A0ED4217C8D8FE99DC3DDAC05172EB056C6173306F604B90079CEAD87AA170EA89E38C07128067C48695040F766131E9E8459FB71ED94BE176C9F827BBAB219E1BD7A4C7ED9FE7FF62E844B0915C9ACD5B17FDE866EC34C44C348C23CC303D6E7AFDC55AAAC007BF3C67280C13C9801D2D8E0739680257CE5CEBD5CA0CF24D2CA6A354D5D132A72D2ABB2E50D257B5A6DAA038683C1A433861204570824D0734402498259C171BB58DA074D22B1DF98479B35EB
-20150522043157 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379177A90103
-20150522044043 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379178F7604B
-20150522044434 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917986809B
-20150522044641 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379179D34D9F
-20150522045152 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917A93F48B
-20150522045648 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917B4FEA03
-20150522051224 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917DA8111B
-20150522051844 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917E9226DB
-20150522052054 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917EDC16FB
-20150522052204 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917F0058A7
-20150522052248 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917F16842F
-20150522052650 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917FA2234F
-20150522052821 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37917FD2EA1B
-20150522054416 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F3791823EE827
-20150522054652 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379182978693
-20150522054912 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379182E6E57B
-20150522054941 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379182F0448B
-20150522055008 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379182FA0E27
-20150522060835 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379185801F93
-20150522062202 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379187943813
-20150522062512 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F3791880945B7
-20150522063933 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918A32FF83
-20150522064222 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918A910AB3
-20150522064452 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918AE83E73
-20150522065035 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918BBA1623
-20150522065634 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918C920633
-20150522070134 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918D471AAB
-20150522070306 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918D7B1063
-20150522070332 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918D838D0B
-20150522070807 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918E2B8B67
-20150522071420 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918F0C3653
-20150522071508 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918F1EFFFB
-20150522071555 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918F35E697
-20150522071903 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37918FA47DEB
-20150522074443 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F37919363872B
-20150522075339 2 6 100 4095 2 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379194BA4383
-20150522080128 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F379195DB3C5F
-20150522080506 2 6 100 4095 5 DDE41D7021F9DF8240D0BD8E14CE1E374A4FFDD073767E84C8C347B6F832731277F9D333B8BC7CD96ED164DF5C6F26E46E4BAF0AA7C87B26CE3E11042C1BDDF76095E50D7772E5DC0C48EBA0E41EC92EAFA655DA1B6C614E1F0F9AD815BD7505AA9B8A265D13956B5A26141EE812404DE13B821C9B7BCA9982B8CF7D862F8E8A373FEFEE4AE46EC2122519A2AD896ED18CAECEF314D1B98C83358B6E9D2F3BC58C1688F162E3CF1FF58E57E7B9E14BB37C9C9E9692E57C42937141C226E84C35B42DED9055A7F366A61C3CB4899B499278ED4C729CC1DE54827E882290F9FC13F7F1488F897698EA62A99468D6F3ED0561816C39B8279154FC7A8E453CCC4EB1ABC777A397B694E1B9866C2495489F94721A3351B252D05FE6C7857929B34C19A8EB42ABED88FA370DABCA83A245DC35CFB399824D127507AD540054C647F61C6BD11CAFC3FE5277A1014DF6B538BC8BFE009315BCD60E020DAB840B8A4219EBA4E349680BC7CA3A9BC36164A3D36E325C530B178747814F575899126B307EB63F910DDE0F09E5056B2F9F7E230A42C11DDD34A9B23A64090C2FF9C7F3DD696E6828613E74A64CFC4046ECFA997BE84981430D8A7F8AEC63001E50AF9F556567A0065A9A013A66A2737CEEE468D6A15002358AC648D862B0618E6DD6A98BBBE9E68174D9C9FE4568BB2D12083CF6892B6B8D58307944955A987F3791965094C7
-20150522083733 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C514C4F88F
-20150522093608 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C517A26827
-20150522094040 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C517D03757
-20150522095314 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C518686A8B
-20150522101845 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C519A641F3
-20150522103233 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C51A4A87B7
-20150522111208 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C51C3A7B9B
-20150522120305 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C51EB16CF7
-20150522122813 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C51FE5C353
-20150522132032 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5226F04CB
-20150522141054 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C524EBC207
-20150522153656 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C529553A9F
-20150522154114 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5298632F7
-20150522154826 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C529DCC5D7
-20150522163842 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C52C78C8C3
-20150522165625 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C52D5A1C27
-20150522172408 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C52EBD88E3
-20150522173745 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C52F69630B
-20150522184340 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5327AFF1B
-20150522190348 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5336CDC63
-20150522200705 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5366C1207
-20150522201200 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5369D0A6B
-20150522202855 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5375B287F
-20150522204401 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5380EDB4B
-20150522205115 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5385D084B
-20150522210056 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C538CEBB3B
-20150522212110 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C539B27FE3
-20150522215602 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C53B4E825B
-20150522222840 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C53CD37713
-20150522224719 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C53DAAAE07
-20150523005800 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C543D2802B
-20150523110456 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C549CAF02F
-20150523111755 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C54A5BCB0B
-20150523135850 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C551C0E2B7
-20150523140345 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C551F4D6B3
-20150523153045 2 6 100 6143 2 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C5561141EB
-20150523170349 2 6 100 6143 5 E49C8871D7F1191BFDDF2C21369599F9E9F57F502A68C5AA4B87527B218B90EB8F33F3D6B4E379A17BA18BDDA81F2DE8B15EABBF424BDEF329D792093D88EB5536D5F165F767F08AD2220E0005162BB37BE7F45B2574F2BE5BFE4262623C8895A803F747E3BCB0DD396DED524EE1E9B9EEE82C741A1F8ACA2E6DB05CC1FE8C2A7DC50F1F019FD74FC6FFBF38ADA2D36A7CC8DB2C7961C154A74BF0086C173AC7A22B266BBE9974459A7EFDC2F0CDB2F9E288527FD356017FDE01AE17A954561197E18E4AADAF0643860328FC9A2D8A5073348DAD615ADF1AE4AD5BA1630437AB4F7948FCB3D33CD225AA6661DD2AAFFE774CA01F0BF8A2DB168D8FFF3A223E3A60B039E9ABAE8E4B6A37B7E8F77A3EC2D1714B79DEC2ED2BCFB39A4FAAB8913D421099623BCD1DE50B419173236D91E09CFCF544161EB4CA8A45295D812708E349D2118EFA3EDC0F86D3300A80C36D77CEE41441F84BBE663413378F2CAA58F6915B5B3CD799541AD5CCC74B76A59555EDC3B6ABD77318E0A9E6450277DF93A882C6F3D2E13E3BBE361BBB2813A2A269324D7FD2D9437AD065CF3CE698BE08857E5E22800CDBC0235AEB364301AF3170C24B8A68B7B038499F788040E86376DA7DB517751F4FC6D1D3E1C3FE8DDA27B69D1281A18D6D2DC92C2E471A4B577F789E5D397C68B738DBEA06FF55AC1D1C177E3A51D136055E379CF68C27DBB6D66771D9ADFD846CBFF9EFF5B0BDC9EA16A8817243451A93545D19DCFB3DE1E50936A62CD98379ED37C13BE8D71DE48E4115DD309E67F676B0CE88B60BDCD0CAB98878A17E67E20723DE50DB3599485E25687005AB55407632E12AD919498F562D2871A55FEDB76F113D1E92AD5E4D342B45611D9F844BED39B36E5225147D3F6BFEC6C6CA88C423ED62781E29EA9A9418500E7419922E51210FA767153619573EEB19609C77212D6A9724295FBF0A1915F33074D5225E9BD0C6105DA28F1B0E5F43EECBE67B18D5FE74FE60CF87800C623B13FD6152CA913F91ABC5113FF0CCFE362C30DF8F369E08DE8D57222DDF659AE2458C7B4225AE583E178328C55A59DCDF
-20150523191201 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB470CDA3203
-20150523215157 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4711A72AAB
-20150523231527 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB47141BE273
-20150523235422 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB47153C4A8F
-20150524010823 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB47174C4663
-20150524013736 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB471810100B
-20150524040115 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB471BEA9823
-20150524051719 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB471DEF42C3
-20150524055417 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB471EE81B27
-20150524104925 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4726B43323
-20150524105636 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4726DBBBDF
-20150524130121 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB472A1294AB
-20150524163025 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB472FBAE453
-20150524163715 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB472FE1144B
-20150524173410 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB47315B458F
-20150524181655 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB473268D4BB
-20150524223625 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB473917D17B
-20150525001303 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB473B95BAC3
-20150525011252 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB473D16F0B3
-20150525020522 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB473E60DDB7
-20150525061910 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4744D20B9F
-20150525092924 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB47499CAF77
-20150525124039 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB474E6A2CEB
-20150525132602 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB474F854D7B
-20150525170642 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4755495933
-20150525201019 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4759D07FB7
-20150525223942 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB475D6E1C07
-20150525230547 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB475E0B3487
-20150525234905 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB475F115D93
-20150526002510 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB475FE94D13
-20150526014857 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4761E82A83
-20150526045853 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB47667CBC4F
-20150605090211 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB476DA5F0B7
-20150605145212 2 6 100 7679 5 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB4776229827
-20150605174343 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB477A770453
-20150605182015 2 6 100 7679 2 F829F98FA9F017F2B534A1ADF10BFE7F46E24D09A1EA89D3BB00CC679F6CDF5107A8AAF6F1AC8581E5D52174BA79E05DC2D61FE0B3F10B52520086FF4BE33841858D569DEFF006D6145E062E37CB2A225BAC5207DBC87BBCBE31A12678F8BD3E64FAFD7DA004CA67EED97A92C511BBDB5CAE7D563758EA45BD2280A91209C417093F079E901E48C80702D0B5420C21A571B133299B590EB3ADD67CB1538D85F03C2EBF2A0E1B64C3CCB55CAE257C3939E2A48DDB50B557BFCFFA891EA55D2CE29ADF58D94887170E2EF8EEA14D83117793B2EBEBAA5DAF26F118C53F3F50EF50ACF4BE634C4714F05F198D0A10C91C789C08F9CE84CE238FDFAA6368A1D971450D3A05B279DC0DB0BE57E7B36ED42FC2DE0989CBF4881F59E1C3EB80C8BFA7A9B4493246AB0977F26E368179D4269DF732C935A7901E34042CEBA93FA7B5F2BE7765D1568F83A82D0A556F973DEE714AE348EC6EE73D06E5746D7CA7A2172053350FF03E2B2483F6F5CC20CE2FD44CF81187EE3A28073C4360432BA958FC71C6B4609208610001B762042C20951BB46D484A4D018134E581BAD41EABE16721DB572B76921A6FDA278B4DBCD6E479D89D8F076A3DF39BBF6A81A1529BBDB06A75792E3CC2AE7047533465FB0C4BB6F0B16A2FB13B5812E5AFA8BC06184CB8620700602A9F3D1194EC7F98FF6858CFB26161FA3903301F7F54E8946C688B91631BF8B2452255F7EA8BC66FA9CB2D12BFE8437330956902B5D04469F45AEBEF0CC2F49791EE958B7FC791ACC0BC6A0DAAA8BFB2A5EB49628051F42A0CF1FA0EA33E9EFC8DED03407EA35D1D6E7F09D278793C9E446F99E3A9D6EB93A07FFFA8A16CA1417D776A3DC2D621F3D49A7DED7FC3274228EA72E2BECFBB071B8F1EEC99F04E62DBE9D6F781B3E4078EE28596222A387E87FC7213BB49AFDB79E549B5533877A8FAAD0A86F34AB36B26A48E544F5175EA498E57E6CC8B72924F2DC0B4C4A6364E667B11E49AEF39CE132086650954863BA4BB734A8A13945901802072BF924A6B38BC81E10E3EB74330411F10E259D58C9C4C5F1B4F40E85F11D12D0A5D4F896E24ABBD91E80EBCF0446B189705C133E113699D589068FD67D1993917B9349D380BAAAC594824051275D3AFA8BD3434AAB6C30CC9B6E687AD41A20DBDB890D36571726BCDA2B7051E1BC227480C83F2352A9DF08EBCDEF39936BC26553279246E536F26FFBB65176F4FE67B21658DF22C344A260B4AA8A09F354ECF50B8505F2F6AE4F99F6549CA139B730DC3618E6B5B70966A4276848266CBF23F0FEE469EAF298932EFBBA50E719BFF2259504A6D23938DAD104016FA91EB477B32F0B3
-20150526114135 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE95C238093
-20150526114600 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE95C32EEF7
-20150526134901 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE95F067BA3
-20150526153127 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE96179B9CB
-20150526164245 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE96332D5AF
-20150526174513 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9649A719B
-20150527035812 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE97262B7F7
-20150527075726 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE977B43343
-20150527112120 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE97C1F6EA7
-20150528010450 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE98E4FBCCB
-20150528020450 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE98F884B93
-20150528024708 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE990692277
-20150605205801 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE994DC793F
-20150606012116 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE99A681C6B
-20150606055158 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9A0264EE7
-20150606071549 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9A1DB0223
-20150606132241 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9A644DC6B
-20150606164856 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9AAAAEE73
-20150606183208 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9ACEEACDB
-20150607015742 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9B6ADF38F
-20150607022317 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9B733A2AB
-20150607051100 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9BAB79D47
-20150607064815 2 6 100 8191 5 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9BCBC8A17
-20150607120629 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9C355FA5B
-20150607121012 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9C3600A83
-20150607123508 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9C3DCB093
-20150607144400 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9C680E5AB
-20150607145646 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9C6BC5BC3
-20150607201140 2 6 100 8191 2 C64DCFC087E26CA2C02394329FAB07FECC446B77A6190D0FFB4326006E0F6D755C35C82228750F80F466E5E6C6FD70A6D4398BBF24C8B4D4B27A38125ADA4D087A7051B2FFCDF675AB1AD9A3A4EE3071B75A8DBEDD879C1B4D396FDF862B2C192B5EB832FA23EAA10DFE795435545882854A0F3BEB476B865E6ED98E43E49950F2FDB00A0E177FAAA3162AE6F513DAFC9A55676C0BC5B87A1C79F98C1A93035F3B39BB24C2C398DA1AADCC16EBB918407579D24ADB3826725E2B4BE73129F28181BD3A1CFCA78712592F8C58E8AF3BA7D7DFFB538AA2476467AC75BFD4C884949C58A0BC8D820E0AE5E0280E083401D239F63649845FEB53444126D137B3A80D4EBF5839263C302FFC3CA5F653B2D93C4AC474D489ADC4E1379BB7FD72950B57EF30FF579917AC9999B4136C030FDCB6121E6F7222227206EBA69DEA5E7DDC7F4718E24E3E4D6D17A81F18E0D376292ED3BB744C66B9ED4BC90F6A04E953B952F794F01372FA88558228C70C97C01D5350EDEE0BEBC99BBD696AE2EFAAB1A0767DCAB15C52821B3243388CE729957668B385A050651F38702C5301A92180A8B84FDF30A74A23E34D9690EEC35A4B644B97DD1558933D7D3DAFF826C942882E223C79EEAE9835F972C273139C396E519D124B6ABBE233548EE1B00B87F7791611DF2E47343368D333C071E231F82914AAE51CEAE790410A6D11D6B82067A9847C945E0BB32310F8370C81636FF68BE65137C3FA912E4C1147F49946C198E1E15E04B8FC7AFFC8465A182E81976C5ED5C2D07F3F6AA25ED27FAC527D6126213BCABC49E102D35AF81E2A694AF0EF83DF6A687E8F3DEEC076BE08A7CD1A3B81C4997136880DB4E7E37B56082F10702F0BB646C7C8A760E297E2A39129BC4A3D0EFB9C3FA2611F5E545F2DC52E013FC49353553F46DEBB59817E18B701689B7A755E609A1B521D72DAE5CBCCE7059E8DA977C97CC87ED8118A2A0011B5ECCCB53785EBDD8986B0A3B36538BBCF4C27DCA06A4B35A9F9920439A35445A0703B34269EB2652999D041912810C06C5742B2AC9B23522D6A2AA3F38A699170B90EAE64509BBD00306C6AFB78AF35EE0D0B504500D5A2AECC0170C2B97620B4796CF538B6D867297F8EC1B08B2F4AFD3534FD9775200BAC298A216AA2553964B7A259D738C84A4035A2BAD35F2AA67CA197D9BB0658ABAB4AF6261C74F18D3D98A5B22C24476FAA8DB9F4FF2621CA01F27C8AB6157F6A1E7F0900CB3F2EEE44D77AAEDC77F24B0E2288340E9A371ACB021407C3E089F61FF0F8469EC9FDFC53892B47CDD0E63748DFE8F814AF7755E6B08491B0CBF8A3A847A922798D28FC72CC9AF8F9299D7B59E1AD1054A98488DB158D471A2D66053FD017238A9B9114393CB4BFD48B8FAABF7E4139E62F533CCCFDD9189E2FFBBB8E488B25B13B17BBEDE9CD3C4A03
+20160301052556 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D19F4647
+20160301052601 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1A5C13B
+20160301052612 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1B7A3EF
+20160301052620 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1C4C33B
+20160301052628 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1CFFACB
+20160301052645 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1F31D8B
+20160301052703 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D218C293
+20160301052723 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D24116E3
+20160301052732 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D25321F3
+20160301052741 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D260D8E3
+20160301052748 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D26CD3D3
+20160301052756 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D2791F7B
+20160301052823 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D2B71133
+20160301052827 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D2BABBA3
+20160301052832 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D2BFC957
+20160301052931 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D3514117
+20160301053017 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D3BF91F7
+20160301053037 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D3E9113F
+20160301053101 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D41BFA83
+20160301053129 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D45A369F
+20160301053217 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D4CB8683
+20160301053222 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D4D01463
+20160301053251 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D50F62C3
+20160301053309 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D5351887
+20160301053333 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D568358B
+20160301053350 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D58AA31F
+20160301053359 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D5991AF3
+20160301053438 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D5F65E07
+20160301053523 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D65F37D3
+20160301053556 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D6AB7E73
+20160301053608 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D6C131CB
+20160301053631 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D6F18A93
+20160301053647 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D7132B7F
+20160301053724 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D76995EB
+20160301053743 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D793D27B
+20160301053757 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D7AE856B
+20160301053820 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D7E1810F
+20160301053828 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D7EC09EB
+20160301053831 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D7ECC2FB
+20160301053958 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D8B829CB
+20160301054042 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D91CFCF3
+20160301054134 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251903103B
+20160301054139 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF2519072B8B
+20160301054157 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF25192F631F
+20160301054207 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF25193F9E7F
+20160301054213 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF2519475A1F
+20160301054301 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF2519BA6807
+20160301054320 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF2519E2FA7F
+20160301054340 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251A0CD913
+20160301054413 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251A5B8A43
+20160301054511 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251AE66597
+20160301054527 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251B03A57F
+20160301054544 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251B276FBB
+20160301054548 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251B2915B3
+20160301054621 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251B79A4BB
+20160301054714 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251BF77377
+20160301054737 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251C28D853
+20160301054819 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251C8C959B
+20160301054844 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251CC0A39B
+20160301055002 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251D7C0A9F
+20160301055021 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251DA0A72F
+20160301055024 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251DA1003F
+20160301055029 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251DA4B607
+20160301055034 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251DA82003
+20160301055101 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251DE323BB
+20160301055123 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251E13DB33
+20160301055136 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251E2A2203
+20160301055141 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251E2F180B
+20160301055208 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251E6B2E8B
+20160301055248 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251ECCA61B
+20160301055312 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251EFFD5C7
+20160301055319 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251F08AD6B
+20160301055413 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251F881A4B
+20160301055420 2 6 100 2047 5 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251F8FC967
+20160301055438 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251FB8102B
+20160301055505 2 6 100 2047 2 F030C513D5C6694FB09539ECF9D8290608A96280EDDEB74FD66DD43CACE3A5BFD6BC4F02EF38E44F68296DA50091214D9E6C518D715D76E19CCCA0578886B93ADA36E8AFDC23B311DA04EB8AC2FF31F3B87BD27C283519DF9CFCAA9D4EF822ECD2AD5593D3819399CEF3FAF0B786071496A9BD94164F739A2D1E0DEBB798BAEF0540B4388D3762523B68E100D6EE231DD95BEB4F4472E9E2236A24E0891DF5A19222A6C69D531C9E73DEF6ADAC84D61BC4EEA36E2A9FD64902461BFAF9BF81D699E141EE77A03996DC4586D3487A0E6189696C1D67F91E91595EB584AD1DF9EF5FC64160EAC3F2D88B4FB0E20A7925FE133D71EF9E1DD018101AAF251FF16983
+20160301061411 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26C5D83833
+20160301061835 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26C6AAA907
+20160301062447 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26C7D2DF17
+20160301062535 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26C7F0856B
+20160301062652 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26C8266573
+20160301062708 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26C82B4297
+20160301063801 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CA342897
+20160301063920 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CA6B6B53
+20160301064001 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CA83D25B
+20160301064133 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CAC6E0AF
+20160301064312 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CB0B8B2F
+20160301064624 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CB9E9EBB
+20160301064954 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CC41F773
+20160301065030 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CC56680F
+20160301065134 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CC82B2B3
+20160301065432 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CD0A0833
+20160301065614 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CD54CA17
+20160301070010 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CE0A7B73
+20160301070046 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CE21045B
+20160301070141 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CE4560CB
+20160301070334 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CE9951EF
+20160301070607 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CF0C830B
+20160301070911 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CF96B75B
+20160301070931 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26CF9EB207
+20160301071405 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D07614DB
+20160301071648 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D0F1177B
+20160301071915 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D15E484F
+20160301071932 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D16371F3
+20160301072032 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D18BD843
+20160301072158 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D1C7632B
+20160301072445 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D2450187
+20160301072709 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D2B15CFB
+20160301073130 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D37B3327
+20160301073142 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D37C7FA3
+20160301073822 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D4B57B13
+20160301074016 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D50A615F
+20160301074134 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D5419827
+20160301074208 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D554AA2F
+20160301074359 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D5A29FEB
+20160301074457 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D5C6DA83
+20160301074620 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D601594B
+20160301074846 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D66D7E6B
+20160301074917 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D67D64E7
+20160301075053 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D6C27B8B
+20160301075132 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D6DB9C33
+20160301075225 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D6FE9337
+20160301075252 2 6 100 3071 5 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D70AF577
+20160301075345 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D72CB613
+20160301075358 2 6 100 3071 2 E2871F8AF82B8E1038DDACF268D3690580ED64FC99F13D64B8322F1F6F19B0860BD4CB74BD2FF72ADF1090B0506E77743EA2C3102093C10A5045A17F92E403AE24B4E9276F9999A4AAD7DF5F2C03EB72B6BB303FE894149BFD670A13ADEDEFBD726A12A7F32919BC4FFFC8FA3E2E73645B432EB894D6906D1E6E8CD5C8BB882953EAA0306508205B6BC0B99177C81E9E9192D8185185CE82CF310AD42A24DB83039A4F10D1C55E7EA7D4C020BD12947A25732829D1AC6100ED9DA3F4D834D8EB28875F37B399C5AE21D6A122950A41680857CEB6A25158A108E8E0338047A2DD979AB97E9F84ABA18FB1DD43FD630F494CEACF0F7FFEF38BC14968B0FDF4942927D0169B46E84D52356EB1B7D04EFCDF2239AEA21A63B6F64E83AC18F81EB6EAEF03328B830860C184B4434B39FA6AE31C751FB5BA1AEA1BD8D41457D9AE58C6EFD230493454BA3C5EB791E74CAB907D0AF1173FFB99D78953660B23127550350A9A09B0116099087A04B56078C274874507ED92ECD2D98A7F064C26D72F088B
+20160301080151 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F1FA94507
+20160301080332 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F1FF62A2F
+20160301080512 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F203E0E3F
+20160301080759 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F20BE897F
+20160301081008 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F211E8DAB
+20160301081510 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F220FBEBB
+20160301081725 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F22727C13
+20160301082213 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2352279F
+20160301083400 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F25905AEF
+20160301083955 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F26AB557B
+20160301084035 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F26C1D647
+20160301084145 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F26F0E75B
+20160301084827 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F282FE7DB
+20160301084906 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2847CBF7
+20160301085226 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F28E1E963
+20160301085254 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F28EF835B
+20160301085737 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F29D012DB
+20160301085933 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2A259503
+20160301090045 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2A569E5F
+20160301090201 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2A89EEB7
+20160301090441 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2B037B2F
+20160301090534 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2B2559FB
+20160301090628 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2B484193
+20160301092125 2 6 100 3071 5 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2E1E1337
+20160301092513 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2ECC261B
+20160301093051 2 6 100 3071 2 F5B3EB8BEBA51E3899E7F8C7E202FBB132EF5731B3C2AC07945AEDA6A77A194E69538E08ABB8BBC3FC5AC2D3F66E582AA280D1832065E63F462AE71CD69CB3523656358545BF625F0F0BA9A8902D2A09484BE915E4AB809B8C767F84AADC75744E07F691893DA5DCCCD3FE8A7140858A9CF09A52E3A8F1050913A592B5750BC54682523B6920F626D87A717D6680B4EE430317DDF7B36458D479ADF6855FE46D865D02F8161D8BD8F4D0F330EE27B28AA40D48B6EA8E183223FCBC4E9C4F1F615DE750A5F8BE130EE46DC23970AD5A3CB93F5822A53084553A3B27A72ADD55958935D98B06D6398B00A718EA6BCE075DD6708F714002AF5A75C67D087DB8308B6FCEC775DBE8415F57CCD39C13496F0782D4834C03241D1B2EFE5CD07D702BD489DE25DAF08CA1DE5FDA5962A8CC6E0283B992640B8706B076531844CF66D26BEC2DD5A0BCDABE6A048BA55F8C25621E8CAA55F2D9E011896DEA823CF9FFBC76143FF7F4653C3BBDC34138A482A150A221E2CA2BE774B7BD22B2481F2FD6418B
+20160301101954 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29E60ED3CB
+20160301104238 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29E7F21B53
+20160301105433 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29E8EA1923
+20160301110823 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29EA099523
+20160301111806 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29EAD0379B
+20160301112515 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29EB5F9FF7
+20160301112655 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29EB7A3C73
+20160301113152 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29EBD8A1AF
+20160301114603 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29ED0421CF
+20160301115854 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29EE10BE07
+20160301122138 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29EFED1757
+20160301124138 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F18BB82B
+20160301124341 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F1AE9F93
+20160301130540 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F378431B
+20160301132038 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F4B041CB
+20160301132156 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F4C33A3B
+20160301133248 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F59F1817
+20160301135039 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F70D3707
+20160301135200 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F720CFD3
+20160301135955 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F7BFD4BF
+20160301141625 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29F9118567
+20160301143329 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FA446E3B
+20160301143411 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FA4A5D73
+20160301143511 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FA57571B
+20160301145341 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FBCEC3DB
+20160301150532 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FCBAFB3B
+20160301150756 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FCE5B5B3
+20160301151026 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FD119B83
+20160301152435 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FE2CAD43
+20160301152638 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FE504DD3
+20160301153829 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FF425A73
+20160301154015 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FF5FBCDB
+20160301154135 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FF725ADF
+20160301154325 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F29FF9005B3
+20160301155218 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F2A00430653
+20160301160626 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F2A01612A43
+20160301160831 2 6 100 4095 5 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F2A01842FE7
+20160301161542 2 6 100 4095 2 EF7840BC7248E3E12D223BD86584358750562F5FCB298632E269C7F4347DC441CEBCBAF5B8AD25C3A3EE85A97FC342EF2B320425ACE6A816200E4A46596E6D911E8E5940E4ED1F64275D1A2A1E2DC8A34E26026A8DD9D20AF2E36B2BEB467168E516F1DF9145DBA60CE4BE46B34E918D36F581B2860BEBD153A09BF5B51348137CEB0BFA43FDEF5398C538CB9854BED966017DC918E4EA26E0E1A283AEA90F41B2D27CBC34E6AA64FE7E370D532BE4A0DB2E77958CA6E570DEDA817FB91351B65E227BAF96383323820AC5CF785CD686E99398773DF19C1E33D7199A5104337AD3C8CF78FE1AF5D8A4A2B8C092E1FD2688F2829E006C050257DC4C16576AB12AC01AE40F35785586902058735024E0CF90B1DD3B547647AC6F98A70BE3CA9EF80E9A1E408D29FDBE7935625B9AB863891D6D30A54903DD23933303055B8E864751CEB7A153A841D2E1CD3C5943C7F6F1BB2836ED387BE4FB3075363317A1E813965497F5CC621A72B1CF5B50813B418F391FB7C4530B6C19416B4A942063012798536BBF853166697747F39827832A3D135ABFB03BF15990787F64D25E629ED1A6009BADF5447730445ACF2684715A84ECBC4B3A1E2C93E3EFCF4D9373E1355740776F66353576D7359C69EAE48FCFB06CA7536F4B132BFCE6DB2FDBD687B24E7A0AD1EBCBF887A7258C24D8AC9BB86BF847D9AC980919AD9BAF3F2A020ED50B
+20160301165149 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE54C87A80B
+20160301165241 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE54C91EA2B
+20160301165750 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE54CFA74E3
+20160301173839 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE5504AEAFB
+20160301174247 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE5509AF4D7
+20160301174504 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE550BFB1D7
+20160301180608 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE5526F5F0F
+20160301181854 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55377C36B
+20160301182221 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE553B4B8F3
+20160301183911 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55510470B
+20160301184110 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE555338897
+20160301184426 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55571A23F
+20160301190148 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE556DEB983
+20160301192446 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE558BD1523
+20160301193428 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE559875F5F
+20160301193505 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE5598BF0AB
+20160301194148 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55A0E82C3
+20160301195020 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55AB8837B
+20160301195917 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55B6C5AB3
+20160301200332 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55BBC661B
+20160301201317 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55C7D9887
+20160301201523 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55CA30A3B
+20160301202029 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55D044403
+20160301203514 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55E324A43
+20160301203700 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55E4D607B
+20160301204309 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55EC519A7
+20160301205135 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55F6BDE23
+20160301205244 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55F7B0B23
+20160301205520 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55FA81627
+20160301205558 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE55FACF2AF
+20160301213318 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE562B75737
+20160301214847 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE563F5D2EB
+20160301215746 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE564AA7C23
+20160301220025 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE564DC00EB
+20160301222154 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE5669AE6CF
+20160301223932 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE567FEFC33
+20160301225302 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE569139497
+20160301225705 2 6 100 4095 5 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE5695E7AB7
+20160301230308 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE569D3D2B3
+20160301230751 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE56A2CD9CB
+20160301231012 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE56A537EDB
+20160301231655 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE56AD78EE3
+20160301232437 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE56B7299EB
+20160301232518 2 6 100 4095 2 E268D4796069A7E90EC81DC69831656A982D57FD2C1E7810FD32855F3A67C150F52C2B45EC5C1183DE82AE98202BCD0CA7D1CD0A4D15AE296B23B6FCC0BD171005C939D9D1D75DEA733A6B4F3DA9A96759881B7482ABC3CF967763F261D0D6BEDDEE374F138597B347A57A4E21F8F801CD8F8A33FB3638FE0CE021E052AD5CE00E23E3A6644C844E8F79749384DBD4AC2D46B7804D797174F4BF19F92D8710B18BAE576F69449EA91681A92B0E8E95EECB47CCB0720DA611EF8686A09A7DB37726E1357EA9A1CFB7B2DB04529147BD30F96515123A7B5540890860D45C7C033DC0FAF079A0A7825C6A6DFD9B87189F2EEFBE5F68BA9B1DDA8E3BF26ECA3A8A261BF5C67E2A01C8E4BDFAA1C221950596216C69468493E424DBBCEFB8BCCF0A83C773123087F355A15EE7515BC3C6536FFCA05B50F8FB7F3A57103DDB6FA82E2B902991086E2EA9284CB09FEC7A4184EBA09A700930188711313FD16C27B338BA4BA55736E0C7B4C6E731933BD9FD7DDC80BC3A23676FF871FE3E21945BFC83B22C3992E2219F75A6C7AD05F66F2D09B8C805C2E1FFBEDBE5115FD9FB023B58B37FAFEA2CDE16C52A54BD7090C03438EF19F04D8FC630055FC96AFEA891B8CDF6016A6E101A9C27C1E6A5A3B81DC785B6E8808EF59414B58C1CBC5E3E1428DA520F1AA2E8BF6A6554F2DCA1CE30972E13BED33D2744621C763D387AE56B78E563
+20160302001351 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF880CFD33
+20160302060207 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF915C8E67
+20160302080221 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF9484D603
+20160302085858 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF95FD5243
+20160302110323 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF99425D23
+20160302115537 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF9AA4530F
+20160302121026 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF9AFF17B3
+20160302125303 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF9C1752FB
+20160302132855 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF9D055A3B
+20160302145027 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDF9F210C3B
+20160302160128 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFA0F799CF
+20160302164318 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFA205C49B
+20160302193543 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFA66F725B
+20160302223446 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFAB045BFF
+20160302230706 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFABD44B9F
+20160303005014 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFAE7817DB
+20160303013053 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFAF76805B
+20160303031806 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFB234F5BB
+20160303034446 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFB2DCD713
+20160303042131 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFB3CABEBB
+20160303052710 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFB569F28F
+20160303064237 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFB744D6A7
+20160303074318 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFB8C38E87
+20160303091435 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFBB0B707F
+20160303111232 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFBE003643
+20160303112343 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFBE40A0B3
+20160303113550 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFBE87B0BF
+20160303120708 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFBF49A92B
+20160303122005 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFBF954093
+20160303134821 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFC1C0AD17
+20160303183137 2 6 100 6143 5 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFC8B45457
+20160303204451 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFCBFBCF5B
+20160303210530 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFCC756893
+20160303224116 2 6 100 6143 2 D9752DD196C5E138B7F542FD56561455DDBDF05DCC107F8A5C8F393529CEBAE3CECA54E85766015CBFE1856D830D7A20385951C0941FF754570F697951C77F6FC064C28B708E8A691BDA8C6C1921C7559288EE8A024EB50D923EFF9F143E76B053D2B5FF1779C1CDC0E5856BBE4396928E605009866CFD212C68183120D5A7EA14BD3878690406069F8BC9AED334AEB6C25FD4CD9421F860893256B1A7741F729982BC109E3B6DF4D86CCFCDC1EBAB2EB13836E7988CB9F32F3EC5120E6B2DD74FF13E456A1A01E313E00A728D2ED690A656DACB1C71C6BADCA959CD944EBA762FC8B0B3CEF237386ED3D4FC6983A8F950B956DC76C09B6AAE22B5B8501B73B6E685FA40AA56139A8C02F6E0B7836E3F08EB5F9D4EC83A8BDA394FC5DA24D2CF078AE7491E3856A18FCA2C68BF9BC82ABCDE494CDFB31F82E5FE8C20D7832412F478BFC67A2B4B2CF5F266DDF53CB62372957861B95FFD2C82C46E48ACD75CAEC30E8453C8A24020ABB6143665441179478D8E33E505C2E34C1EA8F22205CA8FB31A48209BCF10ACD56B6B0060DE1836A4C9EF3C062C552C1BC8528D262FF0A2BEB56626C69A8CC7BA24F65FC39768212BB7C41BFFEDDAFD1A1528F6258F2ABC102F693425FDDF20D9EC9601FBFDC6FCD43E551C082A8A1373A1CB5E83BCD8175D9B60662D03ED5894D3EF4325180633C33FA1DD0964CC0CAEDE403146E7A5B8ED74FC6AB359EE1909A45A445429B17C04658E7F4F31F84DD194FDFBF3EF345C1B4EF2563E16351808FE4262B52D0C8AA748DF502FEF3A92C9F6A6A03BDE903DD1392177265313C08E767B003614AC6C6BFC501AAC24737BB3C8CC0160D81FC3BC6244974E1D83D15E676976F92999AEE25A66E7FE124A94D52A902E035FA5F866833D7AD3387BE2423095930671D8588E49510AEC9430ED1F03A02F3160124D893833D44FA4B51FED9044AE5B4136105466D5CD711FDFC37690183BA1D4930347148433D76B98A857EF4962FE0F48A16F20454555411EC778B248529F50503C4E0D62A122EEF42CA6BEFC7B3517CCB75A293AF2532E29FC2889DFDFCEC94F0B
+20160304002011 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F213AE3B5BB
+20160304013213 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F213CCC818F
+20160304014837 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F213D3357F7
+20160304050100 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F21426DAC33
+20160304070516 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2145B0AFE3
+20160304085926 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2148A9E96B
+20160304092251 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F21493F5C9B
+20160304092815 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F21495C2BA3
+20160304115839 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F214D4FED23
+20160304122842 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F214E130FAF
+20160304143749 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F215161823F
+20160304160139 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2153888D53
+20160304160440 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F215394B933
+20160304162214 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F215400CF9B
+20160304212008 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F215BACC633
+20160304221341 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F215D065E4F
+20160304221614 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F215D0E8A6F
+20160305022340 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F216368CBBB
+20160305044620 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F216709F6C7
+20160305053801 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2168484233
+20160305060125 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2168D0E0E7
+20160305081042 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F216C1797FB
+20160305094218 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F216E608403
+20160305095044 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F216E8BAD0F
+20160305095440 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F216E9B001F
+20160305111737 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2170A72F1B
+20160305152313 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2176C19D53
+20160305152947 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2176E37BCB
+20160305154608 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F217744E9E3
+20160305161226 2 6 100 6143 5 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2177E547CF
+20160305173357 2 6 100 6143 2 FC87210E608B51094653AB8D5963CAEF1C053FBDBBEDF91B83BBD945C79B4F67E96E8FA2C32DD50643434724257CC86C29F3CA2D266A719934B4D350E933D37153610C332F148D4B22D7D790A2A83995B0600254F640BD5E48B7D97D1BCEE76515FE078CE062EFB08529A5670F773DF514EC5392403D50C33577AFCDDE7D90224AEED69799AE17968CADDBFDC81A6E10B1CDE4A0D3F41C4B82CE346E0621973BE07918EAD36D7C67BCF2984D0F78BCD1E540847CA4DC90D909845862D4F699ABFA17F5749554774BC2C59443265CE386C655055202009B32590EB0FD85F203E63425342E756AB57F5BA14BD2E283B617A230E11A955442F0C1F53AF4F08DFD1D2606DD5DD04486C40A0E6D2DB2B390D664A97D32ED7868A6AAC5F2E534B7C880EE0F6834EC100D547B823547443D02980F1EBB2EBB6D57E9368BC70C440BB5406220630583D59AB11C489B0B0B8591A7F9FF322BFD4B9FE0672800A402F9734652EF151B44180D4EA7A713C66873A245691AAF295272BFF02979772EC48D65CF34540F38EDF2B95BDF8E7A88062866A8F5471F29993E1D4A4F1638A447D237964907CA1090C0CE1D4FDD79277219F9E1CE63E3E95BAFF8017639969710AE8520769B09C318BDD8A0CB3560DDC3A6281E1816EF16D942980934B6B381D44FD19311FDE8457113B6F8FBC9101EC20F6F216712BC17A63A753F0724BA90EA9A4766FF93BBA39020CC72E0B33CB6CC3C3D87A13CB86BA9C1A9B9086DBD905F62B29782E5AAD4C27704913415E583A0EF1F2586C612DCA66CA31FD1F797752EC984E543616C7575ADC6BDAB9788F82C9258DF1E58777440BDAD5D93A2CBEAC466D6BE37CC4307CA0534B00B6EBEE4C3958BC587117E8E26D13E36B1D4A9D0F7DB2F00E9568EB21F6530EF635650C51DC9D04B788439BE01ACBF5501D673896A170037E0048882DCF5A09F7605AEFEA5615A534B5CAE77D46B00E27CAC0C7685AA235EBC0941B056FCE7737E3BD6597EF0C5774D1535F294645B12025F17474F9066DA7DFD867B72E3706FAEECD892C05D92494D7A3BEE52080BAC6FCA8F2179D3586B
+20160305235825 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B0B4DFC33
+20160306022229 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B0D65D0DB
+20160306093737 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B13D7D927
+20160306094452 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B13E933BB
+20160306160337 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B1971D123
+20160306224032 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B1F3B6DAB
+20160306225345 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B1F6160BF
+20160306233854 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B2005324F
+20160307010902 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B214E9673
+20160307051433 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B24C9A09F
+20160307062817 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B25CA759B
+20160307113227 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B2A201EFB
+20160307123109 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B2AEC017F
+20160307185147 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B3059D223
+20160308031623 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B3779276B
+20160308074434 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B3B36AF7F
+20160308080500 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B3B735E1B
+20160308090559 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B3C46A863
+20160308204809 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B45F50A43
+20160308220844 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B47098FDB
+20160309000534 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B4893E51B
+20160309035855 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B4B9D5AF3
+20160309042540 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B4BEF4FBB
+20160309152136 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B54B515AB
+20160309192852 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B57FBEBF7
+20160310013359 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B5CE29283
+20160310035549 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B5EB8EE13
+20160310075706 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B61EA384F
+20160310173812 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B6993761B
+20160310190029 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B6A9FDA07
+20160310193821 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B6B156863
+20160311033330 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B714D2463
+20160311043906 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B7225A617
+20160311054129 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B72E8A083
+20160311060123 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B7320D78F
+20160311060829 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B732F58C3
+20160311071819 2 6 100 7679 2 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B740FC84B
+20160311081031 2 6 100 7679 5 CDE6C545B0D2F4A803F7AA7269ADA925DA60EAE55764AE38A7C61738B71DA67096F9E2CABF9B30B2E33E1FE97BFE4CE54B53041F2B2A0DAEF6135B6FB4990BE5C32AA56F223B6FDA4599B58517C6B78EA50C8E17CBB37865B5DB8AB5AB0F9A30B27AD76B11F758F10643A569346816280CE9368A159957E161B5E877CBD33D838B725F3CBAA53F6BC1B8F0062B9ED6D756CBB077B92A0A010636B4B92D570C8E0E3BA5553A92B7F1BF41C7AF7354849491B1C63886EE4A52DDBCF24444D5EA1636F883C1B5482E5ECBCA45BB5C741E9A302554B218DEC84908A75D6A2FB12CD96B1C6046A27FCBEDF260AA445C90A156DC17A1147861792E81840E71D0C8DA6BFC54BE0AA2409B7B23807FC07EF4B2B88B6AA9755809D084448E20D06890B4F299F4A38653F34BB52F38E06E4BC7AECD019E6E06FE39238F661726D7FD4AF8F5CFD49177CE8F8D324C99A00D4FF37B5CE5845106893B0AB4600F0A47BC5C3A536969498548EB86BC2ADB0155F9D2F94B02E7198CCE6E03D091191F63F7CD9AF5F2781D32C105A5DD8425090F90FD2099FE37630A69DB179A7161A226B0CD24C93C087B3AC90EF711C2358DC39EA53C0B9BEAF30851B9DCC5BCE27B4595D391DB68336FF330D3A1E90358A2CB1B35765C6F629D737EF13D6565390D25F3DC8E5A17FDDAF740568659F064CC5DB9F4A3A6CA3BA027A58CD18880F4941CC9B372BDB9B3398FBC357B7672EFEA922537846A4F4B7F393B927786A30DEEC3E5234CFB2D9CE459D1CB2140DE33052CF325BF81C4AA80928FB4906B6700F9CC2628747894CDF90FE2C2F07303F435CFD182F661B19E802092BEDB3E22C275A9AB635DD60A442E2E3D6B61CB204898EB0F0D888CE8903FA8521B9EF18046904F63B66C70B2C503CD1E2A2EEF203274D59D5A86F1B2758B9DDC9F97708841322C99BE9A47524A8BE01D7152B9ACF12C0181BB8C1884DD03FF26FA916FD95A4325DAC03139C80F7931F24694AFDDC150848579C28276BC4DA72400277F560A1E9701186148B5ADADDA2BCC8F7ED47A999DC77C3D6C7E20AD7F3C0A4DFAD3B8EEA0C0C402A28B27B01EAE661CF48CB7A8E14FF0597612798D954B1AC078984BAC3353F2A9829E9F29D88562F5EF90DF5A5E81A97C4BC9565F2F915B43ECD333B189D3C774E18B397D3B6640D8F4902DE3A90BF4E2646302A4BE7341A40F83AEC49B7DC31C0B91CF4BF022EBC8623CDFAD234CECD39942649B386CC65EBED4676F6B0FBC015D2C300B252A7DE8DC6434270DF9918D48FF541CAFFEE9485166EFB82C4F4FB2FA109C6C16D475052E530B12FB81DF189F77C08A9DC2F6A4F37E38601B74B68FAF
+20160311170649 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9B171F787
+20160311195449 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9B3EAFC07
+20160312113901 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9C1FC4A03
+20160312141825 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9C45A6C9B
+20160312221956 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9CB35C95F
+20160313023234 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9CED021AB
+20160313062450 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9D2124DF7
+20160313135733 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9D880F89B
+20160314002320 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9E14CBED3
+20160314074608 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9E75C54D3
+20160314135741 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9EC7E3DAB
+20160314140815 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9EC9AC0E7
+20160314202745 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9F1BD98C3
+20160314223316 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9F36F08D3
+20160315005016 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9F54715BF
+20160315013952 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9F5E3A7F3
+20160315060542 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9F968A573
+20160315072619 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9FA7969D3
+20160315105849 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9FD4C31DB
+20160315120521 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9FE292087
+20160315121136 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073B9FE352FC3
+20160315152946 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA00CB151B
+20160315165331 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA01DFD347
+20160315184225 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA034D7527
+20160315214330 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA05A75E33
+20160316020204 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA0912D52F
+20160316065014 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA0CD7441F
+20160316121031 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA1102A093
+20160316165356 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA14B5C017
+20160316191831 2 6 100 7679 2 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA168B1623
+20160316230539 2 6 100 7679 5 EC435B7E292EBAAEC94B8E8A53ED9F3FF717BB820D4893F0BBE6589BD3AF344B765A6000950C6244B2E4262E7E500BF699AF0FF49605A15EB80C61429C9FB79F658C3E0F8DB516AF9703BCB5E84ABA314292808DC70D183C513609A6D345F5D8676256E25108EE70B210C0293B5C804CF21FD843D2F5F79F91F57CF2C2EFB7052CA5F73544F0568A68FA5583CA6EDD300817AAB25E650B0AB9523C6C60156726F4B5243A8BE580308BB6297E23785893119D49B2407D4D8DACD551D08A5F9BB32BD7965313EC6C9DDCD685A62F7AFC8E71DF10F9E1FA25EB3DCD41D7DBDEFE5DB565BAE0CB62F192AA573A126FB92C9638457E73EB4C007268142D9506B17D20A4D73B51E21983D9AC86F7ABBDCE9B9D10BE307642C49382E27B45ADB32E9FF7A2203F395C71EAF7656DF83F57E527CCA37A2BE9AFBA89FB718DB95CC041BF4025FF1CB5F463C8A09FD374AF3F143EE53FF4B369117BDBE0743335B1B5650B68C5B4F64E42D4CF0B329316F4FCD5E66F4A1359F2B29684961CA04EC5AC787FD4BF990F3FBE698D69FAF946DE12A4215392928E29ACF24F940AE4046C74BC6E799EE1D85BA8264C6C7DFF62A244CA2D05C4352870E0E8EF71F884AEFA4A4CA704B6C6607D2E59D36253350AF73C1FBE9C5D61A26A9024B715B45ECF1487D23970C5E405B46029403DD95B2F5672E61863E48CBB280300B2CF87C749F0ACC52940819688C819250B71E54397C8792AAB31655BCE19FAD3A7C59BD64904CC806304AEB6DC8B534081CD2EFD2808977FAC9BAB540EC153DD98D8B33984EC40BCFBC0C5D5B95AB3E183961DB2EE8883B174A3CFEC21CBE7F200FDD2879C1BA808B65A03B02793688FBB1F753333A23A4139766DD3ECD30742E55C25474D068CAB008BA6957CB014E4D46C4BF3084C8343D61231B6B997A8BCEE761D907E4323B92EED55575A38048D686B04F6614B7F931BF1F7D2CF35912E3472F424B11FEBA41F6D569B1A13002A33D5660844A896436AA4D8BC74B6951C75F883D747690B6AD3501B84C6C5B4E29C4153A98C0F2DF38CAFDF00E15CFE8DB0939E5611518DB4547CB2880B5F2D431526082D608384FA3BDD78B75157F25C7A2448249E635C20051C39577AE777C75E7B424CB647B76C9880E905E401DA09DE7A6A5F3E59376B24DCAC613C6EF263741FA15E83B64C78C03016FD34AB608D77100FD8733F130F63A0725B8E7CCD344F5E9A460D2F4F5BE139A6B57A3955A47726A02D6425EF8D1440709517F2DE1D8BB1D054BF69B77E44B4C4427F26EC6303F91CF197298214820264AFACBD355F08E278734BDBF1E116ADF6C1C03ADF5E73212A7073BA1974D157
+20160317204037 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F505984F7
+20160317232704 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F52635AA3
+20160318065706 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F57FAD16B
+20160318115527 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F5BAEDEAF
+20160318183751 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F608FC39F
+20160318220732 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F6315D9EB
+20160318231533 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F63E5739F
+20160319161235 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F7037DD73
+20160319230645 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F751E7BE3
+20160320013744 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F76DF3D47
+20160320040506 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F789CABBF
+20160321132428 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F8FC5A85B
+20160321160901 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F91961EDF
+20160321181311 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F92F8EDBB
+20160321224946 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F9615911F
+20160321230806 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F963FE5D3
+20160322064427 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F9B60592B
+20160322090339 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F9CE9AD5B
+20160322103202 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F9DDFC97B
+20160322120630 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F9EE9F43F
+20160322130823 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27F9F927B4B
+20160322151455 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FA0F6C9EB
+20160322151924 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FA0FAAD73
+20160323004347 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FA73E643F
+20160323011842 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FA794B363
+20160323041407 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FA98073AF
+20160323042341 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FA992813B
+20160324042502 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FB9535E6F
+20160324084810 2 6 100 8191 2 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FBC2024D3
+20160324112528 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FBDCE47F7
+20160324195325 2 6 100 8191 5 D8320CDE33443FD11E472910A82D580EF614A690CF5313E998A695702508351835AF6D1DF2FA7AF2F1B234CB85E4174D67D9A32B8CC58DAF6DCFD555275B1D038D5EAAC00E0396BFF8A3686F1BB5DADDEB3C5F12B02358C7A1249A01CB1AA2AB3FAC5FC95CB7D16A38DBCD11804212872394D9A2E2F2797A3062AC5AF0C0C57F5ABEF3608546608EC08F197CE2CCF0490875BE4BCF1BD35358AF5694217F2E3DE713800F3C4071622FDBAD20CAEBE2BA60C80DF012DA576EE24A753749C0BAD8707A2382B6E909FF0B8F4A304EEDB1BF04CA0747166981279FE69248AF0DD177702DA2DC709E301D7D6FE985A7D3F7A1678A9BEF306D6036F143806563C42ADFFD8D70595F0C60BA39F0D392CE7EF7CA57547DB2E35B0464FEC6F59F6095F93BD0A241589CAEE15E2226873D31876900E534999F1D2E23E7239FF679377580065A861D3E29FA7215979BDE039ED1FFED26CC2F5541C5CD907E81434EED0479D8737262CCB2807A70504088F23E72A3D949F37C2C8E957DC2FE64BB9CE028013270F42E022BA671F1670EBD20413453A3CF19F53A1A6BDE5D744E39BBF9377384AAF0FBAF475DD1067A2906244CB87F919159DDC71256A251F1BBA789B18D97602C9C1254A4443849C16E0CE2A7A0B6AA6F117788A92C1CB3F60E2C8E539840E3AF49B9248D3E1CAACB08B43146F07CC53D2573086ED062D108C9AC924F58265CCEF3731D39FE5D4F983EADD0E9F9D8B68D953AA9342B8604AFE7916E544D88870F2ED0AFC2CD0C47DD1E5F361004D97B5108D13CD127DEC8609FA2C65FF1714FD45F3B2B3809BAC06DFCA198B71B3929E2A7B62538E5B1B8B5024D8BB78438883911A6FCA870DB16F8F2DA46D9C611F785428A356B40C07B2B8A72E157E3497DE2982AAAE4D2D9F4368469A7AD4061AEE188DA4317D826721B9F9B1A361FECF0C725E0AB6F17C147D2C62A4D11989DB1503F85763FA3E4A49BAB6BDD05C95199158D421B115F40B124EE448803E07496DE7C2682D4AF433662978CFDCFAC88C9100C46CC16929A10E3082BCAD4444D59FE57717FB4BE8DE45F4D84716D204AC97CBA5A7824765636C571AD6780AAA7510E832EECC54D571A780F90BC6A1B54DE8CC83ECB797A9065CC9807CC99DD7638AFC500D05FD2EDEB795227CAA37EBBC04A37DF07762E0319F27B523282D11DEFD85A1DBA40C87EA1EA4D1B9B2A2FC34F9F5395AE51E3A994FE25C680022E5ABD19D11703C2CB6EEE1780F76FEA8601FAE9E27BC16F832BC16776609DC2B0E3D605E635258A95907A148D583B44E202BA4A48211DA3358B7B391B6F3AD0F84D9D7F97DFFA9D819C3D316A59173E8CA970240349A89E09F0A9B1A4B4C6FFCDD878A977BC9EB254318574C40C49D2DCE56FF803601E1752BE3824F94D0D66C1C5FDADCC9670BFC85C422811D27FC34000DF
+20160325054405 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD3C9827F7
+20160325073844 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD3DFD683B
+20160326035547 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD4D2BE973
+20160326072058 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD4FA14E4B
+20160326092507 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD511CC0FB
+20160326124028 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD537EA3E7
+20160326204702 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD595EF333
+20160327004038 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD5C324F5B
+20160327062851 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD606E1A47
+20160327081155 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD61A5005F
+20160327123555 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD64D2A70F
+20160327223323 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD6BD47A7B
+20160328011117 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD6DAD19BF
+20160328031621 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD6F1E5643
+20160328081352 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD7291B183
+20160328130100 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD75E7418B
+20160328200420 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD7AC63CBB
+20160328203420 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD7B12C7E3
+20160329051003 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD80FE5033
+20160329150013 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD87A1FCEB
+20160329205744 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD8BA2A65B
+20160330010039 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD8E545E13
+20160330064620 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD922B39AB
+20160330195544 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD9AE926F7
+20160330202118 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD9B2841A3
+20160331010824 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DD9E522A6F
+20160331155606 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DDA80BFF2B
+20160401003202 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DDADA756E7
+20160401083841 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DDB2E0BFC7
+20160401133333 2 6 100 8191 5 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DDB612067F
+20160401171656 2 6 100 8191 2 E8E5A3AF93DBD4FB99E4325B3B9308AE7731E7E27B532A2D0AF5306CB249EF6C63C7DFB66FC19B8E84A5672B378D77DD413933ACA7F62EABCD4012865D9336A47AD7E596B21EA5B6A2695C0F6C1C70D92CFF3CA18522B29993AA0A43A6849CEFFF53DF7E33C833B5B0037D8906528C80F98C2FC22F0C43B933795D153ECD05FC0D734F4EC61BBBD611F61CACA7CEC4FEF72A127074ACF73A11B1004A954C48D18E74B534E318069C5CE76C1D9BBB0326432B3C39F26058B6D6077B562CBE0DCA4E5B53F1CF9B80EB4F40DA6DAADF924DD2E7A689321F1558FFB55DA7B91009767791BDA252285D117D45A77FF044F467273CDEA8D4B5AC83DBF16DDB8F5FA4C1556129FFF4213D199DE4E0996BAA284FEC13A86A9F81E7FEAD84B4C59CC6DD641ADDE2E74DEAAD096E53F1F9509BF4A5405BAE67B7A1107E685D6CB934A422673ED632BD91BF84758C9B504DBFF7835E36B038C74400C983452CFEE72FACF76D3AE196BA44DF804657B92D6B646DA47910E53FAE8979C1DA9120C672CD4AAD18A7BDBA2AD397F7B0E01AA7AF4700F9A83EDBA90D25F74C1DCE0520BA9DE24636629D0140BB4BC6C2A703103E5A234BBB9154AEBA22D48F8EBC37368CCC68DC6BA310E2060EC37BCA2BF7DBD68F951BB23D7C018DB2CBC74752F5CED8ECA04EC743A8F4B503831DB09C387F6BD3A7DF1A25BCA452FFB852B134B67CCE4B0141E84B3D796BFDE7BFB2C34760C64200D40728560598B6FB965C0187495318A6EE97E6648F476939AE82F3D9D51761652672CFB3263385219E41D9A26ECFD975AB2005F67B9B6DB6D72ACE42C5079C2E11BEF3B2C0B334E9D4C2EFE518AD4BB8C0A9A995F99B4625D570E283D41EB4542BA37ADCEB772E45F77A72071874CBF8E9C2022DB9FAB62BB8BB11F72416193D10F4A493BDD9FB68A3BADF8130AE380D1987CD5ECCD6D9F5AD2F219D0076964D17F2232E5DAACB832D6E54A0CDAE72302C52604675053C5ED83680DB1D5A2FB9D4885B61E29465FDC016B9CE5DD93582A7221167E77C194C6E7A6D00E98A3E0FBE3987B1C5C1562AE878FC14AC7458003F949665D92F4F01B7A511C9C9126B79E32258AD5BFAB38B91B710AFDD222312DB543EA712C60CF8C8C0C9A7968A9AED867EA11E9718D25EF8A21F18A2F2B3FB28944F8E049705ADC399296AFBA30228CC7AF6D39F49689A16FF5FD64F09A2233970885EB76AEF2650D9A16CA594A3C67F0640095D10FB6E818BDC512F36446FB7277480BA1947D49A8AB5D78965DB16F2E50BFD09910DB0DD99654A32E07C86CF1601D618E7B9D2745C4CFC983E3D48FFE5A08AA471B29DD0E7BBE6DC1DE82FF8988E76835D0E03C177945886DC273C9C91B8B0950E7619490125AFC453772CB66D45D3CEBA3AFA919AE4AEF42D36AF7EDC4C5F030B5720C82FB229E9DDB86F198B
index 087e596..dd762af 100644 (file)
--- a/moduli.0
+++ b/moduli.0
@@ -71,4 +71,4 @@ STANDARDS
      the Secure Shell (SSH) Transport Layer Protocol, RFC 4419, March 2006,
      2006.
 
-OpenBSD 5.8                   September 26, 2012                   OpenBSD 5.8
+OpenBSD 6.0                   September 26, 2012                   OpenBSD 6.0
index ed1bdc9..e983b07 100644 (file)
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.30 2015/01/20 23:14:00 deraadt Exp $ */
+/* $OpenBSD: moduli.c,v 1.31 2016/09/12 01:22:38 deraadt Exp $ */
 /*
  * Copyright 1994 Phil Karn <karn@qualcomm.com>
  * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -41,7 +41,6 @@
 
 #ifdef WITH_OPENSSL
 
-#include <sys/param.h> /* MAX */
 #include <sys/types.h>
 
 #include <openssl/bn.h>
@@ -609,7 +608,7 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted,
 
        if (checkpoint_file != NULL)
                last_processed = read_checkpoint(checkpoint_file);
-       last_processed = start_lineno = MAX(last_processed, start_lineno);
+       last_processed = start_lineno = MAXIMUM(last_processed, start_lineno);
        if (end_lineno == ULONG_MAX)
                debug("process from line %lu from pipe", last_processed);
        else
index 8a53dd7..c36c890 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.150 2015/06/22 23:42:16 djm Exp $ */
+/* $OpenBSD: monitor.c,v 1.167 2017/02/03 23:05:57 djm Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos@citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -34,6 +34,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <limits.h>
 #ifdef HAVE_PATHS_H
 #include <paths.h>
 #endif
@@ -74,6 +75,7 @@
 #include "cipher.h"
 #include "kex.h"
 #include "dh.h"
+#include "auth-pam.h"
 #ifdef TARGET_OS_MAC   /* XXX Broken krb5 headers on Mac */
 #undef TARGET_OS_MAC
 #include "zlib.h"
@@ -92,7 +94,6 @@
 #include "misc.h"
 #include "servconf.h"
 #include "monitor.h"
-#include "monitor_mm.h"
 #ifdef GSSAPI
 #include "ssh-gss.h"
 #endif
 #include "monitor_fdpass.h"
 #include "compat.h"
 #include "ssh2.h"
-#include "roaming.h"
 #include "authfd.h"
 #include "match.h"
 #include "ssherr.h"
@@ -168,10 +168,6 @@ static int monitor_read_log(struct monitor *);
 
 static Authctxt *authctxt;
 
-#ifdef WITH_SSH1
-static BIGNUM *ssh1_challenge = NULL;  /* used for ssh1 rsa auth */
-#endif
-
 /* local state for key verify */
 static u_char *key_blob = NULL;
 static u_int key_bloblen = 0;
@@ -211,9 +207,9 @@ struct mon_table mon_dispatch_proto20[] = {
 #ifdef USE_PAM
     {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
     {MONITOR_REQ_PAM_ACCOUNT, 0, mm_answer_pam_account},
-    {MONITOR_REQ_PAM_INIT_CTX, MON_ISAUTH, mm_answer_pam_init_ctx},
-    {MONITOR_REQ_PAM_QUERY, MON_ISAUTH, mm_answer_pam_query},
-    {MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond},
+    {MONITOR_REQ_PAM_INIT_CTX, MON_ONCE, mm_answer_pam_init_ctx},
+    {MONITOR_REQ_PAM_QUERY, 0, mm_answer_pam_query},
+    {MONITOR_REQ_PAM_RESPOND, MON_ONCE, mm_answer_pam_respond},
     {MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx},
 #endif
 #ifdef SSH_AUDIT_EVENTS
@@ -231,9 +227,9 @@ struct mon_table mon_dispatch_proto20[] = {
     {MONITOR_REQ_KEYVERIFY, MON_AUTH, mm_answer_keyverify},
 #ifdef GSSAPI
     {MONITOR_REQ_GSSSETUP, MON_ISAUTH, mm_answer_gss_setup_ctx},
-    {MONITOR_REQ_GSSSTEP, MON_ISAUTH, mm_answer_gss_accept_ctx},
-    {MONITOR_REQ_GSSUSEROK, MON_AUTH, mm_answer_gss_userok},
-    {MONITOR_REQ_GSSCHECKMIC, MON_ISAUTH, mm_answer_gss_checkmic},
+    {MONITOR_REQ_GSSSTEP, 0, mm_answer_gss_accept_ctx},
+    {MONITOR_REQ_GSSUSEROK, MON_ONCE|MON_AUTHDECIDE, mm_answer_gss_userok},
+    {MONITOR_REQ_GSSCHECKMIC, MON_ONCE, mm_answer_gss_checkmic},
 #endif
     {0, 0, NULL}
 };
@@ -253,52 +249,6 @@ struct mon_table mon_dispatch_postauth20[] = {
     {0, 0, NULL}
 };
 
-struct mon_table mon_dispatch_proto15[] = {
-#ifdef WITH_SSH1
-    {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow},
-    {MONITOR_REQ_SESSKEY, MON_ONCE, mm_answer_sesskey},
-    {MONITOR_REQ_SESSID, MON_ONCE, mm_answer_sessid},
-    {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
-    {MONITOR_REQ_RSAKEYALLOWED, MON_ISAUTH|MON_ALOG, mm_answer_rsa_keyallowed},
-    {MONITOR_REQ_KEYALLOWED, MON_ISAUTH|MON_ALOG, mm_answer_keyallowed},
-    {MONITOR_REQ_RSACHALLENGE, MON_ONCE, mm_answer_rsa_challenge},
-    {MONITOR_REQ_RSARESPONSE, MON_ONCE|MON_AUTHDECIDE, mm_answer_rsa_response},
-#ifdef BSD_AUTH
-    {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
-    {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH, mm_answer_bsdauthrespond},
-#endif
-#ifdef SKEY
-    {MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery},
-    {MONITOR_REQ_SKEYRESPOND, MON_AUTH, mm_answer_skeyrespond},
-#endif
-#ifdef USE_PAM
-    {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
-    {MONITOR_REQ_PAM_ACCOUNT, 0, mm_answer_pam_account},
-    {MONITOR_REQ_PAM_INIT_CTX, MON_ISAUTH, mm_answer_pam_init_ctx},
-    {MONITOR_REQ_PAM_QUERY, MON_ISAUTH, mm_answer_pam_query},
-    {MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond},
-    {MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx},
-#endif
-#ifdef SSH_AUDIT_EVENTS
-    {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
-#endif
-#endif /* WITH_SSH1 */
-    {0, 0, NULL}
-};
-
-struct mon_table mon_dispatch_postauth15[] = {
-#ifdef WITH_SSH1
-    {MONITOR_REQ_PTY, MON_ONCE, mm_answer_pty},
-    {MONITOR_REQ_PTYCLEANUP, MON_ONCE, mm_answer_pty_cleanup},
-    {MONITOR_REQ_TERM, 0, mm_answer_term},
-#ifdef SSH_AUDIT_EVENTS
-    {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
-    {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command},
-#endif
-#endif /* WITH_SSH1 */
-    {0, 0, NULL}
-};
-
 struct mon_table *mon_dispatch;
 
 /* Specifies if a certain message is allowed at the moment */
@@ -333,6 +283,7 @@ monitor_permit_authentications(int permit)
 void
 monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
 {
+       struct ssh *ssh = active_state; /* XXX */
        struct mon_table *ent;
        int authenticated = 0, partial = 0;
 
@@ -347,17 +298,10 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
 
        authctxt->loginmsg = &loginmsg;
 
-       if (compat20) {
-               mon_dispatch = mon_dispatch_proto20;
-
-               /* Permit requests for moduli and signatures */
-               monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
-               monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
-       } else {
-               mon_dispatch = mon_dispatch_proto15;
-
-               monitor_permit(mon_dispatch, MONITOR_REQ_SESSKEY, 1);
-       }
+       mon_dispatch = mon_dispatch_proto20;
+       /* Permit requests for moduli and signatures */
+       monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
+       monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
 
        /* The first few requests do not require asynchronous access */
        while (!authenticated) {
@@ -368,9 +312,6 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
 
                /* Special handling for multiple required authentications */
                if (options.num_auth_methods != 0) {
-                       if (!compat20)
-                               fatal("AuthenticationMethods is not supported"
-                                   "with SSH protocol 1");
                        if (authenticated &&
                            !auth2_update_methods_lists(authctxt,
                            auth_method, auth_submethod)) {
@@ -416,6 +357,7 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
 
        debug("%s: %s has been authenticated by privileged process",
            __func__, authctxt->user);
+       ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user);
 
        mm_get_keystate(pmonitor);
 
@@ -454,17 +396,13 @@ monitor_child_postauth(struct monitor *pmonitor)
        signal(SIGXFSZ, SIG_IGN);
 #endif
 
-       if (compat20) {
-               mon_dispatch = mon_dispatch_postauth20;
+       mon_dispatch = mon_dispatch_postauth20;
+
+       /* Permit requests for moduli and signatures */
+       monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
+       monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
+       monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
 
-               /* Permit requests for moduli and signatures */
-               monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
-               monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
-               monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
-       } else {
-               mon_dispatch = mon_dispatch_postauth15;
-               monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
-       }
        if (!no_pty_flag) {
                monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1);
                monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1);
@@ -474,36 +412,6 @@ monitor_child_postauth(struct monitor *pmonitor)
                monitor_read(pmonitor, mon_dispatch, NULL);
 }
 
-void
-monitor_sync(struct monitor *pmonitor)
-{
-       if (options.compression) {
-               /* The member allocation is not visible, so sync it */
-               mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback);
-       }
-}
-
-/* Allocation functions for zlib */
-static void *
-mm_zalloc(struct mm_master *mm, u_int ncount, u_int size)
-{
-       size_t len = (size_t) size * ncount;
-       void *address;
-
-       if (len == 0 || ncount > SIZE_MAX / size)
-               fatal("%s: mm_zalloc(%u, %u)", __func__, ncount, size);
-
-       address = mm_malloc(mm, len);
-
-       return (address);
-}
-
-static void
-mm_zfree(struct mm_master *mm, void *address)
-{
-       mm_free(mm, address);
-}
-
 static int
 monitor_read_log(struct monitor *pmonitor)
 {
@@ -690,18 +598,22 @@ mm_answer_sign(int sock, Buffer *m)
        struct ssh *ssh = active_state;         /* XXX */
        extern int auth_sock;                   /* XXX move to state struct? */
        struct sshkey *key;
-       struct sshbuf *sigbuf;
-       u_char *p;
-       u_char *signature;
-       size_t datlen, siglen;
-       int r, keyid, is_proof = 0;
+       struct sshbuf *sigbuf = NULL;
+       u_char *p = NULL, *signature = NULL;
+       char *alg = NULL;
+       size_t datlen, siglen, alglen;
+       int r, is_proof = 0;
+       u_int keyid;
        const char proof_req[] = "hostkeys-prove-00@openssh.com";
 
        debug3("%s", __func__);
 
        if ((r = sshbuf_get_u32(m, &keyid)) != 0 ||
-           (r = sshbuf_get_string(m, &p, &datlen)) != 0)
+           (r = sshbuf_get_string(m, &p, &datlen)) != 0 ||
+           (r = sshbuf_get_cstring(m, &alg, &alglen)) != 0)
                fatal("%s: buffer error: %s", __func__, ssh_err(r));
+       if (keyid > INT_MAX)
+               fatal("%s: invalid key ID", __func__);
 
        /*
         * Supported KEX types use SHA1 (20 bytes), SHA256 (32 bytes),
@@ -727,7 +639,7 @@ mm_answer_sign(int sock, Buffer *m)
                        fatal("%s: sshbuf_new", __func__);
                if ((r = sshbuf_put_cstring(sigbuf, proof_req)) != 0 ||
                    (r = sshbuf_put_string(sigbuf, session_id2,
-                   session_id2_len) != 0) ||
+                   session_id2_len)) != 0 ||
                    (r = sshkey_puts(key, sigbuf)) != 0)
                        fatal("%s: couldn't prepare private key "
                            "proof buffer: %s", __func__, ssh_err(r));
@@ -747,14 +659,14 @@ mm_answer_sign(int sock, Buffer *m)
        }
 
        if ((key = get_hostkey_by_index(keyid)) != NULL) {
-               if ((r = sshkey_sign(key, &signature, &siglen, p, datlen,
+               if ((r = sshkey_sign(key, &signature, &siglen, p, datlen, alg,
                    datafellows)) != 0)
                        fatal("%s: sshkey_sign failed: %s",
                            __func__, ssh_err(r));
        } else if ((key = get_hostkey_public_by_index(keyid, ssh)) != NULL &&
            auth_sock > 0) {
                if ((r = ssh_agent_sign(auth_sock, key, &signature, &siglen,
-                   p, datlen, datafellows)) != 0) {
+                   p, datlen, alg, datafellows)) != 0) {
                        fatal("%s: ssh_agent_sign failed: %s",
                            __func__, ssh_err(r));
                }
@@ -768,6 +680,7 @@ mm_answer_sign(int sock, Buffer *m)
        if ((r = sshbuf_put_string(m, signature, siglen)) != 0)
                fatal("%s: buffer error: %s", __func__, ssh_err(r));
 
+       free(alg);
        free(p);
        free(signature);
 
@@ -784,6 +697,7 @@ mm_answer_sign(int sock, Buffer *m)
 int
 mm_answer_pwnamallow(int sock, Buffer *m)
 {
+       struct ssh *ssh = active_state; /* XXX */
        char *username;
        struct passwd *pwent;
        int allowed = 0;
@@ -828,6 +742,8 @@ mm_answer_pwnamallow(int sock, Buffer *m)
        buffer_put_cstring(m, pwent->pw_shell);
 
  out:
+       ssh_packet_set_log_preamble(ssh, "%suser %s",
+           authctxt->valid ? "authenticating" : "invalid ", authctxt->user);
        buffer_put_string(m, &options, sizeof(options));
 
 #define M_CP_STROPT(x) do { \
@@ -844,7 +760,7 @@ mm_answer_pwnamallow(int sock, Buffer *m)
 #undef M_CP_STRARRAYOPT
 
        /* Create valid auth method lists */
-       if (compat20 && auth2_setup_methods_lists(authctxt) != 0) {
+       if (auth2_setup_methods_lists(authctxt) != 0) {
                /*
                 * The monitor will continue long enough to let the child
                 * run to it's packet_disconnect(), but it must not allow any
@@ -856,14 +772,10 @@ mm_answer_pwnamallow(int sock, Buffer *m)
        debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed);
        mm_request_send(sock, MONITOR_ANS_PWNAM, m);
 
-       /* For SSHv1 allow authentication now */
-       if (!compat20)
-               monitor_permit_authentications(1);
-       else {
-               /* Allow service/style information on the auth context */
-               monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1);
-               monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
-       }
+       /* Allow service/style information on the auth context */
+       monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1);
+       monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
+
 #ifdef USE_PAM
        if (options.use_pam)
                monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
@@ -911,6 +823,8 @@ mm_answer_authpassword(int sock, Buffer *m)
        int authenticated;
        u_int plen;
 
+       if (!options.password_authentication)
+               fatal("%s: password authentication not enabled", __func__);
        passwd = buffer_get_string(m, &plen);
 #if !defined(ANDROID)
        /* Only authenticate if the context is valid */
@@ -925,6 +839,9 @@ mm_answer_authpassword(int sock, Buffer *m)
 
        buffer_clear(m);
        buffer_put_int(m, authenticated);
+#ifdef USE_PAM
+       buffer_put_int(m, sshpam_get_maxtries_reached());
+#endif
 
        debug3("%s: sending result %d", __func__, authenticated);
        mm_request_send(sock, MONITOR_ANS_AUTHPASSWORD, m);
@@ -949,6 +866,8 @@ mm_answer_bsdauthquery(int sock, Buffer *m)
        char **prompts;
        u_int success;
 
+       if (!options.kbd_interactive_authentication)
+               fatal("%s: kbd-int authentication not enabled", __func__);
        success = bsdauth_query(authctxt, &name, &infotxt, &numprompts,
            &prompts, &echo_on) < 0 ? 0 : 1;
 
@@ -976,7 +895,9 @@ mm_answer_bsdauthrespond(int sock, Buffer *m)
        char *response;
        int authok;
 
-       if (authctxt->as == 0)
+       if (!options.kbd_interactive_authentication)
+               fatal("%s: kbd-int authentication not enabled", __func__);
+       if (authctxt->as == NULL)
                fatal("%s: no bsd auth session", __func__);
 
        response = buffer_get_string(m, NULL);
@@ -992,11 +913,8 @@ mm_answer_bsdauthrespond(int sock, Buffer *m)
        debug3("%s: sending authenticated: %d", __func__, authok);
        mm_request_send(sock, MONITOR_ANS_BSDAUTHRESPOND, m);
 
-       if (compat20) {
-               auth_method = "keyboard-interactive";
-               auth_submethod = "bsdauth";
-       } else
-               auth_method = "bsdauth";
+       auth_method = "keyboard-interactive";
+       auth_submethod = "bsdauth";
 
        return (authok != 0);
 }
@@ -1045,7 +963,8 @@ mm_answer_skeyrespond(int sock, Buffer *m)
        debug3("%s: sending authenticated: %d", __func__, authok);
        mm_request_send(sock, MONITOR_ANS_SKEYRESPOND, m);
 
-       auth_method = "skey";
+       auth_method = "keyboard-interactive";
+       auth_submethod = "skey";
 
        return (authok != 0);
 }
@@ -1061,6 +980,8 @@ mm_answer_pam_start(int sock, Buffer *m)
        start_pam(authctxt);
 
        monitor_permit(mon_dispatch, MONITOR_REQ_PAM_ACCOUNT, 1);
+       if (options.kbd_interactive_authentication)
+               monitor_permit(mon_dispatch, MONITOR_REQ_PAM_INIT_CTX, 1);
 
        return (0);
 }
@@ -1071,7 +992,7 @@ mm_answer_pam_account(int sock, Buffer *m)
        u_int ret;
 
        if (!options.use_pam)
-               fatal("UsePAM not set, but ended up in %s anyway", __func__);
+               fatal("%s: PAM not enabled", __func__);
 
        ret = do_pam_account();
 
@@ -1090,11 +1011,16 @@ int
 mm_answer_pam_init_ctx(int sock, Buffer *m)
 {
        debug3("%s", __func__);
+       if (!options.kbd_interactive_authentication)
+               fatal("%s: kbd-int authentication not enabled", __func__);
+       if (sshpam_ctxt != NULL)
+               fatal("%s: already called", __func__);
        sshpam_ctxt = (sshpam_device.init_ctx)(authctxt);
        sshpam_authok = NULL;
        buffer_clear(m);
        if (sshpam_ctxt != NULL) {
                monitor_permit(mon_dispatch, MONITOR_REQ_PAM_FREE_CTX, 1);
+               monitor_permit(mon_dispatch, MONITOR_REQ_PAM_QUERY, 1);
                buffer_put_int(m, 1);
        } else {
                buffer_put_int(m, 0);
@@ -1112,17 +1038,22 @@ mm_answer_pam_query(int sock, Buffer *m)
 
        debug3("%s", __func__);
        sshpam_authok = NULL;
-       ret = (sshpam_device.query)(sshpam_ctxt, &name, &info, &num, &prompts, &echo_on);
+       if (sshpam_ctxt == NULL)
+               fatal("%s: no context", __func__);
+       ret = (sshpam_device.query)(sshpam_ctxt, &name, &info,
+           &num, &prompts, &echo_on);
        if (ret == 0 && num == 0)
                sshpam_authok = sshpam_ctxt;
        if (num > 1 || name == NULL || info == NULL)
-               ret = -1;
+               fatal("sshpam_device.query failed");
+       monitor_permit(mon_dispatch, MONITOR_REQ_PAM_RESPOND, 1);
        buffer_clear(m);
        buffer_put_int(m, ret);
        buffer_put_cstring(m, name);
        free(name);
        buffer_put_cstring(m, info);
        free(info);
+       buffer_put_int(m, sshpam_get_maxtries_reached());
        buffer_put_int(m, num);
        for (i = 0; i < num; ++i) {
                buffer_put_cstring(m, prompts[i]);
@@ -1145,6 +1076,8 @@ mm_answer_pam_respond(int sock, Buffer *m)
        int ret;
 
        debug3("%s", __func__);
+       if (sshpam_ctxt == NULL)
+               fatal("%s: no context", __func__);
        sshpam_authok = NULL;
        num = buffer_get_int(m);
        if (num > 0) {
@@ -1174,10 +1107,14 @@ mm_answer_pam_free_ctx(int sock, Buffer *m)
        int r = sshpam_authok != NULL && sshpam_authok == sshpam_ctxt;
 
        debug3("%s", __func__);
+       if (sshpam_ctxt == NULL)
+               fatal("%s: no context", __func__);
        (sshpam_device.free_ctx)(sshpam_ctxt);
        sshpam_ctxt = sshpam_authok = NULL;
        buffer_clear(m);
        mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m);
+       /* Allow another attempt */
+       monitor_permit(mon_dispatch, MONITOR_REQ_PAM_INIT_CTX, 1);
        auth_method = "keyboard-interactive";
        auth_submethod = "pam";
        return r;
@@ -1204,10 +1141,6 @@ mm_answer_keyallowed(int sock, Buffer *m)
 
        key = key_from_blob(blob, bloblen);
 
-       if ((compat20 && type == MM_RSAHOSTKEY) ||
-           (!compat20 && type != MM_RSAHOSTKEY))
-               fatal("%s: key type and protocol mismatch", __func__);
-
        debug3("%s: key_from_blob: %p", __func__, key);
 
        if (key != NULL && authctxt->valid) {
@@ -1241,22 +1174,15 @@ mm_answer_keyallowed(int sock, Buffer *m)
                            cuser, chost);
                        auth_method = "hostbased";
                        break;
-#ifdef WITH_SSH1
-               case MM_RSAHOSTKEY:
-                       key->type = KEY_RSA1; /* XXX */
-                       allowed = options.rhosts_rsa_authentication &&
-                           auth_rhosts_rsa_key_allowed(authctxt->pw,
-                           cuser, chost, key);
-                       if (options.rhosts_rsa_authentication && allowed != 1)
-                               auth_clear_options();
-                       auth_method = "rsa";
-                       break;
-#endif
                default:
                        fatal("%s: unknown key type %d", __func__, type);
                        break;
                }
        }
+
+       debug3("%s: key %p is %s",
+           __func__, key, allowed ? "allowed" : "not allowed");
+
        if (key != NULL)
                key_free(key);
 
@@ -1278,18 +1204,12 @@ mm_answer_keyallowed(int sock, Buffer *m)
                free(chost);
        }
 
-       debug3("%s: key %p is %s",
-           __func__, key, allowed ? "allowed" : "not allowed");
-
        buffer_clear(m);
        buffer_put_int(m, allowed);
        buffer_put_int(m, forced_command != NULL);
 
        mm_request_send(sock, MONITOR_ANS_KEYALLOWED, m);
 
-       if (type == MM_RSAHOSTKEY)
-               monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
-
        return (0);
 }
 
@@ -1297,7 +1217,8 @@ static int
 monitor_valid_userblob(u_char *data, u_int datalen)
 {
        Buffer b;
-       char *p, *userstyle;
+       u_char *p;
+       char *userstyle, *cp;
        u_int len;
        int fail = 0;
 
@@ -1322,26 +1243,26 @@ monitor_valid_userblob(u_char *data, u_int datalen)
        }
        if (buffer_get_char(&b) != SSH2_MSG_USERAUTH_REQUEST)
                fail++;
-       p = buffer_get_cstring(&b, NULL);
+       cp = buffer_get_cstring(&b, NULL);
        xasprintf(&userstyle, "%s%s%s", authctxt->user,
            authctxt->style ? ":" : "",
            authctxt->style ? authctxt->style : "");
-       if (strcmp(userstyle, p) != 0) {
-               logit("wrong user name passed to monitor: expected %s != %.100s",
-                   userstyle, p);
+       if (strcmp(userstyle, cp) != 0) {
+               logit("wrong user name passed to monitor: "
+                   "expected %s != %.100s", userstyle, cp);
                fail++;
        }
        free(userstyle);
-       free(p);
+       free(cp);
        buffer_skip_string(&b);
        if (datafellows & SSH_BUG_PKAUTH) {
                if (!buffer_get_char(&b))
                        fail++;
        } else {
-               p = buffer_get_cstring(&b, NULL);
-               if (strcmp("publickey", p) != 0)
+               cp = buffer_get_cstring(&b, NULL);
+               if (strcmp("publickey", cp) != 0)
                        fail++;
-               free(p);
+               free(cp);
                if (!buffer_get_char(&b))
                        fail++;
                buffer_skip_string(&b);
@@ -1454,7 +1375,7 @@ mm_answer_keyverify(int sock, Buffer *m)
            __func__, key, (verified == 1) ? "verified" : "unverified");
 
        /* If auth was successful then record key to ensure it isn't reused */
-       if (verified == 1)
+       if (verified == 1 && key_blobtype == MM_USERKEY)
                auth2_record_userkey(authctxt, key);
        else
                key_free(key);
@@ -1477,12 +1398,10 @@ mm_answer_keyverify(int sock, Buffer *m)
 static void
 mm_record_login(Session *s, struct passwd *pw)
 {
+       struct ssh *ssh = active_state; /* XXX */
        socklen_t fromlen;
        struct sockaddr_storage from;
 
-       if (options.use_login)
-               return;
-
        /*
         * Get IP address of client. If the connection is not a socket, let
         * the address be 0.0.0.0.
@@ -1498,7 +1417,7 @@ mm_record_login(Session *s, struct passwd *pw)
        }
        /* Record that there was a login on that tty from the remote host. */
        record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid,
-           get_remote_name_or_ip(utmp_len, options.use_dns),
+           session_get_remote_name_or_ip(ssh, utmp_len, options.use_dns),
            (struct sockaddr *)&from, fromlen);
 }
 
@@ -1596,186 +1515,6 @@ mm_answer_pty_cleanup(int sock, Buffer *m)
        return (0);
 }
 
-#ifdef WITH_SSH1
-int
-mm_answer_sesskey(int sock, Buffer *m)
-{
-       BIGNUM *p;
-       int rsafail;
-
-       /* Turn off permissions */
-       monitor_permit(mon_dispatch, MONITOR_REQ_SESSKEY, 0);
-
-       if ((p = BN_new()) == NULL)
-               fatal("%s: BN_new", __func__);
-
-       buffer_get_bignum2(m, p);
-
-       rsafail = ssh1_session_key(p);
-
-       buffer_clear(m);
-       buffer_put_int(m, rsafail);
-       buffer_put_bignum2(m, p);
-
-       BN_clear_free(p);
-
-       mm_request_send(sock, MONITOR_ANS_SESSKEY, m);
-
-       /* Turn on permissions for sessid passing */
-       monitor_permit(mon_dispatch, MONITOR_REQ_SESSID, 1);
-
-       return (0);
-}
-
-int
-mm_answer_sessid(int sock, Buffer *m)
-{
-       int i;
-
-       debug3("%s entering", __func__);
-
-       if (buffer_len(m) != 16)
-               fatal("%s: bad ssh1 session id", __func__);
-       for (i = 0; i < 16; i++)
-               session_id[i] = buffer_get_char(m);
-
-       /* Turn on permissions for getpwnam */
-       monitor_permit(mon_dispatch, MONITOR_REQ_PWNAM, 1);
-
-       return (0);
-}
-
-int
-mm_answer_rsa_keyallowed(int sock, Buffer *m)
-{
-       BIGNUM *client_n;
-       Key *key = NULL;
-       u_char *blob = NULL;
-       u_int blen = 0;
-       int allowed = 0;
-
-       debug3("%s entering", __func__);
-
-       auth_method = "rsa";
-       if (options.rsa_authentication && authctxt->valid) {
-               if ((client_n = BN_new()) == NULL)
-                       fatal("%s: BN_new", __func__);
-               buffer_get_bignum2(m, client_n);
-               allowed = auth_rsa_key_allowed(authctxt->pw, client_n, &key);
-               BN_clear_free(client_n);
-       }
-       buffer_clear(m);
-       buffer_put_int(m, allowed);
-       buffer_put_int(m, forced_command != NULL);
-
-       /* clear temporarily storage (used by generate challenge) */
-       monitor_reset_key_state();
-
-       if (allowed && key != NULL) {
-               key->type = KEY_RSA;    /* cheat for key_to_blob */
-               if (key_to_blob(key, &blob, &blen) == 0)
-                       fatal("%s: key_to_blob failed", __func__);
-               buffer_put_string(m, blob, blen);
-
-               /* Save temporarily for comparison in verify */
-               key_blob = blob;
-               key_bloblen = blen;
-               key_blobtype = MM_RSAUSERKEY;
-       }
-       if (key != NULL)
-               key_free(key);
-
-       mm_request_send(sock, MONITOR_ANS_RSAKEYALLOWED, m);
-
-       monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
-       monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 0);
-       return (0);
-}
-
-int
-mm_answer_rsa_challenge(int sock, Buffer *m)
-{
-       Key *key = NULL;
-       u_char *blob;
-       u_int blen;
-
-       debug3("%s entering", __func__);
-
-       if (!authctxt->valid)
-               fatal("%s: authctxt not valid", __func__);
-       blob = buffer_get_string(m, &blen);
-       if (!monitor_allowed_key(blob, blen))
-               fatal("%s: bad key, not previously allowed", __func__);
-       if (key_blobtype != MM_RSAUSERKEY && key_blobtype != MM_RSAHOSTKEY)
-               fatal("%s: key type mismatch", __func__);
-       if ((key = key_from_blob(blob, blen)) == NULL)
-               fatal("%s: received bad key", __func__);
-       if (key->type != KEY_RSA)
-               fatal("%s: received bad key type %d", __func__, key->type);
-       key->type = KEY_RSA1;
-       if (ssh1_challenge)
-               BN_clear_free(ssh1_challenge);
-       ssh1_challenge = auth_rsa_generate_challenge(key);
-
-       buffer_clear(m);
-       buffer_put_bignum2(m, ssh1_challenge);
-
-       debug3("%s sending reply", __func__);
-       mm_request_send(sock, MONITOR_ANS_RSACHALLENGE, m);
-
-       monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 1);
-
-       free(blob);
-       key_free(key);
-       return (0);
-}
-
-int
-mm_answer_rsa_response(int sock, Buffer *m)
-{
-       Key *key = NULL;
-       u_char *blob, *response;
-       u_int blen, len;
-       int success;
-
-       debug3("%s entering", __func__);
-
-       if (!authctxt->valid)
-               fatal("%s: authctxt not valid", __func__);
-       if (ssh1_challenge == NULL)
-               fatal("%s: no ssh1_challenge", __func__);
-
-       blob = buffer_get_string(m, &blen);
-       if (!monitor_allowed_key(blob, blen))
-               fatal("%s: bad key, not previously allowed", __func__);
-       if (key_blobtype != MM_RSAUSERKEY && key_blobtype != MM_RSAHOSTKEY)
-               fatal("%s: key type mismatch: %d", __func__, key_blobtype);
-       if ((key = key_from_blob(blob, blen)) == NULL)
-               fatal("%s: received bad key", __func__);
-       response = buffer_get_string(m, &len);
-       if (len != 16)
-               fatal("%s: received bad response to challenge", __func__);
-       success = auth_rsa_verify_response(key, ssh1_challenge, response);
-
-       free(blob);
-       key_free(key);
-       free(response);
-
-       auth_method = key_blobtype == MM_RSAUSERKEY ? "rsa" : "rhosts-rsa";
-
-       /* reset state */
-       BN_clear_free(ssh1_challenge);
-       ssh1_challenge = NULL;
-       monitor_reset_key_state();
-
-       buffer_clear(m);
-       buffer_put_int(m, success);
-       mm_request_send(sock, MONITOR_ANS_RSARESPONSE, m);
-
-       return (success);
-}
-#endif
-
 int
 mm_answer_term(int sock, Buffer *req)
 {
@@ -1857,11 +1596,14 @@ monitor_apply_keystate(struct monitor *pmonitor)
        sshbuf_free(child_state);
        child_state = NULL;
 
-       if ((kex = ssh->kex) != 0) {
+       if ((kex = ssh->kex) != NULL) {
                /* XXX set callbacks */
 #ifdef WITH_OPENSSL
                kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
                kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
+               kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server;
+               kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server;
+               kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server;
                kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
                kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
 # ifdef OPENSSL_HAS_ECC
@@ -1874,13 +1616,6 @@ monitor_apply_keystate(struct monitor *pmonitor)
                kex->host_key_index=&get_hostkey_index;
                kex->sign = sshd_hostkey_sign;
        }
-
-       /* Update with new address */
-       if (options.compression) {
-               ssh_packet_set_compress_hooks(ssh, pmonitor->m_zlib,
-                   (ssh_packet_comp_alloc_func *)mm_zalloc,
-                   (ssh_packet_comp_free_func *)mm_zfree);
-       }
 }
 
 /* This function requries careful sanity checking */
@@ -1933,24 +1668,11 @@ monitor_openfds(struct monitor *mon, int do_logfds)
 struct monitor *
 monitor_init(void)
 {
-       struct ssh *ssh = active_state;                 /* XXX */
        struct monitor *mon;
 
        mon = xcalloc(1, sizeof(*mon));
-
        monitor_openfds(mon, 1);
 
-       /* Used to share zlib space across processes */
-       if (options.compression) {
-               mon->m_zback = mm_create(NULL, MM_MEMSIZE);
-               mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE);
-
-               /* Compression needs to share state across borders */
-               ssh_packet_set_compress_hooks(ssh, mon->m_zlib,
-                   (ssh_packet_comp_alloc_func *)mm_zalloc,
-                   (ssh_packet_comp_free_func *)mm_zfree);
-       }
-
        return mon;
 }
 
@@ -1968,6 +1690,9 @@ mm_answer_gss_setup_ctx(int sock, Buffer *m)
        OM_uint32 major;
        u_int len;
 
+       if (!options.gss_authentication)
+               fatal("%s: GSSAPI authentication not enabled", __func__);
+
        goid.elements = buffer_get_string(m, &len);
        goid.length = len;
 
@@ -1995,6 +1720,9 @@ mm_answer_gss_accept_ctx(int sock, Buffer *m)
        OM_uint32 flags = 0; /* GSI needs this */
        u_int len;
 
+       if (!options.gss_authentication)
+               fatal("%s: GSSAPI authentication not enabled", __func__);
+
        in.value = buffer_get_string(m, &len);
        in.length = len;
        major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags);
@@ -2023,6 +1751,9 @@ mm_answer_gss_checkmic(int sock, Buffer *m)
        OM_uint32 ret;
        u_int len;
 
+       if (!options.gss_authentication)
+               fatal("%s: GSSAPI authentication not enabled", __func__);
+
        gssbuf.value = buffer_get_string(m, &len);
        gssbuf.length = len;
        mic.value = buffer_get_string(m, &len);
@@ -2049,6 +1780,9 @@ mm_answer_gss_userok(int sock, Buffer *m)
 {
        int authenticated;
 
+       if (!options.gss_authentication)
+               fatal("%s: GSSAPI authentication not enabled", __func__);
+
        authenticated = authctxt->valid && ssh_gssapi_userok(authctxt->user);
 
        buffer_clear(m);
@@ -2063,4 +1797,3 @@ mm_answer_gss_userok(int sock, Buffer *m)
        return (authenticated);
 }
 #endif /* GSSAPI */
-
index 93b8b66..d68f674 100644 (file)
--- a/monitor.h
+++ b/monitor.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.h,v 1.19 2015/01/19 19:52:16 markus Exp $ */
+/* $OpenBSD: monitor.h,v 1.20 2016/09/28 16:33:07 djm Exp $ */
 
 /*
  * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -67,21 +67,17 @@ enum monitor_reqtype {
 
 };
 
-struct mm_master;
 struct monitor {
        int                      m_recvfd;
        int                      m_sendfd;
        int                      m_log_recvfd;
        int                      m_log_sendfd;
-       struct mm_master        *m_zback;
-       struct mm_master        *m_zlib;
        struct kex              **m_pkex;
        pid_t                    m_pid;
 };
 
 struct monitor *monitor_init(void);
 void monitor_reinit(struct monitor *);
-void monitor_sync(struct monitor *);
 
 struct Authctxt;
 void monitor_child_preauth(struct Authctxt *, struct monitor *);
index 2ddd807..d766edc 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_fdpass.c,v 1.20 2015/02/25 23:05:47 djm Exp $ */
+/* $OpenBSD: monitor_fdpass.c,v 1.21 2016/02/29 20:22:36 jca Exp $ */
 /*
  * Copyright 2001 Niels Provos <provos@citi.umich.edu>
  * All rights reserved.
@@ -99,8 +99,7 @@ mm_send_fd(int sock, int fd)
        }
 
        if (n != 1) {
-               error("%s: sendmsg: expected sent 1 got %ld",
-                   __func__, (long)n);
+               error("%s: sendmsg: expected sent 1 got %zd", __func__, n);
                return -1;
        }
        return 0;
@@ -155,8 +154,7 @@ mm_receive_fd(int sock)
        }
 
        if (n != 1) {
-               error("%s: recvmsg: expected received 1 got %ld",
-                   __func__, (long)n);
+               error("%s: recvmsg: expected received 1 got %zd", __func__, n);
                return -1;
        }
 
diff --git a/monitor_mm.c b/monitor_mm.c
deleted file mode 100644 (file)
index aa47b2e..0000000
+++ /dev/null
@@ -1,357 +0,0 @@
-/* $OpenBSD: monitor_mm.c,v 1.21 2015/02/06 23:21:59 millert Exp $ */
-/*
- * Copyright 2002 Niels Provos <provos@citi.umich.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "includes.h"
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-#include "openbsd-compat/sys-tree.h"
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stddef.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-
-#include "xmalloc.h"
-#include "ssh.h"
-#include "log.h"
-#include "monitor_mm.h"
-
-static int
-mm_compare(struct mm_share *a, struct mm_share *b)
-{
-       ptrdiff_t diff = (char *)a->address - (char *)b->address;
-
-       if (diff == 0)
-               return (0);
-       else if (diff < 0)
-               return (-1);
-       else
-               return (1);
-}
-
-RB_GENERATE(mmtree, mm_share, next, mm_compare)
-
-static struct mm_share *
-mm_make_entry(struct mm_master *mm, struct mmtree *head,
-    void *address, size_t size)
-{
-       struct mm_share *tmp, *tmp2;
-
-       if (mm->mmalloc == NULL)
-               tmp = xcalloc(1, sizeof(struct mm_share));
-       else
-               tmp = mm_xmalloc(mm->mmalloc, sizeof(struct mm_share));
-       tmp->address = address;
-       tmp->size = size;
-
-       tmp2 = RB_INSERT(mmtree, head, tmp);
-       if (tmp2 != NULL)
-               fatal("mm_make_entry(%p): double address %p->%p(%zu)",
-                   mm, tmp2, address, size);
-
-       return (tmp);
-}
-
-/* Creates a shared memory area of a certain size */
-
-struct mm_master *
-mm_create(struct mm_master *mmalloc, size_t size)
-{
-       void *address;
-       struct mm_master *mm;
-
-       if (mmalloc == NULL)
-               mm = xcalloc(1, sizeof(struct mm_master));
-       else
-               mm = mm_xmalloc(mmalloc, sizeof(struct mm_master));
-
-       /*
-        * If the memory map has a mm_master it can be completely
-        * shared including authentication between the child
-        * and the client.
-        */
-       mm->mmalloc = mmalloc;
-
-       address = xmmap(size);
-       if (address == (void *)MAP_FAILED)
-               fatal("mmap(%zu): %s", size, strerror(errno));
-
-       mm->address = address;
-       mm->size = size;
-
-       RB_INIT(&mm->rb_free);
-       RB_INIT(&mm->rb_allocated);
-
-       mm_make_entry(mm, &mm->rb_free, address, size);
-
-       return (mm);
-}
-
-/* Frees either the allocated or the free list */
-
-static void
-mm_freelist(struct mm_master *mmalloc, struct mmtree *head)
-{
-       struct mm_share *mms, *next;
-
-       for (mms = RB_ROOT(head); mms; mms = next) {
-               next = RB_NEXT(mmtree, head, mms);
-               RB_REMOVE(mmtree, head, mms);
-               if (mmalloc == NULL)
-                       free(mms);
-               else
-                       mm_free(mmalloc, mms);
-       }
-}
-
-/* Destroys a memory mapped area */
-
-void
-mm_destroy(struct mm_master *mm)
-{
-       mm_freelist(mm->mmalloc, &mm->rb_free);
-       mm_freelist(mm->mmalloc, &mm->rb_allocated);
-
-#ifdef HAVE_MMAP
-       if (munmap(mm->address, mm->size) == -1)
-               fatal("munmap(%p, %zu): %s", mm->address, mm->size,
-                   strerror(errno));
-#else
-       fatal("%s: UsePrivilegeSeparation=yes and Compression=yes not supported",
-           __func__);
-#endif
-       if (mm->mmalloc == NULL)
-               free(mm);
-       else
-               mm_free(mm->mmalloc, mm);
-}
-
-void *
-mm_xmalloc(struct mm_master *mm, size_t size)
-{
-       void *address;
-
-       address = mm_malloc(mm, size);
-       if (address == NULL)
-               fatal("%s: mm_malloc(%zu)", __func__, size);
-       memset(address, 0, size);
-       return (address);
-}
-
-
-/* Allocates data from a memory mapped area */
-
-void *
-mm_malloc(struct mm_master *mm, size_t size)
-{
-       struct mm_share *mms, *tmp;
-
-       if (size == 0)
-               fatal("mm_malloc: try to allocate 0 space");
-       if (size > SIZE_MAX - MM_MINSIZE + 1)
-               fatal("mm_malloc: size too big");
-
-       size = ((size + (MM_MINSIZE - 1)) / MM_MINSIZE) * MM_MINSIZE;
-
-       RB_FOREACH(mms, mmtree, &mm->rb_free) {
-               if (mms->size >= size)
-                       break;
-       }
-
-       if (mms == NULL)
-               return (NULL);
-
-       /* Debug */
-       memset(mms->address, 0xd0, size);
-
-       tmp = mm_make_entry(mm, &mm->rb_allocated, mms->address, size);
-
-       /* Does not change order in RB tree */
-       mms->size -= size;
-       mms->address = (char *)mms->address + size;
-
-       if (mms->size == 0) {
-               RB_REMOVE(mmtree, &mm->rb_free, mms);
-               if (mm->mmalloc == NULL)
-                       free(mms);
-               else
-                       mm_free(mm->mmalloc, mms);
-       }
-
-       return (tmp->address);
-}
-
-/* Frees memory in a memory mapped area */
-
-void
-mm_free(struct mm_master *mm, void *address)
-{
-       struct mm_share *mms, *prev, tmp;
-
-       tmp.address = address;
-       mms = RB_FIND(mmtree, &mm->rb_allocated, &tmp);
-       if (mms == NULL)
-               fatal("mm_free(%p): can not find %p", mm, address);
-
-       /* Debug */
-       memset(mms->address, 0xd0, mms->size);
-
-       /* Remove from allocated list and insert in free list */
-       RB_REMOVE(mmtree, &mm->rb_allocated, mms);
-       if (RB_INSERT(mmtree, &mm->rb_free, mms) != NULL)
-               fatal("mm_free(%p): double address %p", mm, address);
-
-       /* Find previous entry */
-       prev = mms;
-       if (RB_LEFT(prev, next)) {
-               prev = RB_LEFT(prev, next);
-               while (RB_RIGHT(prev, next))
-                       prev = RB_RIGHT(prev, next);
-       } else {
-               if (RB_PARENT(prev, next) &&
-                   (prev == RB_RIGHT(RB_PARENT(prev, next), next)))
-                       prev = RB_PARENT(prev, next);
-               else {
-                       while (RB_PARENT(prev, next) &&
-                           (prev == RB_LEFT(RB_PARENT(prev, next), next)))
-                               prev = RB_PARENT(prev, next);
-                       prev = RB_PARENT(prev, next);
-               }
-       }
-
-       /* Check if range does not overlap */
-       if (prev != NULL && MM_ADDRESS_END(prev) > address)
-               fatal("mm_free: memory corruption: %p(%zu) > %p",
-                   prev->address, prev->size, address);
-
-       /* See if we can merge backwards */
-       if (prev != NULL && MM_ADDRESS_END(prev) == address) {
-               prev->size += mms->size;
-               RB_REMOVE(mmtree, &mm->rb_free, mms);
-               if (mm->mmalloc == NULL)
-                       free(mms);
-               else
-                       mm_free(mm->mmalloc, mms);
-       } else
-               prev = mms;
-
-       if (prev == NULL)
-               return;
-
-       /* Check if we can merge forwards */
-       mms = RB_NEXT(mmtree, &mm->rb_free, prev);
-       if (mms == NULL)
-               return;
-
-       if (MM_ADDRESS_END(prev) > mms->address)
-               fatal("mm_free: memory corruption: %p < %p(%zu)",
-                   mms->address, prev->address, prev->size);
-       if (MM_ADDRESS_END(prev) != mms->address)
-               return;
-
-       prev->size += mms->size;
-       RB_REMOVE(mmtree, &mm->rb_free, mms);
-
-       if (mm->mmalloc == NULL)
-               free(mms);
-       else
-               mm_free(mm->mmalloc, mms);
-}
-
-static void
-mm_sync_list(struct mmtree *oldtree, struct mmtree *newtree,
-    struct mm_master *mm, struct mm_master *mmold)
-{
-       struct mm_master *mmalloc = mm->mmalloc;
-       struct mm_share *mms, *new;
-
-       /* Sync free list */
-       RB_FOREACH(mms, mmtree, oldtree) {
-               /* Check the values */
-               mm_memvalid(mmold, mms, sizeof(struct mm_share));
-               mm_memvalid(mm, mms->address, mms->size);
-
-               new = mm_xmalloc(mmalloc, sizeof(struct mm_share));
-               memcpy(new, mms, sizeof(struct mm_share));
-               RB_INSERT(mmtree, newtree, new);
-       }
-}
-
-void
-mm_share_sync(struct mm_master **pmm, struct mm_master **pmmalloc)
-{
-       struct mm_master *mm;
-       struct mm_master *mmalloc;
-       struct mm_master *mmold;
-       struct mmtree rb_free, rb_allocated;
-
-       debug3("%s: Share sync", __func__);
-
-       mm = *pmm;
-       mmold = mm->mmalloc;
-       mm_memvalid(mmold, mm, sizeof(*mm));
-
-       mmalloc = mm_create(NULL, mm->size);
-       mm = mm_xmalloc(mmalloc, sizeof(struct mm_master));
-       memcpy(mm, *pmm, sizeof(struct mm_master));
-       mm->mmalloc = mmalloc;
-
-       rb_free = mm->rb_free;
-       rb_allocated = mm->rb_allocated;
-
-       RB_INIT(&mm->rb_free);
-       RB_INIT(&mm->rb_allocated);
-
-       mm_sync_list(&rb_free, &mm->rb_free, mm, mmold);
-       mm_sync_list(&rb_allocated, &mm->rb_allocated, mm, mmold);
-
-       mm_destroy(mmold);
-
-       *pmm = mm;
-       *pmmalloc = mmalloc;
-
-       debug3("%s: Share sync end", __func__);
-}
-
-void
-mm_memvalid(struct mm_master *mm, void *address, size_t size)
-{
-       void *end = (char *)address + size;
-
-       if (address < mm->address)
-               fatal("mm_memvalid: address too small: %p", address);
-       if (end < address)
-               fatal("mm_memvalid: end < address: %p < %p", end, address);
-       if (end > MM_ADDRESS_END(mm))
-               fatal("mm_memvalid: address too large: %p", address);
-}
diff --git a/monitor_mm.h b/monitor_mm.h
deleted file mode 100644 (file)
index f1fae7e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $OpenBSD: monitor_mm.h,v 1.6 2014/01/04 17:50:55 tedu Exp $ */
-
-/*
- * Copyright 2002 Niels Provos <provos@citi.umich.edu>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _MM_H_
-#define _MM_H_
-
-struct mm_share {
-       RB_ENTRY(mm_share) next;
-       void *address;
-       size_t size;
-};
-
-struct mm_master {
-       RB_HEAD(mmtree, mm_share) rb_free;
-       struct mmtree rb_allocated;
-       void *address;
-       size_t size;
-
-       struct mm_master *mmalloc;      /* Used to completely share */
-};
-
-RB_PROTOTYPE(mmtree, mm_share, next, mm_compare)
-
-#define MM_MINSIZE             128
-
-#define MM_ADDRESS_END(x)      (void *)((char *)(x)->address + (x)->size)
-
-struct mm_master *mm_create(struct mm_master *, size_t);
-void mm_destroy(struct mm_master *);
-
-void mm_share_sync(struct mm_master **, struct mm_master **);
-
-void *mm_malloc(struct mm_master *, size_t);
-void *mm_xmalloc(struct mm_master *, size_t);
-void mm_free(struct mm_master *, void *);
-
-void mm_memvalid(struct mm_master *, void *, size_t);
-#endif /* _MM_H_ */
index eac421b..64ff928 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.85 2015/05/01 03:23:51 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.89 2016/08/13 17:47:41 markus Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos@citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -60,6 +60,7 @@
 #include "packet.h"
 #include "mac.h"
 #include "log.h"
+#include "auth-pam.h"
 #ifdef TARGET_OS_MAC    /* XXX Broken krb5 headers on Mac */
 #undef TARGET_OS_MAC
 #include "zlib.h"
 #include "channels.h"
 #include "session.h"
 #include "servconf.h"
-#include "roaming.h"
 
 #include "ssherr.h"
 
 /* Imports */
-extern int compat20;
 extern z_stream incoming_stream;
 extern z_stream outgoing_stream;
 extern struct monitor *pmonitor;
@@ -218,7 +217,7 @@ mm_choose_dh(int min, int nbits, int max)
 
 int
 mm_key_sign(Key *key, u_char **sigp, u_int *lenp,
-    const u_char *data, u_int datalen)
+    const u_char *data, u_int datalen, const char *hostkey_alg)
 {
        struct kex *kex = *pmonitor->m_pkex;
        Buffer m;
@@ -228,6 +227,7 @@ mm_key_sign(Key *key, u_char **sigp, u_int *lenp,
        buffer_init(&m);
        buffer_put_int(&m, kex->host_key_index(key, 0, active_state));
        buffer_put_string(&m, data, datalen);
+       buffer_put_cstring(&m, hostkey_alg);
 
        mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SIGN, &m);
 
@@ -362,6 +362,9 @@ mm_auth_password(Authctxt *authctxt, char *password)
        mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTHPASSWORD, &m);
 
        authenticated = buffer_get_int(&m);
+#ifdef USE_PAM
+       sshpam_set_maxtries_reached(buffer_get_int(&m));
+#endif
 
        buffer_free(&m);
 
@@ -378,27 +381,15 @@ mm_user_key_allowed(struct passwd *pw, Key *key, int pubkey_auth_attempt)
 }
 
 int
-mm_hostbased_key_allowed(struct passwd *pw, char *user, char *host,
+mm_hostbased_key_allowed(struct passwd *pw, const char *user, const char *host,
     Key *key)
 {
        return (mm_key_allowed(MM_HOSTKEY, user, host, key, 0));
 }
 
 int
-mm_auth_rhosts_rsa_key_allowed(struct passwd *pw, char *user,
-    char *host, Key *key)
-{
-       int ret;
-
-       key->type = KEY_RSA; /* XXX hack for key_to_blob */
-       ret = mm_key_allowed(MM_RSAHOSTKEY, user, host, key, 0);
-       key->type = KEY_RSA1;
-       return (ret);
-}
-
-int
-mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key,
-    int pubkey_auth_attempt)
+mm_key_allowed(enum mm_keytype type, const char *user, const char *host,
+    Key *key, int pubkey_auth_attempt)
 {
        Buffer m;
        u_char *blob;
@@ -644,6 +635,7 @@ mm_sshpam_query(void *ctx, char **name, char **info,
        debug3("%s: pam_query returned %d", __func__, ret);
        *name = buffer_get_string(&m, NULL);
        *info = buffer_get_string(&m, NULL);
+       sshpam_set_maxtries_reached(buffer_get_int(&m));
        *num = buffer_get_int(&m);
        if (*num > PAM_MAX_NUM_MSG)
                fatal("%s: recieved %u PAM messages, expected <= %u",
@@ -705,28 +697,6 @@ mm_terminate(void)
        buffer_free(&m);
 }
 
-#ifdef WITH_SSH1
-int
-mm_ssh1_session_key(BIGNUM *num)
-{
-       int rsafail;
-       Buffer m;
-
-       buffer_init(&m);
-       buffer_put_bignum2(&m, num);
-       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SESSKEY, &m);
-
-       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_SESSKEY, &m);
-
-       rsafail = buffer_get_int(&m);
-       buffer_get_bignum2(&m, num);
-
-       buffer_free(&m);
-
-       return (rsafail);
-}
-#endif
-
 static void
 mm_chall_setup(char **name, char **infotxt, u_int *numprompts,
     char ***prompts, u_int **echo_on)
@@ -857,120 +827,6 @@ mm_skey_respond(void *ctx, u_int numresponses, char **responses)
 }
 #endif /* SKEY */
 
-void
-mm_ssh1_session_id(u_char session_id[16])
-{
-       Buffer m;
-       int i;
-
-       debug3("%s entering", __func__);
-
-       buffer_init(&m);
-       for (i = 0; i < 16; i++)
-               buffer_put_char(&m, session_id[i]);
-
-       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SESSID, &m);
-       buffer_free(&m);
-}
-
-#ifdef WITH_SSH1
-int
-mm_auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
-{
-       Buffer m;
-       Key *key;
-       u_char *blob;
-       u_int blen;
-       int allowed = 0, have_forced = 0;
-
-       debug3("%s entering", __func__);
-
-       buffer_init(&m);
-       buffer_put_bignum2(&m, client_n);
-
-       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSAKEYALLOWED, &m);
-       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSAKEYALLOWED, &m);
-
-       allowed = buffer_get_int(&m);
-
-       /* fake forced command */
-       auth_clear_options();
-       have_forced = buffer_get_int(&m);
-       forced_command = have_forced ? xstrdup("true") : NULL;
-
-       if (allowed && rkey != NULL) {
-               blob = buffer_get_string(&m, &blen);
-               if ((key = key_from_blob(blob, blen)) == NULL)
-                       fatal("%s: key_from_blob failed", __func__);
-               *rkey = key;
-               free(blob);
-       }
-       buffer_free(&m);
-
-       return (allowed);
-}
-
-BIGNUM *
-mm_auth_rsa_generate_challenge(Key *key)
-{
-       Buffer m;
-       BIGNUM *challenge;
-       u_char *blob;
-       u_int blen;
-
-       debug3("%s entering", __func__);
-
-       if ((challenge = BN_new()) == NULL)
-               fatal("%s: BN_new failed", __func__);
-
-       key->type = KEY_RSA;    /* XXX cheat for key_to_blob */
-       if (key_to_blob(key, &blob, &blen) == 0)
-               fatal("%s: key_to_blob failed", __func__);
-       key->type = KEY_RSA1;
-
-       buffer_init(&m);
-       buffer_put_string(&m, blob, blen);
-       free(blob);
-
-       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSACHALLENGE, &m);
-       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSACHALLENGE, &m);
-
-       buffer_get_bignum2(&m, challenge);
-       buffer_free(&m);
-
-       return (challenge);
-}
-
-int
-mm_auth_rsa_verify_response(Key *key, BIGNUM *p, u_char response[16])
-{
-       Buffer m;
-       u_char *blob;
-       u_int blen;
-       int success = 0;
-
-       debug3("%s entering", __func__);
-
-       key->type = KEY_RSA;    /* XXX cheat for key_to_blob */
-       if (key_to_blob(key, &blob, &blen) == 0)
-               fatal("%s: key_to_blob failed", __func__);
-       key->type = KEY_RSA1;
-
-       buffer_init(&m);
-       buffer_put_string(&m, blob, blen);
-       buffer_put_string(&m, response, 16);
-       free(blob);
-
-       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSARESPONSE, &m);
-       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSARESPONSE, &m);
-
-       success = buffer_get_int(&m);
-       buffer_free(&m);
-
-       return (success);
-}
-#endif
-
 #ifdef SSH_AUDIT_EVENTS
 void
 mm_audit_event(ssh_audit_event_t event)
index de4a08f..db5902f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.h,v 1.27 2015/05/01 03:23:51 djm Exp $ */
+/* $OpenBSD: monitor_wrap.h,v 1.32 2016/09/28 16:33:07 djm Exp $ */
 
 /*
  * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -31,7 +31,7 @@
 extern int use_privsep;
 #define PRIVSEP(x)     (use_privsep ? mm_##x : x)
 
-enum mm_keytype {MM_NOKEY, MM_HOSTKEY, MM_USERKEY, MM_RSAHOSTKEY, MM_RSAUSERKEY};
+enum mm_keytype { MM_NOKEY, MM_HOSTKEY, MM_USERKEY };
 
 struct monitor;
 struct mm_master;
@@ -40,19 +40,16 @@ struct Authctxt;
 void mm_log_handler(LogLevel, const char *, void *);
 int mm_is_monitor(void);
 DH *mm_choose_dh(int, int, int);
-int mm_key_sign(Key *, u_char **, u_int *, const u_char *, u_int);
+int mm_key_sign(Key *, u_char **, u_int *, const u_char *, u_int, const char *);
 void mm_inform_authserv(char *, char *);
 struct passwd *mm_getpwnamallow(const char *);
 char *mm_auth2_read_banner(void);
 int mm_auth_password(struct Authctxt *, char *);
-int mm_key_allowed(enum mm_keytype, char *, char *, Key *, int);
+int mm_key_allowed(enum mm_keytype, const char *, const char *, Key *, int);
 int mm_user_key_allowed(struct passwd *, Key *, int);
-int mm_hostbased_key_allowed(struct passwd *, char *, char *, Key *);
-int mm_auth_rhosts_rsa_key_allowed(struct passwd *, char *, char *, Key *);
+int mm_hostbased_key_allowed(struct passwd *, const char *,
+    const char *, Key *);
 int mm_key_verify(Key *, u_char *, u_int, u_char *, u_int);
-int mm_auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **);
-int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *);
-BIGNUM *mm_auth_rsa_generate_challenge(Key *);
 
 #ifdef GSSAPI
 OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
@@ -82,10 +79,6 @@ void mm_terminate(void);
 int mm_pty_allocate(int *, int *, char *, size_t);
 void mm_session_pty_cleanup2(struct Session *);
 
-/* SSHv1 interfaces */
-void mm_ssh1_session_id(u_char *);
-int mm_ssh1_session_key(BIGNUM *);
-
 /* Key export functions */
 struct newkeys *mm_newkeys_from_blob(u_char *, int);
 int mm_newkeys_to_blob(int, u_char **, u_int *);
@@ -102,7 +95,4 @@ int mm_bsdauth_respond(void *, u_int, char **);
 int mm_skey_query(void *, char **, char **, u_int *, char ***, u_int **);
 int mm_skey_respond(void *, u_int, char **);
 
-/* zlib allocation hooks */
-void mm_init_compression(struct mm_master *);
-
 #endif /* _MM_WRAP_H_ */
diff --git a/mux.c b/mux.c
index e6136fd..2d6639c 100644 (file)
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.54 2015/08/19 23:18:26 djm Exp $ */
+/* $OpenBSD: mux.c,v 1.64 2017/01/21 11:32:04 guenther Exp $ */
 /*
  * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
  *
@@ -79,6 +79,7 @@
 #include "key.h"
 #include "readconf.h"
 #include "clientloop.h"
+#include "ssherr.h"
 
 /* from ssh.c */
 extern int tty_flag;
@@ -88,8 +89,6 @@ extern char *host;
 extern int subsystem_flag;
 extern Buffer command;
 extern volatile sig_atomic_t quit_pending;
-extern char *stdio_forward_host;
-extern int stdio_forward_port;
 
 /* Context for session open confirmation callback */
 struct mux_session_confirm_ctx {
@@ -146,6 +145,7 @@ struct mux_master_state {
 #define MUX_C_CLOSE_FWD                0x10000007
 #define MUX_C_NEW_STDIO_FWD    0x10000008
 #define MUX_C_STOP_LISTENING   0x10000009
+#define MUX_C_PROXY            0x1000000f
 #define MUX_S_OK               0x80000001
 #define MUX_S_PERMISSION_DENIED        0x80000002
 #define MUX_S_FAILURE          0x80000003
@@ -154,6 +154,7 @@ struct mux_master_state {
 #define MUX_S_SESSION_OPENED   0x80000006
 #define MUX_S_REMOTE_PORT      0x80000007
 #define MUX_S_TTY_ALLOC_FAIL   0x80000008
+#define MUX_S_PROXY            0x8000000f
 
 /* type codes for MUX_C_OPEN_FWD and MUX_C_CLOSE_FWD */
 #define MUX_FWD_LOCAL   1
@@ -171,6 +172,7 @@ static int process_mux_open_fwd(u_int, Channel *, Buffer *, Buffer *);
 static int process_mux_close_fwd(u_int, Channel *, Buffer *, Buffer *);
 static int process_mux_stdio_fwd(u_int, Channel *, Buffer *, Buffer *);
 static int process_mux_stop_listening(u_int, Channel *, Buffer *, Buffer *);
+static int process_mux_proxy(u_int, Channel *, Buffer *, Buffer *);
 
 static const struct {
        u_int type;
@@ -184,6 +186,7 @@ static const struct {
        { MUX_C_CLOSE_FWD, process_mux_close_fwd },
        { MUX_C_NEW_STDIO_FWD, process_mux_stdio_fwd },
        { MUX_C_STOP_LISTENING, process_mux_stop_listening },
+       { MUX_C_PROXY, process_mux_proxy },
        { 0, NULL }
 };
 
@@ -1112,6 +1115,18 @@ process_mux_stop_listening(u_int rid, Channel *c, Buffer *m, Buffer *r)
        return 0;
 }
 
+static int
+process_mux_proxy(u_int rid, Channel *c, Buffer *m, Buffer *r)
+{
+       debug("%s: channel %d: proxy request", __func__, c->self);
+
+       c->mux_rcb = channel_proxy_downstream;
+       buffer_put_int(r, MUX_S_PROXY);
+       buffer_put_int(r, rid);
+
+       return 0;
+}
+
 /* Channel callbacks fired on read/write from mux slave fd */
 static int
 mux_master_read_cb(Channel *c)
@@ -1297,7 +1312,7 @@ muxserver_listen(void)
        /* Now atomically "move" the mux socket into position */
        if (link(options.control_path, orig_control_path) != 0) {
                if (errno != EEXIST) {
-                       fatal("%s: link mux listener %s => %s: %s", __func__, 
+                       fatal("%s: link mux listener %s => %s: %s", __func__,
                            options.control_path, orig_control_path,
                            strerror(errno));
                }
@@ -1354,16 +1369,18 @@ mux_session_confirm(int id, int success, void *arg)
                char *proto, *data;
 
                /* Get reasonable local authentication information. */
-               client_x11_get_proto(display, options.xauth_location,
+               if (client_x11_get_proto(display, options.xauth_location,
                    options.forward_x11_trusted, options.forward_x11_timeout,
-                   &proto, &data);
-               /* Request forwarding with authentication spoofing. */
-               debug("Requesting X11 forwarding with authentication "
-                   "spoofing.");
-               x11_request_forwarding_with_spoofing(id, display, proto,
-                   data, 1);
-               client_expect_confirm(id, "X11 forwarding", CONFIRM_WARN);
-               /* XXX exit_on_forward_failure */
+                   &proto, &data) == 0) {
+                       /* Request forwarding with authentication spoofing. */
+                       debug("Requesting X11 forwarding with authentication "
+                           "spoofing.");
+                       x11_request_forwarding_with_spoofing(id, display, proto,
+                           data, 1);
+                       /* XXX exit_on_forward_failure */
+                       client_expect_confirm(id, "X11 forwarding",
+                           CONFIRM_WARN);
+               }
        }
 
        if (cctx->want_agent_fwd && options.forward_agent) {
@@ -1744,7 +1761,7 @@ mux_client_forward(int fd, int cancel_flag, u_int ftype, struct Forward *fwd)
                    fwd->connect_host ? fwd->connect_host : "",
                    fwd->connect_port);
                if (muxclient_command == SSHMUX_COMMAND_FORWARD)
-                       fprintf(stdout, "%u\n", fwd->allocated_port);
+                       fprintf(stdout, "%i\n", fwd->allocated_port);
                break;
        case MUX_S_PERMISSION_DENIED:
                e = buffer_get_string(&m, NULL);
@@ -1889,6 +1906,10 @@ mux_client_request_session(int fd)
        }
        muxclient_request_id++;
 
+       if (pledge("stdio proc tty", NULL) == -1)
+               fatal("%s pledge(): %s", __func__, strerror(errno));
+       platform_pledge_mux();
+
        signal(SIGHUP, control_client_sighandler);
        signal(SIGINT, control_client_sighandler);
        signal(SIGTERM, control_client_sighandler);
@@ -1956,6 +1977,41 @@ mux_client_request_session(int fd)
 }
 
 static int
+mux_client_proxy(int fd)
+{
+       Buffer m;
+       char *e;
+       u_int type, rid;
+
+       buffer_init(&m);
+       buffer_put_int(&m, MUX_C_PROXY);
+       buffer_put_int(&m, muxclient_request_id);
+       if (mux_client_write_packet(fd, &m) != 0)
+               fatal("%s: write packet: %s", __func__, strerror(errno));
+
+       buffer_clear(&m);
+
+       /* Read their reply */
+       if (mux_client_read_packet(fd, &m) != 0) {
+               buffer_free(&m);
+               return 0;
+       }
+       type = buffer_get_int(&m);
+       if (type != MUX_S_PROXY) {
+               e = buffer_get_string(&m, NULL);
+               fatal("%s: master returned error: %s", __func__, e);
+       }
+       if ((rid = buffer_get_int(&m)) != muxclient_request_id)
+               fatal("%s: out of sequence reply: my id %u theirs %u",
+                   __func__, muxclient_request_id, rid);
+       buffer_free(&m);
+
+       debug3("%s: done", __func__);
+       muxclient_request_id++;
+       return 0;
+}
+
+static int
 mux_client_request_stdio_fwd(int fd)
 {
        Buffer m;
@@ -1985,8 +2041,8 @@ mux_client_request_stdio_fwd(int fd)
        buffer_put_int(&m, MUX_C_NEW_STDIO_FWD);
        buffer_put_int(&m, muxclient_request_id);
        buffer_put_cstring(&m, ""); /* reserved */
-       buffer_put_cstring(&m, stdio_forward_host);
-       buffer_put_int(&m, stdio_forward_port);
+       buffer_put_cstring(&m, options.stdio_forward_host);
+       buffer_put_int(&m, options.stdio_forward_port);
 
        if (mux_client_write_packet(fd, &m) != 0)
                fatal("%s: write packet: %s", __func__, strerror(errno));
@@ -1996,6 +2052,10 @@ mux_client_request_stdio_fwd(int fd)
            mm_send_fd(fd, STDOUT_FILENO) == -1)
                fatal("%s: send fds failed", __func__);
 
+       if (pledge("stdio proc tty", NULL) == -1)
+               fatal("%s pledge(): %s", __func__, strerror(errno));
+       platform_pledge_mux();
+
        debug3("%s: stdio forward request sent", __func__);
 
        /* Read their reply */
@@ -2097,16 +2157,15 @@ mux_client_request_stop_listening(int fd)
 }
 
 /* Multiplex client main loop. */
-void
+int
 muxclient(const char *path)
 {
        struct sockaddr_un addr;
-       socklen_t sun_len;
        int sock;
        u_int pid;
 
        if (muxclient_command == 0) {
-               if (stdio_forward_host != NULL)
+               if (options.stdio_forward_host != NULL)
                        muxclient_command = SSHMUX_COMMAND_STDIO_FWD;
                else
                        muxclient_command = SSHMUX_COMMAND_OPEN;
@@ -2120,22 +2179,21 @@ muxclient(const char *path)
        case SSHCTL_MASTER_NO:
                break;
        default:
-               return;
+               return -1;
        }
 
        memset(&addr, '\0', sizeof(addr));
        addr.sun_family = AF_UNIX;
-       sun_len = offsetof(struct sockaddr_un, sun_path) +
-           strlen(path) + 1;
 
        if (strlcpy(addr.sun_path, path,
            sizeof(addr.sun_path)) >= sizeof(addr.sun_path))
-               fatal("ControlPath too long");
+               fatal("ControlPath too long ('%s' >= %u bytes)", path,
+                    (unsigned int)sizeof(addr.sun_path));
 
        if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
                fatal("%s socket(): %s", __func__, strerror(errno));
 
-       if (connect(sock, (struct sockaddr *)&addr, sun_len) == -1) {
+       if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
                switch (muxclient_command) {
                case SSHMUX_COMMAND_OPEN:
                case SSHMUX_COMMAND_STDIO_FWD:
@@ -2155,25 +2213,26 @@ muxclient(const char *path)
                            strerror(errno));
                }
                close(sock);
-               return;
+               return -1;
        }
        set_nonblock(sock);
 
        if (mux_client_hello_exchange(sock) != 0) {
                error("%s: master hello exchange failed", __func__);
                close(sock);
-               return;
+               return -1;
        }
 
        switch (muxclient_command) {
        case SSHMUX_COMMAND_ALIVE_CHECK:
                if ((pid = mux_client_request_alive(sock)) == 0)
                        fatal("%s: master alive check failed", __func__);
-               fprintf(stderr, "Master running (pid=%d)\r\n", pid);
+               fprintf(stderr, "Master running (pid=%u)\r\n", pid);
                exit(0);
        case SSHMUX_COMMAND_TERMINATE:
                mux_client_request_terminate(sock);
-               fprintf(stderr, "Exit request sent.\r\n");
+               if (options.log_level != SYSLOG_LEVEL_QUIET)
+                       fprintf(stderr, "Exit request sent.\r\n");
                exit(0);
        case SSHMUX_COMMAND_FORWARD:
                if (mux_client_forwards(sock, 0) != 0)
@@ -2182,22 +2241,26 @@ muxclient(const char *path)
        case SSHMUX_COMMAND_OPEN:
                if (mux_client_forwards(sock, 0) != 0) {
                        error("%s: master forward request failed", __func__);
-                       return;
+                       return -1;
                }
                mux_client_request_session(sock);
-               return;
+               return -1;
        case SSHMUX_COMMAND_STDIO_FWD:
                mux_client_request_stdio_fwd(sock);
                exit(0);
        case SSHMUX_COMMAND_STOP:
                mux_client_request_stop_listening(sock);
-               fprintf(stderr, "Stop listening request sent.\r\n");
+               if (options.log_level != SYSLOG_LEVEL_QUIET)
+                       fprintf(stderr, "Stop listening request sent.\r\n");
                exit(0);
        case SSHMUX_COMMAND_CANCEL_FWD:
                if (mux_client_forwards(sock, 1) != 0)
                        error("%s: master cancel forward request failed",
                            __func__);
                exit(0);
+       case SSHMUX_COMMAND_PROXY:
+               mux_client_proxy(sock);
+               return (sock);
        default:
                fatal("unrecognised muxclient_command %d", muxclient_command);
        }
index 1ffee53..072e36e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: myproposal.h,v 1.47 2015/07/10 06:21:53 markus Exp $ */
+/* $OpenBSD: myproposal.h,v 1.54 2016/09/28 16:33:07 djm Exp $ */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
 #endif
 
 #ifdef HAVE_EVP_SHA256
-# define KEX_SHA256_METHODS \
-       "diffie-hellman-group-exchange-sha256,"
+# define KEX_SHA2_METHODS \
+       "diffie-hellman-group-exchange-sha256," \
+       "diffie-hellman-group16-sha512," \
+       "diffie-hellman-group18-sha512,"
+# define KEX_SHA2_GROUP14 \
+       "diffie-hellman-group14-sha256,"
 #define        SHA2_HMAC_MODES \
        "hmac-sha2-256," \
        "hmac-sha2-512,"
 #else
-# define KEX_SHA256_METHODS
+# define KEX_SHA2_METHODS
+# define KEX_SHA2_GROUP14
 # define SHA2_HMAC_MODES
 #endif
 
-#ifdef HAVE_EVP_RIPEMD
-#define RIPEMD_MAC_MODES \
-       "hmac-ripemd160-etm@openssh.com," \
-       "hmac-ripemd160," \
-       "hmac-ripemd160@openssh.com",
-#else
-#define RIPEMD_MAC_MODES
-#endif
-
 #ifdef WITH_OPENSSL
 # ifdef HAVE_EVP_SHA256
-#  define KEX_CURVE25519_METHODS "curve25519-sha256@libssh.org,"
+#  define KEX_CURVE25519_METHODS \
+       "curve25519-sha256," \
+       "curve25519-sha256@libssh.org,"
 # else
 #  define KEX_CURVE25519_METHODS ""
 # endif
 #define KEX_COMMON_KEX \
        KEX_CURVE25519_METHODS \
        KEX_ECDH_METHODS \
-       KEX_SHA256_METHODS
+       KEX_SHA2_METHODS
 
 #define KEX_SERVER_KEX KEX_COMMON_KEX \
+       KEX_SHA2_GROUP14 \
        "diffie-hellman-group14-sha1" \
 
 #define KEX_CLIENT_KEX KEX_COMMON_KEX \
        "diffie-hellman-group-exchange-sha1," \
+       KEX_SHA2_GROUP14 \
        "diffie-hellman-group14-sha1"
 
 #define        KEX_DEFAULT_PK_ALG      \
        "ssh-rsa-cert-v01@openssh.com," \
        HOSTKEY_ECDSA_METHODS \
        "ssh-ed25519," \
-       "ssh-rsa" \
+       "rsa-sha2-512," \
+       "rsa-sha2-256," \
+       "ssh-rsa"
 
 /* the actual algorithms */
 
        AESGCM_CIPHER_MODES
 
 #define KEX_CLIENT_ENCRYPT KEX_SERVER_ENCRYPT "," \
-       "arcfour256,arcfour128," \
-       "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
-       "aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se"
+       "aes128-cbc,aes192-cbc,aes256-cbc"
 
 #define KEX_SERVER_MAC \
        "umac-64-etm@openssh.com," \
        "hmac-sha2-512," \
        "hmac-sha1"
 
-#define KEX_CLIENT_MAC KEX_SERVER_MAC "," \
-       "hmac-md5-etm@openssh.com," \
-       "hmac-sha1-96-etm@openssh.com," \
-       "hmac-md5-96-etm@openssh.com," \
-       "hmac-md5," \
-       RIPEMD_MAC_MODES \
-       "hmac-sha1-96," \
-       "hmac-md5-96"
+#define KEX_CLIENT_MAC KEX_SERVER_MAC
 
-#else
+#else /* WITH_OPENSSL */
 
 #define KEX_SERVER_KEX         \
+       "curve25519-sha256," \
        "curve25519-sha256@libssh.org"
 #define        KEX_DEFAULT_PK_ALG      \
        "ssh-ed25519-cert-v01@openssh.com," \
 
 #endif /* WITH_OPENSSL */
 
-#define        KEX_DEFAULT_COMP        "none,zlib@openssh.com,zlib"
+#define        KEX_DEFAULT_COMP        "none,zlib@openssh.com"
 #define        KEX_DEFAULT_LANG        ""
 
 #define KEX_CLIENT \
index b9160d5..5970dd3 100644 (file)
--- a/opacket.c
+++ b/opacket.c
@@ -235,18 +235,6 @@ packet_set_connection(int fd_in, int fd_out)
                fatal("%s: ssh_packet_set_connection failed", __func__);
 }
 
-void
-packet_backup_state(void)
-{
-       ssh_packet_backup_state(active_state, backup_state);
-}
-
-void
-packet_restore_state(void)
-{
-       ssh_packet_restore_state(active_state, backup_state);
-}
-
 u_int
 packet_get_char(void)
 {
index a0a60e5..c487f4f 100644 (file)
--- a/opacket.h
+++ b/opacket.h
@@ -39,8 +39,6 @@ do { \
 void    packet_close(void);
 u_int   packet_get_char(void);
 u_int   packet_get_int(void);
-void    packet_backup_state(void);
-void    packet_restore_state(void);
 void     packet_set_connection(int, int);
 int     packet_read_seqnr(u_int32_t *);
 int     packet_read_poll_seqnr(u_int32_t *);
@@ -127,8 +125,6 @@ void        packet_disconnect(const char *, ...)
        sshpkt_add_padding(active_state, (pad))
 #define packet_send_ignore(nbytes) \
        ssh_packet_send_ignore(active_state, (nbytes))
-#define packet_need_rekeying() \
-       ssh_packet_need_rekeying(active_state)
 #define packet_set_server() \
        ssh_packet_set_server(active_state)
 #define packet_set_authenticated() \
@@ -137,9 +133,6 @@ void        packet_disconnect(const char *, ...)
        ssh_packet_get_input(active_state)
 #define packet_get_output() \
        ssh_packet_get_output(active_state)
-#define packet_set_compress_hooks(ctx, allocfunc, freefunc) \
-       ssh_packet_set_compress_hooks(active_state, ctx, \
-           allocfunc, freefunc);
 #define packet_check_eom() \
        ssh_packet_check_eom(active_state)
 #define set_newkeys(mode) \
@@ -148,10 +141,6 @@ void       packet_disconnect(const char *, ...)
        ssh_packet_get_state(active_state, m)
 #define packet_set_state(m) \
        ssh_packet_set_state(active_state, m)
-#if 0
-#define get_remote_ipaddr() \
-       ssh_remote_ipaddr(active_state)
-#endif
 #define packet_get_raw(lenp) \
         sshpkt_ptr(active_state, lenp)
 #define packet_get_ecpoint(c,p) \
@@ -164,5 +153,9 @@ void        packet_disconnect(const char *, ...)
        ssh_packet_set_rekey_limits(active_state, x, y)
 #define packet_get_bytes(x,y) \
        ssh_packet_get_bytes(active_state, x, y)
+#define packet_set_mux() \
+       ssh_packet_set_mux(active_state)
+#define packet_get_mux() \
+       ssh_packet_get_mux(active_state)
 
 #endif /* _OPACKET_H */
diff --git a/openbsd-compat/.cvsignore b/openbsd-compat/.cvsignore
deleted file mode 100644 (file)
index f3c7a7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
index 3c5e3b7..d51eacf 100644 (file)
@@ -16,9 +16,9 @@ RANLIB=@RANLIB@
 INSTALL=@INSTALL@
 LDFLAGS=-L. @LDFLAGS@
 
-OPENBSD=base64.o basename.o bcrypt_pbkdf.o bindresvport.o blowfish.o daemon.o dirname.o fmt_scaled.o getcwd.o getgrouplist.o getopt_long.o getrrsetbyname.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o pwcache.o readpassphrase.o reallocarray.o realpath.o rresvport.o setenv.o setproctitle.o sha1.o sha2.o rmd160.o md5.o sigact.o strlcat.o strlcpy.o strmode.o strnlen.o strptime.o strsep.o strtonum.o strtoll.o strtoul.o strtoull.o timingsafe_bcmp.o vis.o blowfish.o bcrypt_pbkdf.o explicit_bzero.o
+OPENBSD=base64.o basename.o bcrypt_pbkdf.o bindresvport.o blowfish.o daemon.o dirname.o fmt_scaled.o getcwd.o getgrouplist.o getopt_long.o getrrsetbyname.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o pwcache.o readpassphrase.o reallocarray.o realpath.o rresvport.o setenv.o setproctitle.o sha1.o sha2.o rmd160.o md5.o sigact.o strcasestr.o strlcat.o strlcpy.o strmode.o strnlen.o strptime.o strsep.o strtonum.o strtoll.o strtoul.o strtoull.o timingsafe_bcmp.o vis.o blowfish.o bcrypt_pbkdf.o explicit_bzero.o
 
-COMPAT=arc4random.o bsd-asprintf.o bsd-closefrom.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o getrrsetbyname-ldns.o bsd-misc.o bsd-nextstep.o bsd-openpty.o bsd-poll.o bsd-setres_id.o bsd-snprintf.o bsd-statvfs.o bsd-waitpid.o fake-rfc2553.o openssl-compat.o xmmap.o xcrypt.o kludge-fd_set.o
+COMPAT=arc4random.o bsd-asprintf.o bsd-closefrom.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o getrrsetbyname-ldns.o bsd-err.o bsd-misc.o bsd-nextstep.o bsd-openpty.o bsd-poll.o bsd-setres_id.o bsd-snprintf.o bsd-statvfs.o bsd-waitpid.o fake-rfc2553.o openssl-compat.o xcrypt.o kludge-fd_set.o
 
 PORTS=port-aix.o port-irix.o port-linux.o port-solaris.o port-tun.o port-uw.o
 
@@ -36,7 +36,7 @@ libopenbsd-compat.a:  $(COMPAT) $(OPENBSD) $(PORTS)
        $(RANLIB) $@
 
 clean:
-       rm -f *.o *.a core 
+       rm -f *.o *.a core
 
 distclean: clean
        rm -f Makefile *~
index 046f57e..b6256b4 100644 (file)
@@ -110,8 +110,8 @@ _rs_stir(void)
 
 #ifdef WITH_OPENSSL
        if (RAND_bytes(rnd, sizeof(rnd)) <= 0)
-               fatal("Couldn't obtain random bytes (error %ld)",
-                   ERR_get_error());
+               fatal("Couldn't obtain random bytes (error 0x%lx)",
+                   (unsigned long)ERR_get_error());
 #else
        getrnd(rnd, sizeof(rnd));
 #endif
index 732c6b3..bd77293 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: base64.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */
-
 /*
  * Copyright (c) 1996 by Internet Software Consortium.
  *
@@ -49,7 +47,7 @@
 
 #ifndef HAVE___B64_NTOP
 # ifndef HAVE_B64_NTOP
-int b64_ntop(u_char const *src, size_t srclength, char *target, 
+int b64_ntop(u_char const *src, size_t srclength, char *target,
     size_t targsize);
 # endif /* !HAVE_B64_NTOP */
 # define __b64_ntop(a,b,c,d) b64_ntop(a,b,c,d)
index c89f214..eeb269d 100644 (file)
@@ -64,6 +64,7 @@ bindresvport_sa(int sd, struct sockaddr *sa)
        if (sa == NULL) {
                memset(&myaddr, 0, sizeof(myaddr));
                sa = (struct sockaddr *)&myaddr;
+               salen = sizeof(myaddr);
 
                if (getsockname(sd, sa, &salen) == -1)
                        return -1;      /* errno is correctly set */
index 3368195..8223671 100644 (file)
 #include <stdarg.h>
 #include <stdlib.h>
 
-#ifndef VA_COPY
-# ifdef HAVE_VA_COPY
-#  define VA_COPY(dest, src) va_copy(dest, src)
-# else
-#  ifdef HAVE___VA_COPY
-#   define VA_COPY(dest, src) __va_copy(dest, src)
-#  else
-#   define VA_COPY(dest, src) (dest) = (src)
-#  endif
-# endif
-#endif
-
 #define INIT_SZ        128
 
 int
@@ -90,7 +78,7 @@ int asprintf(char **str, const char *fmt, ...)
 {
        va_list ap;
        int ret;
-       
+
        *str = NULL;
        va_start(ap, fmt);
        ret = vasprintf(str, fmt, ap);
index f1bbd7d..c02e632 100644 (file)
@@ -1,10 +1,9 @@
-/* 
- * $Id: bsd-cray.c,v 1.17 2007/08/15 09:17:43 dtucker Exp $
+/*
  *
  * bsd-cray.c
  *
  * Copyright (c) 2002, Cray Inc.  (Wendy Palm <wendyp@cray.com>)
- * Significant portions provided by 
+ * Significant portions provided by
  *          Wayne Schroeder, SDSC <schroeder@sdsc.edu>
  *          William Jones, UTexas <jones@tacc.utexas.edu>
  *
@@ -268,7 +267,7 @@ cray_setup (uid_t uid, char *username, const char *command)
        usent.uname = username;
        usent.host = hostname;
        usent.ttyn = ttyn;
-       usent.caller = IA_SSHD; 
+       usent.caller = IA_SSHD;
        usent.pswdlist = &pwdacm;
        usent.ueptr = &ue;
        usent.flags = IA_INTERACTIVE | IA_FFLAG;
@@ -352,7 +351,7 @@ cray_setup (uid_t uid, char *username, const char *command)
        /*
         *  These are failed return codes from ia_user()
         */
-               switch (ia_rcode) 
+               switch (ia_rcode)
                {
                case IA_BADAUTH:
                        printf("Bad authorization, access denied.\n");
@@ -407,7 +406,7 @@ cray_setup (uid_t uid, char *username, const char *command)
                */
                ia_failure(&fsent, &fret);
 
-               exit(1); 
+               exit(1);
        }
 
        ia_mlsrcode = IA_NORMAL;
@@ -441,7 +440,7 @@ cray_setup (uid_t uid, char *username, const char *command)
                 *  There is no return because ia_failure exits.
                 */
                ia_failure(&fsent,&fret);
-               exit(1); 
+               exit(1);
        }
 
        /* Provide login status information */
@@ -526,7 +525,7 @@ cray_setup (uid_t uid, char *username, const char *command)
                                        break;
                                default:
                                        valid_acct = nam2acid(acct_name);
-                                       if (valid_acct == -1) 
+                                       if (valid_acct == -1)
                                                printf(
                                                    "Account id not found for"
                                                    " account name \"%s\"\n\n",
@@ -576,9 +575,9 @@ cray_setup (uid_t uid, char *username, const char *command)
                exit(1);
        }
 
-       /* 
-        * Now set shares, quotas, limits, including CPU time for the 
-        * (interactive) job and process, and set up permissions 
+       /*
+        * Now set shares, quotas, limits, including CPU time for the
+        * (interactive) job and process, and set up permissions
         * (for chown etc), etc.
         */
        if (setshares(ue.ue_uid, valid_acct, printf, 0, 0)) {
@@ -656,7 +655,7 @@ drop_cray_privs()
                usrv.sv_minlvl = sysv.sy_minlvl;
                usrv.sv_actlvl = sysv.sy_minlvl;
                usrv.sv_maxlvl = sysv.sy_maxlvl;
-       }       
+       }
        usrv.sv_actcmp = 0;
        usrv.sv_valcmp = sysv.sy_valcmp;
 
index 774eceb..ca626a0 100644 (file)
@@ -1,8 +1,6 @@
-/* $Id: bsd-cray.h,v 1.12 2005/02/02 06:10:11 dtucker Exp $ */
-
 /*
  * Copyright (c) 2002, Cray Inc.  (Wendy Palm <wendyp@cray.com>)
- * Significant portions provided by 
+ * Significant portions provided by
  *          Wayne Schroeder, SDSC <schroeder@sdsc.edu>
  *          William Jones, UTexas <jones@tacc.utexas.edu>
  *
index 8672ccf..398a5f6 100644 (file)
 
 #include "xmalloc.h"
 
-int 
+int
 binary_open(const char *filename, int flags, ...)
 {
        va_list ap;
        mode_t mode;
-       
+
        va_start(ap, flags);
        mode = va_arg(ap, mode_t);
        va_end(ap);
index 79cb2a1..9cef694 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-cygwin_util.h,v 1.18 2014/05/27 04:34:43 djm Exp $ */
-
 /*
  * Copyright (c) 2000, 2001, 2011, 2013 Corinna Vinschen <vinschen@redhat.com>
  *
diff --git a/openbsd-compat/bsd-err.c b/openbsd-compat/bsd-err.c
new file mode 100644 (file)
index 0000000..ab10646
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2015 Tim Rice <tim@multitalents.net>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+
+#ifndef HAVE_ERR
+void
+err(int r, const char *fmt, ...)
+{
+       va_list args;
+
+       va_start(args, fmt);
+       fprintf(stderr, "%s: ", strerror(errno));
+       vfprintf(stderr, fmt, args);
+       fputc('\n', stderr);
+       va_end(args);
+       exit(r);
+}
+#endif
+
+#ifndef HAVE_ERRX
+void
+errx(int r, const char *fmt, ...)
+{
+       va_list args;
+
+       va_start(args, fmt);
+       vfprintf(stderr, fmt, args);
+       fputc('\n', stderr);
+       va_end(args);
+       exit(r);
+}
+#endif
+
+#ifndef HAVE_WARN
+void
+warn(const char *fmt, ...)
+{
+       va_list args;
+
+       va_start(args, fmt);
+       fprintf(stderr, "%s: ", strerror(errno));
+       vfprintf(stderr, fmt, args);
+       fputc('\n', stderr);
+       va_end(args);
+}
+#endif
index f7be415..cfd7326 100644 (file)
@@ -70,8 +70,8 @@ int setlogin(const char *name)
 #endif /* !HAVE_SETLOGIN */
 
 #ifndef HAVE_INNETGR
-int innetgr(const char *netgroup, const char *host, 
-            const char *user, const char *domain)
+int innetgr(const char *netgroup, const char *host,
+           const char *user, const char *domain)
 {
        return (0);
 }
@@ -96,7 +96,7 @@ const char *strerror(int e)
 {
        extern int sys_nerr;
        extern char *sys_errlist[];
-       
+
        if ((e >= 0) && (e < sys_nerr))
                return (sys_errlist[e]);
 
@@ -111,10 +111,10 @@ int utimes(char *filename, struct timeval *tvp)
 
        ub.actime = tvp[0].tv_sec;
        ub.modtime = tvp[1].tv_sec;
-       
+
        return (utime(filename, &ub));
 }
-#endif 
+#endif
 
 #ifndef HAVE_TRUNCATE
 int truncate(const char *path, off_t length)
@@ -149,9 +149,9 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
                saverrno = errno;
                (void) gettimeofday (&tstop, NULL);
                errno = saverrno;
-               tremain.tv_sec = time2wait.tv_sec - 
+               tremain.tv_sec = time2wait.tv_sec -
                        (tstop.tv_sec - tstart.tv_sec);
-               tremain.tv_usec = time2wait.tv_usec - 
+               tremain.tv_usec = time2wait.tv_usec -
                        (tstop.tv_usec - tstart.tv_usec);
                tremain.tv_sec += tremain.tv_usec / 1000000L;
                tremain.tv_usec %= 1000000L;
@@ -276,3 +276,36 @@ getpgid(pid_t pid)
        return -1;
 }
 #endif
+
+#ifndef HAVE_PLEDGE
+int
+pledge(const char *promises, const char *paths[])
+{
+       return 0;
+}
+#endif
+
+#ifndef HAVE_MBTOWC
+/* a mbtowc that only supports ASCII */
+int
+mbtowc(wchar_t *pwc, const char *s, size_t n)
+{
+       if (s == NULL || *s == '\0')
+               return 0;       /* ASCII is not state-dependent */
+       if (*s < 0 || *s > 0x7f || n < 1) {
+               errno = EOPNOTSUPP;
+               return -1;
+       }
+       if (pwc != NULL)
+               *pwc = *s;
+       return 1;
+}
+#endif
+
+#ifndef HAVE_LLABS
+long long
+llabs(long long j)
+{
+       return (j < 0 ? -j : j);
+}
+#endif
index ff347a2..70a538f 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-misc.h,v 1.25 2013/08/04 11:48:41 dtucker Exp $ */
-
 /*
  * Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org>
  *
@@ -49,7 +47,7 @@ int setegid(uid_t);
 
 #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
 const char *strerror(int);
-#endif 
+#endif
 
 #if !defined(HAVE_SETLINEBUF)
 #define setlinebuf(a)  (setvbuf((a), NULL, _IOLBF, 0))
@@ -122,4 +120,23 @@ pid_t getpgid(pid_t);
 # define krb5_free_error_message(a,b) do { } while(0)
 #endif
 
+#ifndef HAVE_PLEDGE
+int pledge(const char *promises, const char *paths[]);
+#endif
+
+/* bsd-err.h */
+#ifndef HAVE_ERR
+void err(int, const char *, ...) __attribute__((format(printf, 2, 3)));
+#endif
+#ifndef HAVE_ERRX
+void errx(int, const char *, ...) __attribute__((format(printf, 2, 3)));
+#endif
+#ifndef HAVE_WARN
+void warn(const char *, ...) __attribute__((format(printf, 1, 2)));
+#endif
+
+#ifndef HAVE_LLABS
+long long llabs(long long);
+#endif
+
 #endif /* _BSD_MISC_H */
index 8195af8..d52443f 100644 (file)
@@ -29,7 +29,7 @@
 #include <sys/wait.h>
 #include "bsd-nextstep.h"
 
-pid_t 
+pid_t
 posix_wait(int *status)
 {
        union wait statusp;
index ca5b4b5..610f9e3 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-nextstep.h,v 1.9 2003/08/29 16:59:52 mouring Exp $ */
-
 /*
  * Copyright (c) 2000,2001 Ben Lindstrom.  All rights reserved.
  *
index 1e0c333..d1372ca 100644 (file)
@@ -123,7 +123,7 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
 
 #if !defined(ANDROID)
        /*
-        * Try to push the appropriate streams modules, as described 
+        * Try to push the appropriate streams modules, as described
         * in Solaris pts(7).
         */
        ioctl(*aslave, I_PUSH, "ptem");
@@ -186,7 +186,7 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
        struct termios tio;
 
        for (i = 0; i < num_ptys; i++) {
-               snprintf(ptbuf, sizeof(ptbuf), "/dev/pty%c%c", 
+               snprintf(ptbuf, sizeof(ptbuf), "/dev/pty%c%c",
                    ptymajors[i / num_minors], ptyminors[i % num_minors]);
                snprintf(ttbuf, sizeof(ttbuf), "/dev/tty%c%c",
                    ptymajors[i / num_minors], ptyminors[i % num_minors]);
@@ -219,4 +219,3 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
 }
 
 #endif /* !defined(HAVE_OPENPTY) */
-
index 73a8524..c8e6222 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-poll.c,v 1.6 2014/02/05 23:44:13 dtucker Exp $ */
-
 /*
  * Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au).
  *
index dcbb9ca..17945f5 100644 (file)
@@ -42,11 +42,11 @@ typedef unsigned int        nfds_t;
 #define        POLLIN          0x0001
 #define        POLLOUT         0x0004
 #define        POLLERR         0x0008
+#define        POLLHUP         0x0010
+#define        POLLNVAL        0x0020
 #if 0
 /* the following are currently not implemented */
 #define        POLLPRI         0x0002
-#define        POLLHUP         0x0010
-#define        POLLNVAL        0x0020
 #define        POLLRDNORM      0x0040
 #define POLLNORM       POLLRDNORM
 #define POLLWRNORM      POLLOUT
index 018bde8..696ae7b 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-setres_id.c,v 1.2 2013/12/07 21:23:09 djm Exp $ */
-
 /*
  * Copyright (c) 2012 Darren Tucker (dtucker at zip com au).
  *
index 6c269e0..0350a59 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-setres_id.h,v 1.1 2012/11/05 06:04:37 dtucker Exp $ */
-
 /*
  * Copyright (c) 2012 Darren Tucker (dtucker at zip com au).
  *
index 23a6359..d95b6a4 100644 (file)
 # undef HAVE_VSNPRINTF
 #endif
 
-#ifndef VA_COPY
-# ifdef HAVE_VA_COPY
-#  define VA_COPY(dest, src) va_copy(dest, src)
-# else
-#  ifdef HAVE___VA_COPY
-#   define VA_COPY(dest, src) __va_copy(dest, src)
-#  else
-#   define VA_COPY(dest, src) (dest) = (src)
-#  endif
-# endif
-#endif
-
 #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
 
 #include <ctype.h>
index 2d93bfc..bad11d5 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-statvfs.c,v 1.2 2014/01/17 07:10:59 dtucker Exp $ */
-
 /*
  * Copyright (c) 2008,2014 Darren Tucker <dtucker@zip.com.au>
  *
index dfd6099..815ec03 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-statvfs.h,v 1.3 2014/01/17 07:48:22 dtucker Exp $ */
-
 /*
  * Copyright (c) 2008,2014 Darren Tucker <dtucker@zip.com.au>
  *
index 40e6ffa..113fb1e 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 
-#ifndef HAVE_WAITPID 
+#ifndef HAVE_WAITPID
 #include <errno.h>
 #include <sys/wait.h>
 #include "bsd-waitpid.h"
@@ -43,11 +43,11 @@ waitpid(int pid, int *stat_loc, int options)
                /* wait4() wants pid=0 for indiscriminate wait. */
                pid = 0;
        }
-        wait_pid = wait4(pid, &statusp, options, NULL);
+       wait_pid = wait4(pid, &statusp, options, NULL);
        if (stat_loc)
-               *stat_loc = (int) statusp.w_status;            
+               *stat_loc = (int) statusp.w_status;
 
-        return (wait_pid);                               
+       return (wait_pid);
 }
 
 #endif /* !HAVE_WAITPID */
index 2d853db..5ce3ee4 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: bsd-waitpid.h,v 1.5 2003/08/29 16:59:52 mouring Exp $ */
-
 /*
  * Copyright (c) 2000 Ben Lindstrom.  All rights reserved.
  *
index 13f87fe..308e2e6 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "includes.h"
+
 #include <string.h>
 
 /*
@@ -24,16 +25,40 @@ explicit_bzero(void *p, size_t n)
 
 #else /* HAVE_MEMSET_S */
 
+#if defined(ANDROID) && defined(bzero)
+/* On some Android versions bzero is a macro */
+static void wrapped_bzero(void* dest, size_t sz) {
+  memset(dest, 0, sz);
+}
+
+/*
+ * Indirect bzero through a volatile pointer to hopefully avoid
+ * dead-store optimisation eliminating the call.
+ */
+static void (* volatile ssh_bzero)(void *, size_t) = wrapped_bzero;
+#else
 /*
  * Indirect bzero through a volatile pointer to hopefully avoid
  * dead-store optimisation eliminating the call.
  */
-static void* (* volatile ssh_memset)(void *, int, size_t) = memset;
+static void (* volatile ssh_bzero)(void *, size_t) = bzero;
+#endif
 
 void
 explicit_bzero(void *p, size_t n)
 {
-       ssh_memset(p, 0, n);
+       /*
+        * clang -fsanitize=memory needs to intercept memset-like functions
+        * to correctly detect memory initialisation. Make sure one is called
+        * directly since our indirection trick above sucessfully confuses it.
+        */
+#if defined(__has_feature)
+# if __has_feature(memory_sanitizer)
+       memset(p, 0, n);
+# endif
+#endif
+
+       ssh_bzero(p, n);
 }
 
 #endif /* HAVE_MEMSET_S */
index 096d9e0..d5a6297 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2000-2003 Damien Miller.  All rights reserved.
  * Copyright (C) 1999 WIDE Project.  All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -13,7 +13,7 @@
  * 3. Neither the name of the project nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -44,8 +44,8 @@
 #include <arpa/inet.h>
 
 #ifndef HAVE_GETNAMEINFO
-int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, 
-                size_t hostlen, char *serv, size_t servlen, int flags)
+int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
+               size_t hostlen, char *serv, size_t servlen, int flags)
 {
        struct sockaddr_in *sin = (struct sockaddr_in *)sa;
        struct hostent *hp;
@@ -67,11 +67,11 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
                        else
                                return (0);
                } else {
-                       hp = gethostbyaddr((char *)&sin->sin_addr, 
+                       hp = gethostbyaddr((char *)&sin->sin_addr,
                            sizeof(struct in_addr), AF_INET);
                        if (hp == NULL)
                                return (EAI_NODATA);
-                       
+
                        if (strlcpy(host, hp->h_name, hostlen) >= hostlen)
                                return (EAI_MEMORY);
                        else
@@ -102,7 +102,7 @@ gai_strerror(int err)
        default:
                return ("unknown/invalid error.");
        }
-}    
+}
 #endif /* !HAVE_GAI_STRERROR */
 
 #ifndef HAVE_FREEADDRINFO
@@ -128,9 +128,9 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
        ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
        if (ai == NULL)
                return (NULL);
-       
+
        memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in));
-       
+
        ai->ai_addr = (struct sockaddr *)(ai + 1);
        /* XXX -- ssh doesn't use sa_len */
        ai->ai_addrlen = sizeof(struct sockaddr_in);
@@ -138,7 +138,7 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
 
        ((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
        ((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
-       
+
        /* XXX: the following is not generally correct, but does what we want */
        if (hints->ai_socktype)
                ai->ai_socktype = hints->ai_socktype;
@@ -152,7 +152,7 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
 }
 
 int
-getaddrinfo(const char *hostname, const char *servname, 
+getaddrinfo(const char *hostname, const char *servname,
     const struct addrinfo *hints, struct addrinfo **res)
 {
        struct hostent *hp;
@@ -183,29 +183,29 @@ getaddrinfo(const char *hostname, const char *servname,
                if (hostname && inet_aton(hostname, &in) != 0)
                        addr = in.s_addr;
                *res = malloc_ai(port, addr, hints);
-               if (*res == NULL) 
+               if (*res == NULL)
                        return (EAI_MEMORY);
                return (0);
        }
-               
+
        if (!hostname) {
                *res = malloc_ai(port, htonl(0x7f000001), hints);
-               if (*res == NULL) 
+               if (*res == NULL)
                        return (EAI_MEMORY);
                return (0);
        }
-       
+
        if (inet_aton(hostname, &in)) {
                *res = malloc_ai(port, in.s_addr, hints);
-               if (*res == NULL) 
+               if (*res == NULL)
                        return (EAI_MEMORY);
                return (0);
        }
-       
+
        /* Don't try DNS if AI_NUMERICHOST is set */
        if (hints && hints->ai_flags & AI_NUMERICHOST)
                return (EAI_NONAME);
-       
+
        hp = gethostbyname(hostname);
        if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
                struct addrinfo *cur, *prev;
@@ -229,7 +229,7 @@ getaddrinfo(const char *hostname, const char *servname,
                }
                return (0);
        }
-       
+
        return (EAI_NODATA);
 }
 #endif /* !HAVE_GETADDRINFO */
index 6426f7b..f913617 100644 (file)
@@ -1,9 +1,7 @@
-/* $Id: fake-rfc2553.h,v 1.16 2008/07/14 11:37:37 djm Exp $ */
-
 /*
  * Copyright (C) 2000-2003 Damien Miller.  All rights reserved.
  * Copyright (C) 1999 WIDE Project.  All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -15,7 +13,7 @@
  * 3. Neither the name of the project nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -47,7 +45,7 @@
 #endif
 
 /*
- * First, socket and INET6 related definitions 
+ * First, socket and INET6 related definitions
  */
 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
 # define       _SS_MAXSIZE     128     /* Implementation specific max size */
@@ -154,7 +152,7 @@ struct addrinfo {
 # undef getaddrinfo
 #endif
 #define getaddrinfo(a,b,c,d)   (ssh_getaddrinfo(a,b,c,d))
-int getaddrinfo(const char *, const char *, 
+int getaddrinfo(const char *, const char *,
     const struct addrinfo *, struct addrinfo **);
 #endif /* !HAVE_GETADDRINFO */
 
@@ -170,7 +168,7 @@ void freeaddrinfo(struct addrinfo *);
 
 #ifndef HAVE_GETNAMEINFO
 #define getnameinfo(a,b,c,d,e,f,g) (ssh_getnameinfo(a,b,c,d,e,f,g))
-int getnameinfo(const struct sockaddr *, size_t, char *, size_t, 
+int getnameinfo(const struct sockaddr *, size_t, char *, size_t,
     char *, size_t, int);
 #endif /* !HAVE_GETNAMEINFO */
 
index edd682a..e5533b2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: fmt_scaled.c,v 1.9 2007/03/20 03:42:52 tedu Exp $     */
+/*     $OpenBSD: fmt_scaled.c,v 1.13 2017/03/11 23:37:23 djm Exp $     */
 
 /*
  * Copyright (c) 2001, 2002, 2003 Ian F. Darwin.  All rights reserved.
@@ -69,7 +69,7 @@ static long long scale_factors[] = {
 
 #define MAX_DIGITS (SCALE_LENGTH * 3)  /* XXX strlen(sprintf("%lld", -1)? */
 
-/** Convert the given input string "scaled" into numeric in "result".
+/* Convert the given input string "scaled" into numeric in "result".
  * Return 0 on success, -1 and errno set on error.
  */
 int
@@ -81,7 +81,7 @@ scan_scaled(char *scaled, long long *result)
        long long scale_fact = 1, whole = 0, fpart = 0;
 
        /* Skip leading whitespace */
-       while (isascii(*p) && isspace(*p))
+       while (isascii((unsigned char)*p) && isspace((unsigned char)*p))
                ++p;
 
        /* Then at most one leading + or - */
@@ -108,7 +108,8 @@ scan_scaled(char *scaled, long long *result)
         * (but note that E for Exa might look like e to some!).
         * Advance 'p' to end, to get scale factor.
         */
-       for (; isascii(*p) && (isdigit(*p) || *p=='.'); ++p) {
+       for (; isascii((unsigned char)*p) &&
+           (isdigit((unsigned char)*p) || *p=='.'); ++p) {
                if (*p == '.') {
                        if (fract_digits > 0) { /* oops, more than one '.' */
                                errno = EINVAL;
@@ -124,6 +125,10 @@ scan_scaled(char *scaled, long long *result)
                                /* ignore extra fractional digits */
                                continue;
                        fract_digits++;         /* for later scaling */
+                       if (fpart >= LLONG_MAX / 10) {
+                               errno = ERANGE;
+                               return -1;
+                       }
                        fpart *= 10;
                        fpart += i;
                } else {                                /* normal digit */
@@ -131,6 +136,10 @@ scan_scaled(char *scaled, long long *result)
                                errno = ERANGE;
                                return -1;
                        }
+                       if (whole >= LLONG_MAX / 10) {
+                               errno = ERANGE;
+                               return -1;
+                       }
                        whole *= 10;
                        whole += i;
                }
@@ -150,17 +159,22 @@ scan_scaled(char *scaled, long long *result)
        /* Validate scale factor, and scale whole and fraction by it. */
        for (i = 0; i < SCALE_LENGTH; i++) {
 
-               /** Are we there yet? */
+               /* Are we there yet? */
                if (*p == scale_chars[i] ||
-                       *p == tolower(scale_chars[i])) {
+                       *p == tolower((unsigned char)scale_chars[i])) {
 
                        /* If it ends with alphanumerics after the scale char, bad. */
-                       if (isalnum(*(p+1))) {
+                       if (isalnum((unsigned char)*(p+1))) {
                                errno = EINVAL;
                                return -1;
                        }
                        scale_fact = scale_factors[i];
 
+                       if (whole >= LLONG_MAX / scale_fact) {
+                               errno = ERANGE;
+                               return -1;
+                       }
+
                        /* scale whole part */
                        whole *= scale_fact;
 
@@ -181,7 +195,9 @@ scan_scaled(char *scaled, long long *result)
                        return 0;
                }
        }
-       errno = ERANGE;
+
+       /* Invalid unit or character */
+       errno = EINVAL;
        return -1;
 }
 
@@ -196,7 +212,7 @@ fmt_scaled(long long number, char *result)
        unsigned int i;
        unit_type unit = NONE;
 
-       abval = (number < 0LL) ? -number : number;      /* no long long_abs yet */
+       abval = llabs(number);
 
        /* Not every negative long long has a positive representation.
         * Also check for numbers that are just too darned big to format
index 3edbb9c..e4f7f5a 100644 (file)
@@ -1,4 +1,4 @@
-/*     from OpenBSD: getcwd.c,v 1.14 2005/08/08 08:05:34 espie Exp */
+/*     $OpenBSD: getcwd.c,v 1.14 2005/08/08 08:05:34 espie Exp */
 /*
  * Copyright (c) 1989, 1991, 1993
  *     The Regents of the University of California.  All rights reserved.
index 3afcb92..3906cd6 100644 (file)
@@ -1,4 +1,4 @@
-/*     from OpenBSD: getgrouplist.c,v 1.12 2005/08/08 08:05:34 espie Exp */
+/*     $OpenBSD: getgrouplist.c,v 1.12 2005/08/08 08:05:34 espie Exp */
 /*
  * Copyright (c) 1991, 1993
  *     The Regents of the University of California.  All rights reserved.
index d2bea21..dc6fe05 100644 (file)
@@ -56,8 +56,6 @@
 #include <arpa/inet.h>
 
 #include "getrrsetbyname.h"
-#include "nameser.h"
-#include "nameser_compat.h"
 
 #if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO
 extern int h_errno;
index 742b4b9..7c97e67 100644 (file)
@@ -59,6 +59,7 @@
  */
 
 #include "includes.h"
+#include "glob.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
index f8a7fa5..f069a05 100644 (file)
     !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 || \
     defined(BROKEN_GLOB)
 
-#ifndef _GLOB_H_
-#define        _GLOB_H_
+#ifndef _COMPAT_GLOB_H_
+#define        _COMPAT_GLOB_H_
 
 #include <sys/stat.h>
 
+# define glob_t _ssh_compat_glob_t
+# define glob(a, b, c, d)  _ssh__compat_glob(a, b, c, d)
+# define globfree(a)  _ssh__compat_globfree(a)
+
 struct stat;
 typedef struct {
        int gl_pathc;           /* Count of total paths so far. */
index 130597e..093a172 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * Copyright (c) 1983, 1990, 1993
  *    The Regents of the University of California.  All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -15,7 +15,7 @@
  * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  * SUCH DAMAGE.
  * -
  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- * 
+ *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies, and that
  * the name of Digital Equipment Corporation not be used in advertising or
  * publicity pertaining to distribution of the document or software without
  * specific, written prior permission.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
@@ -77,7 +77,7 @@ inet_addr(const char *cp)
 }
 #endif
 
-/* 
+/*
  * Check whether "cp" is a valid ascii representation
  * of an Internet address and convert to a binary address.
  * Returns 1 if the address is valid, 0 if not.
index 1ff7114..cff5477 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: openbsd-compat.h,v 1.62 2014/09/30 23:43:08 djm Exp $ */
-
 /*
  * Copyright (c) 1999-2003 Damien Miller.  All rights reserved.
  * Copyright (c) 2003 Ben Lindstrom. All rights reserved.
 
 #include <sys/socket.h>
 
+#include <stddef.h>  /* for wchar_t */
+
 /* OpenBSD function replacements */
 #include "base64.h"
 #include "sigact.h"
-#include "glob.h"
 #include "readpassphrase.h"
 #include "vis.h"
 #include "getrrsetbyname.h"
@@ -63,7 +62,7 @@ void closefrom(int);
 
 #ifndef HAVE_GETCWD
 char *getcwd(char *pt, size_t size);
-#endif 
+#endif
 
 #ifndef HAVE_REALLOCARRAY
 void *reallocarray(void *, size_t, size_t);
@@ -86,14 +85,16 @@ int rresvport_af(int *alport, sa_family_t af);
 #endif
 
 #ifndef HAVE_STRLCPY
-/* #include <sys/types.h> XXX Still needed? */
 size_t strlcpy(char *dst, const char *src, size_t siz);
 #endif
 
 #ifndef HAVE_STRLCAT
-/* #include <sys/types.h> XXX Still needed? */
 size_t strlcat(char *dst, const char *src, size_t siz);
-#endif 
+#endif
+
+#ifndef HAVE_STRCASESTR
+char *strcasestr(const char *, const char *);
+#endif
 
 #ifndef HAVE_SETENV
 int setenv(register const char *name, register const char *value, int rewrite);
@@ -112,11 +113,11 @@ char *strptime(const char *buf, const char *fmt, struct tm *tm);
 int mkstemps(char *path, int slen);
 int mkstemp(char *path);
 char *mkdtemp(char *path);
-#endif 
+#endif
 
 #ifndef HAVE_DAEMON
 int daemon(int nochdir, int noclose);
-#endif 
+#endif
 
 #ifndef HAVE_DIRNAME
 char *dirname(const char *path);
@@ -141,7 +142,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
 
 #ifndef HAVE_INET_ATON
 int inet_aton(const char *cp, struct in_addr *addr);
-#endif 
+#endif
 
 #ifndef HAVE_STRSEP
 char *strsep(char **stringp, const char *delim);
@@ -153,7 +154,6 @@ void compat_init_setproctitle(int argc, char *argv[]);
 #endif
 
 #ifndef HAVE_GETGROUPLIST
-/* #include <grp.h> XXXX Still needed ? */
 int getgrouplist(const char *, gid_t, gid_t *, int *);
 #endif
 
@@ -198,18 +198,16 @@ u_int32_t arc4random_uniform(u_int32_t);
 
 #ifndef HAVE_ASPRINTF
 int asprintf(char **, const char *, ...);
-#endif 
+#endif
 
 #ifndef HAVE_OPENPTY
 # include <sys/ioctl.h>        /* for struct winsize */
 int openpty(int *, int *, char *, struct termios *, struct winsize *);
 #endif /* HAVE_OPENPTY */
 
-/* #include <sys/types.h> XXX needed? For size_t */
-
 #ifndef HAVE_SNPRINTF
 int snprintf(char *, size_t, SNPRINTF_CONST char *, ...);
-#endif 
+#endif
 
 #ifndef HAVE_STRTOLL
 long long strtoll(const char *, char **, int);
@@ -232,10 +230,43 @@ long long strtonum(const char *, long long, long long, const char **);
 # define mblen(x, y)   (1)
 #endif
 
+#ifndef HAVE_WCWIDTH
+# define wcwidth(x)    (((x) >= 0x20 && (x) <= 0x7e) ? 1 : -1)
+/* force our no-op nl_langinfo and mbtowc */
+# undef HAVE_NL_LANGINFO
+# undef HAVE_MBTOWC
+# undef HAVE_LANGINFO_H
+#endif
+
+#ifndef HAVE_NL_LANGINFO
+# define nl_langinfo(x)        ""
+#endif
+
+#ifndef HAVE_MBTOWC
+int mbtowc(wchar_t *, const char*, size_t);
+#endif
+
 #if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
 # include <stdarg.h>
 #endif
 
+/*
+ * Some platforms unconditionally undefine va_copy() so we define VA_COPY()
+ * instead.  This is known to be the case on at least some configurations of
+ * AIX with the xlc compiler.
+ */
+#ifndef VA_COPY
+# ifdef HAVE_VA_COPY
+#  define VA_COPY(dest, src) va_copy(dest, src)
+# else
+#  ifdef HAVE___VA_COPY
+#   define VA_COPY(dest, src) __va_copy(dest, src)
+#  else
+#   define VA_COPY(dest, src) (dest) = (src)
+#  endif
+# endif
+#endif
+
 #ifndef HAVE_VASPRINTF
 int vasprintf(char **, const char *, va_list);
 #endif
@@ -265,7 +296,6 @@ int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
 void explicit_bzero(void *p, size_t n);
 #endif
 
-void *xmmap(size_t size);
 char *xcrypt(const char *password, const char *salt);
 char *shadow_pw(struct passwd *pw);
 
index 63a660c..259fccb 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: openssl-compat.c,v 1.19 2014/07/02 05:28:07 djm Exp $ */
-
 /*
  * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
  *
@@ -55,7 +53,7 @@ ssh_compatible_openssl(long headerver, long libver)
                mask = 0xfffff00fL; /* major,minor,fix,status */
                return (headerver & mask) == (libver & mask);
        }
-       
+
        /*
         * For versions >= 1.0.0, major,minor,status must match and library
         * fix version must be equal to or newer than the header.
index 8917551..2ae42ba 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: openssl-compat.h,v 1.31 2014/08/29 18:18:29 djm Exp $ */
-
 /*
  * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
  *
@@ -71,6 +69,12 @@ void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
 # endif
 #endif
 
+#if defined(HAVE_EVP_RIPEMD160)
+# if defined(OPENSSL_NO_RIPEMD) || defined(OPENSSL_NO_RMD160)
+#  undef HAVE_EVP_RIPEMD160
+# endif
+#endif
+
 /*
  * We overload some of the OpenSSL crypto functions with ssh_* equivalents
  * to automatically handle OpenSSL engine initialisation.
index 8da367d..c2970c4 100644 (file)
@@ -179,7 +179,7 @@ sys_auth_passwd(Authctxt *ctxt, const char *password)
        do {
                result = authenticate((char *)name, (char *)password, &reenter,
                    &authmsg);
-               aix_remove_embedded_newlines(authmsg);  
+               aix_remove_embedded_newlines(authmsg);
                debug3("AIX/authenticate result %d, authmsg %.100s", result,
                    authmsg);
        } while (reenter);
@@ -337,11 +337,11 @@ aix_setauthdb(const char *user)
                debug3("%s: Could not open userdb to read", __func__);
                return;
        }
-       
+
        if (getuserattr((char *)user, S_REGISTRY, &registry, SEC_CHAR) == 0) {
                if (setauthdb(registry, old_registry) == 0)
                        debug3("AIX/setauthdb set registry '%s'", registry);
-               else 
+               else
                        debug3("AIX/setauthdb set registry '%s' failed: %s",
                            registry, strerror(errno));
        } else
index 53e4e88..9c0a4dd 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: port-aix.h,v 1.32 2009/12/20 23:49:22 dtucker Exp $ */
-
 /*
  *
  * Copyright (c) 2001 Gert Doering.  All rights reserved.
index ba751a5..525b029 100644 (file)
@@ -47,42 +47,42 @@ void
 irix_setusercontext(struct passwd *pw)
 {
 #ifdef WITH_IRIX_PROJECT
-        prid_t projid;
+       prid_t projid;
 #endif
 #ifdef WITH_IRIX_JOBS
-        jid_t jid = 0;
+       jid_t jid = 0;
 #elif defined(WITH_IRIX_ARRAY)
-        int jid = 0;
+       int jid = 0;
 #endif
 
 #ifdef WITH_IRIX_JOBS
-        jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
-        if (jid == -1)
-                fatal("Failed to create job container: %.100s",
-                    strerror(errno));
+       jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
+       if (jid == -1)
+               fatal("Failed to create job container: %.100s",
+                   strerror(errno));
 #endif /* WITH_IRIX_JOBS */
 #ifdef WITH_IRIX_ARRAY
-        /* initialize array session */
-        if (jid == 0  && newarraysess() != 0)
-                fatal("Failed to set up new array session: %.100s",
-                    strerror(errno));
+       /* initialize array session */
+       if (jid == 0  && newarraysess() != 0)
+               fatal("Failed to set up new array session: %.100s",
+                   strerror(errno));
 #endif /* WITH_IRIX_ARRAY */
 #ifdef WITH_IRIX_PROJECT
-        /* initialize irix project info */
-        if ((projid = getdfltprojuser(pw->pw_name)) == -1) {
-                debug("Failed to get project id, using projid 0");
-                projid = 0;
-        }
-        if (setprid(projid))
-                fatal("Failed to initialize project %d for %s: %.100s",
-                    (int)projid, pw->pw_name, strerror(errno));
+       /* initialize irix project info */
+       if ((projid = getdfltprojuser(pw->pw_name)) == -1) {
+               debug("Failed to get project id, using projid 0");
+               projid = 0;
+       }
+       if (setprid(projid))
+               fatal("Failed to initialize project %d for %s: %.100s",
+                   (int)projid, pw->pw_name, strerror(errno));
 #endif /* WITH_IRIX_PROJECT */
 #ifdef WITH_IRIX_AUDIT
-        if (sysconf(_SC_AUDIT)) {
-                debug("Setting sat id to %d", (int) pw->pw_uid);
-                if (satsetid(pw->pw_uid))
-                        debug("error setting satid: %.100s", strerror(errno));
-        }
+       if (sysconf(_SC_AUDIT)) {
+               debug("Setting sat id to %d", (int) pw->pw_uid);
+               if (satsetid(pw->pw_uid))
+                       debug("error setting satid: %.100s", strerror(errno));
+       }
 #endif /* WITH_IRIX_AUDIT */
 }
 
index 67c4863..bc8cc44 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: port-irix.h,v 1.4 2003/08/29 16:59:52 mouring Exp $ */
-
 /*
  * Copyright (c) 2000 Denis Parker.  All rights reserved.
  * Copyright (c) 2000 Michael Stone.  All rights reserved.
index f36999d..e4c5d1b 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: port-linux.c,v 1.18 2013/06/01 22:07:32 dtucker Exp $ */
-
 /*
  * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
  * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
index e3d1004..3c22a85 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: port-linux.h,v 1.5 2011/01/25 01:16:18 djm Exp $ */
-
 /*
  * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
  *
index 25382f1..0e89dc3 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: port-solaris.c,v 1.4 2010/11/05 01:03:05 dtucker Exp $ */
-
 /*
  * Copyright (c) 2006 Chad Mynhier.
  *
@@ -215,7 +213,7 @@ solaris_set_default_project(struct passwd *pw)
 
        /* get default project, if we fail just return gracefully  */
        if ((defaultproject = getdefaultproj(pw->pw_name, &tempproject, &buf,
-           sizeof(buf))) > 0) {
+           sizeof(buf))) != NULL) {
                /* set default project */
                if (setproject(defaultproject->pj_name, pw->pw_name,
                    TASK_NORMAL) != 0)
@@ -227,3 +225,139 @@ solaris_set_default_project(struct passwd *pw)
        }
 }
 #endif /* USE_SOLARIS_PROJECTS */
+
+#ifdef USE_SOLARIS_PRIVS
+# ifdef HAVE_PRIV_H
+#  include <priv.h>
+# endif
+
+priv_set_t *
+solaris_basic_privset(void)
+{
+       priv_set_t *pset;
+
+#ifdef HAVE_PRIV_BASICSET
+       if ((pset = priv_allocset()) == NULL) {
+               error("priv_allocset: %s", strerror(errno));
+               return NULL;
+       }
+       priv_basicset(pset);
+#else
+       if ((pset = priv_str_to_set("basic", ",", NULL)) == NULL) {
+               error("priv_str_to_set: %s", strerror(errno));
+               return NULL;
+       }
+#endif
+       return pset;
+}
+
+void
+solaris_drop_privs_pinfo_net_fork_exec(void)
+{
+       priv_set_t *pset = NULL, *npset = NULL;
+
+       /*
+        * Note: this variant avoids dropping DAC filesystem rights, in case
+        * the process calling it is running as root and should have the
+        * ability to read/write/chown any file on the system.
+        *
+        * We start with the basic set, then *add* the DAC rights to it while
+        * taking away other parts of BASIC we don't need. Then we intersect
+        * this with our existing PERMITTED set. In this way we keep any
+        * DAC rights we had before, while otherwise reducing ourselves to
+        * the minimum set of privileges we need to proceed.
+        *
+        * This also means we drop any other parts of "root" that we don't
+        * need (e.g. the ability to kill any process, create new device nodes
+        * etc etc).
+        */
+
+       if ((pset = priv_allocset()) == NULL)
+               fatal("priv_allocset: %s", strerror(errno));
+       if ((npset = solaris_basic_privset()) == NULL)
+               fatal("solaris_basic_privset: %s", strerror(errno));
+
+       if (priv_addset(npset, PRIV_FILE_CHOWN) != 0 ||
+           priv_addset(npset, PRIV_FILE_DAC_READ) != 0 ||
+           priv_addset(npset, PRIV_FILE_DAC_SEARCH) != 0 ||
+           priv_addset(npset, PRIV_FILE_DAC_WRITE) != 0 ||
+           priv_addset(npset, PRIV_FILE_OWNER) != 0)
+               fatal("priv_addset: %s", strerror(errno));
+
+       if (priv_delset(npset, PRIV_FILE_LINK_ANY) != 0 ||
+#ifdef PRIV_NET_ACCESS
+           priv_delset(npset, PRIV_NET_ACCESS) != 0 ||
+#endif
+           priv_delset(npset, PRIV_PROC_EXEC) != 0 ||
+           priv_delset(npset, PRIV_PROC_FORK) != 0 ||
+           priv_delset(npset, PRIV_PROC_INFO) != 0 ||
+           priv_delset(npset, PRIV_PROC_SESSION) != 0)
+               fatal("priv_delset: %s", strerror(errno));
+
+       if (getppriv(PRIV_PERMITTED, pset) != 0)
+               fatal("getppriv: %s", strerror(errno));
+
+       priv_intersect(pset, npset);
+
+       if (setppriv(PRIV_SET, PRIV_PERMITTED, npset) != 0 ||
+           setppriv(PRIV_SET, PRIV_LIMIT, npset) != 0 ||
+           setppriv(PRIV_SET, PRIV_INHERITABLE, npset) != 0)
+               fatal("setppriv: %s", strerror(errno));
+
+       priv_freeset(pset);
+       priv_freeset(npset);
+}
+
+void
+solaris_drop_privs_root_pinfo_net(void)
+{
+       priv_set_t *pset = NULL;
+
+       /* Start with "basic" and drop everything we don't need. */
+       if ((pset = solaris_basic_privset()) == NULL)
+               fatal("solaris_basic_privset: %s", strerror(errno));
+
+       if (priv_delset(pset, PRIV_FILE_LINK_ANY) != 0 ||
+#ifdef PRIV_NET_ACCESS
+           priv_delset(pset, PRIV_NET_ACCESS) != 0 ||
+#endif
+           priv_delset(pset, PRIV_PROC_INFO) != 0 ||
+           priv_delset(pset, PRIV_PROC_SESSION) != 0)
+               fatal("priv_delset: %s", strerror(errno));
+
+       if (setppriv(PRIV_SET, PRIV_PERMITTED, pset) != 0 ||
+           setppriv(PRIV_SET, PRIV_LIMIT, pset) != 0 ||
+           setppriv(PRIV_SET, PRIV_INHERITABLE, pset) != 0)
+               fatal("setppriv: %s", strerror(errno));
+
+       priv_freeset(pset);
+}
+
+void
+solaris_drop_privs_root_pinfo_net_exec(void)
+{
+       priv_set_t *pset = NULL;
+
+
+       /* Start with "basic" and drop everything we don't need. */
+       if ((pset = solaris_basic_privset()) == NULL)
+               fatal("solaris_basic_privset: %s", strerror(errno));
+
+       if (priv_delset(pset, PRIV_FILE_LINK_ANY) != 0 ||
+#ifdef PRIV_NET_ACCESS
+           priv_delset(pset, PRIV_NET_ACCESS) != 0 ||
+#endif
+           priv_delset(pset, PRIV_PROC_EXEC) != 0 ||
+           priv_delset(pset, PRIV_PROC_INFO) != 0 ||
+           priv_delset(pset, PRIV_PROC_SESSION) != 0)
+               fatal("priv_delset: %s", strerror(errno));
+
+       if (setppriv(PRIV_SET, PRIV_PERMITTED, pset) != 0 ||
+           setppriv(PRIV_SET, PRIV_LIMIT, pset) != 0 ||
+           setppriv(PRIV_SET, PRIV_INHERITABLE, pset) != 0)
+               fatal("setppriv: %s", strerror(errno));
+
+       priv_freeset(pset);
+}
+
+#endif
index cd442e7..dde1a5b 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: port-solaris.h,v 1.2 2010/11/05 01:03:05 dtucker Exp $ */
-
 /*
  * Copyright (c) 2006 Chad Mynhier.
  *
@@ -26,5 +24,12 @@ void solaris_contract_pre_fork(void);
 void solaris_contract_post_fork_child(void);
 void solaris_contract_post_fork_parent(pid_t pid);
 void solaris_set_default_project(struct passwd *);
+# ifdef USE_SOLARIS_PRIVS
+#include <priv.h>
+priv_set_t *solaris_basic_privset(void);
+void solaris_drop_privs_pinfo_net_fork_exec(void);
+void solaris_drop_privs_root_pinfo_net(void);
+void solaris_drop_privs_root_pinfo_net_exec(void);
+# endif /* USE_SOLARIS_PRIVS */
 
 #endif
index 49e7b4d..a444adf 100644 (file)
@@ -68,7 +68,7 @@ sys_tun_open(int tun, int mode)
                return (-1);
        }
 
-       bzero(&ifr, sizeof(ifr));       
+       bzero(&ifr, sizeof(ifr));
 
        if (mode == SSH_TUNMODE_ETHERNET) {
                ifr.ifr_flags = IFF_TAP;
index d63cdf2..24aed6e 100644 (file)
@@ -1,7 +1,8 @@
-/*     $OpenBSD: readpassphrase.c,v 1.22 2010/01/13 10:20:54 dtucker Exp $     */
+/*     $OpenBSD: readpassphrase.c,v 1.26 2016/10/18 12:47:18 millert Exp $     */
 
 /*
- * Copyright (c) 2000-2002, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2000-2002, 2007, 2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 #include <string.h>
 #include <unistd.h>
 
-#ifdef TCSASOFT
-# define _T_FLUSH      (TCSAFLUSH|TCSASOFT)
-#else
-# define _T_FLUSH      (TCSAFLUSH)
+#ifndef TCSASOFT
+/* If we don't have TCSASOFT define it so that ORing it it below is a no-op. */
+# define TCSASOFT 0
 #endif
 
 /* SunOS 4.x which lacks _POSIX_VDISABLE, but has VDISABLE */
@@ -95,6 +95,27 @@ restart:
        }
 
        /*
+        * Turn off echo if possible.
+        * If we are using a tty but are not the foreground pgrp this will
+        * generate SIGTTOU, so do it *before* installing the signal handlers.
+        */
+       if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) {
+               memcpy(&term, &oterm, sizeof(term));
+               if (!(flags & RPP_ECHO_ON))
+                       term.c_lflag &= ~(ECHO | ECHONL);
+#ifdef VSTATUS
+               if (term.c_cc[VSTATUS] != _POSIX_VDISABLE)
+                       term.c_cc[VSTATUS] = _POSIX_VDISABLE;
+#endif
+               (void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term);
+       } else {
+               memset(&term, 0, sizeof(term));
+               term.c_lflag |= ECHO;
+               memset(&oterm, 0, sizeof(oterm));
+               oterm.c_lflag |= ECHO;
+       }
+
+       /*
         * Catch signals that would otherwise cause the user to end
         * up with echo turned off in the shell.  Don't worry about
         * things like SIGXCPU and SIGVTALRM for now.
@@ -112,53 +133,37 @@ restart:
        (void)sigaction(SIGTTIN, &sa, &savettin);
        (void)sigaction(SIGTTOU, &sa, &savettou);
 
-       /* Turn off echo if possible. */
-       if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) {
-               memcpy(&term, &oterm, sizeof(term));
-               if (!(flags & RPP_ECHO_ON))
-                       term.c_lflag &= ~(ECHO | ECHONL);
-#ifdef VSTATUS
-               if (term.c_cc[VSTATUS] != _POSIX_VDISABLE)
-                       term.c_cc[VSTATUS] = _POSIX_VDISABLE;
-#endif
-               (void)tcsetattr(input, _T_FLUSH, &term);
-       } else {
-               memset(&term, 0, sizeof(term));
-               term.c_lflag |= ECHO;
-               memset(&oterm, 0, sizeof(oterm));
-               oterm.c_lflag |= ECHO;
-       }
-
-       /* No I/O if we are already backgrounded. */
-       if (signo[SIGTTOU] != 1 && signo[SIGTTIN] != 1) {
-               if (!(flags & RPP_STDIN))
-                       (void)write(output, prompt, strlen(prompt));
-               end = buf + bufsiz - 1;
-               p = buf;
-               while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') {
-                       if (p < end) {
-                               if ((flags & RPP_SEVENBIT))
-                                       ch &= 0x7f;
-                               if (isalpha(ch)) {
-                                       if ((flags & RPP_FORCELOWER))
-                                               ch = (char)tolower(ch);
-                                       if ((flags & RPP_FORCEUPPER))
-                                               ch = (char)toupper(ch);
-                               }
-                               *p++ = ch;
+       if (!(flags & RPP_STDIN))
+               (void)write(output, prompt, strlen(prompt));
+       end = buf + bufsiz - 1;
+       p = buf;
+       while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') {
+               if (p < end) {
+                       if ((flags & RPP_SEVENBIT))
+                               ch &= 0x7f;
+                       if (isalpha((unsigned char)ch)) {
+                               if ((flags & RPP_FORCELOWER))
+                                       ch = (char)tolower((unsigned char)ch);
+                               if ((flags & RPP_FORCEUPPER))
+                                       ch = (char)toupper((unsigned char)ch);
                        }
+                       *p++ = ch;
                }
-               *p = '\0';
-               save_errno = errno;
-               if (!(term.c_lflag & ECHO))
-                       (void)write(output, "\n", 1);
        }
+       *p = '\0';
+       save_errno = errno;
+       if (!(term.c_lflag & ECHO))
+               (void)write(output, "\n", 1);
 
        /* Restore old terminal settings and signals. */
        if (memcmp(&term, &oterm, sizeof(term)) != 0) {
-               while (tcsetattr(input, _T_FLUSH, &oterm) == -1 &&
-                   errno == EINTR)
+               const int sigttou = signo[SIGTTOU];
+
+               /* Ignore SIGTTOU generated when we are not the fg pgrp. */
+               while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 &&
+                   errno == EINTR && !signo[SIGTTOU])
                        continue;
+               signo[SIGTTOU] = sigttou;
        }
        (void)sigaction(SIGALRM, &savealrm, NULL);
        (void)sigaction(SIGHUP, &savehup, NULL);
@@ -194,6 +199,7 @@ restart:
                errno = save_errno;
        return(nr == -1 ? NULL : buf);
 }
+DEF_WEAK(readpassphrase);
 
 #if 0
 char *
index ba4cea9..a2f090e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: realpath.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
+/*     $OpenBSD: realpath.c,v 1.20 2015/10/13 20:55:37 millert Exp $ */
 /*
  * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
  *
 #include <stddef.h>
 #include <string.h>
 #include <unistd.h>
+#include <limits.h>
+
+#ifndef SYMLOOP_MAX
+# define SYMLOOP_MAX 32
+#endif
+
+/* A slightly modified copy of this file exists in libexec/ld.so */
 
 /*
  * char *realpath(const char *path, char resolved[PATH_MAX]);
  * in which case the path which caused trouble is left in (resolved).
  */
 char *
-realpath(const char *path, char resolved[PATH_MAX])
+realpath(const char *path, char *resolved)
 {
        struct stat sb;
        char *p, *q, *s;
        size_t left_len, resolved_len;
        unsigned symlinks;
-       int serrno, slen;
+       int serrno, slen, mem_allocated;
        char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX];
 
+       if (path[0] == '\0') {
+               errno = ENOENT;
+               return (NULL);
+       }
+
        serrno = errno;
+
+       if (resolved == NULL) {
+               resolved = malloc(PATH_MAX);
+               if (resolved == NULL)
+                       return (NULL);
+               mem_allocated = 1;
+       } else
+               mem_allocated = 0;
+
        symlinks = 0;
        if (path[0] == '/') {
                resolved[0] = '/';
@@ -71,7 +92,10 @@ realpath(const char *path, char resolved[PATH_MAX])
                left_len = strlcpy(left, path + 1, sizeof(left));
        } else {
                if (getcwd(resolved, PATH_MAX) == NULL) {
-                       strlcpy(resolved, ".", PATH_MAX);
+                       if (mem_allocated)
+                               free(resolved);
+                       else
+                               strlcpy(resolved, ".", PATH_MAX);
                        return (NULL);
                }
                resolved_len = strlen(resolved);
@@ -79,7 +103,7 @@ realpath(const char *path, char resolved[PATH_MAX])
        }
        if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) {
                errno = ENAMETOOLONG;
-               return (NULL);
+               goto err;
        }
 
        /*
@@ -94,7 +118,7 @@ realpath(const char *path, char resolved[PATH_MAX])
                s = p ? p : left + left_len;
                if (s - left >= (ptrdiff_t)sizeof(next_token)) {
                        errno = ENAMETOOLONG;
-                       return (NULL);
+                       goto err;
                }
                memcpy(next_token, left, s - left);
                next_token[s - left] = '\0';
@@ -104,7 +128,7 @@ realpath(const char *path, char resolved[PATH_MAX])
                if (resolved[resolved_len - 1] != '/') {
                        if (resolved_len + 1 >= PATH_MAX) {
                                errno = ENAMETOOLONG;
-                               return (NULL);
+                               goto err;
                        }
                        resolved[resolved_len++] = '/';
                        resolved[resolved_len] = '\0';
@@ -135,23 +159,23 @@ realpath(const char *path, char resolved[PATH_MAX])
                resolved_len = strlcat(resolved, next_token, PATH_MAX);
                if (resolved_len >= PATH_MAX) {
                        errno = ENAMETOOLONG;
-                       return (NULL);
+                       goto err;
                }
                if (lstat(resolved, &sb) != 0) {
                        if (errno == ENOENT && p == NULL) {
                                errno = serrno;
                                return (resolved);
                        }
-                       return (NULL);
+                       goto err;
                }
                if (S_ISLNK(sb.st_mode)) {
-                       if (symlinks++ > MAXSYMLINKS) {
+                       if (symlinks++ > SYMLOOP_MAX) {
                                errno = ELOOP;
-                               return (NULL);
+                               goto err;
                        }
                        slen = readlink(resolved, symlink, sizeof(symlink) - 1);
                        if (slen < 0)
-                               return (NULL);
+                               goto err;
                        symlink[slen] = '\0';
                        if (symlink[0] == '/') {
                                resolved[1] = 0;
@@ -174,15 +198,15 @@ realpath(const char *path, char resolved[PATH_MAX])
                                        if (slen + 1 >=
                                            (ptrdiff_t)sizeof(symlink)) {
                                                errno = ENAMETOOLONG;
-                                               return (NULL);
+                                               goto err;
                                        }
                                        symlink[slen] = '/';
                                        symlink[slen + 1] = 0;
                                }
-                               left_len = strlcat(symlink, left, sizeof(left));
-                               if (left_len >= sizeof(left)) {
+                               left_len = strlcat(symlink, left, sizeof(symlink));
+                               if (left_len >= sizeof(symlink)) {
                                        errno = ENAMETOOLONG;
-                                       return (NULL);
+                                       goto err;
                                }
                        }
                        left_len = strlcpy(left, symlink, sizeof(left));
@@ -196,5 +220,10 @@ realpath(const char *path, char resolved[PATH_MAX])
        if (resolved_len > 1 && resolved[resolved_len - 1] == '/')
                resolved[resolved_len - 1] = '\0';
        return (resolved);
+
+err:
+       if (mem_allocated)
+               free(resolved);
+       return (NULL);
 }
 #endif /* !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) */
diff --git a/openbsd-compat/regress/.cvsignore b/openbsd-compat/regress/.cvsignore
deleted file mode 100644 (file)
index 33074f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-snprintftest
-strduptest
-strtonumtest
-closefromtest
-opensslvertest
index 9f7ca14..2b15c6e 100644 (file)
@@ -76,7 +76,7 @@ compat_init_setproctitle(int argc, char *argv[])
 
        /*
         * NB: This assumes that argv has already been copied out of the
-        * way. This is true for sshd, but may not be true for other 
+        * way. This is true for sshd, but may not be true for other
         * programs. Beware.
         */
 
@@ -92,7 +92,7 @@ compat_init_setproctitle(int argc, char *argv[])
        }
 
        /*
-        * Find the last argv string or environment variable within 
+        * Find the last argv string or environment variable within
         * our process memory area.
         */
        for (i = 0; i < argc; i++) {
@@ -108,8 +108,8 @@ compat_init_setproctitle(int argc, char *argv[])
        argv_start = argv[0];
        argv_env_len = lastargv - argv[0] - 1;
 
-       /* 
-        * Copy environment 
+       /*
+        * Copy environment
         * XXX - will truncate env on strdup fail
         */
        for (i = 0; envp[i] != NULL; i++)
@@ -156,7 +156,7 @@ setproctitle(const char *fmt, ...)
        pst.pst_command = ptitle;
        pstat(PSTAT_SETCMD, pst, strlen(ptitle), 0, 0);
 #elif SPT_TYPE == SPT_REUSEARGV
-/*     debug("setproctitle: copy \"%s\" into len %d", 
+/*     debug("setproctitle: copy \"%s\" into len %d",
            buf, argv_env_len); */
        len = strlcpy(argv_start, ptitle, argv_env_len);
        for(; len < argv_env_len; len++)
index 737935d..a22099b 100644 (file)
@@ -1,4 +1,4 @@
-/*     from OpenBSD: sha2.c,v 1.11 2005/08/08 08:05:35 espie Exp       */
+/*     $OpenBSD: sha2.c,v 1.11 2005/08/08 08:05:35 espie Exp   */
 
 /*
  * FILE:       sha2.c
index c8bfc3c..c6e6c97 100644 (file)
@@ -1,4 +1,4 @@
-/*     OpenBSD: sha2.h,v 1.6 2004/06/22 01:57:30 jfb Exp       */
+/*     $OpenBSD: sha2.h,v 1.6 2004/06/22 01:57:30 jfb Exp      */
 
 /*
  * FILE:       sha2.h
diff --git a/openbsd-compat/strcasestr.c b/openbsd-compat/strcasestr.c
new file mode 100644 (file)
index 0000000..4c4d147
--- /dev/null
@@ -0,0 +1,69 @@
+/*     $OpenBSD: strcasestr.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
+/*     $NetBSD: strcasestr.c,v 1.2 2005/02/09 21:35:47 kleink Exp $    */
+
+/*-
+ * Copyright (c) 1990, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* OPENBSD ORIGINAL: lib/libc/string/strcasestr.c */
+
+#include "includes.h"
+
+#ifndef HAVE_STRCASESTR
+
+#include <ctype.h>
+#include <string.h>
+
+/*
+ * Find the first occurrence of find in s, ignore case.
+ */
+char *
+strcasestr(const char *s, const char *find)
+{
+       char c, sc;
+       size_t len;
+
+       if ((c = *find++) != 0) {
+               c = (char)tolower((unsigned char)c);
+               len = strlen(find);
+               do {
+                       do {
+                               if ((sc = *s++) == 0)
+                                       return (NULL);
+                       } while ((char)tolower((unsigned char)sc) != c);
+               } while (strncasecmp(s, find, len) != 0);
+               s--;
+       }
+       return ((char *)s);
+}
+DEF_WEAK(strcasestr);
+
+#endif
index f6f5665..0e04ed0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vis.c,v 1.19 2005/09/01 17:15:49 millert Exp $ */
+/*     $OpenBSD: vis.c,v 1.25 2015/09/13 11:32:51 guenther Exp $ */
 /*-
  * Copyright (c) 1989, 1993
  *     The Regents of the University of California.  All rights reserved.
 #include "includes.h"
 #if !defined(HAVE_STRNVIS) || defined(BROKEN_STRNVIS)
 
+#include <sys/types.h>
+#include <errno.h>
 #include <ctype.h>
+#include <limits.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include "vis.h"
 
 #define        isoctal(c)      (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-#define        isvisible(c)                                                    \
+#define        isvisible(c,flag)                                               \
+       (((c) == '\\' || (flag & VIS_ALL) == 0) &&                      \
        (((u_int)(c) <= UCHAR_MAX && isascii((u_char)(c)) &&            \
        (((c) != '*' && (c) != '?' && (c) != '[' && (c) != '#') ||      \
                (flag & VIS_GLOB) == 0) && isgraph((u_char)(c))) ||     \
@@ -48,7 +53,7 @@
        ((flag & VIS_NL) == 0 && (c) == '\n') ||                        \
        ((flag & VIS_SAFE) && ((c) == '\b' ||                           \
                (c) == '\007' || (c) == '\r' ||                         \
-               isgraph((u_char)(c)))))
+               isgraph((u_char)(c))))))
 
 /*
  * vis - visually encode characters
 char *
 vis(char *dst, int c, int flag, int nextc)
 {
-       if (isvisible(c)) {
-               *dst++ = c;
-               if (c == '\\' && (flag & VIS_NOSLASH) == 0)
+       if (isvisible(c, flag)) {
+               if ((c == '"' && (flag & VIS_DQ) != 0) ||
+                   (c == '\\' && (flag & VIS_NOSLASH) == 0))
                        *dst++ = '\\';
+               *dst++ = c;
                *dst = '\0';
                return (dst);
        }
@@ -136,6 +142,7 @@ done:
        *dst = '\0';
        return (dst);
 }
+DEF_WEAK(vis);
 
 /*
  * strvis, strnvis, strvisx - visually encode characters from src into dst
@@ -161,6 +168,7 @@ strvis(char *dst, const char *src, int flag)
        *dst = '\0';
        return (dst - start);
 }
+DEF_WEAK(strvis);
 
 int
 strnvis(char *dst, const char *src, size_t siz, int flag)
@@ -171,19 +179,18 @@ strnvis(char *dst, const char *src, size_t siz, int flag)
 
        i = 0;
        for (start = dst, end = start + siz - 1; (c = *src) && dst < end; ) {
-               if (isvisible(c)) {
-                       i = 1;
-                       *dst++ = c;
-                       if (c == '\\' && (flag & VIS_NOSLASH) == 0) {
+               if (isvisible(c, flag)) {
+                       if ((c == '"' && (flag & VIS_DQ) != 0) ||
+                           (c == '\\' && (flag & VIS_NOSLASH) == 0)) {
                                /* need space for the extra '\\' */
-                               if (dst < end)
-                                       *dst++ = '\\';
-                               else {
-                                       dst--;
+                               if (dst + 1 >= end) {
                                        i = 2;
                                        break;
                                }
+                               *dst++ = '\\';
                        }
+                       i = 1;
+                       *dst++ = c;
                        src++;
                } else {
                        i = vis(tbuf, c, flag, *++src) - tbuf;
@@ -207,6 +214,25 @@ strnvis(char *dst, const char *src, size_t siz, int flag)
 }
 
 int
+stravis(char **outp, const char *src, int flag)
+{
+       char *buf;
+       int len, serrno;
+
+       buf = reallocarray(NULL, 4, strlen(src) + 1);
+       if (buf == NULL)
+               return -1;
+       len = strvis(buf, src, flag);
+       serrno = errno;
+       *outp = realloc(buf, len + 1);
+       if (*outp == NULL) {
+               *outp = buf;
+               errno = serrno;
+       }
+       return (len);
+}
+
+int
 strvisx(char *dst, const char *src, size_t len, int flag)
 {
        char c;
index d1286c9..2cdfd36 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vis.h,v 1.11 2005/08/09 19:38:31 millert Exp $        */
+/*     $OpenBSD: vis.h,v 1.15 2015/07/20 01:52:27 millert Exp $        */
 /*     $NetBSD: vis.h,v 1.4 1994/10/26 00:56:41 cgd Exp $      */
 
 /*-
@@ -58,6 +58,8 @@
 #define        VIS_NL          0x10    /* also encode newline */
 #define        VIS_WHITE       (VIS_SP | VIS_TAB | VIS_NL)
 #define        VIS_SAFE        0x20    /* only encode "unsafe" characters */
+#define        VIS_DQ          0x200   /* backslash-escape double quotes */
+#define        VIS_ALL         0x400   /* encode all characters */
 
 /*
  * other
@@ -81,6 +83,7 @@
 
 char   *vis(char *, int, int, int);
 int    strvis(char *, const char *, int);
+int    stravis(char **, const char *, int);
 int    strnvis(char *, const char *, size_t, int)
                __attribute__ ((__bounded__(__string__,1,3)));
 int    strvisx(char *, const char *, size_t, int)
index 8577cbd..c9c6283 100644 (file)
@@ -25,6 +25,7 @@
 #include "includes.h"
 
 #include <sys/types.h>
+#include <string.h>
 #include <unistd.h>
 #include <pwd.h>
 
@@ -41,7 +42,7 @@
 #  include <sys/security.h>
 #  include <sys/audit.h>
 #  include <prot.h>
-# endif 
+# endif
 
 # if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
 #  include <shadow.h>
 #  define crypt DES_crypt
 # endif
 
+/*
+ * Pick an appropriate password encryption type and salt for the running
+ * system by searching through accounts until we find one that has a valid
+ * salt.  Usually this will be root unless the root account is locked out.
+ * If we don't find one we return a traditional DES-based salt.
+ */
+static const char *
+pick_salt(void)
+{
+       struct passwd *pw;
+       char *passwd, *p;
+       size_t typelen;
+       static char salt[32];
+
+       if (salt[0] != '\0')
+               return salt;
+       strlcpy(salt, "xx", sizeof(salt));
+       setpwent();
+       while ((pw = getpwent()) != NULL) {
+               passwd = shadow_pw(pw);
+               if (passwd[0] == '$' && (p = strrchr(passwd+1, '$')) != NULL) {
+                       typelen = p - passwd + 1;
+                       strlcpy(salt, passwd, MIN(typelen, sizeof(salt)));
+                       explicit_bzero(passwd, strlen(passwd));
+                       goto out;
+               }
+       }
+ out:
+       endpwent();
+       return salt;
+}
+
 char *
 xcrypt(const char *password, const char *salt)
 {
        char *crypted;
 
+       /*
+        * If we don't have a salt we are encrypting a fake password for
+        * for timing purposes.  Pick an appropriate salt.
+        */
+       if (salt == NULL)
+               salt = pick_salt();
+
 # ifdef HAVE_MD5_PASSWORDS
-        if (is_md5_salt(salt))
-                crypted = md5_crypt(password, salt);
-        else
-                crypted = crypt(password, salt);
+       if (is_md5_salt(salt))
+               crypted = md5_crypt(password, salt);
+       else
+               crypted = crypt(password, salt);
 # elif defined(__hpux) && !defined(HAVE_SECUREWARE)
        if (iscomsec())
-                crypted = bigcrypt(password, salt);
-        else
-                crypted = crypt(password, salt);
+               crypted = bigcrypt(password, salt);
+       else
+               crypted = crypt(password, salt);
 # elif defined(HAVE_SECUREWARE)
-        crypted = bigcrypt(password, salt);
+       crypted = bigcrypt(password, salt);
 # else
-        crypted = crypt(password, salt);
-# endif 
+       crypted = crypt(password, salt);
+# endif
 
        return crypted;
 }
diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c
deleted file mode 100644 (file)
index 04c6bab..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2002 Tim Rice.  All rights reserved.
- * MAP_FAILED code by Solar Designer.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* $Id: xmmap.c,v 1.15 2009/02/16 04:21:40 djm Exp $ */
-
-#include "includes.h"
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-#include <sys/stat.h>
-
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-#include <errno.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "log.h"
-
-void *
-xmmap(size_t size)
-{
-#ifdef HAVE_MMAP
-       void *address;
-
-# ifdef MAP_ANON
-       address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
-           -1, (off_t)0);
-# else
-       address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED,
-           open("/dev/zero", O_RDWR), (off_t)0);
-# endif
-
-#define MM_SWAP_TEMPLATE "/var/run/sshd.mm.XXXXXXXX"
-       if (address == (void *)MAP_FAILED) {
-               char tmpname[sizeof(MM_SWAP_TEMPLATE)] = MM_SWAP_TEMPLATE;
-               int tmpfd;
-               mode_t old_umask;
-
-               old_umask = umask(0177);
-               tmpfd = mkstemp(tmpname);
-               umask(old_umask);
-               if (tmpfd == -1)
-                       fatal("mkstemp(\"%s\"): %s",
-                           MM_SWAP_TEMPLATE, strerror(errno));
-               unlink(tmpname);
-               if (ftruncate(tmpfd, size) != 0)
-                       fatal("%s: ftruncate: %s", __func__, strerror(errno));
-               address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED,
-                   tmpfd, (off_t)0);
-               close(tmpfd);
-       }
-
-       return (address);
-#else
-       fatal("%s: UsePrivilegeSeparation=yes and Compression=yes not supported",
-           __func__);
-#endif /* HAVE_MMAP */
-
-}
-
index 517345b..3908566 100755 (executable)
@@ -25,9 +25,9 @@ HOST_KEY_ED25519=$sysconfdir/ssh_host_ed25519_key
 
 
 checkkeys() {
-    if [ ! -f $HOST_KEY_RSA1 ]; then
-       ${SSH_KEYGEN} -t rsa1 -f ${HOST_KEY_RSA1} -N ""
-    fi
+@COMMENT_OUT_RSA1@    if [ ! -f $HOST_KEY_RSA1 ]; then
+@COMMENT_OUT_RSA1@     ${SSH_KEYGEN} -t rsa1 -f ${HOST_KEY_RSA1} -N ""
+@COMMENT_OUT_RSA1@    fi
     if [ ! -f $HOST_KEY_DSA ]; then
        ${SSH_KEYGEN} -t dsa -f ${HOST_KEY_DSA} -N ""
     fi
index 7b5c419..2f3a2ec 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.214 2015/08/20 22:32:42 deraadt Exp $ */
+/* $OpenBSD: packet.c,v 1.247 2017/03/11 13:07:35 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -38,8 +38,7 @@
  */
 
 #include "includes.h"
-#include <sys/param.h> /* MIN roundup */
+
 #include <sys/types.h>
 #include "openbsd-compat/sys-queue.h"
 #include <sys/socket.h>
@@ -52,6 +51,7 @@
 #include <arpa/inet.h>
 
 #include <errno.h>
+#include <netdb.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -83,7 +83,6 @@
 #include "channels.h"
 #include "ssh.h"
 #include "packet.h"
-#include "roaming.h"
 #include "ssherr.h"
 #include "sshbuf.h"
 
@@ -122,10 +121,10 @@ struct session_state {
        u_int remote_protocol_flags;
 
        /* Encryption context for receiving data.  Only used for decryption. */
-       struct sshcipher_ctx receive_context;
+       struct sshcipher_ctx *receive_context;
 
        /* Encryption context for sending data.  Only used for encryption. */
-       struct sshcipher_ctx send_context;
+       struct sshcipher_ctx *send_context;
 
        /* Buffer for raw input data from the socket. */
        struct sshbuf *input;
@@ -181,8 +180,7 @@ struct session_state {
        struct packet_state p_read, p_send;
 
        /* Volume-based rekeying */
-       u_int64_t max_blocks_in, max_blocks_out;
-       u_int32_t rekey_limit;
+       u_int64_t max_blocks_in, max_blocks_out, rekey_limit;
 
        /* Time-based rekeying */
        u_int32_t rekey_interval;       /* how often in seconds */
@@ -197,6 +195,7 @@ struct session_state {
 
        /* XXX discard incoming data after MAC error */
        u_int packet_discard;
+       size_t packet_discard_mac_already;
        struct sshmac *packet_discard_mac;
 
        /* Used in packet_read_poll2() */
@@ -205,6 +204,9 @@ struct session_state {
        /* Used in packet_send2 */
        int rekeying;
 
+       /* Used in ssh_packet_send_mux() */
+       int mux;
+
        /* Used in packet_set_interactive */
        int set_interactive_called;
 
@@ -217,6 +219,10 @@ struct session_state {
        /* SSH1 CRC compensation attack detector */
        struct deattack_ctx deattack;
 
+       /* Hook for fuzzing inbound packets */
+       ssh_packet_hook_fn *hook_in;
+       void *hook_in_ctx;
+
        TAILQ_HEAD(, packet) outgoing;
 };
 
@@ -261,6 +267,21 @@ ssh_alloc_session_state(void)
        return NULL;
 }
 
+void
+ssh_packet_set_input_hook(struct ssh *ssh, ssh_packet_hook_fn *hook, void *ctx)
+{
+       ssh->state->hook_in = hook;
+       ssh->state->hook_in_ctx = ctx;
+}
+
+/* Returns nonzero if rekeying is in progress */
+int
+ssh_packet_is_rekeying(struct ssh *ssh)
+{
+       return compat20 &&
+           (ssh->state->rekeying || (ssh->kex != NULL && ssh->kex->done == 0));
+}
+
 /*
  * Sets the descriptors used for communication.  Disables encryption until
  * packet_set_encryption_key is called.
@@ -290,7 +311,7 @@ ssh_packet_set_connection(struct ssh *ssh, int fd_in, int fd_out)
            (r = cipher_init(&state->receive_context, none,
            (const u_char *)"", 0, NULL, 0, CIPHER_DECRYPT)) != 0) {
                error("%s: cipher_init failed: %s", __func__, ssh_err(r));
-               free(ssh);
+               free(ssh); /* XXX need ssh_free_session_state? */
                return NULL;
        }
        state->newkeys[MODE_IN] = state->newkeys[MODE_OUT] = NULL;
@@ -318,6 +339,38 @@ ssh_packet_set_timeout(struct ssh *ssh, int timeout, int count)
                state->packet_timeout_ms = timeout * count * 1000;
 }
 
+void
+ssh_packet_set_mux(struct ssh *ssh)
+{
+       ssh->state->mux = 1;
+       ssh->state->rekeying = 0;
+}
+
+int
+ssh_packet_get_mux(struct ssh *ssh)
+{
+       return ssh->state->mux;
+}
+
+int
+ssh_packet_set_log_preamble(struct ssh *ssh, const char *fmt, ...)
+{
+       va_list args;
+       int r;
+
+       free(ssh->log_preamble);
+       if (fmt == NULL)
+               ssh->log_preamble = NULL;
+       else {
+               va_start(args, fmt);
+               r = vasprintf(&ssh->log_preamble, fmt, args);
+               va_end(args);
+               if (r < 0 || ssh->log_preamble == NULL)
+                       return SSH_ERR_ALLOC_FAIL;
+       }
+       return 0;
+}
+
 int
 ssh_packet_stop_discard(struct ssh *ssh)
 {
@@ -326,25 +379,28 @@ ssh_packet_stop_discard(struct ssh *ssh)
 
        if (state->packet_discard_mac) {
                char buf[1024];
+               size_t dlen = PACKET_MAX_SIZE;
 
+               if (dlen > state->packet_discard_mac_already)
+                       dlen -= state->packet_discard_mac_already;
                memset(buf, 'a', sizeof(buf));
-               while (sshbuf_len(state->incoming_packet) <
-                   PACKET_MAX_SIZE)
+               while (sshbuf_len(state->incoming_packet) < dlen)
                        if ((r = sshbuf_put(state->incoming_packet, buf,
                            sizeof(buf))) != 0)
                                return r;
                (void) mac_compute(state->packet_discard_mac,
                    state->p_read.seqnr,
-                   sshbuf_ptr(state->incoming_packet), PACKET_MAX_SIZE,
+                   sshbuf_ptr(state->incoming_packet), dlen,
                    NULL, 0);
        }
-       logit("Finished discarding for %.200s", ssh_remote_ipaddr(ssh));
+       logit("Finished discarding for %.200s port %d",
+           ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
        return SSH_ERR_MAC_INVALID;
 }
 
 static int
 ssh_packet_start_discard(struct ssh *ssh, struct sshenc *enc,
-    struct sshmac *mac, u_int packet_length, u_int discard)
+    struct sshmac *mac, size_t mac_already, u_int discard)
 {
        struct session_state *state = ssh->state;
        int r;
@@ -354,11 +410,16 @@ ssh_packet_start_discard(struct ssh *ssh, struct sshenc *enc,
                        return r;
                return SSH_ERR_MAC_INVALID;
        }
-       if (packet_length != PACKET_MAX_SIZE && mac && mac->enabled)
+       /*
+        * Record number of bytes over which the mac has already
+        * been computed in order to minimize timing attacks.
+        */
+       if (mac && mac->enabled) {
                state->packet_discard_mac = mac;
-       if (sshbuf_len(state->input) >= discard &&
-          (r = ssh_packet_stop_discard(ssh)) != 0)
-               return r;
+               state->packet_discard_mac_already = mac_already;
+       }
+       if (sshbuf_len(state->input) >= discard)
+               return ssh_packet_stop_discard(ssh);
        state->packet_discard = discard - sshbuf_len(state->input);
        return 0;
 }
@@ -372,6 +433,9 @@ ssh_packet_connection_is_on_socket(struct ssh *ssh)
        struct sockaddr_storage from, to;
        socklen_t fromlen, tolen;
 
+       if (state->connection_in == -1 || state->connection_out == -1)
+               return 0;
+
        /* filedescriptors in and out are the same, so it's a socket */
        if (state->connection_in == state->connection_out)
                return 1;
@@ -455,23 +519,61 @@ ssh_packet_get_connection_out(struct ssh *ssh)
 const char *
 ssh_remote_ipaddr(struct ssh *ssh)
 {
+       const int sock = ssh->state->connection_in;
+
        /* Check whether we have cached the ipaddr. */
-       if (ssh->remote_ipaddr == NULL)
-               ssh->remote_ipaddr = ssh_packet_connection_is_on_socket(ssh) ?
-                   get_peer_ipaddr(ssh->state->connection_in) :
-                   strdup("UNKNOWN");
-       if (ssh->remote_ipaddr == NULL)
-               return "UNKNOWN";
+       if (ssh->remote_ipaddr == NULL) {
+               if (ssh_packet_connection_is_on_socket(ssh)) {
+                       ssh->remote_ipaddr = get_peer_ipaddr(sock);
+                       ssh->remote_port = get_peer_port(sock);
+                       ssh->local_ipaddr = get_local_ipaddr(sock);
+                       ssh->local_port = get_local_port(sock);
+               } else {
+                       ssh->remote_ipaddr = strdup("UNKNOWN");
+                       ssh->remote_port = 65535;
+                       ssh->local_ipaddr = strdup("UNKNOWN");
+                       ssh->local_port = 65535;
+               }
+       }
        return ssh->remote_ipaddr;
 }
 
+/* Returns the port number of the remote host. */
+
+int
+ssh_remote_port(struct ssh *ssh)
+{
+       (void)ssh_remote_ipaddr(ssh); /* Will lookup and cache. */
+       return ssh->remote_port;
+}
+
+/*
+ * Returns the IP-address of the local host as a string.  The returned
+ * string must not be freed.
+ */
+
+const char *
+ssh_local_ipaddr(struct ssh *ssh)
+{
+       (void)ssh_remote_ipaddr(ssh); /* Will lookup and cache. */
+       return ssh->local_ipaddr;
+}
+
+/* Returns the port number of the local host. */
+
+int
+ssh_local_port(struct ssh *ssh)
+{
+       (void)ssh_remote_ipaddr(ssh); /* Will lookup and cache. */
+       return ssh->local_port;
+}
+
 /* Closes the connection and clears and frees internal data structures. */
 
 void
 ssh_packet_close(struct ssh *ssh)
 {
        struct session_state *state = ssh->state;
-       int r;
        u_int mode;
 
        if (!state->initialized)
@@ -515,14 +617,11 @@ ssh_packet_close(struct ssh *ssh)
                                inflateEnd(stream);
                }
        }
-       if ((r = cipher_cleanup(&state->send_context)) != 0)
-               error("%s: cipher_cleanup failed: %s", __func__, ssh_err(r));
-       if ((r = cipher_cleanup(&state->receive_context)) != 0)
-               error("%s: cipher_cleanup failed: %s", __func__, ssh_err(r));
-       if (ssh->remote_ipaddr) {
-               free(ssh->remote_ipaddr);
-               ssh->remote_ipaddr = NULL;
-       }
+       cipher_free(state->send_context);
+       cipher_free(state->receive_context);
+       state->send_context = state->receive_context = NULL;
+       free(ssh->remote_ipaddr);
+       ssh->remote_ipaddr = NULL;
        free(ssh->state);
        ssh->state = NULL;
 }
@@ -703,86 +802,6 @@ uncompress_buffer(struct ssh *ssh, struct sshbuf *in, struct sshbuf *out)
        /* NOTREACHED */
 }
 
-/* Serialise compression state into a blob for privsep */
-static int
-ssh_packet_get_compress_state(struct sshbuf *m, struct ssh *ssh)
-{
-       struct session_state *state = ssh->state;
-       struct sshbuf *b;
-       int r;
-
-       if ((b = sshbuf_new()) == NULL)
-               return SSH_ERR_ALLOC_FAIL;
-       if (state->compression_in_started) {
-               if ((r = sshbuf_put_string(b, &state->compression_in_stream,
-                   sizeof(state->compression_in_stream))) != 0)
-                       goto out;
-       } else if ((r = sshbuf_put_string(b, NULL, 0)) != 0)
-               goto out;
-       if (state->compression_out_started) {
-               if ((r = sshbuf_put_string(b, &state->compression_out_stream,
-                   sizeof(state->compression_out_stream))) != 0)
-                       goto out;
-       } else if ((r = sshbuf_put_string(b, NULL, 0)) != 0)
-               goto out;
-       r = sshbuf_put_stringb(m, b);
- out:
-       sshbuf_free(b);
-       return r;
-}
-
-/* Deserialise compression state from a blob for privsep */
-static int
-ssh_packet_set_compress_state(struct ssh *ssh, struct sshbuf *m)
-{
-       struct session_state *state = ssh->state;
-       struct sshbuf *b = NULL;
-       int r;
-       const u_char *inblob, *outblob;
-       size_t inl, outl;
-
-       if ((r = sshbuf_froms(m, &b)) != 0)
-               goto out;
-       if ((r = sshbuf_get_string_direct(b, &inblob, &inl)) != 0 ||
-           (r = sshbuf_get_string_direct(b, &outblob, &outl)) != 0)
-               goto out;
-       if (inl == 0)
-               state->compression_in_started = 0;
-       else if (inl != sizeof(state->compression_in_stream)) {
-               r = SSH_ERR_INTERNAL_ERROR;
-               goto out;
-       } else {
-               state->compression_in_started = 1;
-               memcpy(&state->compression_in_stream, inblob, inl);
-       }
-       if (outl == 0)
-               state->compression_out_started = 0;
-       else if (outl != sizeof(state->compression_out_stream)) {
-               r = SSH_ERR_INTERNAL_ERROR;
-               goto out;
-       } else {
-               state->compression_out_started = 1;
-               memcpy(&state->compression_out_stream, outblob, outl);
-       }
-       r = 0;
- out:
-       sshbuf_free(b);
-       return r;
-}
-
-void
-ssh_packet_set_compress_hooks(struct ssh *ssh, void *ctx,
-    void *(*allocfunc)(void *, u_int, u_int),
-    void (*freefunc)(void *, void *))
-{
-       ssh->state->compression_out_stream.zalloc = (alloc_func)allocfunc;
-       ssh->state->compression_out_stream.zfree = (free_func)freefunc;
-       ssh->state->compression_out_stream.opaque = ctx;
-       ssh->state->compression_in_stream.zalloc = (alloc_func)allocfunc;
-       ssh->state->compression_in_stream.zfree = (free_func)freefunc;
-       ssh->state->compression_in_stream.opaque = ctx;
-}
-
 /*
  * Causes any further packets to be encrypted using the given key.  The same
  * key is used for both sending and reception.  However, both directions are
@@ -814,8 +833,8 @@ ssh_packet_set_encryption_key(struct ssh *ssh, const u_char *key, u_int keylen,
            NULL, 0, CIPHER_DECRYPT) != 0))
                fatal("%s: cipher_init failed: %s", __func__, ssh_err(r));
        if (!state->cipher_warning_done &&
-           ((wmsg = cipher_warning_message(&state->send_context)) != NULL ||
-           (wmsg = cipher_warning_message(&state->send_context)) != NULL)) {
+           ((wmsg = cipher_warning_message(state->send_context)) != NULL ||
+           (wmsg = cipher_warning_message(state->send_context)) != NULL)) {
                error("Warning: %s", wmsg);
                state->cipher_warning_done = 1;
        }
@@ -861,7 +880,7 @@ ssh_packet_send1(struct ssh *ssh)
 
        /* Insert padding. Initialized to zero in packet_start1() */
        padding = 8 - len % 8;
-       if (!state->send_context.plaintext) {
+       if (!cipher_ctx_is_plaintext(state->send_context)) {
                cp = sshbuf_mutable_ptr(state->outgoing_packet);
                if (cp == NULL) {
                        r = SSH_ERR_INTERNAL_ERROR;
@@ -891,7 +910,7 @@ ssh_packet_send1(struct ssh *ssh)
        if ((r = sshbuf_reserve(state->output,
            sshbuf_len(state->outgoing_packet), &cp)) != 0)
                goto out;
-       if ((r = cipher_crypt(&state->send_context, 0, cp,
+       if ((r = cipher_crypt(state->send_context, 0, cp,
            sshbuf_ptr(state->outgoing_packet),
            sshbuf_len(state->outgoing_packet), 0, 0)) != 0)
                goto out;
@@ -922,28 +941,34 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
        struct sshenc *enc;
        struct sshmac *mac;
        struct sshcomp *comp;
-       struct sshcipher_ctx *cc;
+       struct sshcipher_ctx **ccp;
+       struct packet_state *ps;
        u_int64_t *max_blocks;
-       const char *wmsg;
+       const char *wmsg, *dir;
        int r, crypt_type;
 
        debug2("set_newkeys: mode %d", mode);
 
        if (mode == MODE_OUT) {
-               cc = &state->send_context;
+               dir = "output";
+               ccp = &state->send_context;
                crypt_type = CIPHER_ENCRYPT;
-               state->p_send.packets = state->p_send.blocks = 0;
+               ps = &state->p_send;
                max_blocks = &state->max_blocks_out;
        } else {
-               cc = &state->receive_context;
+               dir = "input";
+               ccp = &state->receive_context;
                crypt_type = CIPHER_DECRYPT;
-               state->p_read.packets = state->p_read.blocks = 0;
+               ps = &state->p_read;
                max_blocks = &state->max_blocks_in;
        }
        if (state->newkeys[mode] != NULL) {
-               debug("set_newkeys: rekeying");
-               if ((r = cipher_cleanup(cc)) != 0)
-                       return r;
+               debug("%s: rekeying after %llu %s blocks"
+                   " (%llu bytes total)", __func__,
+                   (unsigned long long)ps->blocks, dir,
+                   (unsigned long long)ps->bytes);
+               cipher_free(*ccp);
+               *ccp = NULL;
                enc  = &state->newkeys[mode]->enc;
                mac  = &state->newkeys[mode]->mac;
                comp = &state->newkeys[mode]->comp;
@@ -959,6 +984,8 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
                free(comp->name);
                free(state->newkeys[mode]);
        }
+       /* note that both bytes and the seqnr are not reset */
+       ps->packets = ps->blocks = 0;
        /* move newkeys from kex to state */
        if ((state->newkeys[mode] = ssh->kex->newkeys[mode]) == NULL)
                return SSH_ERR_INTERNAL_ERROR;
@@ -972,11 +999,11 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
        }
        mac->enabled = 1;
        DBG(debug("cipher_init_context: %d", mode));
-       if ((r = cipher_init(cc, enc->cipher, enc->key, enc->key_len,
+       if ((r = cipher_init(ccp, enc->cipher, enc->key, enc->key_len,
            enc->iv, enc->iv_len, crypt_type)) != 0)
                return r;
        if (!state->cipher_warning_done &&
-           (wmsg = cipher_warning_message(cc)) != NULL) {
+           (wmsg = cipher_warning_message(*ccp)) != NULL) {
                error("Warning: %s", wmsg);
                state->cipher_warning_done = 1;
        }
@@ -1007,11 +1034,57 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
        else
                *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
        if (state->rekey_limit)
-               *max_blocks = MIN(*max_blocks,
+               *max_blocks = MINIMUM(*max_blocks,
                    state->rekey_limit / enc->block_size);
+       debug("rekey after %llu blocks", (unsigned long long)*max_blocks);
        return 0;
 }
 
+#define MAX_PACKETS    (1U<<31)
+static int
+ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+{
+       struct session_state *state = ssh->state;
+       u_int32_t out_blocks;
+
+       /* XXX client can't cope with rekeying pre-auth */
+       if (!state->after_authentication)
+               return 0;
+
+       /* Haven't keyed yet or KEX in progress. */
+       if (ssh->kex == NULL || ssh_packet_is_rekeying(ssh))
+               return 0;
+
+       /* Peer can't rekey */
+       if (ssh->compat & SSH_BUG_NOREKEY)
+               return 0;
+
+       /*
+        * Permit one packet in or out per rekey - this allows us to
+        * make progress when rekey limits are very small.
+        */
+       if (state->p_send.packets == 0 && state->p_read.packets == 0)
+               return 0;
+
+       /* Time-based rekeying */
+       if (state->rekey_interval != 0 &&
+           (int64_t)state->rekey_time + state->rekey_interval <= monotime())
+               return 1;
+
+       /* Always rekey when MAX_PACKETS sent in either direction */
+       if (state->p_send.packets > MAX_PACKETS ||
+           state->p_read.packets > MAX_PACKETS)
+               return 1;
+
+       /* Rekey after (cipher-specific) maxiumum blocks */
+       out_blocks = ROUNDUP(outbound_packet_len,
+           state->newkeys[MODE_OUT]->enc.block_size);
+       return (state->max_blocks_out &&
+           (state->p_send.blocks + out_blocks > state->max_blocks_out)) ||
+           (state->max_blocks_in &&
+           (state->p_read.blocks > state->max_blocks_in));
+}
+
 /*
  * Delayed compression for SSH2 is enabled after authentication:
  * This happens on the server side after a SSH2_MSG_USERAUTH_SUCCESS is sent,
@@ -1050,6 +1123,20 @@ ssh_packet_enable_delayed_compress(struct ssh *ssh)
        return 0;
 }
 
+/* Used to mute debug logging for noisy packet types */
+int
+ssh_packet_log_type(u_char type)
+{
+       switch (type) {
+       case SSH2_MSG_CHANNEL_DATA:
+       case SSH2_MSG_CHANNEL_EXTENDED_DATA:
+       case SSH2_MSG_CHANNEL_WINDOW_ADJUST:
+               return 0;
+       default:
+               return 1;
+       }
+}
+
 /*
  * Finalize packet in SSH2 format (compress, mac, encrypt, enqueue)
  */
@@ -1058,7 +1145,7 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
 {
        struct session_state *state = ssh->state;
        u_char type, *cp, macbuf[SSH_DIGEST_MAX_LENGTH];
-       u_char padlen, pad = 0;
+       u_char tmp, padlen, pad = 0;
        u_int authlen = 0, aadlen = 0;
        u_int len;
        struct sshenc *enc   = NULL;
@@ -1078,7 +1165,8 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
        aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0;
 
        type = (sshbuf_ptr(state->outgoing_packet))[5];
-
+       if (ssh_packet_log_type(type))
+               debug3("send packet: type %u", type);
 #ifdef PACKET_DEBUG
        fprintf(stderr, "plain:     ");
        sshbuf_dump(state->outgoing_packet, stderr);
@@ -1115,19 +1203,29 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
        if (padlen < 4)
                padlen += block_size;
        if (state->extra_pad) {
-               /* will wrap if extra_pad+padlen > 255 */
+               tmp = state->extra_pad;
                state->extra_pad =
-                   roundup(state->extra_pad, block_size);
-               pad = state->extra_pad -
-                   ((len + padlen) % state->extra_pad);
+                   ROUNDUP(state->extra_pad, block_size);
+               /* check if roundup overflowed */
+               if (state->extra_pad < tmp)
+                       return SSH_ERR_INVALID_ARGUMENT;
+               tmp = (len + padlen) % state->extra_pad;
+               /* Check whether pad calculation below will underflow */
+               if (tmp > state->extra_pad)
+                       return SSH_ERR_INVALID_ARGUMENT;
+               pad = state->extra_pad - tmp;
                DBG(debug3("%s: adding %d (len %d padlen %d extra_pad %d)",
                    __func__, pad, len, padlen, state->extra_pad));
+               tmp = padlen;
                padlen += pad;
+               /* Check whether padlen calculation overflowed */
+               if (padlen < tmp)
+                       return SSH_ERR_INVALID_ARGUMENT; /* overflow */
                state->extra_pad = 0;
        }
        if ((r = sshbuf_reserve(state->outgoing_packet, padlen, &cp)) != 0)
                goto out;
-       if (enc && !state->send_context.plaintext) {
+       if (enc && !cipher_ctx_is_plaintext(state->send_context)) {
                /* random padding */
                arc4random_buf(cp, padlen);
        } else {
@@ -1159,7 +1257,7 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
        if ((r = sshbuf_reserve(state->output,
            sshbuf_len(state->outgoing_packet) + authlen, &cp)) != 0)
                goto out;
-       if ((r = cipher_crypt(&state->send_context, state->p_send.seqnr, cp,
+       if ((r = cipher_crypt(state->send_context, state->p_send.seqnr, cp,
            sshbuf_ptr(state->outgoing_packet),
            len - aadlen, aadlen, authlen)) != 0)
                goto out;
@@ -1200,34 +1298,58 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
        return r;
 }
 
+/* returns non-zero if the specified packet type is usec by KEX */
+static int
+ssh_packet_type_is_kex(u_char type)
+{
+       return
+           type >= SSH2_MSG_TRANSPORT_MIN &&
+           type <= SSH2_MSG_TRANSPORT_MAX &&
+           type != SSH2_MSG_SERVICE_REQUEST &&
+           type != SSH2_MSG_SERVICE_ACCEPT &&
+           type != SSH2_MSG_EXT_INFO;
+}
+
 int
 ssh_packet_send2(struct ssh *ssh)
 {
        struct session_state *state = ssh->state;
        struct packet *p;
        u_char type;
-       int r;
+       int r, need_rekey;
 
+       if (sshbuf_len(state->outgoing_packet) < 6)
+               return SSH_ERR_INTERNAL_ERROR;
        type = sshbuf_ptr(state->outgoing_packet)[5];
+       need_rekey = !ssh_packet_type_is_kex(type) &&
+           ssh_packet_need_rekeying(ssh, sshbuf_len(state->outgoing_packet));
 
-       /* during rekeying we can only send key exchange messages */
-       if (state->rekeying) {
-               if ((type < SSH2_MSG_TRANSPORT_MIN) ||
-                   (type > SSH2_MSG_TRANSPORT_MAX) ||
-                   (type == SSH2_MSG_SERVICE_REQUEST) ||
-                   (type == SSH2_MSG_SERVICE_ACCEPT)) {
-                       debug("enqueue packet: %u", type);
-                       p = calloc(1, sizeof(*p));
-                       if (p == NULL)
-                               return SSH_ERR_ALLOC_FAIL;
-                       p->type = type;
-                       p->payload = state->outgoing_packet;
-                       TAILQ_INSERT_TAIL(&state->outgoing, p, next);
-                       state->outgoing_packet = sshbuf_new();
-                       if (state->outgoing_packet == NULL)
-                               return SSH_ERR_ALLOC_FAIL;
-                       return 0;
+       /*
+        * During rekeying we can only send key exchange messages.
+        * Queue everything else.
+        */
+       if ((need_rekey || state->rekeying) && !ssh_packet_type_is_kex(type)) {
+               if (need_rekey)
+                       debug3("%s: rekex triggered", __func__);
+               debug("enqueue packet: %u", type);
+               p = calloc(1, sizeof(*p));
+               if (p == NULL)
+                       return SSH_ERR_ALLOC_FAIL;
+               p->type = type;
+               p->payload = state->outgoing_packet;
+               TAILQ_INSERT_TAIL(&state->outgoing, p, next);
+               state->outgoing_packet = sshbuf_new();
+               if (state->outgoing_packet == NULL)
+                       return SSH_ERR_ALLOC_FAIL;
+               if (need_rekey) {
+                       /*
+                        * This packet triggered a rekey, so send the
+                        * KEXINIT now.
+                        * NB. reenters this function via kex_start_rekex().
+                        */
+                       return kex_start_rekex(ssh);
                }
+               return 0;
        }
 
        /* rekeying starts with sending KEXINIT */
@@ -1243,10 +1365,22 @@ ssh_packet_send2(struct ssh *ssh)
                state->rekey_time = monotime();
                while ((p = TAILQ_FIRST(&state->outgoing))) {
                        type = p->type;
+                       /*
+                        * If this packet triggers a rekex, then skip the
+                        * remaining packets in the queue for now.
+                        * NB. re-enters this function via kex_start_rekex.
+                        */
+                       if (ssh_packet_need_rekeying(ssh,
+                           sshbuf_len(p->payload))) {
+                               debug3("%s: queued packet triggered rekex",
+                                   __func__);
+                               return kex_start_rekex(ssh);
+                       }
                        debug("dequeue packet: %u", type);
                        sshbuf_free(state->outgoing_packet);
                        state->outgoing_packet = p->payload;
                        TAILQ_REMOVE(&state->outgoing, p, next);
+                       memset(p, 0, sizeof(*p));
                        free(p);
                        if ((r = ssh_packet_send2_wrapped(ssh)) != 0)
                                return r;
@@ -1265,7 +1399,7 @@ int
 ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
 {
        struct session_state *state = ssh->state;
-       int len, r, ms_remain, cont;
+       int len, r, ms_remain;
        fd_set *setp;
        char buf[8192];
        struct timeval timeout, start, *timeoutp = NULL;
@@ -1332,14 +1466,12 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
                                break;
                        }
                }
-               if (r == 0)
-                       return SSH_ERR_CONN_TIMEOUT;
+               if (r == 0) {
+                       r = SSH_ERR_CONN_TIMEOUT;
+                       goto out;
+               }
                /* Read data from the socket. */
-               do {
-                       cont = 0;
-                       len = roaming_read(state->connection_in, buf,
-                           sizeof(buf), &cont);
-               } while (len == 0 && cont);
+               len = read(state->connection_in, buf, sizeof(buf));
                if (len == 0) {
                        r = SSH_ERR_CONN_CLOSED;
                        goto out;
@@ -1442,7 +1574,7 @@ ssh_packet_read_poll1(struct ssh *ssh, u_char *typep)
         * (C)1998 CORE-SDI, Buenos Aires Argentina
         * Ariel Futoransky(futo@core-sdi.com)
         */
-       if (!state->receive_context.plaintext) {
+       if (!cipher_ctx_is_plaintext(state->receive_context)) {
                emsg = NULL;
                switch (detect_attack(&state->deattack,
                    sshbuf_ptr(state->input), padded_len)) {
@@ -1471,7 +1603,7 @@ ssh_packet_read_poll1(struct ssh *ssh, u_char *typep)
        sshbuf_reset(state->incoming_packet);
        if ((r = sshbuf_reserve(state->incoming_packet, padded_len, &p)) != 0)
                goto out;
-       if ((r = cipher_crypt(&state->receive_context, 0, p,
+       if ((r = cipher_crypt(state->receive_context, 0, p,
            sshbuf_ptr(state->input), padded_len, 0, 0)) != 0)
                goto out;
 
@@ -1539,18 +1671,59 @@ ssh_packet_read_poll1(struct ssh *ssh, u_char *typep)
        return r;
 }
 
+static int
+ssh_packet_read_poll2_mux(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
+{
+       struct session_state *state = ssh->state;
+       const u_char *cp;
+       size_t need;
+       int r;
+
+       if (ssh->kex)
+               return SSH_ERR_INTERNAL_ERROR;
+       *typep = SSH_MSG_NONE;
+       cp = sshbuf_ptr(state->input);
+       if (state->packlen == 0) {
+               if (sshbuf_len(state->input) < 4 + 1)
+                       return 0; /* packet is incomplete */
+               state->packlen = PEEK_U32(cp);
+               if (state->packlen < 4 + 1 ||
+                   state->packlen > PACKET_MAX_SIZE)
+                       return SSH_ERR_MESSAGE_INCOMPLETE;
+       }
+       need = state->packlen + 4;
+       if (sshbuf_len(state->input) < need)
+               return 0; /* packet is incomplete */
+       sshbuf_reset(state->incoming_packet);
+       if ((r = sshbuf_put(state->incoming_packet, cp + 4,
+           state->packlen)) != 0 ||
+           (r = sshbuf_consume(state->input, need)) != 0 ||
+           (r = sshbuf_get_u8(state->incoming_packet, NULL)) != 0 ||
+           (r = sshbuf_get_u8(state->incoming_packet, typep)) != 0)
+               return r;
+       if (ssh_packet_log_type(*typep))
+               debug3("%s: type %u", __func__, *typep);
+       /* sshbuf_dump(state->incoming_packet, stderr); */
+       /* reset for next packet */
+       state->packlen = 0;
+       return r;
+}
+
 int
 ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
 {
        struct session_state *state = ssh->state;
        u_int padlen, need;
-       u_char *cp, macbuf[SSH_DIGEST_MAX_LENGTH];
+       u_char *cp;
        u_int maclen, aadlen = 0, authlen = 0, block_size;
        struct sshenc *enc   = NULL;
        struct sshmac *mac   = NULL;
        struct sshcomp *comp = NULL;
        int r;
 
+       if (state->mux)
+               return ssh_packet_read_poll2_mux(ssh, typep, seqnr_p);
+
        *typep = SSH_MSG_NONE;
 
        if (state->packet_discard)
@@ -1569,7 +1742,7 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
        aadlen = (mac && mac->enabled && mac->etm) || authlen ? 4 : 0;
 
        if (aadlen && state->packlen == 0) {
-               if (cipher_get_length(&state->receive_context,
+               if (cipher_get_length(state->receive_context,
                    &state->packlen, state->p_read.seqnr,
                    sshbuf_ptr(state->input), sshbuf_len(state->input)) != 0)
                        return 0;
@@ -1595,7 +1768,7 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
                if ((r = sshbuf_reserve(state->incoming_packet, block_size,
                    &cp)) != 0)
                        goto out;
-               if ((r = cipher_crypt(&state->receive_context,
+               if ((r = cipher_crypt(state->receive_context,
                    state->p_send.seqnr, cp, sshbuf_ptr(state->input),
                    block_size, 0, 0)) != 0)
                        goto out;
@@ -1609,8 +1782,8 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
                        sshbuf_dump(state->incoming_packet, stderr);
 #endif
                        logit("Bad packet length %u.", state->packlen);
-                       return ssh_packet_start_discard(ssh, enc, mac,
-                           state->packlen, PACKET_MAX_SIZE);
+                       return ssh_packet_start_discard(ssh, enc, mac, 0,
+                           PACKET_MAX_SIZE);
                }
                if ((r = sshbuf_consume(state->input, block_size)) != 0)
                        goto out;
@@ -1632,8 +1805,8 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
        if (need % block_size != 0) {
                logit("padding error: need %d block %d mod %d",
                    need, block_size, need % block_size);
-               return ssh_packet_start_discard(ssh, enc, mac,
-                   state->packlen, PACKET_MAX_SIZE - block_size);
+               return ssh_packet_start_discard(ssh, enc, mac, 0,
+                   PACKET_MAX_SIZE - block_size);
        }
        /*
         * check if the entire packet has been received and
@@ -1644,46 +1817,46 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
         * 'maclen' bytes of message authentication code.
         */
        if (sshbuf_len(state->input) < aadlen + need + authlen + maclen)
-               return 0;
+               return 0; /* packet is incomplete */
 #ifdef PACKET_DEBUG
        fprintf(stderr, "read_poll enc/full: ");
        sshbuf_dump(state->input, stderr);
 #endif
-       /* EtM: compute mac over encrypted input */
+       /* EtM: check mac over encrypted input */
        if (mac && mac->enabled && mac->etm) {
-               if ((r = mac_compute(mac, state->p_read.seqnr,
+               if ((r = mac_check(mac, state->p_read.seqnr,
                    sshbuf_ptr(state->input), aadlen + need,
-                   macbuf, sizeof(macbuf))) != 0)
+                   sshbuf_ptr(state->input) + aadlen + need + authlen,
+                   maclen)) != 0) {
+                       if (r == SSH_ERR_MAC_INVALID)
+                               logit("Corrupted MAC on input.");
                        goto out;
+               }
        }
        if ((r = sshbuf_reserve(state->incoming_packet, aadlen + need,
            &cp)) != 0)
                goto out;
-       if ((r = cipher_crypt(&state->receive_context, state->p_read.seqnr, cp,
+       if ((r = cipher_crypt(state->receive_context, state->p_read.seqnr, cp,
            sshbuf_ptr(state->input), need, aadlen, authlen)) != 0)
                goto out;
        if ((r = sshbuf_consume(state->input, aadlen + need + authlen)) != 0)
                goto out;
-       /*
-        * compute MAC over seqnr and packet,
-        * increment sequence number for incoming packet
-        */
        if (mac && mac->enabled) {
-               if (!mac->etm)
-                       if ((r = mac_compute(mac, state->p_read.seqnr,
-                           sshbuf_ptr(state->incoming_packet),
-                           sshbuf_len(state->incoming_packet),
-                           macbuf, sizeof(macbuf))) != 0)
+               /* Not EtM: check MAC over cleartext */
+               if (!mac->etm && (r = mac_check(mac, state->p_read.seqnr,
+                   sshbuf_ptr(state->incoming_packet),
+                   sshbuf_len(state->incoming_packet),
+                   sshbuf_ptr(state->input), maclen)) != 0) {
+                       if (r != SSH_ERR_MAC_INVALID)
                                goto out;
-               if (timingsafe_bcmp(macbuf, sshbuf_ptr(state->input),
-                   mac->mac_len) != 0) {
                        logit("Corrupted MAC on input.");
-                       if (need > PACKET_MAX_SIZE)
+                       if (need + block_size > PACKET_MAX_SIZE)
                                return SSH_ERR_INTERNAL_ERROR;
                        return ssh_packet_start_discard(ssh, enc, mac,
-                           state->packlen, PACKET_MAX_SIZE - need);
+                           sshbuf_len(state->incoming_packet),
+                           PACKET_MAX_SIZE - need - block_size);
                }
-
+               /* Remove MAC from input buffer */
                DBG(debug("MAC #%d ok", state->p_read.seqnr));
                if ((r = sshbuf_consume(state->input, mac->mac_len)) != 0)
                        goto out;
@@ -1734,6 +1907,8 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
         */
        if ((r = sshbuf_get_u8(state->incoming_packet, typep)) != 0)
                goto out;
+       if (ssh_packet_log_type(*typep))
+               debug3("receive packet: type %u", *typep);
        if (*typep < SSH2_MSG_MIN || *typep >= SSH2_MSG_LOCAL_MIN) {
                if ((r = sshpkt_disconnect(ssh,
                    "Invalid ssh2 packet type: %d", *typep)) != 0 ||
@@ -1741,9 +1916,11 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
                        return r;
                return SSH_ERR_PROTOCOL_ERROR;
        }
-       if (*typep == SSH2_MSG_NEWKEYS)
-               r = ssh_set_newkeys(ssh, MODE_IN);
-       else if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
+       if (state->hook_in != NULL &&
+           (r = state->hook_in(ssh, state->incoming_packet, typep,
+           state->hook_in_ctx)) != 0)
+               return r;
+       if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
                r = ssh_packet_enable_delayed_compress(ssh);
        else
                r = 0;
@@ -1753,6 +1930,13 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
 #endif
        /* reset for next packet */
        state->packlen = 0;
+
+       /* do we need to rekey? */
+       if (ssh_packet_need_rekeying(ssh, 0)) {
+               debug3("%s: rekex triggered", __func__);
+               if ((r = kex_start_rekex(ssh)) != 0)
+                       return r;
+       }
  out:
        return r;
 }
@@ -1783,8 +1967,7 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
                                if ((r = sshpkt_get_u8(ssh, NULL)) != 0 ||
                                    (r = sshpkt_get_string(ssh, &msg, NULL)) != 0 ||
                                    (r = sshpkt_get_string(ssh, NULL, NULL)) != 0) {
-                                       if (msg)
-                                               free(msg);
+                                       free(msg);
                                        return r;
                                }
                                debug("Remote: %.900s", msg);
@@ -1798,8 +1981,9 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
                                do_log2(ssh->state->server_side &&
                                    reason == SSH2_DISCONNECT_BY_APPLICATION ?
                                    SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
-                                   "Received disconnect from %s: %u: %.400s",
-                                   ssh_remote_ipaddr(ssh), reason, msg);
+                                   "Received disconnect from %s port %d:"
+                                   "%u: %.400s", ssh_remote_ipaddr(ssh),
+                                   ssh_remote_port(ssh), reason, msg);
                                free(msg);
                                return SSH_ERR_DISCONNECTED;
                        case SSH2_MSG_UNIMPLEMENTED:
@@ -1827,8 +2011,9 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
                        case SSH_MSG_DISCONNECT:
                                if ((r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
                                        return r;
-                               error("Received disconnect from %s: %.400s",
-                                   ssh_remote_ipaddr(ssh), msg);
+                               error("Received disconnect from %s port %d: "
+                                   "%.400s", ssh_remote_ipaddr(ssh),
+                                   ssh_remote_port(ssh), msg);
                                free(msg);
                                return SSH_ERR_DISCONNECTED;
                        default:
@@ -1910,29 +2095,36 @@ ssh_packet_send_debug(struct ssh *ssh, const char *fmt,...)
                fatal("%s: %s", __func__, ssh_err(r));
 }
 
+static void
+fmt_connection_id(struct ssh *ssh, char *s, size_t l)
+{
+       snprintf(s, l, "%.200s%s%s port %d",
+           ssh->log_preamble ? ssh->log_preamble : "",
+           ssh->log_preamble ? " " : "",
+           ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
+}
+
 /*
  * Pretty-print connection-terminating errors and exit.
  */
 void
 sshpkt_fatal(struct ssh *ssh, const char *tag, int r)
 {
+       char remote_id[512];
+
+       fmt_connection_id(ssh, remote_id, sizeof(remote_id));
+
        switch (r) {
        case SSH_ERR_CONN_CLOSED:
-               logit("Connection closed by %.200s", ssh_remote_ipaddr(ssh));
-               cleanup_exit(255);
+               logdie("Connection closed by %s", remote_id);
        case SSH_ERR_CONN_TIMEOUT:
-               logit("Connection to %.200s timed out", ssh_remote_ipaddr(ssh));
-               cleanup_exit(255);
+               logdie("Connection %s %s timed out",
+                   ssh->state->server_side ? "from" : "to", remote_id);
        case SSH_ERR_DISCONNECTED:
-               logit("Disconnected from %.200s",
-                   ssh_remote_ipaddr(ssh));
-               cleanup_exit(255);
+               logdie("Disconnected from %s", remote_id);
        case SSH_ERR_SYSTEM_ERROR:
-               if (errno == ECONNRESET) {
-                       logit("Connection reset by %.200s",
-                           ssh_remote_ipaddr(ssh));
-                       cleanup_exit(255);
-               }
+               if (errno == ECONNRESET)
+                       logdie("Connection reset by %s", remote_id);
                /* FALLTHROUGH */
        case SSH_ERR_NO_CIPHER_ALG_MATCH:
        case SSH_ERR_NO_MAC_ALG_MATCH:
@@ -1940,15 +2132,16 @@ sshpkt_fatal(struct ssh *ssh, const char *tag, int r)
        case SSH_ERR_NO_KEX_ALG_MATCH:
        case SSH_ERR_NO_HOSTKEY_ALG_MATCH:
                if (ssh && ssh->kex && ssh->kex->failed_choice) {
-                       fatal("Unable to negotiate with %.200s: %s. "
-                           "Their offer: %s", ssh_remote_ipaddr(ssh),
-                           ssh_err(r), ssh->kex->failed_choice);
+                       logdie("Unable to negotiate with %s: %s. "
+                           "Their offer: %s", remote_id, ssh_err(r),
+                           ssh->kex->failed_choice);
                }
                /* FALLTHROUGH */
        default:
-               fatal("%s%sConnection to %.200s: %s",
+               logdie("%s%sConnection %s %s: %s",
                    tag != NULL ? tag : "", tag != NULL ? ": " : "",
-                   ssh_remote_ipaddr(ssh), ssh_err(r));
+                   ssh->state->server_side ? "from" : "to",
+                   remote_id, ssh_err(r));
        }
 }
 
@@ -1961,7 +2154,7 @@ sshpkt_fatal(struct ssh *ssh, const char *tag, int r)
 void
 ssh_packet_disconnect(struct ssh *ssh, const char *fmt,...)
 {
-       char buf[1024];
+       char buf[1024], remote_id[512];
        va_list args;
        static int disconnecting = 0;
        int r;
@@ -1974,12 +2167,13 @@ ssh_packet_disconnect(struct ssh *ssh, const char *fmt,...)
         * Format the message.  Note that the caller must make sure the
         * message is of limited size.
         */
+       fmt_connection_id(ssh, remote_id, sizeof(remote_id));
        va_start(args, fmt);
        vsnprintf(buf, sizeof(buf), fmt, args);
        va_end(args);
 
        /* Display the error locally */
-       logit("Disconnecting: %.100s", buf);
+       logit("Disconnecting %s: %.100s", remote_id, buf);
 
        /*
         * Send the disconnect message to the other side, and wait
@@ -2005,19 +2199,18 @@ ssh_packet_write_poll(struct ssh *ssh)
 {
        struct session_state *state = ssh->state;
        int len = sshbuf_len(state->output);
-       int cont, r;
+       int r;
 
        if (len > 0) {
-               cont = 0;
-               len = roaming_write(state->connection_out,
-                   sshbuf_ptr(state->output), len, &cont);
+               len = write(state->connection_out,
+                   sshbuf_ptr(state->output), len);
                if (len == -1) {
                        if (errno == EINTR || errno == EAGAIN ||
                            errno == EWOULDBLOCK)
                                return 0;
                        return SSH_ERR_SYSTEM_ERROR;
                }
-               if (len == 0 && !cont)
+               if (len == 0)
                        return SSH_ERR_CONN_CLOSED;
                if ((r = sshbuf_consume(state->output, len)) != 0)
                        return r;
@@ -2041,7 +2234,10 @@ ssh_packet_write_wait(struct ssh *ssh)
            NFDBITS), sizeof(fd_mask));
        if (setp == NULL)
                return SSH_ERR_ALLOC_FAIL;
-       ssh_packet_write_poll(ssh);
+       if ((r = ssh_packet_write_poll(ssh)) != 0) {
+               free(setp);
+               return r;
+       }
        while (ssh_packet_have_data_to_write(ssh)) {
                memset(setp, 0, howmany(state->connection_out + 1,
                    NFDBITS) * sizeof(fd_mask));
@@ -2229,30 +2425,11 @@ ssh_packet_send_ignore(struct ssh *ssh, int nbytes)
        }
 }
 
-#define MAX_PACKETS    (1U<<31)
-int
-ssh_packet_need_rekeying(struct ssh *ssh)
-{
-       struct session_state *state = ssh->state;
-
-       if (ssh->compat & SSH_BUG_NOREKEY)
-               return 0;
-       return
-           (state->p_send.packets > MAX_PACKETS) ||
-           (state->p_read.packets > MAX_PACKETS) ||
-           (state->max_blocks_out &&
-               (state->p_send.blocks > state->max_blocks_out)) ||
-           (state->max_blocks_in &&
-               (state->p_read.blocks > state->max_blocks_in)) ||
-           (state->rekey_interval != 0 && state->rekey_time +
-                state->rekey_interval <= monotime());
-}
-
 void
-ssh_packet_set_rekey_limits(struct ssh *ssh, u_int32_t bytes, time_t seconds)
+ssh_packet_set_rekey_limits(struct ssh *ssh, u_int64_t bytes, u_int32_t seconds)
 {
-       debug3("rekey after %lld bytes, %d seconds", (long long)bytes,
-           (int)seconds);
+       debug3("rekey after %llu bytes, %u seconds", (unsigned long long)bytes,
+           (unsigned int)seconds);
        ssh->state->rekey_limit = bytes;
        ssh->state->rekey_interval = seconds;
 }
@@ -2291,77 +2468,18 @@ ssh_packet_get_output(struct ssh *ssh)
        return (void *)ssh->state->output;
 }
 
-/* XXX TODO update roaming to new API (does not work anyway) */
-/*
- * Save the state for the real connection, and use a separate state when
- * resuming a suspended connection.
- */
-void
-ssh_packet_backup_state(struct ssh *ssh,
-    struct ssh *backup_state)
-{
-       struct ssh *tmp;
-
-       close(ssh->state->connection_in);
-       ssh->state->connection_in = -1;
-       close(ssh->state->connection_out);
-       ssh->state->connection_out = -1;
-       if (backup_state)
-               tmp = backup_state;
-       else
-               tmp = ssh_alloc_session_state();
-       backup_state = ssh;
-       ssh = tmp;
-}
-
-/* XXX FIXME FIXME FIXME */
-/*
- * Swap in the old state when resuming a connecion.
- */
-void
-ssh_packet_restore_state(struct ssh *ssh,
-    struct ssh *backup_state)
-{
-       struct ssh *tmp;
-       u_int len;
-       int r;
-
-       tmp = backup_state;
-       backup_state = ssh;
-       ssh = tmp;
-       ssh->state->connection_in = backup_state->state->connection_in;
-       backup_state->state->connection_in = -1;
-       ssh->state->connection_out = backup_state->state->connection_out;
-       backup_state->state->connection_out = -1;
-       len = sshbuf_len(backup_state->state->input);
-       if (len > 0) {
-               if ((r = sshbuf_putb(ssh->state->input,
-                   backup_state->state->input)) != 0)
-                       fatal("%s: %s", __func__, ssh_err(r));
-               sshbuf_reset(backup_state->state->input);
-               add_recv_bytes(len);
-       }
-}
-
 /* Reset after_authentication and reset compression in post-auth privsep */
 static int
 ssh_packet_set_postauth(struct ssh *ssh)
 {
-       struct sshcomp *comp;
-       int r, mode;
+       int r;
 
        debug("%s: called", __func__);
        /* This was set in net child, but is not visible in user child */
        ssh->state->after_authentication = 1;
        ssh->state->rekeying = 0;
-       for (mode = 0; mode < MODE_MAX; mode++) {
-               if (ssh->state->newkeys[mode] == NULL)
-                       continue;
-               comp = &ssh->state->newkeys[mode]->comp;
-               if (comp && comp->enabled &&
-                   (r = ssh_packet_init_compression(ssh)) != 0)
-                       return r;
-       }
+       if ((r = ssh_packet_enable_delayed_compress(ssh)) != 0)
+               return r;
        return 0;
 }
 
@@ -2404,8 +2522,8 @@ newkeys_to_blob(struct sshbuf *m, struct ssh *ssh, int mode)
        enc = &newkey->enc;
        mac = &newkey->mac;
        comp = &newkey->comp;
-       cc = (mode == MODE_OUT) ? &ssh->state->send_context :
-           &ssh->state->receive_context;
+       cc = (mode == MODE_OUT) ? ssh->state->send_context :
+           ssh->state->receive_context;
        if ((r = cipher_get_keyiv(cc, enc->iv, enc->iv_len)) != 0)
                return r;
        if ((b = sshbuf_new()) == NULL)
@@ -2425,13 +2543,11 @@ newkeys_to_blob(struct sshbuf *m, struct ssh *ssh, int mode)
                        goto out;
        }
        if ((r = sshbuf_put_u32(b, comp->type)) != 0 ||
-           (r = sshbuf_put_u32(b, comp->enabled)) != 0 ||
            (r = sshbuf_put_cstring(b, comp->name)) != 0)
                goto out;
        r = sshbuf_put_stringb(m, b);
  out:
-       if (b != NULL)
-               sshbuf_free(b);
+       sshbuf_free(b);
        return r;
 }
 
@@ -2445,24 +2561,24 @@ ssh_packet_get_state(struct ssh *ssh, struct sshbuf *m)
        int r, ssh1cipher;
 
        if (!compat20) {
-               ssh1cipher = cipher_get_number(state->receive_context.cipher);
-               slen = cipher_get_keyiv_len(&state->send_context);
-               rlen = cipher_get_keyiv_len(&state->receive_context);
+               ssh1cipher = cipher_ctx_get_number(state->receive_context);
+               slen = cipher_get_keyiv_len(state->send_context);
+               rlen = cipher_get_keyiv_len(state->receive_context);
                if ((r = sshbuf_put_u32(m, state->remote_protocol_flags)) != 0 ||
                    (r = sshbuf_put_u32(m, ssh1cipher)) != 0 ||
                    (r = sshbuf_put_string(m, state->ssh1_key, state->ssh1_keylen)) != 0 ||
                    (r = sshbuf_put_u32(m, slen)) != 0 ||
                    (r = sshbuf_reserve(m, slen, &p)) != 0 ||
-                   (r = cipher_get_keyiv(&state->send_context, p, slen)) != 0 ||
+                   (r = cipher_get_keyiv(state->send_context, p, slen)) != 0 ||
                    (r = sshbuf_put_u32(m, rlen)) != 0 ||
                    (r = sshbuf_reserve(m, rlen, &p)) != 0 ||
-                   (r = cipher_get_keyiv(&state->receive_context, p, rlen)) != 0)
+                   (r = cipher_get_keyiv(state->receive_context, p, rlen)) != 0)
                        return r;
        } else {
                if ((r = kex_to_blob(m, ssh->kex)) != 0 ||
                    (r = newkeys_to_blob(m, ssh, MODE_OUT)) != 0 ||
                    (r = newkeys_to_blob(m, ssh, MODE_IN)) != 0 ||
-                   (r = sshbuf_put_u32(m, state->rekey_limit)) != 0 ||
+                   (r = sshbuf_put_u64(m, state->rekey_limit)) != 0 ||
                    (r = sshbuf_put_u32(m, state->rekey_interval)) != 0 ||
                    (r = sshbuf_put_u32(m, state->p_send.seqnr)) != 0 ||
                    (r = sshbuf_put_u64(m, state->p_send.blocks)) != 0 ||
@@ -2475,29 +2591,22 @@ ssh_packet_get_state(struct ssh *ssh, struct sshbuf *m)
                        return r;
        }
 
-       slen = cipher_get_keycontext(&state->send_context, NULL);
-       rlen = cipher_get_keycontext(&state->receive_context, NULL);
+       slen = cipher_get_keycontext(state->send_context, NULL);
+       rlen = cipher_get_keycontext(state->receive_context, NULL);
        if ((r = sshbuf_put_u32(m, slen)) != 0 ||
            (r = sshbuf_reserve(m, slen, &p)) != 0)
                return r;
-       if (cipher_get_keycontext(&state->send_context, p) != (int)slen)
+       if (cipher_get_keycontext(state->send_context, p) != (int)slen)
                return SSH_ERR_INTERNAL_ERROR;
        if ((r = sshbuf_put_u32(m, rlen)) != 0 ||
            (r = sshbuf_reserve(m, rlen, &p)) != 0)
                return r;
-       if (cipher_get_keycontext(&state->receive_context, p) != (int)rlen)
+       if (cipher_get_keycontext(state->receive_context, p) != (int)rlen)
                return SSH_ERR_INTERNAL_ERROR;
-
-       if ((r = ssh_packet_get_compress_state(m, ssh)) != 0 ||
-           (r = sshbuf_put_stringb(m, state->input)) != 0 ||
+       if ((r = sshbuf_put_stringb(m, state->input)) != 0 ||
            (r = sshbuf_put_stringb(m, state->output)) != 0)
                return r;
 
-       if (compat20) {
-               if ((r = sshbuf_put_u64(m, get_sent_bytes())) != 0 ||
-                   (r = sshbuf_put_u64(m, get_recv_bytes())) != 0)
-                       return r;
-       }
        return 0;
 }
 
@@ -2548,7 +2657,6 @@ newkeys_from_blob(struct sshbuf *m, struct ssh *ssh, int mode)
                mac->key_len = maclen;
        }
        if ((r = sshbuf_get_u32(b, &comp->type)) != 0 ||
-           (r = sshbuf_get_u32(b, (u_int *)&comp->enabled)) != 0 ||
            (r = sshbuf_get_cstring(b, &comp->name, NULL)) != 0)
                goto out;
        if (enc->name == NULL ||
@@ -2566,10 +2674,8 @@ newkeys_from_blob(struct sshbuf *m, struct ssh *ssh, int mode)
        newkey = NULL;
        r = 0;
  out:
-       if (newkey != NULL)
-               free(newkey);
-       if (b != NULL)
-               sshbuf_free(b);
+       free(newkey);
+       sshbuf_free(b);
        return r;
 }
 
@@ -2602,10 +2708,8 @@ kex_from_blob(struct sshbuf *m, struct kex **kexp)
  out:
        if (r != 0 || kexp == NULL) {
                if (kex != NULL) {
-                       if (kex->my != NULL)
-                               sshbuf_free(kex->my);
-                       if (kex->peer != NULL)
-                               sshbuf_free(kex->peer);
+                       sshbuf_free(kex->my);
+                       sshbuf_free(kex->peer);
                        free(kex);
                }
                if (kexp != NULL)
@@ -2628,7 +2732,6 @@ ssh_packet_set_state(struct ssh *ssh, struct sshbuf *m)
        size_t ssh1keylen, rlen, slen, ilen, olen;
        int r;
        u_int ssh1cipher = 0;
-       u_int64_t sent_bytes = 0, recv_bytes = 0;
 
        if (!compat20) {
                if ((r = sshbuf_get_u32(m, &state->remote_protocol_flags)) != 0 ||
@@ -2641,17 +2744,17 @@ ssh_packet_set_state(struct ssh *ssh, struct sshbuf *m)
                        return SSH_ERR_KEY_UNKNOWN_CIPHER;
                ssh_packet_set_encryption_key(ssh, ssh1key, ssh1keylen,
                    (int)ssh1cipher);
-               if (cipher_get_keyiv_len(&state->send_context) != (int)slen ||
-                   cipher_get_keyiv_len(&state->receive_context) != (int)rlen)
+               if (cipher_get_keyiv_len(state->send_context) != (int)slen ||
+                   cipher_get_keyiv_len(state->receive_context) != (int)rlen)
                        return SSH_ERR_INVALID_FORMAT;
-               if ((r = cipher_set_keyiv(&state->send_context, ivout)) != 0 ||
-                   (r = cipher_set_keyiv(&state->receive_context, ivin)) != 0)
+               if ((r = cipher_set_keyiv(state->send_context, ivout)) != 0 ||
+                   (r = cipher_set_keyiv(state->receive_context, ivin)) != 0)
                        return r;
        } else {
                if ((r = kex_from_blob(m, &ssh->kex)) != 0 ||
                    (r = newkeys_from_blob(m, ssh, MODE_OUT)) != 0 ||
                    (r = newkeys_from_blob(m, ssh, MODE_IN)) != 0 ||
-                   (r = sshbuf_get_u32(m, &state->rekey_limit)) != 0 ||
+                   (r = sshbuf_get_u64(m, &state->rekey_limit)) != 0 ||
                    (r = sshbuf_get_u32(m, &state->rekey_interval)) != 0 ||
                    (r = sshbuf_get_u32(m, &state->p_send.seqnr)) != 0 ||
                    (r = sshbuf_get_u64(m, &state->p_send.blocks)) != 0 ||
@@ -2675,14 +2778,13 @@ ssh_packet_set_state(struct ssh *ssh, struct sshbuf *m)
        if ((r = sshbuf_get_string_direct(m, &keyout, &slen)) != 0 ||
            (r = sshbuf_get_string_direct(m, &keyin, &rlen)) != 0)
                return r;
-       if (cipher_get_keycontext(&state->send_context, NULL) != (int)slen ||
-           cipher_get_keycontext(&state->receive_context, NULL) != (int)rlen)
+       if (cipher_get_keycontext(state->send_context, NULL) != (int)slen ||
+           cipher_get_keycontext(state->receive_context, NULL) != (int)rlen)
                return SSH_ERR_INVALID_FORMAT;
-       cipher_set_keycontext(&state->send_context, keyout);
-       cipher_set_keycontext(&state->receive_context, keyin);
+       cipher_set_keycontext(state->send_context, keyout);
+       cipher_set_keycontext(state->receive_context, keyin);
 
-       if ((r = ssh_packet_set_compress_state(ssh, m)) != 0 ||
-           (r = ssh_packet_set_postauth(ssh)) != 0)
+       if ((r = ssh_packet_set_postauth(ssh)) != 0)
                return r;
 
        sshbuf_reset(state->input);
@@ -2693,12 +2795,6 @@ ssh_packet_set_state(struct ssh *ssh, struct sshbuf *m)
            (r = sshbuf_put(state->output, output, olen)) != 0)
                return r;
 
-       if (compat20) {
-               if ((r = sshbuf_get_u64(m, &sent_bytes)) != 0 ||
-                   (r = sshbuf_get_u64(m, &recv_bytes)) != 0)
-                       return r;
-               roam_set_bytes(sent_bytes, recv_bytes);
-       }
        if (sshbuf_len(m))
                return SSH_ERR_INVALID_FORMAT;
        debug3("%s: done", __func__);
@@ -2881,11 +2977,43 @@ sshpkt_start(struct ssh *ssh, u_char type)
        return sshbuf_put(ssh->state->outgoing_packet, buf, len);
 }
 
+static int
+ssh_packet_send_mux(struct ssh *ssh)
+{
+       struct session_state *state = ssh->state;
+       u_char type, *cp;
+       size_t len;
+       int r;
+
+       if (ssh->kex)
+               return SSH_ERR_INTERNAL_ERROR;
+       len = sshbuf_len(state->outgoing_packet);
+       if (len < 6)
+               return SSH_ERR_INTERNAL_ERROR;
+       cp = sshbuf_mutable_ptr(state->outgoing_packet);
+       type = cp[5];
+       if (ssh_packet_log_type(type))
+               debug3("%s: type %u", __func__, type);
+       /* drop everything, but the connection protocol */
+       if (type >= SSH2_MSG_CONNECTION_MIN &&
+           type <= SSH2_MSG_CONNECTION_MAX) {
+               POKE_U32(cp, len - 4);
+               if ((r = sshbuf_putb(state->output,
+                   state->outgoing_packet)) != 0)
+                       return r;
+               /* sshbuf_dump(state->output, stderr); */
+       }
+       sshbuf_reset(state->outgoing_packet);
+       return 0;
+}
+
 /* send it */
 
 int
 sshpkt_send(struct ssh *ssh)
 {
+       if (ssh->state && ssh->state->mux)
+               return ssh_packet_send_mux(ssh);
        if (compat20)
                return ssh_packet_send2(ssh);
        else
index 7b06544..0d25b35 100644 (file)
--- a/packet.h
+++ b/packet.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.h,v 1.66 2015/01/30 01:13:33 djm Exp $ */
+/* $OpenBSD: packet.h,v 1.76 2017/02/03 23:03:33 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -56,9 +56,14 @@ struct ssh {
        /* Key exchange */
        struct kex *kex;
 
-       /* cached remote ip address and port*/
+       /* cached local and remote ip addresses and ports */
        char *remote_ipaddr;
        int remote_port;
+       char *local_ipaddr;
+       int local_port;
+
+       /* Optional preamble for log messages (e.g. username) */
+       char *log_preamble;
 
        /* Dispatcher table */
        dispatch_fn *dispatch[DISPATCH_MAX];
@@ -76,6 +81,9 @@ struct ssh {
        void *app_data;
 };
 
+typedef int (ssh_packet_hook_fn)(struct ssh *, struct sshbuf *,
+    u_char *, void *);
+
 struct ssh *ssh_alloc_session_state(void);
 struct ssh *ssh_packet_set_connection(struct ssh *, int, int);
 void     ssh_packet_set_timeout(struct ssh *, int, int);
@@ -86,6 +94,9 @@ int      ssh_packet_get_connection_in(struct ssh *);
 int      ssh_packet_get_connection_out(struct ssh *);
 void     ssh_packet_close(struct ssh *);
 void    ssh_packet_set_encryption_key(struct ssh *, const u_char *, u_int, int);
+void    ssh_packet_set_input_hook(struct ssh *, ssh_packet_hook_fn *, void *);
+
+int     ssh_packet_is_rekeying(struct ssh *);
 void     ssh_packet_set_protocol_flags(struct ssh *, u_int);
 u_int   ssh_packet_get_protocol_flags(struct ssh *);
 int      ssh_packet_start_compression(struct ssh *, int);
@@ -94,6 +105,12 @@ void     ssh_packet_set_interactive(struct ssh *, int, int, int);
 int      ssh_packet_is_interactive(struct ssh *);
 void     ssh_packet_set_server(struct ssh *);
 void     ssh_packet_set_authenticated(struct ssh *);
+void     ssh_packet_set_mux(struct ssh *);
+int     ssh_packet_get_mux(struct ssh *);
+int     ssh_packet_set_log_preamble(struct ssh *, const char *, ...)
+    __attribute__((format(printf, 2, 3)));
+
+int     ssh_packet_log_type(u_char);
 
 int     ssh_packet_send1(struct ssh *);
 int     ssh_packet_send2_wrapped(struct ssh *);
@@ -117,11 +134,6 @@ void     ssh_packet_send_debug(struct ssh *, const char *fmt, ...) __attribute__
 int     ssh_set_newkeys(struct ssh *, int mode);
 void    ssh_packet_get_bytes(struct ssh *, u_int64_t *, u_int64_t *);
 
-typedef void *(ssh_packet_comp_alloc_func)(void *, u_int, u_int);
-typedef void (ssh_packet_comp_free_func)(void *, void *);
-void    ssh_packet_set_compress_hooks(struct ssh *, void *,
-    ssh_packet_comp_alloc_func *, ssh_packet_comp_free_func *);
-
 int     ssh_packet_write_poll(struct ssh *);
 int     ssh_packet_write_wait(struct ssh *);
 int      ssh_packet_have_data_to_write(struct ssh *);
@@ -143,15 +155,13 @@ int        ssh_packet_get_state(struct ssh *, struct sshbuf *);
 int     ssh_packet_set_state(struct ssh *, struct sshbuf *);
 
 const char *ssh_remote_ipaddr(struct ssh *);
+int     ssh_remote_port(struct ssh *);
+const char *ssh_local_ipaddr(struct ssh *);
+int     ssh_local_port(struct ssh *);
 
-int     ssh_packet_need_rekeying(struct ssh *);
-void    ssh_packet_set_rekey_limits(struct ssh *, u_int32_t, time_t);
+void    ssh_packet_set_rekey_limits(struct ssh *, u_int64_t, u_int32_t);
 time_t  ssh_packet_get_rekey_timeout(struct ssh *);
 
-/* XXX FIXME */
-void    ssh_packet_backup_state(struct ssh *, struct ssh *);
-void    ssh_packet_restore_state(struct ssh *, struct ssh *);
-
 void   *ssh_packet_get_input(struct ssh *);
 void   *ssh_packet_get_output(struct ssh *);
 
index ec89fc6..a8deb9f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pathnames.h,v 1.24 2013/12/06 13:39:49 markus Exp $ */
+/* $OpenBSD: pathnames.h,v 1.25 2016/03/31 05:24:06 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -42,8 +42,6 @@
 #define _PATH_HOST_ED25519_KEY_FILE    SSHDIR "/ssh_host_ed25519_key"
 #define _PATH_HOST_RSA_KEY_FILE                SSHDIR "/ssh_host_rsa_key"
 #define _PATH_DH_MODULI                        SSHDIR "/moduli"
-/* Backwards compatibility */
-#define _PATH_DH_PRIMES                        SSHDIR "/primes"
 
 #ifndef _PATH_SSH_PROGRAM
 #define _PATH_SSH_PROGRAM              "/usr/bin/ssh"
 #define _PATH_LS                       "ls"
 #endif
 
-/* path to login program */
-#ifndef LOGIN_PROGRAM
-# ifdef LOGIN_PROGRAM_FALLBACK
-#  define LOGIN_PROGRAM         LOGIN_PROGRAM_FALLBACK
-# else
-#  define LOGIN_PROGRAM         "/usr/bin/login"
-# endif
-#endif /* LOGIN_PROGRAM */
-
 /* Askpass program define */
 #ifndef ASKPASS_PROGRAM
 #define ASKPASS_PROGRAM         "/usr/lib/ssh/ssh-askpass"
diff --git a/platform-pledge.c b/platform-pledge.c
new file mode 100644 (file)
index 0000000..4a6ec15
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2015 Joyent, Inc
+ * Author: Alex Wilson <alex.wilson@joyent.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+
+#include <stdarg.h>
+#include <unistd.h>
+
+#include "platform.h"
+
+#include "openbsd-compat/openbsd-compat.h"
+
+/*
+ * Drop any fine-grained privileges that are not needed for post-startup
+ * operation of ssh-agent
+ *
+ * Should be as close as possible to pledge("stdio cpath unix id proc exec", ...)
+ */
+void
+platform_pledge_agent(void)
+{
+#ifdef USE_SOLARIS_PRIVS
+       /*
+        * Note: Solaris priv dropping is closer to tame() than pledge(), but
+        * we will use what we have.
+        */
+       solaris_drop_privs_root_pinfo_net();
+#endif
+}
+
+/*
+ * Drop any fine-grained privileges that are not needed for post-startup
+ * operation of sftp-server
+ */
+void
+platform_pledge_sftp_server(void)
+{
+#ifdef USE_SOLARIS_PRIVS
+       solaris_drop_privs_pinfo_net_fork_exec();
+#endif
+}
+
+/*
+ * Drop any fine-grained privileges that are not needed for the post-startup
+ * operation of the SSH client mux
+ *
+ * Should be as close as possible to pledge("stdio proc tty", ...)
+ */
+void
+platform_pledge_mux(void)
+{
+#ifdef USE_SOLARIS_PRIVS
+       solaris_drop_privs_root_pinfo_net_exec();
+#endif
+}
diff --git a/platform-tracing.c b/platform-tracing.c
new file mode 100644 (file)
index 0000000..4c80a28
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2016 Darren Tucker.  All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#if defined(HAVE_SYS_PRCTL_H)
+#include <sys/prctl.h> /* For prctl() and PR_SET_DUMPABLE */
+#endif
+#ifdef HAVE_SYS_PTRACE_H
+#include <sys/ptrace.h>
+#endif
+#ifdef HAVE_PRIV_H
+#include <priv.h> /* For setpflags() and __PROC_PROTECT  */
+#endif
+#include <stdarg.h>
+
+#include "log.h"
+
+void
+platform_disable_tracing(int strict)
+{
+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
+       /* Disable ptrace on Linux without sgid bit */
+       if (prctl(PR_SET_DUMPABLE, 0) != 0 && strict)
+               fatal("unable to make the process undumpable");
+#endif
+#if defined(HAVE_SETPFLAGS) && defined(__PROC_PROTECT)
+       /* On Solaris, we should make this process untraceable */
+       if (setpflags(__PROC_PROTECT, 1) != 0 && strict)
+               fatal("unable to make the process untraceable");
+#endif
+#ifdef PT_DENY_ATTACH
+       /* Mac OS X */
+       if (ptrace(PT_DENY_ATTACH, 0, 0, 0) == -1 && strict)
+               fatal("unable to set PT_DENY_ATTACH");
+#endif
+}
index ee313da..973a63e 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: platform.c,v 1.22 2014/07/18 04:11:26 djm Exp $ */
-
 /*
  * Copyright (c) 2006 Darren Tucker.  All rights reserved.
  *
@@ -18,8 +16,6 @@
 
 #include "includes.h"
 
-#include <sys/types.h>
-
 #include <stdarg.h>
 #include <unistd.h>
 
@@ -107,8 +103,12 @@ platform_setusercontext(struct passwd *pw)
 #endif
 
 #ifdef USE_SOLARIS_PROJECTS
-       /* if solaris projects were detected, set the default now */
-       if (getuid() == 0 || geteuid() == 0)
+       /*
+        * If solaris projects were detected, set the default now, unless
+        * we are using PAM in which case it is the responsibility of the
+        * PAM stack.
+        */
+       if (!options.use_pam && (getuid() == 0 || geteuid() == 0))
                solaris_set_default_project(pw);
 #endif
 
index 1c7a45d..ea4f9c5 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: platform.h,v 1.9 2013/09/22 09:02:40 dtucker Exp $ */
-
 /*
  * Copyright (c) 2006 Darren Tucker.  All rights reserved.
  *
@@ -31,3 +29,9 @@ void platform_setusercontext_post_groups(struct passwd *);
 char *platform_get_krb5_client(const char *);
 char *platform_krb5_get_principal_name(const char *);
 int platform_sys_dir_uid(uid_t);
+void platform_disable_tracing(int);
+
+/* in platform-pledge.c */
+void platform_pledge_agent(void);
+void platform_pledge_sftp_server(void);
+void platform_pledge_mux(void);
index 319b747..fe9bf52 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: progressmeter.c,v 1.41 2015/01/14 13:54:13 djm Exp $ */
+/* $OpenBSD: progressmeter.c,v 1.45 2016/06/30 05:17:05 dtucker Exp $ */
 /*
  * Copyright (c) 2003 Nils Nordman.  All rights reserved.
  *
@@ -63,8 +63,8 @@ void refresh_progress_meter(void);
 /* signal handler for updating the progress meter */
 static void update_progress_meter(int);
 
-static time_t start;           /* start progress */
-static time_t last_update;     /* last progress update */
+static double start;           /* start progress */
+static double last_update;     /* last progress update */
 static const char *file;       /* name of the file being transferred */
 static off_t start_pos;                /* initial position of transfer */
 static off_t end_pos;          /* ending position of transfer */
@@ -120,9 +120,8 @@ void
 refresh_progress_meter(void)
 {
        char buf[MAX_WINSIZE + 1];
-       time_t now;
        off_t transferred;
-       double elapsed;
+       double elapsed, now;
        int percent;
        off_t bytes_left;
        int cur_speed;
@@ -132,7 +131,7 @@ refresh_progress_meter(void)
 
        transferred = *counter - (cur_pos ? cur_pos : start_pos);
        cur_pos = *counter;
-       now = monotime();
+       now = monotime_double();
        bytes_left = end_pos - cur_pos;
 
        if (bytes_left > 0)
@@ -172,10 +171,10 @@ refresh_progress_meter(void)
        }
 
        /* percent of transfer done */
-       if (end_pos != 0)
-               percent = ((float)cur_pos / end_pos) * 100;
-       else
+       if (end_pos == 0 || cur_pos == end_pos)
                percent = 100;
+       else
+               percent = ((float)cur_pos / end_pos) * 100;
        snprintf(buf + strlen(buf), win_size - strlen(buf),
            " %3d%% ", percent);
 
@@ -250,7 +249,7 @@ update_progress_meter(int ignore)
 void
 start_progress_meter(const char *f, off_t filesize, off_t *ctr)
 {
-       start = last_update = monotime();
+       start = last_update = monotime_double();
        file = f;
        start_pos = *ctr;
        end_pos = filesize;
index cd01482..9d59493 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.239 2015/07/30 00:01:34 djm Exp $ */
+/* $OpenBSD: readconf.c,v 1.270 2017/03/10 04:27:32 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef USE_SYSTEM_GLOB
+# include <glob.h>
+#else
+# include "openbsd-compat/glob.h"
+#endif
 #ifdef HAVE_UTIL_H
 #include <util.h>
 #endif
@@ -88,7 +93,7 @@
 
    Host books.com
      RemoteForward 9999 shadows.cs.hut.fi:9999
-     Cipher 3des
+     Ciphers 3des-cbc
 
    Host fascist.blob.com
      Port 23123
      PublicKeyAuthentication no
 
    Host *.su
-     Cipher none
+     Ciphers aes128-ctr
      PasswordAuthentication no
 
    Host vpn.fake.com
 
 */
 
+static int read_config_file_depth(const char *filename, struct passwd *pw,
+    const char *host, const char *original_host, Options *options,
+    int flags, int *activep, int depth);
+static int process_config_line_depth(Options *options, struct passwd *pw,
+    const char *host, const char *original_host, char *line,
+    const char *filename, int linenum, int *activep, int flags, int depth);
+
 /* Keyword tokens. */
 
 typedef enum {
        oBadOption,
-       oHost, oMatch,
+       oHost, oMatch, oInclude,
        oForwardAgent, oForwardX11, oForwardX11Trusted, oForwardX11Timeout,
        oGatewayPorts, oExitOnForwardFailure,
        oPasswordAuthentication, oRSAAuthentication,
        oChallengeResponseAuthentication, oXAuthLocation,
        oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,
+       oCertificateFile, oAddKeysToAgent, oIdentityAgent,
        oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
        oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
        oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
@@ -151,13 +164,13 @@ typedef enum {
        oSendEnv, oControlPath, oControlMaster, oControlPersist,
        oHashKnownHosts,
        oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
-       oVisualHostKey, oUseRoaming,
+       oVisualHostKey,
        oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
        oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
        oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,
        oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys,
        oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes,
-       oPubkeyAcceptedKeyTypes,
+       oPubkeyAcceptedKeyTypes, oProxyJump,
        oIgnoredUnknownOption, oDeprecated, oUnsupported
 } OpCodes;
 
@@ -167,6 +180,44 @@ static struct {
        const char *name;
        OpCodes opcode;
 } keywords[] = {
+       /* Deprecated options */
+       { "fallbacktorsh", oDeprecated },
+       { "globalknownhostsfile2", oDeprecated },
+       { "rhostsauthentication", oDeprecated },
+       { "userknownhostsfile2", oDeprecated },
+       { "useroaming", oDeprecated },
+       { "usersh", oDeprecated },
+
+       /* Unsupported options */
+       { "afstokenpassing", oUnsupported },
+       { "kerberosauthentication", oUnsupported },
+       { "kerberostgtpassing", oUnsupported },
+
+       /* Sometimes-unsupported options */
+#if defined(GSSAPI)
+       { "gssapiauthentication", oGssAuthentication },
+       { "gssapidelegatecredentials", oGssDelegateCreds },
+# else
+       { "gssapiauthentication", oUnsupported },
+       { "gssapidelegatecredentials", oUnsupported },
+#endif
+#ifdef ENABLE_PKCS11
+       { "smartcarddevice", oPKCS11Provider },
+       { "pkcs11provider", oPKCS11Provider },
+# else
+       { "smartcarddevice", oUnsupported },
+       { "pkcs11provider", oUnsupported },
+#endif
+#ifdef WITH_SSH1
+       { "rsaauthentication", oRSAAuthentication },
+       { "rhostsrsaauthentication", oRhostsRSAAuthentication },
+       { "compressionlevel", oCompressionLevel },
+# else
+       { "rsaauthentication", oUnsupported },
+       { "rhostsrsaauthentication", oUnsupported },
+       { "compressionlevel", oUnsupported },
+#endif
+
        { "forwardagent", oForwardAgent },
        { "forwardx11", oForwardX11 },
        { "forwardx11trusted", oForwardX11Trusted },
@@ -175,33 +226,21 @@ static struct {
        { "xauthlocation", oXAuthLocation },
        { "gatewayports", oGatewayPorts },
        { "useprivilegedport", oUsePrivilegedPort },
-       { "rhostsauthentication", oDeprecated },
        { "passwordauthentication", oPasswordAuthentication },
        { "kbdinteractiveauthentication", oKbdInteractiveAuthentication },
        { "kbdinteractivedevices", oKbdInteractiveDevices },
-       { "rsaauthentication", oRSAAuthentication },
        { "pubkeyauthentication", oPubkeyAuthentication },
        { "dsaauthentication", oPubkeyAuthentication },             /* alias */
-       { "rhostsrsaauthentication", oRhostsRSAAuthentication },
        { "hostbasedauthentication", oHostbasedAuthentication },
        { "challengeresponseauthentication", oChallengeResponseAuthentication },
        { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */
        { "tisauthentication", oChallengeResponseAuthentication },  /* alias */
-       { "kerberosauthentication", oUnsupported },
-       { "kerberostgtpassing", oUnsupported },
-       { "afstokenpassing", oUnsupported },
-#if defined(GSSAPI)
-       { "gssapiauthentication", oGssAuthentication },
-       { "gssapidelegatecredentials", oGssDelegateCreds },
-#else
-       { "gssapiauthentication", oUnsupported },
-       { "gssapidelegatecredentials", oUnsupported },
-#endif
-       { "fallbacktorsh", oDeprecated },
-       { "usersh", oDeprecated },
        { "identityfile", oIdentityFile },
        { "identityfile2", oIdentityFile },                     /* obsolete */
        { "identitiesonly", oIdentitiesOnly },
+       { "certificatefile", oCertificateFile },
+       { "addkeystoagent", oAddKeysToAgent },
+       { "identityagent", oIdentityAgent },
        { "hostname", oHostName },
        { "hostkeyalias", oHostKeyAlias },
        { "proxycommand", oProxyCommand },
@@ -217,15 +256,12 @@ static struct {
        { "match", oMatch },
        { "escapechar", oEscapeChar },
        { "globalknownhostsfile", oGlobalKnownHostsFile },
-       { "globalknownhostsfile2", oDeprecated },
        { "userknownhostsfile", oUserKnownHostsFile },
-       { "userknownhostsfile2", oDeprecated },
        { "connectionattempts", oConnectionAttempts },
        { "batchmode", oBatchMode },
        { "checkhostip", oCheckHostIP },
        { "stricthostkeychecking", oStrictHostKeyChecking },
        { "compression", oCompression },
-       { "compressionlevel", oCompressionLevel },
        { "tcpkeepalive", oTCPKeepAlive },
        { "keepalive", oTCPKeepAlive },                         /* obsolete */
        { "numberofpasswordprompts", oNumberOfPasswordPrompts },
@@ -234,13 +270,6 @@ static struct {
        { "preferredauthentications", oPreferredAuthentications },
        { "hostkeyalgorithms", oHostKeyAlgorithms },
        { "bindaddress", oBindAddress },
-#ifdef ENABLE_PKCS11
-       { "smartcarddevice", oPKCS11Provider },
-       { "pkcs11provider", oPKCS11Provider },
-#else
-       { "smartcarddevice", oUnsupported },
-       { "pkcs11provider", oUnsupported },
-#endif
        { "clearallforwardings", oClearAllForwardings },
        { "enablesshkeysign", oEnableSSHKeysign },
        { "verifyhostkeydns", oVerifyHostKeyDNS },
@@ -255,12 +284,12 @@ static struct {
        { "controlmaster", oControlMaster },
        { "controlpersist", oControlPersist },
        { "hashknownhosts", oHashKnownHosts },
+       { "include", oInclude },
        { "tunnel", oTunnel },
        { "tunneldevice", oTunnelDevice },
        { "localcommand", oLocalCommand },
        { "permitlocalcommand", oPermitLocalCommand },
        { "visualhostkey", oVisualHostKey },
-       { "useroaming", oUseRoaming },
        { "kexalgorithms", oKexAlgorithms },
        { "ipqos", oIPQoS },
        { "requesttty", oRequestTTY },
@@ -278,6 +307,7 @@ static struct {
        { "hostbasedkeytypes", oHostbasedKeyTypes },
        { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes },
        { "ignoreunknown", oIgnoreUnknown },
+       { "proxyjump", oProxyJump },
 
        { NULL, oBadOption }
 };
@@ -291,12 +321,17 @@ void
 add_local_forward(Options *options, const struct Forward *newfwd)
 {
        struct Forward *fwd;
-#ifndef NO_IPPORT_RESERVED_CONCEPT
        extern uid_t original_real_uid;
-       if (newfwd->listen_port < IPPORT_RESERVED && original_real_uid != 0 &&
+       int i;
+
+       if (!bind_permitted(newfwd->listen_port, original_real_uid) &&
            newfwd->listen_path == NULL)
                fatal("Privileged ports can only be forwarded by root.");
-#endif
+       /* Don't add duplicates */
+       for (i = 0; i < options->num_local_forwards; i++) {
+               if (forward_equals(newfwd, options->local_forwards + i))
+                       return;
+       }
        options->local_forwards = xreallocarray(options->local_forwards,
            options->num_local_forwards + 1,
            sizeof(*options->local_forwards));
@@ -319,7 +354,13 @@ void
 add_remote_forward(Options *options, const struct Forward *newfwd)
 {
        struct Forward *fwd;
+       int i;
 
+       /* Don't add duplicates */
+       for (i = 0; i < options->num_remote_forwards; i++) {
+               if (forward_equals(newfwd, options->remote_forwards + i))
+                       return;
+       }
        options->remote_forwards = xreallocarray(options->remote_forwards,
            options->num_remote_forwards + 1,
            sizeof(*options->remote_forwards));
@@ -366,6 +407,30 @@ clear_forwardings(Options *options)
 }
 
 void
+add_certificate_file(Options *options, const char *path, int userprovided)
+{
+       int i;
+
+       if (options->num_certificate_files >= SSH_MAX_CERTIFICATE_FILES)
+               fatal("Too many certificate files specified (max %d)",
+                   SSH_MAX_CERTIFICATE_FILES);
+
+       /* Avoid registering duplicates */
+       for (i = 0; i < options->num_certificate_files; i++) {
+               if (options->certificate_file_userprovided[i] == userprovided &&
+                   strcmp(options->certificate_files[i], path) == 0) {
+                       debug2("%s: ignoring duplicate key %s", __func__, path);
+                       return;
+               }
+       }
+
+       options->certificate_file_userprovided[options->num_certificate_files] =
+           userprovided;
+       options->certificate_files[options->num_certificate_files++] =
+           xstrdup(path);
+}
+
+void
 add_identity_file(Options *options, const char *dir, const char *filename,
     int userprovided)
 {
@@ -416,7 +481,7 @@ default_ssh_port(void)
 static int
 execute_in_shell(const char *cmd)
 {
-       char *shell, *command_string;
+       char *shell;
        pid_t pid;
        int devnull, status;
        extern uid_t original_real_uid;
@@ -424,12 +489,6 @@ execute_in_shell(const char *cmd)
        if ((shell = getenv("SHELL")) == NULL)
                shell = _PATH_BSHELL;
 
-       /*
-        * Use "exec" to avoid "sh -c" processes on some platforms
-        * (e.g. Solaris)
-        */
-       xasprintf(&command_string, "exec %s", cmd);
-
        /* Need this to redirect subprocess stdin/out */
        if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
                fatal("open(/dev/null): %s", strerror(errno));
@@ -454,7 +513,7 @@ execute_in_shell(const char *cmd)
 
                argv[0] = shell;
                argv[1] = "-c";
-               argv[2] = command_string;
+               argv[2] = xstrdup(cmd);
                argv[3] = NULL;
 
                execv(argv[0], argv);
@@ -469,7 +528,6 @@ execute_in_shell(const char *cmd)
                fatal("%s: fork: %.100s", __func__, strerror(errno));
 
        close(devnull);
-       free(command_string);
 
        while (waitpid(pid, &status, 0) == -1) {
                if (errno != EINTR && errno != EAGAIN)
@@ -502,12 +560,15 @@ match_cfg_line(Options *options, char **condition, struct passwd *pw,
         */
        port = options->port <= 0 ? default_ssh_port() : options->port;
        ruser = options->user == NULL ? pw->pw_name : options->user;
-       if (options->hostname != NULL) {
+       if (post_canon) {
+               host = xstrdup(options->hostname);
+       } else if (options->hostname != NULL) {
                /* NB. Please keep in sync with ssh.c:main() */
                host = percent_expand(options->hostname,
                    "h", host_arg, (char *)NULL);
-       } else
+       } else {
                host = xstrdup(host_arg);
+       }
 
        debug2("checking match for '%s' host %s originally %s",
            cp, host, original_host);
@@ -693,6 +754,15 @@ static const struct multistate multistate_yesnoask[] = {
        { "ask",                        2 },
        { NULL, -1 }
 };
+static const struct multistate multistate_yesnoaskconfirm[] = {
+       { "true",                       1 },
+       { "false",                      0 },
+       { "yes",                        1 },
+       { "no",                         0 },
+       { "ask",                        2 },
+       { "confirm",                    3 },
+       { NULL, -1 }
+};
 static const struct multistate multistate_addressfamily[] = {
        { "inet",                       AF_INET },
        { "inet6",                      AF_INET6 },
@@ -740,33 +810,43 @@ static const struct multistate multistate_canonicalizehostname[] = {
  * Processes a single option line as used in the configuration files. This
  * only sets those values that have not already been set.
  */
-#define WHITESPACE " \t\r\n"
 int
 process_config_line(Options *options, struct passwd *pw, const char *host,
     const char *original_host, char *line, const char *filename,
     int linenum, int *activep, int flags)
 {
+       return process_config_line_depth(options, pw, host, original_host,
+           line, filename, linenum, activep, flags, 0);
+}
+
+#define WHITESPACE " \t\r\n"
+static int
+process_config_line_depth(Options *options, struct passwd *pw, const char *host,
+    const char *original_host, char *line, const char *filename,
+    int linenum, int *activep, int flags, int depth)
+{
        char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;
        char **cpptr, fwdarg[256];
        u_int i, *uintptr, max_entries = 0;
-       int negated, opcode, *intptr, value, value2, cmdline = 0;
+       int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0;
        LogLevel *log_level_ptr;
        long long val64;
        size_t len;
        struct Forward fwd;
        const struct multistate *multistate_ptr;
        struct allowed_cname *cname;
+       glob_t gl;
 
        if (activep == NULL) { /* We are processing a command line directive */
                cmdline = 1;
                activep = &cmdline;
        }
 
-       /* Strip trailing whitespace */
+       /* Strip trailing whitespace. Allow \f (form feed) at EOL only */
        if ((len = strlen(line)) == 0)
                return 0;
        for (len--; len > 0; len--) {
-               if (strchr(WHITESPACE, line[len]) == NULL)
+               if (strchr(WHITESPACE "\f", line[len]) == NULL)
                        break;
                line[len] = '\0';
        }
@@ -790,7 +870,6 @@ process_config_line(Options *options, struct passwd *pw, const char *host,
        case oBadOption:
                /* don't panic, but count bad options */
                return -1;
-               /* NOTREACHED */
        case oIgnoredUnknownOption:
                debug("%s line %d: Ignored unknown option \"%s\"",
                    filename, linenum, keyword);
@@ -947,16 +1026,12 @@ parse_time:
                        if (scan_scaled(arg, &val64) == -1)
                                fatal("%.200s line %d: Bad number '%s': %s",
                                    filename, linenum, arg, strerror(errno));
-                       /* check for too-large or too-small limits */
-                       if (val64 > UINT_MAX)
-                               fatal("%.200s line %d: RekeyLimit too large",
-                                   filename, linenum);
                        if (val64 != 0 && val64 < 16)
                                fatal("%.200s line %d: RekeyLimit too small",
                                    filename, linenum);
                }
                if (*activep && options->rekey_limit == -1)
-                       options->rekey_limit = (u_int32_t)val64;
+                       options->rekey_limit = val64;
                if (s != NULL) { /* optional rekey interval present */
                        if (strcmp(s, "none") == 0) {
                                (void)strdelim(&s);     /* discard */
@@ -981,6 +1056,24 @@ parse_time:
                }
                break;
 
+       case oCertificateFile:
+               arg = strdelim(&s);
+               if (!arg || *arg == '\0')
+                       fatal("%.200s line %d: Missing argument.",
+                           filename, linenum);
+               if (*activep) {
+                       intptr = &options->num_certificate_files;
+                       if (*intptr >= SSH_MAX_CERTIFICATE_FILES) {
+                               fatal("%.200s line %d: Too many certificate "
+                                   "files specified (max %d).",
+                                   filename, linenum,
+                                   SSH_MAX_CERTIFICATE_FILES);
+                       }
+                       add_certificate_file(options, arg,
+                           flags & SSHCONF_USERCONF);
+               }
+               break;
+
        case oXAuthLocation:
                charptr=&options->xauth_location;
                goto parse_string;
@@ -1040,6 +1133,9 @@ parse_char_array:
 
        case oProxyCommand:
                charptr = &options->proxy_command;
+               /* Ignore ProxyCommand if ProxyJump already specified */
+               if (options->jump_host != NULL)
+                       charptr = &options->jump_host; /* Skip below */
 parse_command:
                if (s == NULL)
                        fatal("%.200s line %d: Missing argument.", filename, linenum);
@@ -1048,6 +1144,18 @@ parse_command:
                        *charptr = xstrdup(s + len);
                return 0;
 
+       case oProxyJump:
+               if (s == NULL) {
+                       fatal("%.200s line %d: Missing argument.",
+                           filename, linenum);
+               }
+               len = strspn(s, WHITESPACE "=");
+               if (parse_jump(s + len, options, *activep) == -1) {
+                       fatal("%.200s line %d: Invalid ProxyJump \"%s\"",
+                           filename, linenum, s + len);
+               }
+               return 0;
+
        case oPort:
                intptr = &options->port;
 parse_int:
@@ -1086,7 +1194,7 @@ parse_int:
                arg = strdelim(&s);
                if (!arg || *arg == '\0')
                        fatal("%.200s line %d: Missing argument.", filename, linenum);
-               if (!ciphers_valid(*arg == '+' ? arg + 1 : arg))
+               if (*arg != '-' && !ciphers_valid(*arg == '+' ? arg + 1 : arg))
                        fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.",
                            filename, linenum, arg ? arg : "<NONE>");
                if (*activep && options->ciphers == NULL)
@@ -1097,7 +1205,7 @@ parse_int:
                arg = strdelim(&s);
                if (!arg || *arg == '\0')
                        fatal("%.200s line %d: Missing argument.", filename, linenum);
-               if (!mac_valid(*arg == '+' ? arg + 1 : arg))
+               if (*arg != '-' && !mac_valid(*arg == '+' ? arg + 1 : arg))
                        fatal("%.200s line %d: Bad SSH2 Mac spec '%s'.",
                            filename, linenum, arg ? arg : "<NONE>");
                if (*activep && options->macs == NULL)
@@ -1109,7 +1217,8 @@ parse_int:
                if (!arg || *arg == '\0')
                        fatal("%.200s line %d: Missing argument.",
                            filename, linenum);
-               if (!kex_names_valid(*arg == '+' ? arg + 1 : arg))
+               if (*arg != '-' &&
+                   !kex_names_valid(*arg == '+' ? arg + 1 : arg))
                        fatal("%.200s line %d: Bad SSH2 KexAlgorithms '%s'.",
                            filename, linenum, arg ? arg : "<NONE>");
                if (*activep && options->kex_algorithms == NULL)
@@ -1123,7 +1232,8 @@ parse_keytypes:
                if (!arg || *arg == '\0')
                        fatal("%.200s line %d: Missing argument.",
                            filename, linenum);
-               if (!sshkey_names_valid2(*arg == '+' ? arg + 1 : arg, 1))
+               if (*arg != '-' &&
+                   !sshkey_names_valid2(*arg == '+' ? arg + 1 : arg, 1))
                        fatal("%s line %d: Bad key types '%s'.",
                                filename, linenum, arg ? arg : "<NONE>");
                if (*activep && *charptr == NULL)
@@ -1201,6 +1311,8 @@ parse_keytypes:
                *activep = 0;
                arg2 = NULL;
                while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
+                       if ((flags & SSHCONF_NEVERMATCH) != 0)
+                               break;
                        negated = *arg == '!';
                        if (negated)
                                arg++;
@@ -1233,7 +1345,7 @@ parse_keytypes:
                if (value < 0)
                        fatal("%.200s line %d: Bad Match condition", filename,
                            linenum);
-               *activep = value;
+               *activep = (flags & SSHCONF_NEVERMATCH) ? 0 : value;
                break;
 
        case oEscapeChar:
@@ -1361,6 +1473,69 @@ parse_keytypes:
                intptr = &options->visual_host_key;
                goto parse_flag;
 
+       case oInclude:
+               if (cmdline)
+                       fatal("Include directive not supported as a "
+                           "command-line option");
+               value = 0;
+               while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
+                       /*
+                        * Ensure all paths are anchored. User configuration
+                        * files may begin with '~/' but system configurations
+                        * must not. If the path is relative, then treat it
+                        * as living in ~/.ssh for user configurations or
+                        * /etc/ssh for system ones.
+                        */
+                       if (*arg == '~' && (flags & SSHCONF_USERCONF) == 0)
+                               fatal("%.200s line %d: bad include path %s.",
+                                   filename, linenum, arg);
+                       if (*arg != '/' && *arg != '~') {
+                               xasprintf(&arg2, "%s/%s",
+                                   (flags & SSHCONF_USERCONF) ?
+                                   "~/" _PATH_SSH_USER_DIR : SSHDIR, arg);
+                       } else
+                               arg2 = xstrdup(arg);
+                       memset(&gl, 0, sizeof(gl));
+                       r = glob(arg2, GLOB_TILDE, NULL, &gl);
+                       if (r == GLOB_NOMATCH) {
+                               debug("%.200s line %d: include %s matched no "
+                                   "files",filename, linenum, arg2);
+                               free(arg2);
+                               continue;
+                       } else if (r != 0 || gl.gl_pathc < 0)
+                               fatal("%.200s line %d: glob failed for %s.",
+                                   filename, linenum, arg2);
+                       free(arg2);
+                       oactive = *activep;
+                       for (i = 0; i < (u_int)gl.gl_pathc; i++) {
+                               debug3("%.200s line %d: Including file %s "
+                                   "depth %d%s", filename, linenum,
+                                   gl.gl_pathv[i], depth,
+                                   oactive ? "" : " (parse only)");
+                               r = read_config_file_depth(gl.gl_pathv[i],
+                                   pw, host, original_host, options,
+                                   flags | SSHCONF_CHECKPERM |
+                                   (oactive ? 0 : SSHCONF_NEVERMATCH),
+                                   activep, depth + 1);
+                               if (r != 1 && errno != ENOENT) {
+                                       fatal("Can't open user config file "
+                                           "%.100s: %.100s", gl.gl_pathv[i],
+                                           strerror(errno));
+                               }
+                               /*
+                                * don't let Match in includes clobber the
+                                * containing file's Match state.
+                                */
+                               *activep = oactive;
+                               if (r != 1)
+                                       value = -1;
+                       }
+                       globfree(&gl);
+               }
+               if (value != 0)
+                       return value;
+               break;
+
        case oIPQoS:
                arg = strdelim(&s);
                if ((value = parse_ipqos(arg)) == -1)
@@ -1378,10 +1553,6 @@ parse_keytypes:
                }
                break;
 
-       case oUseRoaming:
-               intptr = &options->use_roaming;
-               goto parse_flag;
-
        case oRequestTTY:
                intptr = &options->request_tty;
                multistate_ptr = multistate_requesttty;
@@ -1496,6 +1667,15 @@ parse_keytypes:
                charptr = &options->pubkey_key_types;
                goto parse_keytypes;
 
+       case oAddKeysToAgent:
+               intptr = &options->add_keys_to_agent;
+               multistate_ptr = multistate_yesnoaskconfirm;
+               goto parse_multistate;
+
+       case oIdentityAgent:
+               charptr = &options->identity_agent;
+               goto parse_string;
+
        case oDeprecated:
                debug("%s line %d: Deprecated option \"%s\"",
                    filename, linenum, keyword);
@@ -1518,22 +1698,35 @@ parse_keytypes:
        return 0;
 }
 
-
 /*
  * Reads the config file and modifies the options accordingly.  Options
  * should already be initialized before this call.  This never returns if
  * there is an error.  If the file does not exist, this returns 0.
  */
-
 int
 read_config_file(const char *filename, struct passwd *pw, const char *host,
     const char *original_host, Options *options, int flags)
 {
+       int active = 1;
+
+       return read_config_file_depth(filename, pw, host, original_host,
+           options, flags, &active, 0);
+}
+
+#define READCONF_MAX_DEPTH     16
+static int
+read_config_file_depth(const char *filename, struct passwd *pw,
+    const char *host, const char *original_host, Options *options,
+    int flags, int *activep, int depth)
+{
        FILE *f;
-       char line[1024];
-       int active, linenum;
+       char line[4096];
+       int linenum;
        int bad_options = 0;
 
+       if (depth < 0 || depth > READCONF_MAX_DEPTH)
+               fatal("Too many recursive configuration includes");
+
        if ((f = fopen(filename, "r")) == NULL)
                return 0;
 
@@ -1553,13 +1746,14 @@ read_config_file(const char *filename, struct passwd *pw, const char *host,
         * Mark that we are now processing the options.  This flag is turned
         * on/off by Host specifications.
         */
-       active = 1;
        linenum = 0;
        while (fgets(line, sizeof(line), f)) {
                /* Update line number counter. */
                linenum++;
-               if (process_config_line(options, pw, host, original_host,
-                   line, filename, linenum, &active, flags) != 0)
+               if (strlen(line) == sizeof(line) - 1)
+                       fatal("%s line %d too long", filename, linenum);
+               if (process_config_line_depth(options, pw, host, original_host,
+                   line, filename, linenum, activep, flags, depth) != 0)
                        bad_options++;
        }
        fclose(f);
@@ -1591,6 +1785,9 @@ initialize_options(Options * options)
        options->forward_x11 = -1;
        options->forward_x11_trusted = -1;
        options->forward_x11_timeout = -1;
+       options->stdio_forward_host = NULL;
+       options->stdio_forward_port = 0;
+       options->clear_forwardings = -1;
        options->exit_on_forward_failure = -1;
        options->xauth_location = NULL;
        options->fwd_opts.gateway_ports = -1;
@@ -1625,9 +1822,14 @@ initialize_options(Options * options)
        options->hostkeyalgorithms = NULL;
        options->protocol = SSH_PROTO_UNKNOWN;
        options->num_identity_files = 0;
+       options->num_certificate_files = 0;
        options->hostname = NULL;
        options->host_key_alias = NULL;
        options->proxy_command = NULL;
+       options->jump_user = NULL;
+       options->jump_host = NULL;
+       options->jump_port = -1;
+       options->jump_extra = NULL;
        options->user = NULL;
        options->escape_char = -1;
        options->num_system_hostfiles = 0;
@@ -1636,7 +1838,6 @@ initialize_options(Options * options)
        options->num_local_forwards = 0;
        options->remote_forwards = NULL;
        options->num_remote_forwards = 0;
-       options->clear_forwardings = -1;
        options->log_level = SYSLOG_LEVEL_NOT_SET;
        options->preferred_authentications = NULL;
        options->bind_address = NULL;
@@ -1660,7 +1861,8 @@ initialize_options(Options * options)
        options->tun_remote = -1;
        options->local_command = NULL;
        options->permit_local_command = -1;
-       options->use_roaming = 0;
+       options->add_keys_to_agent = -1;
+       options->identity_agent = NULL;
        options->visual_host_key = -1;
        options->ip_qos_interactive = -1;
        options->ip_qos_bulk = -1;
@@ -1709,8 +1911,19 @@ fill_default_options(Options * options)
                options->forward_x11_trusted = 0;
        if (options->forward_x11_timeout == -1)
                options->forward_x11_timeout = 1200;
+       /*
+        * stdio forwarding (-W) changes the default for these but we defer
+        * setting the values so they can be overridden.
+        */
        if (options->exit_on_forward_failure == -1)
-               options->exit_on_forward_failure = 0;
+               options->exit_on_forward_failure =
+                   options->stdio_forward_host != NULL ? 1 : 0;
+       if (options->clear_forwardings == -1)
+               options->clear_forwardings =
+                   options->stdio_forward_host != NULL ? 1 : 0;
+       if (options->clear_forwardings == 1)
+               clear_forwardings(options);
+
        if (options->xauth_location == NULL)
                options->xauth_location = _PATH_XAUTH;
        if (options->fwd_opts.gateway_ports == -1)
@@ -1765,6 +1978,8 @@ fill_default_options(Options * options)
        /* options->hostkeyalgorithms, default set in myproposals.h */
        if (options->protocol == SSH_PROTO_UNKNOWN)
                options->protocol = SSH_PROTO_2;
+       if (options->add_keys_to_agent == -1)
+               options->add_keys_to_agent = 0;
        if (options->num_identity_files == 0) {
                if (options->protocol & SSH_PROTO_1) {
                        add_identity_file(options, "~/",
@@ -1799,8 +2014,6 @@ fill_default_options(Options * options)
        }
        if (options->log_level == SYSLOG_LEVEL_NOT_SET)
                options->log_level = SYSLOG_LEVEL_INFO;
-       if (options->clear_forwardings == 1)
-               clear_forwardings(options);
        if (options->no_host_authentication_for_localhost == - 1)
                options->no_host_authentication_for_localhost = 0;
        if (options->identities_only == -1)
@@ -1833,7 +2046,6 @@ fill_default_options(Options * options)
                options->tun_remote = SSH_TUNID_ANY;
        if (options->permit_local_command == -1)
                options->permit_local_command = 0;
-       options->use_roaming = 0;
        if (options->visual_host_key == -1)
                options->visual_host_key = 0;
        if (options->ip_qos_interactive == -1)
@@ -1874,6 +2086,7 @@ fill_default_options(Options * options)
        CLEAR_ON_NONE(options->proxy_command);
        CLEAR_ON_NONE(options->control_path);
        CLEAR_ON_NONE(options->revoked_host_keys);
+       /* options->identity_agent distinguishes NULL from 'none' */
        /* options->user will be set in the main program if appropriate */
        /* options->hostname will be set in the main program if appropriate */
        /* options->host_key_alias should not be set by default */
@@ -2089,6 +2302,54 @@ parse_forward(struct Forward *fwd, const char *fwdspec, int dynamicfwd, int remo
        return (0);
 }
 
+int
+parse_jump(const char *s, Options *o, int active)
+{
+       char *orig, *sdup, *cp;
+       char *host = NULL, *user = NULL;
+       int ret = -1, port = -1, first;
+
+       active &= o->proxy_command == NULL && o->jump_host == NULL;
+
+       orig = sdup = xstrdup(s);
+       first = active;
+       do {
+               if ((cp = strrchr(sdup, ',')) == NULL)
+                       cp = sdup; /* last */
+               else
+                       *cp++ = '\0';
+
+               if (first) {
+                       /* First argument and configuration is active */
+                       if (parse_user_host_port(cp, &user, &host, &port) != 0)
+                               goto out;
+               } else {
+                       /* Subsequent argument or inactive configuration */
+                       if (parse_user_host_port(cp, NULL, NULL, NULL) != 0)
+                               goto out;
+               }
+               first = 0; /* only check syntax for subsequent hosts */
+       } while (cp != sdup);
+       /* success */
+       if (active) {
+               o->jump_user = user;
+               o->jump_host = host;
+               o->jump_port = port;
+               o->proxy_command = xstrdup("none");
+               user = host = NULL;
+               if ((cp = strrchr(s, ',')) != NULL && cp != s) {
+                       o->jump_extra = xstrdup(s);
+                       o->jump_extra[cp - s] = '\0';
+               }
+       }
+       ret = 0;
+ out:
+       free(orig);
+       free(user);
+       free(host);
+       return ret;
+}
+
 /* XXX the following is a near-vebatim copy from servconf.c; refactor */
 static const char *
 fmt_multistate_int(int val, const struct multistate *m)
@@ -2207,10 +2468,10 @@ dump_cfg_forwards(OpCodes code, u_int count, const struct Forward *fwds)
        /* oDynamicForward */
        for (i = 0; i < count; i++) {
                fwd = &fwds[i];
-               if (code == oDynamicForward &&
+               if (code == oDynamicForward && fwd->connect_host != NULL &&
                    strcmp(fwd->connect_host, "socks") != 0)
                        continue;
-               if (code == oLocalForward &&
+               if (code == oLocalForward && fwd->connect_host != NULL &&
                    strcmp(fwd->connect_host, "socks") == 0)
                        continue;
                printf("%s", lookup_opcode_name(code));
@@ -2240,7 +2501,11 @@ void
 dump_client_config(Options *o, const char *host)
 {
        int i;
-       char vbuf[5];
+       char buf[8];
+
+       /* This is normally prepared in ssh_kex2 */
+       if (kex_assemble_names(KEX_DEFAULT_PK_ALG, &o->hostkeyalgorithms) != 0)
+               fatal("%s: kex_assemble_names failed", __func__);
 
        /* Most interesting options first: user, host, port */
        dump_cfg_string(oUser, o->user);
@@ -2257,6 +2522,7 @@ dump_client_config(Options *o, const char *host)
        dump_cfg_fmtint(oCompression, o->compression);
        dump_cfg_fmtint(oControlMaster, o->control_master);
        dump_cfg_fmtint(oEnableSSHKeysign, o->enable_ssh_keysign);
+       dump_cfg_fmtint(oClearAllForwardings, o->clear_forwardings);
        dump_cfg_fmtint(oExitOnForwardFailure, o->exit_on_forward_failure);
        dump_cfg_fmtint(oFingerprintHash, o->fingerprint_hash);
        dump_cfg_fmtint(oForwardAgent, o->forward_agent);
@@ -2278,8 +2544,10 @@ dump_client_config(Options *o, const char *host)
        dump_cfg_fmtint(oProxyUseFdpass, o->proxy_use_fdpass);
        dump_cfg_fmtint(oPubkeyAuthentication, o->pubkey_authentication);
        dump_cfg_fmtint(oRequestTTY, o->request_tty);
+#ifdef WITH_RSA1
        dump_cfg_fmtint(oRhostsRSAAuthentication, o->rhosts_rsa_authentication);
        dump_cfg_fmtint(oRSAAuthentication, o->rsa_authentication);
+#endif
        dump_cfg_fmtint(oStreamLocalBindUnlink, o->fwd_opts.streamlocal_bind_unlink);
        dump_cfg_fmtint(oStrictHostKeyChecking, o->strict_host_key_checking);
        dump_cfg_fmtint(oTCPKeepAlive, o->tcp_keep_alive);
@@ -2291,7 +2559,9 @@ dump_client_config(Options *o, const char *host)
 
        /* Integer options */
        dump_cfg_int(oCanonicalizeMaxDots, o->canonicalize_max_dots);
+#ifdef WITH_SSH1
        dump_cfg_int(oCompressionLevel, o->compression_level);
+#endif
        dump_cfg_int(oConnectionAttempts, o->connection_attempts);
        dump_cfg_int(oForwardX11Timeout, o->forward_x11_timeout);
        dump_cfg_int(oNumberOfPasswordPrompts, o->number_of_password_prompts);
@@ -2302,17 +2572,20 @@ dump_client_config(Options *o, const char *host)
        dump_cfg_string(oBindAddress, o->bind_address);
        dump_cfg_string(oCiphers, o->ciphers ? o->ciphers : KEX_CLIENT_ENCRYPT);
        dump_cfg_string(oControlPath, o->control_path);
-       dump_cfg_string(oHostKeyAlgorithms, o->hostkeyalgorithms ? o->hostkeyalgorithms : KEX_DEFAULT_PK_ALG);
+       dump_cfg_string(oHostKeyAlgorithms, o->hostkeyalgorithms);
        dump_cfg_string(oHostKeyAlias, o->host_key_alias);
        dump_cfg_string(oHostbasedKeyTypes, o->hostbased_key_types);
+       dump_cfg_string(oIdentityAgent, o->identity_agent);
        dump_cfg_string(oKbdInteractiveDevices, o->kbd_interactive_devices);
        dump_cfg_string(oKexAlgorithms, o->kex_algorithms ? o->kex_algorithms : KEX_CLIENT_KEX);
        dump_cfg_string(oLocalCommand, o->local_command);
        dump_cfg_string(oLogLevel, log_level_name(o->log_level));
        dump_cfg_string(oMacs, o->macs ? o->macs : KEX_CLIENT_MAC);
+#ifdef ENABLE_PKCS11
        dump_cfg_string(oPKCS11Provider, o->pkcs11_provider);
+#endif
        dump_cfg_string(oPreferredAuthentications, o->preferred_authentications);
-       dump_cfg_string(oProxyCommand, o->proxy_command);
+       dump_cfg_string(oPubkeyAcceptedKeyTypes, o->pubkey_key_types);
        dump_cfg_string(oRevokedHostKeys, o->revoked_host_keys);
        dump_cfg_string(oXAuthLocation, o->xauth_location);
 
@@ -2372,8 +2645,8 @@ dump_client_config(Options *o, const char *host)
        if (o->escape_char == SSH_ESCAPECHAR_NONE)
                printf("escapechar none\n");
        else {
-               vis(vbuf, o->escape_char, VIS_WHITE, 0);
-               printf("escapechar %s\n", vbuf);
+               vis(buf, o->escape_char, VIS_WHITE, 0);
+               printf("escapechar %s\n", buf);
        }
 
        /* oIPQoS */
@@ -2381,10 +2654,36 @@ dump_client_config(Options *o, const char *host)
        printf("%s\n", iptos2str(o->ip_qos_bulk));
 
        /* oRekeyLimit */
-       printf("rekeylimit %lld %d\n",
-           (long long)o->rekey_limit, o->rekey_interval);
+       printf("rekeylimit %llu %d\n",
+           (unsigned long long)o->rekey_limit, o->rekey_interval);
 
        /* oStreamLocalBindMask */
        printf("streamlocalbindmask 0%o\n",
            o->fwd_opts.streamlocal_bind_mask);
+
+       /* oProxyCommand / oProxyJump */
+       if (o->jump_host == NULL)
+               dump_cfg_string(oProxyCommand, o->proxy_command);
+       else {
+               /* Check for numeric addresses */
+               i = strchr(o->jump_host, ':') != NULL ||
+                   strspn(o->jump_host, "1234567890.") == strlen(o->jump_host);
+               snprintf(buf, sizeof(buf), "%d", o->jump_port);
+               printf("proxyjump %s%s%s%s%s%s%s%s%s\n",
+                   /* optional additional jump spec */
+                   o->jump_extra == NULL ? "" : o->jump_extra,
+                   o->jump_extra == NULL ? "" : ",",
+                   /* optional user */
+                   o->jump_user == NULL ? "" : o->jump_user,
+                   o->jump_user == NULL ? "" : "@",
+                   /* opening [ if hostname is numeric */
+                   i ? "[" : "",
+                   /* mandatory hostname */
+                   o->jump_host,
+                   /* closing ] if hostname is numeric */
+                   i ? "]" : "",
+                   /* optional port number */
+                   o->jump_port <= 0 ? "" : ":",
+                   o->jump_port <= 0 ? "" : buf);
+       }
 }
index bb2d552..cef55f7 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.h,v 1.110 2015/07/10 06:21:53 markus Exp $ */
+/* $OpenBSD: readconf.h,v 1.117 2016/07/15 00:24:30 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -95,6 +95,14 @@ typedef struct {
        int    identity_file_userprovided[SSH_MAX_IDENTITY_FILES];
        struct sshkey *identity_keys[SSH_MAX_IDENTITY_FILES];
 
+       int     num_certificate_files; /* Number of extra certificates for ssh. */
+       char    *certificate_files[SSH_MAX_CERTIFICATE_FILES];
+       int     certificate_file_userprovided[SSH_MAX_CERTIFICATE_FILES];
+       struct sshkey *certificates[SSH_MAX_CERTIFICATE_FILES];
+
+       int     add_keys_to_agent;
+       char   *identity_agent;         /* Optional path to ssh-agent socket */
+
        /* Local TCP/IP forward requests. */
        int     num_local_forwards;
        struct Forward *local_forwards;
@@ -104,6 +112,10 @@ typedef struct {
        struct Forward *remote_forwards;
        int     clear_forwardings;
 
+       /* stdio forwarding (-W) host and port */
+       char   *stdio_forward_host;
+       int     stdio_forward_port;
+
        int     enable_ssh_keysign;
        int64_t rekey_limit;
        int     rekey_interval;
@@ -130,8 +142,6 @@ typedef struct {
        int     permit_local_command;
        int     visual_host_key;
 
-       int     use_roaming;
-
        int     request_tty;
 
        int     proxy_use_fdpass;
@@ -153,6 +163,11 @@ typedef struct {
        char   *hostbased_key_types;
        char   *pubkey_key_types;
 
+       char   *jump_user;
+       char   *jump_host;
+       int     jump_port;
+       char   *jump_extra;
+
        char    *ignored_unknown; /* Pattern list of unknown tokens to ignore */
 }       Options;
 
@@ -174,6 +189,7 @@ typedef struct {
 #define SSHCONF_CHECKPERM      1  /* check permissions on config file */
 #define SSHCONF_USERCONF       2  /* user provided config file not system */
 #define SSHCONF_POSTCANON      4  /* After hostname canonicalisation */
+#define SSHCONF_NEVERMATCH     8  /* Match/Host never matches; internal only */
 
 #define SSH_UPDATE_HOSTKEYS_NO 0
 #define SSH_UPDATE_HOSTKEYS_YES        1
@@ -187,6 +203,7 @@ int  process_config_line(Options *, struct passwd *, const char *,
 int     read_config_file(const char *, struct passwd *, const char *,
     const char *, Options *, int);
 int     parse_forward(struct Forward *, const char *, int, int);
+int     parse_jump(const char *, Options *, int);
 int     default_ssh_port(void);
 int     option_clear_or_none(const char *);
 void    dump_client_config(Options *o, const char *host);
@@ -194,5 +211,6 @@ void         dump_client_config(Options *o, const char *host);
 void    add_local_forward(Options *, const struct Forward *);
 void    add_remote_forward(Options *, const struct Forward *);
 void    add_identity_file(Options *, const char *, const char *, int);
+void    add_certificate_file(Options *, const char *, int);
 
 #endif                         /* READCONF_H */
index 869d864..05c8cac 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: readpass.c,v 1.50 2014/02/02 03:44:31 djm Exp $ */
+/* $OpenBSD: readpass.c,v 1.51 2015/12/11 00:20:04 mmcc Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -76,7 +76,7 @@ ssh_askpass(char *askpass, const char *msg)
                close(p[0]);
                if (dup2(p[1], STDOUT_FILENO) < 0)
                        fatal("ssh_askpass: dup2: %s", strerror(errno));
-               execlp(askpass, askpass, msg, (char *) 0);
+               execlp(askpass, askpass, msg, (char *)NULL);
                fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno));
        }
        close(p[1]);
diff --git a/regress/Makefile b/regress/Makefile
new file mode 100644 (file)
index 0000000..b23496b
--- /dev/null
@@ -0,0 +1,233 @@
+#      $OpenBSD: Makefile,v 1.94 2016/12/16 03:51:19 dtucker Exp $
+
+REGRESS_TARGETS=       unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t-exec
+tests:         prep $(REGRESS_TARGETS)
+
+# Interop tests are not run by default
+interop interop-tests: t-exec-interop
+
+prep:
+       test "x${USE_VALGRIND}" = "x" || mkdir -p $(OBJ)/valgrind-out
+
+clean:
+       for F in $(CLEANFILES); do rm -f $(OBJ)$$F; done
+       test -z "${SUDO}" || ${SUDO} rm -f ${SUDO_CLEAN}
+       rm -rf $(OBJ).putty
+
+distclean:     clean
+
+LTESTS=        connect \
+               proxy-connect \
+               connect-privsep \
+               proto-version \
+               proto-mismatch \
+               exit-status \
+               envpass \
+               transfer \
+               banner \
+               rekey \
+               stderr-data \
+               stderr-after-eof \
+               broken-pipe \
+               try-ciphers \
+               yes-head \
+               login-timeout \
+               agent \
+               agent-getpeereid \
+               agent-timeout \
+               agent-ptrace \
+               keyscan \
+               keygen-change \
+               keygen-convert \
+               keygen-moduli \
+               key-options \
+               scp \
+               sftp \
+               sftp-chroot \
+               sftp-cmds \
+               sftp-badcmds \
+               sftp-batch \
+               sftp-glob \
+               sftp-perm \
+               reconfigure \
+               dynamic-forward \
+               forwarding \
+               multiplex \
+               reexec \
+               brokenkeys \
+               sshcfgparse \
+               cfgparse \
+               cfgmatch \
+               addrmatch \
+               localcommand \
+               forcecommand \
+               portnum \
+               keytype \
+               kextype \
+               cert-hostkey \
+               cert-userkey \
+               host-expand \
+               keys-command \
+               forward-control \
+               integrity \
+               krl \
+               multipubkey \
+               limit-keytype \
+               hostkey-agent \
+               keygen-knownhosts \
+               hostkey-rotate \
+               principals-command \
+               cert-file \
+               cfginclude \
+               allow-deny-users
+
+
+#              dhgex \
+
+INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers
+#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
+
+#LTESTS=       cipher-speed
+
+USERNAME!=             id -un
+CLEANFILES=    *.core actual agent-key.* authorized_keys_${USERNAME} \
+               authorized_keys_${USERNAME}.* \
+               authorized_principals_${USERNAME} \
+               banner.in banner.out cert_host_key* cert_user_key* \
+               copy.1 copy.2 data ed25519-agent ed25519-agent* \
+               ed25519-agent.pub empty.in expect failed-regress.log \
+               failed-ssh.log failed-sshd.log hkr.* host.rsa host.rsa1 \
+               host_* host_ca_key* host_krl_* host_revoked_* key.* \
+               key.dsa-* key.ecdsa-* key.ed25519-512 key.ed25519-512.pub \
+               key.rsa-* keys-command-args kh.* known_hosts \
+               known_hosts-cert known_hosts.* krl-* ls.copy modpipe \
+               netcat pidfile putty.rsa2 ready regress.log remote_pid \
+               revoked-* rsa rsa-agent rsa-agent.pub rsa.pub rsa1 \
+               rsa1-agent rsa1-agent.pub rsa1.pub rsa_ssh2_cr.prv \
+               rsa_ssh2_crnl.prv scp-ssh-wrapper.exe \
+               scp-ssh-wrapper.scp setuid-allowed sftp-server.log \
+               sftp-server.sh sftp.log ssh-log-wrapper.sh ssh.log \
+               ssh_config ssh_config.* ssh_proxy ssh_proxy_bak \
+               ssh_proxy_envpass sshd.log sshd_config sshd_config.orig \
+               sshd_proxy sshd_proxy.* sshd_proxy_bak sshd_proxy_orig \
+               t10.out t10.out.pub t12.out t12.out.pub t2.out t3.out \
+               t6.out1 t6.out2 t7.out t7.out.pub t8.out t8.out.pub \
+               t9.out t9.out.pub testdata user_*key* user_ca* user_key*
+
+SUDO_CLEAN+=   /var/run/testdata_${USERNAME} /var/run/keycommand_${USERNAME}
+
+# Enable all malloc(3) randomisations and checks
+TEST_ENV=      "MALLOC_OPTIONS=CFGJRSUX"
+
+TEST_SSH_SSHKEYGEN?=ssh-keygen
+
+CPPFLAGS=-I..
+
+t1:
+       ${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
+       tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv
+       ${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_cr.prv | diff - ${.CURDIR}/rsa_openssh.prv
+       awk '{print $$0 "\r"}' ${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_crnl.prv
+       ${TEST_SSH_SSHKEYGEN} -if ${.OBJDIR}/rsa_ssh2_crnl.prv | diff - ${.CURDIR}/rsa_openssh.prv
+
+t2:
+       cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out
+       chmod 600 $(OBJ)/t2.out
+       ${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub
+
+t3:
+       ${TEST_SSH_SSHKEYGEN} -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/t3.out
+       ${TEST_SSH_SSHKEYGEN} -if $(OBJ)/t3.out | diff - ${.CURDIR}/rsa_openssh.pub
+
+t4:
+       ${TEST_SSH_SSHKEYGEN} -E md5 -lf ${.CURDIR}/rsa_openssh.pub |\
+               awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
+
+t5:
+       ${TEST_SSH_SSHKEYGEN} -Bf ${.CURDIR}/rsa_openssh.pub |\
+               awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
+
+t6:
+       ${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1
+       ${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2
+       chmod 600 $(OBJ)/t6.out1
+       ${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2
+
+$(OBJ)/t7.out:
+       ${TEST_SSH_SSHKEYGEN} -q -t rsa -N '' -f $@
+
+t7: $(OBJ)/t7.out
+       ${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t7.out > /dev/null
+       ${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t7.out > /dev/null
+
+$(OBJ)/t8.out:
+       ${TEST_SSH_SSHKEYGEN} -q -t dsa -N '' -f $@
+
+t8: $(OBJ)/t8.out
+       ${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t8.out > /dev/null
+       ${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t8.out > /dev/null
+
+$(OBJ)/t9.out:
+       test "${TEST_SSH_ECC}" != yes || \
+       ${TEST_SSH_SSHKEYGEN} -q -t ecdsa -N '' -f $@
+
+t9: $(OBJ)/t9.out
+       test "${TEST_SSH_ECC}" != yes || \
+       ${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t9.out > /dev/null
+       test "${TEST_SSH_ECC}" != yes || \
+       ${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t9.out > /dev/null
+
+
+$(OBJ)/t10.out:
+       ${TEST_SSH_SSHKEYGEN} -q -t ed25519 -N '' -f $@
+
+t10: $(OBJ)/t10.out
+       ${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t10.out > /dev/null
+       ${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t10.out > /dev/null
+
+t11:
+       ${TEST_SSH_SSHKEYGEN} -E sha256 -lf ${.CURDIR}/rsa_openssh.pub |\
+               awk '{print $$2}' | diff - ${.CURDIR}/t11.ok
+
+$(OBJ)/t12.out:
+       ${TEST_SSH_SSHKEYGEN} -q -t ed25519 -N '' -C 'test-comment-1234' -f $@
+
+t12: $(OBJ)/t12.out
+       ${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t12.out.pub | grep test-comment-1234 >/dev/null
+
+t-exec:        ${LTESTS:=.sh}
+       @if [ "x$?" = "x" ]; then exit 0; fi; \
+       for TEST in ""$?; do \
+               echo "run test $${TEST}" ... 1>&2; \
+               (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} ${TEST_SHELL} ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
+       done
+
+t-exec-interop:        ${INTEROP_TESTS:=.sh}
+       @if [ "x$?" = "x" ]; then exit 0; fi; \
+       for TEST in ""$?; do \
+               echo "run test $${TEST}" ... 1>&2; \
+               (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} ${TEST_SHELL} ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
+       done
+
+# Not run by default
+interop: ${INTEROP_TARGETS}
+
+# Unit tests, built by top-level Makefile
+unit:
+       set -e ; if test -z "${SKIP_UNIT}" ; then \
+               V="" ; \
+               test "x${USE_VALGRIND}" = "x" || \
+                   V=${.CURDIR}/valgrind-unit.sh ; \
+               $$V ${.OBJDIR}/unittests/sshbuf/test_sshbuf ; \
+               $$V ${.OBJDIR}/unittests/sshkey/test_sshkey \
+                       -d ${.CURDIR}/unittests/sshkey/testdata ; \
+               $$V ${.OBJDIR}/unittests/bitmap/test_bitmap ; \
+               $$V ${.OBJDIR}/unittests/conversion/test_conversion ; \
+               $$V ${.OBJDIR}/unittests/kex/test_kex ; \
+               $$V ${.OBJDIR}/unittests/hostkeys/test_hostkeys \
+                       -d ${.CURDIR}/unittests/hostkeys/testdata ; \
+               $$V ${.OBJDIR}/unittests/match/test_match ; \
+               if test "x${TEST_SSH_UTF8}" = "xyes"  ; then \
+                       $$V ${.OBJDIR}/unittests/utf8/test_utf8 ; \
+               fi \
+       fi
diff --git a/regress/README.regress b/regress/README.regress
new file mode 100644 (file)
index 0000000..9b99bda
--- /dev/null
@@ -0,0 +1,104 @@
+Overview.
+
+$ ./configure && make tests
+
+You'll see some progress info. A failure will cause either the make to
+abort or the driver script to report a "FATAL" failure.
+
+The test consists of 2 parts. The first is the file-based tests which is
+driven by the Makefile, and the second is a set of network or proxycommand
+based tests, which are driven by a driver script (test-exec.sh) which is
+called multiple times by the Makefile.
+
+Failures in the first part will cause the Makefile to return an error.
+Failures in the second part will print a "FATAL" message for the failed
+test and continue.
+
+OpenBSD has a system-wide regression test suite. OpenSSH Portable's test
+suite is based on OpenBSD's with modifications.
+
+
+Environment variables.
+
+SUDO: path to sudo command, if desired. Note that some systems (notably
+       systems using PAM) require sudo to execute some tests.
+TEST_SSH_TRACE: set to "yes" for verbose output from tests 
+TEST_SSH_QUIET: set to "yes" to suppress non-fatal output.
+TEST_SSH_x: path to "ssh" command under test, where x=SSH,SSHD,SSHAGENT,SSHADD
+       SSHKEYGEN,SSHKEYSCAN,SFTP,SFTPSERVER
+OBJ: used by test scripts to access build dir.
+TEST_SHELL: shell used for running the test scripts.
+TEST_SSH_PORT: TCP port to be used for the listening tests.
+TEST_SSH_SSH_CONFOPTS: Configuration directives to be added to ssh_config
+       before running each test.
+TEST_SSH_SSHD_CONFOPTS: Configuration directives to be added to sshd_config
+       before running each test.
+
+
+Individual tests.
+
+You can run an individual test from the top-level Makefile, eg:
+$ make tests LTESTS=agent-timeout
+
+If you need to manipulate the environment more you can invoke test-exec.sh
+directly if you set up the path to find the binaries under test and the
+test scripts themselves, for example:
+
+$ cd regress
+$ PATH=`pwd`/..:$PATH:. TEST_SHELL=/bin/sh sh test-exec.sh `pwd` \
+    agent-timeout.sh
+ok agent timeout test
+
+
+Files.
+
+test-exec.sh: the main test driver. Sets environment, creates config files
+and keys and runs the specified test.
+
+At the time of writing, the individual tests are:
+agent-timeout.sh:      agent timeout test
+agent.sh:              simple agent test
+broken-pipe.sh:                broken pipe test
+connect-privsep.sh:    proxy connect with privsep
+connect.sh:            simple connect
+exit-status.sh:                remote exit status
+forwarding.sh:         local and remote forwarding
+keygen-change.sh:      change passphrase for key
+keyscan.sh:            keyscan
+proto-mismatch.sh:     protocol version mismatch
+proto-version.sh:      sshd version with different protocol combinations
+proxy-connect.sh:      proxy connect
+sftp.sh:               basic sftp put/get
+ssh-com-client.sh:     connect with ssh.com client
+ssh-com-keygen.sh:     ssh.com key import
+ssh-com-sftp.sh:       basic sftp put/get with ssh.com server
+ssh-com.sh:            connect to ssh.com server
+stderr-after-eof.sh:   stderr data after eof
+stderr-data.sh:                stderr data transfer
+transfer.sh:           transfer data
+try-ciphers.sh:                try ciphers
+yes-head.sh:           yes pipe head
+
+
+Problems?
+
+Run the failing test with shell tracing (-x) turned on:
+$ PATH=`pwd`/..:$PATH:. sh -x test-exec.sh `pwd` agent-timeout.sh
+
+Failed tests can be difficult to diagnose. Suggestions:
+- run the individual test via ./test-exec.sh `pwd` [testname]
+- set LogLevel to VERBOSE in test-exec.sh and enable syslogging of
+  auth.debug (eg to /var/log/authlog).
+
+
+Known Issues.
+
+- Similarly, if you do not have "scp" in your system's $PATH then the
+  multiplex scp tests will fail (since the system's shell startup scripts
+  will determine where the shell started by sshd will look for scp).
+
+- Recent GNU coreutils deprecate "head -[n]": this will cause the yes-head
+  test to fail.  The old behaviour can be restored by setting (and
+  exporting) _POSIX2_VERSION=199209 before running the tests.
+
+$Id: README.regress,v 1.12 2011/05/05 03:48:42 djm Exp $
diff --git a/regress/addrmatch.sh b/regress/addrmatch.sh
new file mode 100644 (file)
index 0000000..1584bd4
--- /dev/null
@@ -0,0 +1,56 @@
+#      $OpenBSD: addrmatch.sh,v 1.4 2012/05/13 01:42:32 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="address match"
+
+mv $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+
+run_trial()
+{
+       user="$1"; addr="$2"; host="$3"; laddr="$4"; lport="$5"
+       expected="$6"; descr="$7"
+
+       verbose "test $descr for $user $addr $host"
+       result=`${SSHD} -f $OBJ/sshd_proxy -T \
+           -C user=${user},addr=${addr},host=${host},laddr=${laddr},lport=${lport} | \
+           awk '/^forcecommand/ {print $2}'`
+       if [ "$result" != "$expected" ]; then
+               fail "failed '$descr' expected $expected got $result"
+       fi
+}
+
+cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+cat >>$OBJ/sshd_proxy <<EOD
+ForceCommand nomatch
+Match Address 192.168.0.0/16,!192.168.30.0/24,10.0.0.0/8,host.example.com
+       ForceCommand match1
+Match Address 1.1.1.1,::1,!::3,2000::/16
+       ForceCommand match2
+Match LocalAddress 127.0.0.1,::1
+       ForceCommand match3
+Match LocalPort 5678
+       ForceCommand match4
+EOD
+
+run_trial user 192.168.0.1 somehost 1.2.3.4 1234 match1 "first entry"
+run_trial user 192.168.30.1 somehost 1.2.3.4 1234 nomatch "negative match"
+run_trial user 19.0.0.1 somehost 1.2.3.4 1234 nomatch "no match"
+run_trial user 10.255.255.254 somehost 1.2.3.4 1234 match1 "list middle"
+run_trial user 192.168.30.1 192.168.0.1 1.2.3.4 1234 nomatch "faked IP in hostname"
+run_trial user 1.1.1.1 somehost.example.com 1.2.3.4 1234 match2 "bare IP4 address"
+run_trial user 19.0.0.1 somehost 127.0.0.1 1234 match3 "localaddress"
+run_trial user 19.0.0.1 somehost 1.2.3.4 5678 match4 "localport"
+
+if test "$TEST_SSH_IPV6" != "no"; then
+run_trial user ::1 somehost.example.com ::2 1234 match2 "bare IP6 address"
+run_trial user ::2 somehost.exaple.com ::2 1234 nomatch "deny IPv6"
+run_trial user ::3 somehost ::2 1234 nomatch "IP6 negated"
+run_trial user ::4 somehost ::2 1234 nomatch "IP6 no match"
+run_trial user 2000::1 somehost ::2 1234 match2 "IP6 network"
+run_trial user 2001::1 somehost ::2 1234 nomatch "IP6 network"
+run_trial user ::5 somehost ::1 1234 match3 "IP6 localaddress"
+run_trial user ::5 somehost ::2 5678 match4 "IP6 localport"
+fi
+
+cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+rm $OBJ/sshd_proxy_bak
diff --git a/regress/agent-getpeereid.sh b/regress/agent-getpeereid.sh
new file mode 100644 (file)
index 0000000..34bced1
--- /dev/null
@@ -0,0 +1,56 @@
+#      $OpenBSD: agent-getpeereid.sh,v 1.8 2017/01/06 02:51:16 djm Exp $
+#      Placed in the Public Domain.
+
+tid="disallow agent attach from other uid"
+
+UNPRIV=nobody
+ASOCK=${OBJ}/agent
+SSH_AUTH_SOCK=/nonexistent
+
+if config_defined HAVE_GETPEEREID HAVE_GETPEERUCRED HAVE_SO_PEERCRED ; then
+       :
+else
+       echo "skipped (not supported on this platform)"
+       exit 0
+fi
+case "x$SUDO" in
+       xsudo) sudo=1;;
+       xdoas) ;;
+       x)
+               echo "need SUDO to switch to uid $UNPRIV"
+               exit 0 ;;
+       *)
+               echo "unsupported $SUDO - "doas" and "sudo" are allowed"
+               exit 0 ;;
+esac
+
+trace "start agent"
+eval `${SSHAGENT} -s -a ${ASOCK}` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+       fail "could not start ssh-agent: exit code $r"
+else
+       chmod 644 ${SSH_AUTH_SOCK}
+
+       ${SSHADD} -l > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 1 ]; then
+               fail "ssh-add failed with $r != 1"
+       fi
+       if test -z "$sudo" ; then
+               # doas
+               ${SUDO} -n -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
+       else
+               # sudo
+               < /dev/null ${SUDO} -S -u ${UNPRIV} ${SSHADD} -l 2>/dev/null
+       fi
+       r=$?
+       if [ $r -lt 2 ]; then
+               fail "ssh-add did not fail for ${UNPRIV}: $r < 2"
+       fi
+
+       trace "kill agent"
+       ${SSHAGENT} -k > /dev/null
+fi
+
+rm -f ${OBJ}/agent
diff --git a/regress/agent-pkcs11.sh b/regress/agent-pkcs11.sh
new file mode 100644 (file)
index 0000000..3aa20c8
--- /dev/null
@@ -0,0 +1,71 @@
+#      $OpenBSD: agent-pkcs11.sh,v 1.2 2015/01/12 11:46:32 djm Exp $
+#      Placed in the Public Domain.
+
+tid="pkcs11 agent test"
+
+TEST_SSH_PIN=""
+TEST_SSH_PKCS11=/usr/local/lib/soft-pkcs11.so.0.0
+
+test -f "$TEST_SSH_PKCS11" || fatal "$TEST_SSH_PKCS11 does not exist"
+
+# setup environment for soft-pkcs11 token
+SOFTPKCS11RC=$OBJ/pkcs11.info
+export SOFTPKCS11RC
+# prevent ssh-agent from calling ssh-askpass
+SSH_ASKPASS=/usr/bin/true
+export SSH_ASKPASS
+unset DISPLAY
+
+# start command w/o tty, so ssh-add accepts pin from stdin
+notty() {
+       perl -e 'use POSIX; POSIX::setsid(); 
+           if (fork) { wait; exit($? >> 8); } else { exec(@ARGV) }' "$@"
+}
+
+trace "start agent"
+eval `${SSHAGENT} -s` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+       fail "could not start ssh-agent: exit code $r"
+else
+       trace "generating key/cert"
+       rm -f $OBJ/pkcs11.key $OBJ/pkcs11.crt
+       openssl genrsa -out $OBJ/pkcs11.key 2048 > /dev/null 2>&1
+       chmod 600 $OBJ/pkcs11.key 
+       openssl req -key $OBJ/pkcs11.key -new -x509 \
+           -out $OBJ/pkcs11.crt -text -subj '/CN=pkcs11 test' > /dev/null
+       printf "a\ta\t$OBJ/pkcs11.crt\t$OBJ/pkcs11.key" > $SOFTPKCS11RC
+       # add to authorized keys
+       ${SSHKEYGEN} -y -f $OBJ/pkcs11.key > $OBJ/authorized_keys_$USER
+
+       trace "add pkcs11 key to agent"
+       echo ${TEST_SSH_PIN} | notty ${SSHADD} -s ${TEST_SSH_PKCS11} > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-add -s failed: exit code $r"
+       fi
+
+       trace "pkcs11 list via agent"
+       ${SSHADD} -l > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-add -l failed: exit code $r"
+       fi
+
+       trace "pkcs11 connect via agent"
+       ${SSH} -2 -F $OBJ/ssh_proxy somehost exit 5
+       r=$?
+       if [ $r -ne 5 ]; then
+               fail "ssh connect failed (exit code $r)"
+       fi
+
+       trace "remove pkcs11 keys"
+       echo ${TEST_SSH_PIN} | notty ${SSHADD} -e ${TEST_SSH_PKCS11} > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-add -e failed: exit code $r"
+       fi
+
+       trace "kill agent"
+       ${SSHAGENT} -k > /dev/null
+fi
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
new file mode 100644 (file)
index 0000000..bb676d6
--- /dev/null
@@ -0,0 +1,66 @@
+#      $OpenBSD: agent-ptrace.sh,v 1.2 2014/02/27 21:21:25 djm Exp $
+#      Placed in the Public Domain.
+
+tid="disallow agent ptrace attach"
+
+if have_prog uname ; then
+       case `uname` in
+       AIX|CYGWIN*|OSF1)
+               echo "skipped (not supported on this platform)"
+               exit 0
+               ;;
+       esac
+fi
+
+if [ "x$USER" = "xroot" ]; then
+       echo "Skipped: running as root"
+       exit 0
+fi
+
+if have_prog gdb ; then
+       : ok
+else
+       echo "skipped (gdb not found)"
+       exit 0
+fi
+
+if $OBJ/setuid-allowed ${SSHAGENT} ; then
+       : ok
+else
+       echo "skipped (${SSHAGENT} is mounted on a no-setuid filesystem)"
+       exit 0
+fi
+
+if test -z "$SUDO" ; then
+       echo "skipped (SUDO not set)"
+       exit 0
+else
+       $SUDO chown 0 ${SSHAGENT}
+       $SUDO chgrp 0 ${SSHAGENT}
+       $SUDO chmod 2755 ${SSHAGENT}
+fi
+
+trace "start agent"
+eval `${SSHAGENT} -s` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+       fail "could not start ssh-agent: exit code $r"
+else
+       # ls -l ${SSH_AUTH_SOCK}
+       gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF
+               quit
+EOF
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "gdb failed: exit code $r"
+       fi
+       egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null ${OBJ}/gdb.out
+       r=$?
+       rm -f ${OBJ}/gdb.out
+       if [ $r -ne 0 ]; then
+               fail "ptrace succeeded?: exit code $r"
+       fi
+
+       trace "kill agent"
+       ${SSHAGENT} -k > /dev/null
+fi
diff --git a/regress/agent-timeout.sh b/regress/agent-timeout.sh
new file mode 100644 (file)
index 0000000..9598c20
--- /dev/null
@@ -0,0 +1,36 @@
+#      $OpenBSD: agent-timeout.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="agent timeout test"
+
+SSHAGENT_TIMEOUT=10
+
+trace "start agent"
+eval `${SSHAGENT} -s` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+       fail "could not start ssh-agent: exit code $r"
+else
+       trace "add keys with timeout"
+       for t in ${SSH_KEYTYPES}; do
+               ${SSHADD} -t ${SSHAGENT_TIMEOUT} $OBJ/$t > /dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh-add did succeed exit code 0"
+               fi
+       done
+       n=`${SSHADD} -l 2> /dev/null | wc -l`
+       trace "agent has $n keys"
+       if [ $n -ne 2 ]; then
+               fail "ssh-add -l did not return 2 keys: $n"
+       fi
+       trace "sleeping 2*${SSHAGENT_TIMEOUT} seconds"
+       sleep ${SSHAGENT_TIMEOUT}
+       sleep ${SSHAGENT_TIMEOUT}
+       ${SSHADD} -l 2> /dev/null | grep 'The agent has no identities.' >/dev/null
+       if [ $? -ne 0 ]; then
+               fail "ssh-add -l still returns keys after timeout"
+       fi
+
+       trace "kill agent"
+       ${SSHAGENT} -k > /dev/null
+fi
diff --git a/regress/agent.sh b/regress/agent.sh
new file mode 100644 (file)
index 0000000..c5e2794
--- /dev/null
@@ -0,0 +1,81 @@
+#      $OpenBSD: agent.sh,v 1.11 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="simple agent test"
+
+SSH_AUTH_SOCK=/nonexistent ${SSHADD} -l > /dev/null 2>&1
+if [ $? -ne 2 ]; then
+       fail "ssh-add -l did not fail with exit code 2"
+fi
+
+trace "start agent"
+eval `${SSHAGENT} -s` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+       fail "could not start ssh-agent: exit code $r"
+else
+       ${SSHADD} -l > /dev/null 2>&1
+       if [ $? -ne 1 ]; then
+               fail "ssh-add -l did not fail with exit code 1"
+       fi
+       trace "overwrite authorized keys"
+       printf '' > $OBJ/authorized_keys_$USER
+       for t in ${SSH_KEYTYPES}; do
+               # generate user key for agent
+               rm -f $OBJ/$t-agent
+               ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t-agent ||\
+                        fail "ssh-keygen for $t-agent failed"
+               # add to authorized keys
+               cat $OBJ/$t-agent.pub >> $OBJ/authorized_keys_$USER
+               # add privat key to agent
+               ${SSHADD} $OBJ/$t-agent > /dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh-add did succeed exit code 0"
+               fi
+       done
+       ${SSHADD} -l > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-add -l failed: exit code $r"
+       fi
+       # the same for full pubkey output
+       ${SSHADD} -L > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-add -L failed: exit code $r"
+       fi
+
+       trace "simple connect via agent"
+       for p in ${SSH_PROTOCOLS}; do
+               ${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p
+               r=$?
+               if [ $r -ne 5$p ]; then
+                       fail "ssh connect with protocol $p failed (exit code $r)"
+               fi
+       done
+
+       trace "agent forwarding"
+       for p in ${SSH_PROTOCOLS}; do
+               ${SSH} -A -$p -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1
+               r=$?
+               if [ $r -ne 0 ]; then
+                       fail "ssh-add -l via agent fwd proto $p failed (exit code $r)"
+               fi
+               ${SSH} -A -$p -F $OBJ/ssh_proxy somehost \
+                       "${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p"
+               r=$?
+               if [ $r -ne 5$p ]; then
+                       fail "agent fwd proto $p failed (exit code $r)"
+               fi
+       done
+
+       trace "delete all agent keys"
+       ${SSHADD} -D > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-add -D failed: exit code $r"
+       fi
+
+       trace "kill agent"
+       ${SSHAGENT} -k > /dev/null
+fi
diff --git a/regress/allow-deny-users.sh b/regress/allow-deny-users.sh
new file mode 100644 (file)
index 0000000..86805e1
--- /dev/null
@@ -0,0 +1,40 @@
+# Public Domain
+# Zev Weiss, 2016
+
+tid="AllowUsers/DenyUsers"
+
+me="$LOGNAME"
+if [ "x$me" = "x" ]; then
+       me=`whoami`
+fi
+other="nobody"
+
+test_auth()
+{
+       deny="$1"
+       allow="$2"
+       should_succeed="$3"
+       failmsg="$4"
+
+       start_sshd -oDenyUsers="$deny" -oAllowUsers="$allow"
+
+       ${SSH} -F $OBJ/ssh_config "$me@somehost" true
+       status=$?
+
+       if (test $status -eq 0 && ! $should_succeed) \
+           || (test $status -ne 0 && $should_succeed); then
+               fail "$failmsg"
+       fi
+
+       stop_sshd
+}
+
+#         DenyUsers     AllowUsers    should_succeed  failure_message
+test_auth ""            ""            true            "user in neither DenyUsers nor AllowUsers denied"
+test_auth "$other $me"  ""            false           "user in DenyUsers allowed"
+test_auth "$me $other"  ""            false           "user in DenyUsers allowed"
+test_auth ""            "$other"      false           "user not in AllowUsers allowed"
+test_auth ""            "$other $me"  true            "user in AllowUsers denied"
+test_auth ""            "$me $other"  true            "user in AllowUsers denied"
+test_auth "$me $other"  "$me $other"  false           "user in both DenyUsers and AllowUsers allowed"
+test_auth "$other $me"  "$other $me"  false           "user in both DenyUsers and AllowUsers allowed"
diff --git a/regress/banner.sh b/regress/banner.sh
new file mode 100644 (file)
index 0000000..0b9c950
--- /dev/null
@@ -0,0 +1,44 @@
+#      $OpenBSD: banner.sh,v 1.2 2003/10/11 11:49:49 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="banner"
+echo "Banner $OBJ/banner.in" >> $OBJ/sshd_proxy
+
+rm -f $OBJ/banner.out $OBJ/banner.in $OBJ/empty.in
+touch $OBJ/empty.in
+
+trace "test missing banner file"
+verbose "test $tid: missing banner file"
+( ${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \
+       cmp $OBJ/empty.in $OBJ/banner.out ) || \
+       fail "missing banner file"
+
+for s in 0 10 100 1000 10000 100000 ; do
+       if [ "$s" = "0" ]; then
+               # create empty banner
+               touch $OBJ/banner.in
+       elif [ "$s" = "10" ]; then
+               # create 10-byte banner file
+               echo "abcdefghi" >$OBJ/banner.in
+       else
+               # increase size 10x
+               cp $OBJ/banner.in $OBJ/banner.out
+               for i in 0 1 2 3 4 5 6 7 8 ; do
+                       cat $OBJ/banner.out >> $OBJ/banner.in
+               done
+       fi
+
+       trace "test banner size $s"
+       verbose "test $tid: size $s"
+       ( ${SSH} -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \
+               cmp $OBJ/banner.in $OBJ/banner.out ) || \
+               fail "banner size $s mismatch"
+done
+
+trace "test suppress banner (-q)"
+verbose "test $tid: suppress banner (-q)"
+( ${SSH} -q -2 -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \
+       cmp $OBJ/empty.in $OBJ/banner.out ) || \
+       fail "suppress banner (-q)"
+
+rm -f $OBJ/banner.out $OBJ/banner.in $OBJ/empty.in
diff --git a/regress/broken-pipe.sh b/regress/broken-pipe.sh
new file mode 100644 (file)
index 0000000..a416f7a
--- /dev/null
@@ -0,0 +1,15 @@
+#      $OpenBSD: broken-pipe.sh,v 1.5 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="broken pipe test"
+
+for p in ${SSH_PROTOCOLS}; do
+       trace "protocol $p"
+       for i in 1 2 3 4; do
+               ${SSH} -$p -F $OBJ/ssh_config_config nexthost echo $i 2> /dev/null | true
+               r=$?
+               if [ $r -ne 0 ]; then
+                       fail "broken pipe returns $r for protocol $p"
+               fi
+       done
+done
diff --git a/regress/brokenkeys.sh b/regress/brokenkeys.sh
new file mode 100644 (file)
index 0000000..3e70c34
--- /dev/null
@@ -0,0 +1,23 @@
+#      $OpenBSD: brokenkeys.sh,v 1.1 2004/10/29 23:59:22 djm Exp $
+#      Placed in the Public Domain.
+
+tid="broken keys"
+
+KEYS="$OBJ/authorized_keys_${USER}"
+
+start_sshd
+
+mv ${KEYS} ${KEYS}.bak
+
+# Truncated key
+echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEABTM= bad key" > $KEYS
+cat ${KEYS}.bak >> ${KEYS}
+cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER
+
+${SSH} -2 -F $OBJ/ssh_config somehost true
+if [ $? -ne 0 ]; then
+       fail "ssh connect with protocol $p failed"
+fi
+
+mv ${KEYS}.bak ${KEYS}
+
diff --git a/regress/cert-file.sh b/regress/cert-file.sh
new file mode 100644 (file)
index 0000000..43b8e02
--- /dev/null
@@ -0,0 +1,169 @@
+#      $OpenBSD: cert-file.sh,v 1.5 2017/03/11 23:44:16 djm Exp $
+#      Placed in the Public Domain.
+
+tid="ssh with certificates"
+
+rm -f $OBJ/user_ca_key* $OBJ/user_key*
+rm -f $OBJ/cert_user_key*
+
+# Create a CA key
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_ca_key1 ||\
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t ed25519  -f $OBJ/user_ca_key2 ||\
+       fatal "ssh-keygen failed"
+
+# Make some keys and certificates.
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key1 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key2 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key3 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key4 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key5 || \
+       fatal "ssh-keygen failed"
+
+# Move the certificate to a different address to better control
+# when it is offered.
+${SSHKEYGEN} -q -s $OBJ/user_ca_key1 -I "regress user key for $USER" \
+       -z $$ -n ${USER} $OBJ/user_key1 ||
+               fatal "couldn't sign user_key1 with user_ca_key1"
+mv $OBJ/user_key1-cert.pub $OBJ/cert_user_key1_1.pub
+${SSHKEYGEN} -q -s $OBJ/user_ca_key2 -I "regress user key for $USER" \
+       -z $$ -n ${USER} $OBJ/user_key1 ||
+               fatal "couldn't sign user_key1 with user_ca_key2"
+mv $OBJ/user_key1-cert.pub $OBJ/cert_user_key1_2.pub
+${SSHKEYGEN} -q -s $OBJ/user_ca_key1 -I "regress user key for $USER" \
+       -z $$ -n ${USER} $OBJ/user_key3 ||
+               fatal "couldn't sign user_key3 with user_ca_key1"
+rm $OBJ/user_key3.pub # to test use of private key w/o public half.
+${SSHKEYGEN} -q -s $OBJ/user_ca_key1 -I "regress user key for $USER" \
+       -z $$ -n ${USER} $OBJ/user_key4 ||
+               fatal "couldn't sign user_key4 with user_ca_key1"
+rm $OBJ/user_key4 $OBJ/user_key4.pub # to test no matching pub/private key case.
+
+trace 'try with identity files'
+opts="-F $OBJ/ssh_proxy -oIdentitiesOnly=yes"
+opts2="$opts -i $OBJ/user_key1 -i $OBJ/user_key2"
+echo "cert-authority $(cat $OBJ/user_ca_key1.pub)" > $OBJ/authorized_keys_$USER
+
+# Make a clean config that doesn't have any pre-added identities.
+cat $OBJ/ssh_proxy | grep -v IdentityFile > $OBJ/no_identity_config
+
+# XXX: verify that certificate used was what we expect. Needs exposure of
+# keys via enviornment variable or similar.
+
+for p in ${SSH_PROTOCOLS}; do
+       # Key with no .pub should work - finding the equivalent *-cert.pub.
+       verbose "protocol $p: identity cert with no plain public file"
+       ${SSH} -F $OBJ/no_identity_config -oIdentitiesOnly=yes \
+           -i $OBJ/user_key3 somehost exit 5$p
+       [ $? -ne 5$p ] && fail "ssh failed"
+
+       # CertificateFile matching private key with no .pub file should work.
+       verbose "protocol $p: CertificateFile with no plain public file"
+       ${SSH} -F $OBJ/no_identity_config -oIdentitiesOnly=yes \
+           -oCertificateFile=$OBJ/user_key3-cert.pub \
+           -i $OBJ/user_key3 somehost exit 5$p
+       [ $? -ne 5$p ] && fail "ssh failed"
+
+       # Just keys should fail
+       verbose "protocol $p: plain keys"
+       ${SSH} $opts2 somehost exit 5$p
+       r=$?
+       if [ $r -eq 5$p ]; then
+               fail "ssh succeeded with no certs in protocol $p"
+       fi
+
+       # Keys with untrusted cert should fail.
+       verbose "protocol $p: untrusted cert"
+       opts3="$opts2 -oCertificateFile=$OBJ/cert_user_key1_2.pub"
+       ${SSH} $opts3 somehost exit 5$p
+       r=$?
+       if [ $r -eq 5$p ]; then
+               fail "ssh succeeded with bad cert in protocol $p"
+       fi
+
+       # Good cert with bad key should fail.
+       verbose "protocol $p: good cert, bad key"
+       opts3="$opts -i $OBJ/user_key2"
+       opts3="$opts3 -oCertificateFile=$OBJ/cert_user_key1_1.pub"
+       ${SSH} $opts3 somehost exit 5$p
+       r=$?
+       if [ $r -eq 5$p ]; then
+               fail "ssh succeeded with no matching key in protocol $p"
+       fi
+
+       # Keys with one trusted cert, should succeed.
+       verbose "protocol $p: single trusted"
+       opts3="$opts2 -oCertificateFile=$OBJ/cert_user_key1_1.pub"
+       ${SSH} $opts3 somehost exit 5$p
+       r=$?
+       if [ $r -ne 5$p ]; then
+               fail "ssh failed with trusted cert and key in protocol $p"
+       fi
+
+       # Multiple certs and keys, with one trusted cert, should succeed.
+       verbose "protocol $p: multiple trusted"
+       opts3="$opts2 -oCertificateFile=$OBJ/cert_user_key1_2.pub"
+       opts3="$opts3 -oCertificateFile=$OBJ/cert_user_key1_1.pub"
+       ${SSH} $opts3 somehost exit 5$p
+       r=$?
+       if [ $r -ne 5$p ]; then
+               fail "ssh failed with multiple certs in protocol $p"
+       fi
+done
+
+#next, using an agent in combination with the keys
+SSH_AUTH_SOCK=/nonexistent ${SSHADD} -l > /dev/null 2>&1
+if [ $? -ne 2 ]; then
+       fatal "ssh-add -l did not fail with exit code 2"
+fi
+
+trace "start agent"
+eval `${SSHAGENT} -s` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+       fatal "could not start ssh-agent: exit code $r"
+fi
+
+# add private keys to agent
+${SSHADD} -k $OBJ/user_key2 > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+       fatal "ssh-add did not succeed with exit code 0"
+fi
+${SSHADD} -k $OBJ/user_key1 > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+       fatal "ssh-add did not succeed with exit code 0"
+fi
+
+# try ssh with the agent and certificates
+# note: ssh agent only uses certificates in protocol 2
+opts="-F $OBJ/ssh_proxy"
+# with no certificates, shoud fail
+${SSH} -2 $opts somehost exit 52
+if [ $? -eq 52 ]; then
+       fail "ssh connect with agent in protocol 2 succeeded with no cert"
+fi
+
+#with an untrusted certificate, should fail
+opts="$opts -oCertificateFile=$OBJ/cert_user_key1_2.pub"
+${SSH} -2 $opts somehost exit 52
+if [ $? -eq 52 ]; then
+       fail "ssh connect with agent in protocol 2 succeeded with bad cert"
+fi
+
+#with an additional trusted certificate, should succeed
+opts="$opts -oCertificateFile=$OBJ/cert_user_key1_1.pub"
+${SSH} -2 $opts somehost exit 52
+if [ $? -ne 52 ]; then
+       fail "ssh connect with agent in protocol 2 failed with good cert"
+fi
+
+trace "kill agent"
+${SSHAGENT} -k > /dev/null
+
+#cleanup
+rm -f $OBJ/user_ca_key* $OBJ/user_key*
+rm -f $OBJ/cert_user_key*
diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
new file mode 100644 (file)
index 0000000..62261cf
--- /dev/null
@@ -0,0 +1,314 @@
+#      $OpenBSD: cert-hostkey.sh,v 1.14 2016/05/02 09:52:00 djm Exp $
+#      Placed in the Public Domain.
+
+tid="certified host keys"
+
+rm -f $OBJ/known_hosts-cert* $OBJ/host_ca_key* $OBJ/host_revoked_*
+rm -f $OBJ/cert_host_key* $OBJ/host_krl_*
+
+# Allow all hostkey/pubkey types, prefer certs for the client
+types=""
+for i in `$SSH -Q key`; do
+       if [ -z "$types" ]; then
+               types="$i"
+               continue
+       fi
+       case "$i" in
+       *cert*) types="$i,$types";;
+       *)      types="$types,$i";;
+       esac
+done
+(
+       echo "HostKeyAlgorithms ${types}"
+       echo "PubkeyAcceptedKeyTypes *"
+) >> $OBJ/ssh_proxy
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+(
+       echo "HostKeyAlgorithms *"
+       echo "PubkeyAcceptedKeyTypes *"
+) >> $OBJ/sshd_proxy_bak
+
+HOSTS='localhost-with-alias,127.0.0.1,::1'
+
+kh_ca() {
+       for k in "$@" ; do
+               printf "@cert-authority $HOSTS "
+               cat $OBJ/$k || fatal "couldn't cat $k"
+       done
+}
+kh_revoke() {
+       for k in "$@" ; do
+               printf "@revoked * "
+               cat $OBJ/$k || fatal "couldn't cat $k"
+       done
+}
+
+# Create a CA key and add it to known hosts. Ed25519 chosen for speed.
+# RSA for testing RSA/SHA2 signatures.
+${SSHKEYGEN} -q -N '' -t ed25519  -f $OBJ/host_ca_key ||\
+       fail "ssh-keygen of host_ca_key failed"
+${SSHKEYGEN} -q -N '' -t rsa  -f $OBJ/host_ca_key2 ||\
+       fail "ssh-keygen of host_ca_key failed"
+
+kh_ca host_ca_key.pub host_ca_key2.pub > $OBJ/known_hosts-cert.orig
+cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+
+# Plain text revocation files
+touch $OBJ/host_revoked_empty
+touch $OBJ/host_revoked_plain
+touch $OBJ/host_revoked_cert
+cat $OBJ/host_ca_key.pub $OBJ/host_ca_key2.pub > $OBJ/host_revoked_ca
+
+PLAIN_TYPES=`$SSH -Q key-plain | sed 's/^ssh-dss/ssh-dsa/g;s/^ssh-//'`
+
+if echo "$PLAIN_TYPES" | grep '^rsa$' >/dev/null 2>&1 ; then
+       PLAIN_TYPES="$PLAIN_TYPES rsa-sha2-256 rsa-sha2-512"
+fi
+
+# Prepare certificate, plain key and CA KRLs
+${SSHKEYGEN} -kf $OBJ/host_krl_empty || fatal "KRL init failed"
+${SSHKEYGEN} -kf $OBJ/host_krl_plain || fatal "KRL init failed"
+${SSHKEYGEN} -kf $OBJ/host_krl_cert || fatal "KRL init failed"
+${SSHKEYGEN} -kf $OBJ/host_krl_ca $OBJ/host_ca_key.pub $OBJ/host_ca_key2.pub \
+       || fatal "KRL init failed"
+
+# Generate and sign host keys
+serial=1
+for ktype in $PLAIN_TYPES ; do
+       verbose "$tid: sign host ${ktype} cert"
+       # Generate and sign a host key
+       ${SSHKEYGEN} -q -N '' -t ${ktype} \
+           -f $OBJ/cert_host_key_${ktype} || \
+               fatal "ssh-keygen of cert_host_key_${ktype} failed"
+       ${SSHKEYGEN} -ukf $OBJ/host_krl_plain \
+           $OBJ/cert_host_key_${ktype}.pub || fatal "KRL update failed"
+       cat $OBJ/cert_host_key_${ktype}.pub >> $OBJ/host_revoked_plain
+       case $ktype in
+       rsa-sha2-*)     tflag="-t $ktype"; ca="$OBJ/host_ca_key2" ;;
+       *)              tflag=""; ca="$OBJ/host_ca_key" ;;
+       esac
+       ${SSHKEYGEN} -h -q -s $ca -z $serial $tflag \
+           -I "regress host key for $USER" \
+           -n $HOSTS $OBJ/cert_host_key_${ktype} ||
+               fatal "couldn't sign cert_host_key_${ktype}"
+       ${SSHKEYGEN} -ukf $OBJ/host_krl_cert \
+           $OBJ/cert_host_key_${ktype}-cert.pub || \
+               fatal "KRL update failed"
+       cat $OBJ/cert_host_key_${ktype}-cert.pub >> $OBJ/host_revoked_cert
+       serial=`expr $serial + 1`
+done
+
+attempt_connect() {
+       _ident="$1"
+       _expect_success="$2"
+       shift; shift
+       verbose "$tid: $_ident expect success $_expect_success"
+       cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+       ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
+           -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
+           "$@" -F $OBJ/ssh_proxy somehost true
+       _r=$?
+       if [ "x$_expect_success" = "xyes" ] ; then
+               if [ $_r -ne 0 ]; then
+                       fail "ssh cert connect $_ident failed"
+               fi
+       else
+               if [ $_r -eq 0 ]; then
+                       fail "ssh cert connect $_ident succeeded unexpectedly"
+               fi
+       fi
+}
+
+# Basic connect and revocation tests.
+for privsep in yes no ; do
+       for ktype in $PLAIN_TYPES ; do
+               verbose "$tid: host ${ktype} cert connect privsep $privsep"
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo HostKey $OBJ/cert_host_key_${ktype}
+                       echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
+                       echo UsePrivilegeSeparation $privsep
+               ) > $OBJ/sshd_proxy
+
+               #               test name                         expect success
+               attempt_connect "$ktype basic connect"                  "yes"
+               attempt_connect "$ktype empty KRL"                      "yes" \
+                   -oRevokedHostKeys=$OBJ/host_krl_empty
+               attempt_connect "$ktype KRL w/ plain key revoked"       "no" \
+                   -oRevokedHostKeys=$OBJ/host_krl_plain
+               attempt_connect "$ktype KRL w/ cert revoked"            "no" \
+                   -oRevokedHostKeys=$OBJ/host_krl_cert
+               attempt_connect "$ktype KRL w/ CA revoked"              "no" \
+                   -oRevokedHostKeys=$OBJ/host_krl_ca
+               attempt_connect "$ktype empty plaintext revocation"     "yes" \
+                   -oRevokedHostKeys=$OBJ/host_revoked_empty
+               attempt_connect "$ktype plain key plaintext revocation" "no" \
+                   -oRevokedHostKeys=$OBJ/host_revoked_plain
+               attempt_connect "$ktype cert plaintext revocation"      "no" \
+                   -oRevokedHostKeys=$OBJ/host_revoked_cert
+               attempt_connect "$ktype CA plaintext revocation"        "no" \
+                   -oRevokedHostKeys=$OBJ/host_revoked_ca
+       done
+done
+
+# Revoked certificates with key present
+kh_ca host_ca_key.pub host_ca_key2.pub > $OBJ/known_hosts-cert.orig
+for ktype in $PLAIN_TYPES ; do
+       test -f "$OBJ/cert_host_key_${ktype}.pub" || fatal "no pubkey"
+       kh_revoke cert_host_key_${ktype}.pub >> $OBJ/known_hosts-cert.orig
+done
+cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+for privsep in yes no ; do
+       for ktype in $PLAIN_TYPES ; do
+               verbose "$tid: host ${ktype} revoked cert privsep $privsep"
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo HostKey $OBJ/cert_host_key_${ktype}
+                       echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
+                       echo UsePrivilegeSeparation $privsep
+               ) > $OBJ/sshd_proxy
+
+               cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+               ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
+                   -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
+                       -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+       done
+done
+
+# Revoked CA
+kh_ca host_ca_key.pub host_ca_key2.pub > $OBJ/known_hosts-cert.orig
+kh_revoke host_ca_key.pub host_ca_key2.pub >> $OBJ/known_hosts-cert.orig
+cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+for ktype in $PLAIN_TYPES ; do
+       verbose "$tid: host ${ktype} revoked cert"
+       (
+               cat $OBJ/sshd_proxy_bak
+               echo HostKey $OBJ/cert_host_key_${ktype}
+               echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
+       ) > $OBJ/sshd_proxy
+       cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+       ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
+           -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
+               -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               fail "ssh cert connect succeeded unexpectedly"
+       fi
+done
+
+# Create a CA key and add it to known hosts
+kh_ca host_ca_key.pub host_ca_key2.pub > $OBJ/known_hosts-cert.orig
+cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+
+test_one() {
+       ident=$1
+       result=$2
+       sign_opts=$3
+
+       for kt in rsa ed25519 ; do
+               case $ktype in
+               rsa-sha2-*)     tflag="-t $ktype"; ca="$OBJ/host_ca_key2" ;;
+               *)              tflag=""; ca="$OBJ/host_ca_key" ;;
+               esac
+               ${SSHKEYGEN} -q -s $ca $tflag -I "regress host key for $USER" \
+                   $sign_opts $OBJ/cert_host_key_${kt} ||
+                       fatal "couldn't sign cert_host_key_${kt}"
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo HostKey $OBJ/cert_host_key_${kt}
+                       echo HostCertificate $OBJ/cert_host_key_${kt}-cert.pub
+               ) > $OBJ/sshd_proxy
+
+               cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+               ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
+                   -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               rc=$?
+               if [ "x$result" = "xsuccess" ] ; then
+                       if [ $rc -ne 0 ]; then
+                               fail "ssh cert connect $ident failed unexpectedly"
+                       fi
+               else
+                       if [ $rc -eq 0 ]; then
+                               fail "ssh cert connect $ident succeeded unexpectedly"
+                       fi
+               fi
+       done
+}
+
+test_one "user-certificate"    failure "-n $HOSTS"
+test_one "empty principals"    success "-h"
+test_one "wrong principals"    failure "-h -n foo"
+test_one "cert not yet valid"  failure "-h -V20200101:20300101"
+test_one "cert expired"                failure "-h -V19800101:19900101"
+test_one "cert valid interval" success "-h -V-1w:+2w"
+test_one "cert has constraints"        failure "-h -Oforce-command=false"
+
+# Check downgrade of cert to raw key when no CA found
+for ktype in $PLAIN_TYPES ; do
+       rm -f $OBJ/known_hosts-cert $OBJ/cert_host_key*
+       verbose "$tid: host ${ktype} ${v} cert downgrade to raw key"
+       # Generate and sign a host key
+       ${SSHKEYGEN} -q -N '' -t ${ktype} -f $OBJ/cert_host_key_${ktype} || \
+               fail "ssh-keygen of cert_host_key_${ktype} failed"
+       case $ktype in
+       rsa-sha2-*)     tflag="-t $ktype"; ca="$OBJ/host_ca_key2" ;;
+       *)              tflag=""; ca="$OBJ/host_ca_key" ;;
+       esac
+       ${SSHKEYGEN} -h -q $tflag -s $ca $tflag \
+           -I "regress host key for $USER" \
+           -n $HOSTS $OBJ/cert_host_key_${ktype} ||
+               fatal "couldn't sign cert_host_key_${ktype}"
+       (
+               printf "$HOSTS "
+               cat $OBJ/cert_host_key_${ktype}.pub
+       ) > $OBJ/known_hosts-cert
+       (
+               cat $OBJ/sshd_proxy_bak
+               echo HostKey $OBJ/cert_host_key_${ktype}
+               echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
+       ) > $OBJ/sshd_proxy
+
+       ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
+           -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
+               -F $OBJ/ssh_proxy somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh cert connect failed"
+       fi
+done
+
+# Wrong certificate
+kh_ca host_ca_key.pub host_ca_key2.pub > $OBJ/known_hosts-cert.orig
+cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+for kt in $PLAIN_TYPES ; do
+       verbose "$tid: host ${kt} connect wrong cert"
+       rm -f $OBJ/cert_host_key*
+       # Self-sign key
+       ${SSHKEYGEN} -q -N '' -t ${kt} -f $OBJ/cert_host_key_${kt} || \
+               fail "ssh-keygen of cert_host_key_${kt} failed"
+       case $kt in
+       rsa-sha2-*)     tflag="-t $kt" ;;
+       *)              tflag="" ;;
+       esac
+       ${SSHKEYGEN} $tflag -h -q -s $OBJ/cert_host_key_${kt} \
+           -I "regress host key for $USER" \
+           -n $HOSTS $OBJ/cert_host_key_${kt} ||
+               fatal "couldn't sign cert_host_key_${kt}"
+       (
+               cat $OBJ/sshd_proxy_bak
+               echo HostKey $OBJ/cert_host_key_${kt}
+               echo HostCertificate $OBJ/cert_host_key_${kt}-cert.pub
+       ) > $OBJ/sshd_proxy
+
+       cp $OBJ/known_hosts-cert.orig $OBJ/known_hosts-cert
+       ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
+           -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
+               -F $OBJ/ssh_proxy -q somehost true >/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               fail "ssh cert connect $ident succeeded unexpectedly"
+       fi
+done
+
+rm -f $OBJ/known_hosts-cert* $OBJ/host_ca_key* $OBJ/cert_host_key*
diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh
new file mode 100644 (file)
index 0000000..7005fd5
--- /dev/null
@@ -0,0 +1,390 @@
+#      $OpenBSD: cert-userkey.sh,v 1.17 2016/11/30 03:01:33 djm Exp $
+#      Placed in the Public Domain.
+
+tid="certified user keys"
+
+rm -f $OBJ/authorized_keys_$USER $OBJ/user_ca_key* $OBJ/cert_user_key*
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
+
+PLAIN_TYPES=`$SSH -Q key-plain | sed 's/^ssh-dss/ssh-dsa/;s/^ssh-//'`
+
+if echo "$PLAIN_TYPES" | grep '^rsa$' >/dev/null 2>&1 ; then
+       PLAIN_TYPES="$PLAIN_TYPES rsa-sha2-256 rsa-sha2-512"
+fi
+
+kname() {
+       case $ktype in
+       rsa-sha2-*) ;;
+       # subshell because some seds will add a newline
+       *) n=$(echo $1 | sed 's/^dsa/ssh-dss/;s/^rsa/ssh-rsa/;s/^ed/ssh-ed/') ;;
+       esac
+       echo "$n*,ssh-rsa*,ssh-ed25519*"
+}
+
+# Create a CA key
+${SSHKEYGEN} -q -N '' -t rsa  -f $OBJ/user_ca_key ||\
+       fail "ssh-keygen of user_ca_key failed"
+
+# Generate and sign user keys
+for ktype in $PLAIN_TYPES $EXTRA_TYPES ; do
+       verbose "$tid: sign user ${ktype} cert"
+       ${SSHKEYGEN} -q -N '' -t ${ktype} \
+           -f $OBJ/cert_user_key_${ktype} || \
+               fatal "ssh-keygen of cert_user_key_${ktype} failed"
+       # Generate RSA/SHA2 certs for rsa-sha2* keys.
+       case $ktype in
+       rsa-sha2-*)     tflag="-t $ktype" ;;
+       *)              tflag="" ;;
+       esac
+       ${SSHKEYGEN} -q -s $OBJ/user_ca_key -z $$ \
+           -I "regress user key for $USER" \
+           -n ${USER},mekmitasdigoat $tflag $OBJ/cert_user_key_${ktype} || \
+               fatal "couldn't sign cert_user_key_${ktype}"
+done
+
+# Test explicitly-specified principals
+for ktype in $EXTRA_TYPES $PLAIN_TYPES ; do
+       t=$(kname $ktype)
+       for privsep in yes no ; do
+               _prefix="${ktype} privsep $privsep"
+
+               # Setup for AuthorizedPrincipalsFile
+               rm -f $OBJ/authorized_keys_$USER
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo "UsePrivilegeSeparation $privsep"
+                       echo "AuthorizedPrincipalsFile " \
+                           "$OBJ/authorized_principals_%u"
+                       echo "TrustedUserCAKeys $OBJ/user_ca_key.pub"
+                       echo "PubkeyAcceptedKeyTypes ${t}"
+               ) > $OBJ/sshd_proxy
+               (
+                       cat $OBJ/ssh_proxy_bak
+                       echo "PubkeyAcceptedKeyTypes ${t}"
+               ) > $OBJ/ssh_proxy
+
+               # Missing authorized_principals
+               verbose "$tid: ${_prefix} missing authorized_principals"
+               rm -f $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # Empty authorized_principals
+               verbose "$tid: ${_prefix} empty authorized_principals"
+               echo > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # Wrong authorized_principals
+               verbose "$tid: ${_prefix} wrong authorized_principals"
+               echo gregorsamsa > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # Correct authorized_principals
+               verbose "$tid: ${_prefix} correct authorized_principals"
+               echo mekmitasdigoat > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh cert connect failed"
+               fi
+
+               # authorized_principals with bad key option
+               verbose "$tid: ${_prefix} authorized_principals bad key opt"
+               echo 'blah mekmitasdigoat' > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # authorized_principals with command=false
+               verbose "$tid: ${_prefix} authorized_principals command=false"
+               echo 'command="false" mekmitasdigoat' > \
+                   $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+
+               # authorized_principals with command=true
+               verbose "$tid: ${_prefix} authorized_principals command=true"
+               echo 'command="true" mekmitasdigoat' > \
+                   $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost false >/dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh cert connect failed"
+               fi
+
+               # Setup for principals= key option
+               rm -f $OBJ/authorized_principals_$USER
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo "UsePrivilegeSeparation $privsep"
+                       echo "PubkeyAcceptedKeyTypes ${t}"
+               ) > $OBJ/sshd_proxy
+               (
+                       cat $OBJ/ssh_proxy_bak
+                       echo "PubkeyAcceptedKeyTypes ${t}"
+               ) > $OBJ/ssh_proxy
+
+               # Wrong principals list
+               verbose "$tid: ${_prefix} wrong principals key option"
+               (
+                       printf 'cert-authority,principals="gregorsamsa" '
+                       cat $OBJ/user_ca_key.pub
+               ) > $OBJ/authorized_keys_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # Correct principals list
+               verbose "$tid: ${_prefix} correct principals key option"
+               (
+                       printf 'cert-authority,principals="mekmitasdigoat" '
+                       cat $OBJ/user_ca_key.pub
+               ) > $OBJ/authorized_keys_$USER
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh cert connect failed"
+               fi
+       done
+done
+
+basic_tests() {
+       auth=$1
+       if test "x$auth" = "xauthorized_keys" ; then
+               # Add CA to authorized_keys
+               (
+                       printf 'cert-authority '
+                       cat $OBJ/user_ca_key.pub
+               ) > $OBJ/authorized_keys_$USER
+       else
+               echo > $OBJ/authorized_keys_$USER
+               extra_sshd="TrustedUserCAKeys $OBJ/user_ca_key.pub"
+       fi
+
+       for ktype in $PLAIN_TYPES ; do
+               t=$(kname $ktype)
+               for privsep in yes no ; do
+                       _prefix="${ktype} privsep $privsep $auth"
+                       # Simple connect
+                       verbose "$tid: ${_prefix} connect"
+                       (
+                               cat $OBJ/sshd_proxy_bak
+                               echo "UsePrivilegeSeparation $privsep"
+                               echo "PubkeyAcceptedKeyTypes ${t}"
+                               echo "$extra_sshd"
+                       ) > $OBJ/sshd_proxy
+                       (
+                               cat $OBJ/ssh_proxy_bak
+                               echo "PubkeyAcceptedKeyTypes ${t}"
+                       ) > $OBJ/ssh_proxy
+
+                       ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                           -F $OBJ/ssh_proxy somehost true
+                       if [ $? -ne 0 ]; then
+                               fail "ssh cert connect failed"
+                       fi
+
+                       # Revoked keys
+                       verbose "$tid: ${_prefix} revoked key"
+                       (
+                               cat $OBJ/sshd_proxy_bak
+                               echo "UsePrivilegeSeparation $privsep"
+                               echo "RevokedKeys $OBJ/cert_user_key_revoked"
+                               echo "PubkeyAcceptedKeyTypes ${t}"
+                               echo "$extra_sshd"
+                       ) > $OBJ/sshd_proxy
+                       cp $OBJ/cert_user_key_${ktype}.pub \
+                           $OBJ/cert_user_key_revoked
+                       ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                           -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+                       if [ $? -eq 0 ]; then
+                               fail "ssh cert connect succeeded unexpecedly"
+                       fi
+                       verbose "$tid: ${_prefix} revoked via KRL"
+                       rm $OBJ/cert_user_key_revoked
+                       ${SSHKEYGEN} -kqf $OBJ/cert_user_key_revoked \
+                           $OBJ/cert_user_key_${ktype}.pub
+                       ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                           -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+                       if [ $? -eq 0 ]; then
+                               fail "ssh cert connect succeeded unexpecedly"
+                       fi
+                       verbose "$tid: ${_prefix} empty KRL"
+                       ${SSHKEYGEN} -kqf $OBJ/cert_user_key_revoked
+                       ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                           -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+                       if [ $? -ne 0 ]; then
+                               fail "ssh cert connect failed"
+                       fi
+               done
+
+               # Revoked CA
+               verbose "$tid: ${ktype} $auth revoked CA key"
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo "RevokedKeys $OBJ/user_ca_key.pub"
+                       echo "PubkeyAcceptedKeyTypes ${t}"
+                       echo "$extra_sshd"
+               ) > $OBJ/sshd_proxy
+               ${SSH} -2i $OBJ/cert_user_key_${ktype} -F $OBJ/ssh_proxy \
+                   somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpecedly"
+               fi
+       done
+
+       verbose "$tid: $auth CA does not authenticate"
+       (
+               cat $OBJ/sshd_proxy_bak
+               echo "PubkeyAcceptedKeyTypes ${t}"
+               echo "$extra_sshd"
+       ) > $OBJ/sshd_proxy
+       verbose "$tid: ensure CA key does not authenticate user"
+       ${SSH} -2i $OBJ/user_ca_key \
+           -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               fail "ssh cert connect with CA key succeeded unexpectedly"
+       fi
+}
+
+basic_tests authorized_keys
+basic_tests TrustedUserCAKeys
+
+test_one() {
+       ident=$1
+       result=$2
+       sign_opts=$3
+       auth_choice=$4
+       auth_opt=$5
+
+       if test "x$auth_choice" = "x" ; then
+               auth_choice="authorized_keys TrustedUserCAKeys"
+       fi
+
+       for auth in $auth_choice ; do
+               for ktype in rsa ed25519 ; do
+                       cat $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy
+                       if test "x$auth" = "xauthorized_keys" ; then
+                               # Add CA to authorized_keys
+                               (
+                                       printf "cert-authority${auth_opt} "
+                                       cat $OBJ/user_ca_key.pub
+                               ) > $OBJ/authorized_keys_$USER
+                       else
+                               echo > $OBJ/authorized_keys_$USER
+                               echo "TrustedUserCAKeys $OBJ/user_ca_key.pub" \
+                                   >> $OBJ/sshd_proxy
+                               echo "PubkeyAcceptedKeyTypes ${t}*" \
+                                   >> $OBJ/sshd_proxy
+                               if test "x$auth_opt" != "x" ; then
+                                       echo $auth_opt >> $OBJ/sshd_proxy
+                               fi
+                       fi
+
+                       verbose "$tid: $ident auth $auth expect $result $ktype"
+                       ${SSHKEYGEN} -q -s $OBJ/user_ca_key \
+                           -I "regress user key for $USER" \
+                           $sign_opts $OBJ/cert_user_key_${ktype} ||
+                               fail "couldn't sign cert_user_key_${ktype}"
+
+                       ${SSH} -2i $OBJ/cert_user_key_${ktype} \
+                           -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+                       rc=$?
+                       if [ "x$result" = "xsuccess" ] ; then
+                               if [ $rc -ne 0 ]; then
+                                       fail "$ident failed unexpectedly"
+                               fi
+                       else
+                               if [ $rc -eq 0 ]; then
+                                       fail "$ident succeeded unexpectedly"
+                               fi
+                       fi
+               done
+       done
+}
+
+test_one "correct principal"   success "-n ${USER}"
+test_one "host-certificate"    failure "-n ${USER} -h"
+test_one "wrong principals"    failure "-n foo"
+test_one "cert not yet valid"  failure "-n ${USER} -V20200101:20300101"
+test_one "cert expired"                failure "-n ${USER} -V19800101:19900101"
+test_one "cert valid interval" success "-n ${USER} -V-1w:+2w"
+test_one "wrong source-address"        failure "-n ${USER} -Osource-address=10.0.0.0/8"
+test_one "force-command"       failure "-n ${USER} -Oforce-command=false"
+
+# Behaviour is different here: TrustedUserCAKeys doesn't allow empty principals
+test_one "empty principals"    success "" authorized_keys
+test_one "empty principals"    failure "" TrustedUserCAKeys
+
+# Check explicitly-specified principals: an empty principals list in the cert
+# should always be refused.
+
+# AuthorizedPrincipalsFile
+rm -f $OBJ/authorized_keys_$USER
+echo mekmitasdigoat > $OBJ/authorized_principals_$USER
+test_one "AuthorizedPrincipalsFile principals" success "-n mekmitasdigoat" \
+    TrustedUserCAKeys "AuthorizedPrincipalsFile $OBJ/authorized_principals_%u"
+test_one "AuthorizedPrincipalsFile no principals" failure "" \
+    TrustedUserCAKeys "AuthorizedPrincipalsFile $OBJ/authorized_principals_%u"
+
+# principals= key option
+rm -f $OBJ/authorized_principals_$USER
+test_one "principals key option principals" success "-n mekmitasdigoat" \
+    authorized_keys ',principals="mekmitasdigoat"'
+test_one "principals key option no principals" failure "" \
+    authorized_keys ',principals="mekmitasdigoat"'
+
+# command= options vs. force-command in key
+test_one "force-command match true" success \
+    "-n ${USER} -Oforce-command=true" \
+    authorized_keys ',command="true"'
+test_one "force-command match true" failure \
+    "-n ${USER} -Oforce-command=false" \
+    authorized_keys ',command="false"'
+test_one "force-command mismatch 1" failure \
+    "-n ${USER} -Oforce-command=false" \
+    authorized_keys ',command="true"'
+test_one "force-command mismatch 2" failure \
+    "-n ${USER} -Oforce-command=true" \
+    authorized_keys ',command="false"'
+
+# Wrong certificate
+cat $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy
+for ktype in $PLAIN_TYPES ; do
+       t=$(kname $ktype)
+       # Self-sign
+       ${SSHKEYGEN} -q -s $OBJ/cert_user_key_${ktype} -I \
+           "regress user key for $USER" \
+           -n $USER $OBJ/cert_user_key_${ktype} ||
+               fatal "couldn't sign cert_user_key_${ktype}"
+       verbose "$tid: user ${ktype} connect wrong cert"
+       ${SSH} -2i $OBJ/cert_user_key_${ktype} -F $OBJ/ssh_proxy \
+           somehost true >/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               fail "ssh cert connect $ident succeeded unexpectedly"
+       fi
+done
+
+rm -f $OBJ/authorized_keys_$USER $OBJ/user_ca_key* $OBJ/cert_user_key*
+rm -f $OBJ/authorized_principals_$USER
+
diff --git a/regress/cfginclude.sh b/regress/cfginclude.sh
new file mode 100644 (file)
index 0000000..2fc39ce
--- /dev/null
@@ -0,0 +1,293 @@
+#      $OpenBSD: cfginclude.sh,v 1.2 2016/05/03 15:30:46 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="config include"
+
+# to appease StrictModes
+umask 022
+
+cat > $OBJ/ssh_config.i << _EOF
+Match host a
+       Hostname aa
+
+Match host b
+       Hostname bb
+       Include $OBJ/ssh_config.i.*
+
+Match host c
+       Include $OBJ/ssh_config.i.*
+       Hostname cc
+
+Match host m
+       Include $OBJ/ssh_config.i.*
+
+Host d
+       Hostname dd
+
+Host e
+       Hostname ee
+       Include $OBJ/ssh_config.i.*
+
+Host f
+       Include $OBJ/ssh_config.i.*
+       Hostname ff
+
+Host n
+       Include $OBJ/ssh_config.i.*
+_EOF
+
+cat > $OBJ/ssh_config.i.0 << _EOF
+Match host xxxxxx
+_EOF
+
+cat > $OBJ/ssh_config.i.1 << _EOF
+Match host a
+       Hostname aaa
+
+Match host b
+       Hostname bbb
+
+Match host c
+       Hostname ccc
+
+Host d
+       Hostname ddd
+
+Host e
+       Hostname eee
+
+Host f
+       Hostname fff
+_EOF
+
+cat > $OBJ/ssh_config.i.2 << _EOF
+Match host a
+       Hostname aaaa
+
+Match host b
+       Hostname bbbb
+
+Match host c
+       Hostname cccc
+
+Host d
+       Hostname dddd
+
+Host e
+       Hostname eeee
+
+Host f
+       Hostname ffff
+
+Match all
+       Hostname xxxx
+_EOF
+
+trial() {
+       _host="$1"
+       _exp="$2"
+       ${REAL_SSH} -F $OBJ/ssh_config.i -G "$_host" > $OBJ/ssh_config.out ||
+               fatal "ssh config parse failed"
+       _got=`grep -i '^hostname ' $OBJ/ssh_config.out | awk '{print $2}'`
+       if test "x$_exp" != "x$_got" ; then
+               fail "host $_host include fail: expected $_exp got $_got"
+       fi
+}
+
+trial a aa
+trial b bb
+trial c ccc
+trial d dd
+trial e ee
+trial f fff
+trial m xxxx
+trial n xxxx
+trial x x
+
+# Prepare an included config with an error.
+
+cat > $OBJ/ssh_config.i.3 << _EOF
+Hostname xxxx
+       Junk
+_EOF
+
+${REAL_SSH} -F $OBJ/ssh_config.i -G a 2>/dev/null && \
+       fail "ssh include allowed invalid config"
+
+${REAL_SSH} -F $OBJ/ssh_config.i -G x 2>/dev/null && \
+       fail "ssh include allowed invalid config"
+
+rm -f $OBJ/ssh_config.i.*
+
+# Ensure that a missing include is not fatal.
+cat > $OBJ/ssh_config.i << _EOF
+Include $OBJ/ssh_config.i.*
+Hostname aa
+_EOF
+
+trial a aa
+
+# Ensure that Match/Host in an included config does not affect parent.
+cat > $OBJ/ssh_config.i.x << _EOF
+Match host x
+_EOF
+
+trial a aa
+
+cat > $OBJ/ssh_config.i.x << _EOF
+Host x
+_EOF
+
+trial a aa
+
+# cleanup
+rm -f $OBJ/ssh_config.i $OBJ/ssh_config.i.* $OBJ/ssh_config.out
+#      $OpenBSD: cfginclude.sh,v 1.2 2016/05/03 15:30:46 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="config include"
+
+cat > $OBJ/ssh_config.i << _EOF
+Match host a
+       Hostname aa
+
+Match host b
+       Hostname bb
+       Include $OBJ/ssh_config.i.*
+
+Match host c
+       Include $OBJ/ssh_config.i.*
+       Hostname cc
+
+Match host m
+       Include $OBJ/ssh_config.i.*
+
+Host d
+       Hostname dd
+
+Host e
+       Hostname ee
+       Include $OBJ/ssh_config.i.*
+
+Host f
+       Include $OBJ/ssh_config.i.*
+       Hostname ff
+
+Host n
+       Include $OBJ/ssh_config.i.*
+_EOF
+
+cat > $OBJ/ssh_config.i.0 << _EOF
+Match host xxxxxx
+_EOF
+
+cat > $OBJ/ssh_config.i.1 << _EOF
+Match host a
+       Hostname aaa
+
+Match host b
+       Hostname bbb
+
+Match host c
+       Hostname ccc
+
+Host d
+       Hostname ddd
+
+Host e
+       Hostname eee
+
+Host f
+       Hostname fff
+_EOF
+
+cat > $OBJ/ssh_config.i.2 << _EOF
+Match host a
+       Hostname aaaa
+
+Match host b
+       Hostname bbbb
+
+Match host c
+       Hostname cccc
+
+Host d
+       Hostname dddd
+
+Host e
+       Hostname eeee
+
+Host f
+       Hostname ffff
+
+Match all
+       Hostname xxxx
+_EOF
+
+trial() {
+       _host="$1"
+       _exp="$2"
+       ${REAL_SSH} -F $OBJ/ssh_config.i -G "$_host" > $OBJ/ssh_config.out ||
+               fatal "ssh config parse failed"
+       _got=`grep -i '^hostname ' $OBJ/ssh_config.out | awk '{print $2}'`
+       if test "x$_exp" != "x$_got" ; then
+               fail "host $_host include fail: expected $_exp got $_got"
+       fi
+}
+
+trial a aa
+trial b bb
+trial c ccc
+trial d dd
+trial e ee
+trial f fff
+trial m xxxx
+trial n xxxx
+trial x x
+
+# Prepare an included config with an error.
+
+cat > $OBJ/ssh_config.i.3 << _EOF
+Hostname xxxx
+       Junk
+_EOF
+
+${REAL_SSH} -F $OBJ/ssh_config.i -G a 2>/dev/null && \
+       fail "ssh include allowed invalid config"
+
+${REAL_SSH} -F $OBJ/ssh_config.i -G x 2>/dev/null && \
+       fail "ssh include allowed invalid config"
+
+rm -f $OBJ/ssh_config.i.*
+
+# Ensure that a missing include is not fatal.
+cat > $OBJ/ssh_config.i << _EOF
+Include $OBJ/ssh_config.i.*
+Hostname aa
+_EOF
+
+trial a aa
+
+# Ensure that Match/Host in an included config does not affect parent.
+cat > $OBJ/ssh_config.i.x << _EOF
+Match host x
+_EOF
+
+trial a aa
+
+cat > $OBJ/ssh_config.i.x << _EOF
+Host x
+_EOF
+
+trial a aa
+
+# Ensure that recursive includes are bounded.
+cat > $OBJ/ssh_config.i << _EOF
+Include $OBJ/ssh_config.i
+_EOF
+
+${REAL_SSH} -F $OBJ/ssh_config.i -G a 2>/dev/null && \
+       fail "ssh include allowed infinite recursion?" # or hang...
+
+# cleanup
+rm -f $OBJ/ssh_config.i $OBJ/ssh_config.i.* $OBJ/ssh_config.out
diff --git a/regress/cfgmatch.sh b/regress/cfgmatch.sh
new file mode 100644 (file)
index 0000000..0562963
--- /dev/null
@@ -0,0 +1,127 @@
+#      $OpenBSD: cfgmatch.sh,v 1.9 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="sshd_config match"
+
+pidfile=$OBJ/remote_pid
+fwdport=3301
+fwd="-L $fwdport:127.0.0.1:$PORT"
+
+echo "ExitOnForwardFailure=yes" >> $OBJ/ssh_config
+echo "ExitOnForwardFailure=yes" >> $OBJ/ssh_proxy
+
+start_client()
+{
+       rm -f $pidfile
+       ${SSH} -q -$p $fwd "$@" somehost \
+           exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' \
+           >>$TEST_REGRESS_LOGFILE 2>&1 &
+       client_pid=$!
+       # Wait for remote end
+       n=0
+       while test ! -f $pidfile ; do
+               sleep 1
+               n=`expr $n + 1`
+               if test $n -gt 60; then
+                       kill $client_pid
+                       fatal "timeout waiting for background ssh"
+               fi
+       done    
+}
+
+stop_client()
+{
+       pid=`cat $pidfile`
+       if [ ! -z "$pid" ]; then
+               kill $pid
+       fi
+       wait
+}
+
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_config
+echo "Match Address 127.0.0.1" >>$OBJ/sshd_config
+echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_config
+
+grep -v AuthorizedKeysFile $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy
+echo "AuthorizedKeysFile /dev/null" >>$OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_proxy
+echo "Match user $USER" >>$OBJ/sshd_proxy
+echo "AuthorizedKeysFile /dev/null $OBJ/authorized_keys_%u" >>$OBJ/sshd_proxy
+echo "Match Address 127.0.0.1" >>$OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_proxy
+
+start_sshd
+
+#set -x
+
+# Test Match + PermitOpen in sshd_config.  This should be permitted
+for p in ${SSH_PROTOCOLS}; do
+       trace "match permitopen localhost proto $p"
+       start_client -F $OBJ/ssh_config
+       ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
+           fail "match permitopen permit proto $p"
+       stop_client
+done
+
+# Same but from different source.  This should not be permitted
+for p in ${SSH_PROTOCOLS}; do
+       trace "match permitopen proxy proto $p"
+       start_client -F $OBJ/ssh_proxy
+       ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
+           fail "match permitopen deny proto $p"
+       stop_client
+done
+
+# Retry previous with key option, should also be denied.
+cp /dev/null $OBJ/authorized_keys_$USER
+for t in ${SSH_KEYTYPES}; do
+       printf 'permitopen="127.0.0.1:'$PORT'" ' >> $OBJ/authorized_keys_$USER
+       cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER
+done
+for p in ${SSH_PROTOCOLS}; do
+       trace "match permitopen proxy w/key opts proto $p"
+       start_client -F $OBJ/ssh_proxy
+       ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
+           fail "match permitopen deny w/key opt proto $p"
+       stop_client
+done
+
+# Test both sshd_config and key options permitting the same dst/port pair.
+# Should be permitted.
+for p in ${SSH_PROTOCOLS}; do
+       trace "match permitopen localhost proto $p"
+       start_client -F $OBJ/ssh_config
+       ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
+           fail "match permitopen permit proto $p"
+       stop_client
+done
+
+cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:1 127.0.0.1:$PORT 127.0.0.2:2" >>$OBJ/sshd_proxy
+echo "Match User $USER" >>$OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:1 127.0.0.1:2" >>$OBJ/sshd_proxy
+
+# Test that a Match overrides a PermitOpen in the global section
+for p in ${SSH_PROTOCOLS}; do
+       trace "match permitopen proxy w/key opts proto $p"
+       start_client -F $OBJ/ssh_proxy
+       ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
+           fail "match override permitopen proto $p"
+       stop_client
+done
+
+cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:1 127.0.0.1:$PORT 127.0.0.2:2" >>$OBJ/sshd_proxy
+echo "Match User NoSuchUser" >>$OBJ/sshd_proxy
+echo "PermitOpen 127.0.0.1:1 127.0.0.1:2" >>$OBJ/sshd_proxy
+
+# Test that a rule that doesn't match doesn't override, plus test a
+# PermitOpen entry that's not at the start of the list
+for p in ${SSH_PROTOCOLS}; do
+       trace "nomatch permitopen proxy w/key opts proto $p"
+       start_client -F $OBJ/ssh_proxy
+       ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
+           fail "nomatch override permitopen proto $p"
+       stop_client
+done
diff --git a/regress/cfgparse.sh b/regress/cfgparse.sh
new file mode 100644 (file)
index 0000000..ccf511f
--- /dev/null
@@ -0,0 +1,75 @@
+#      $OpenBSD: cfgparse.sh,v 1.6 2016/06/03 03:47:59 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="sshd config parse"
+
+# This is a reasonable proxy for IPv6 support.
+if ! config_defined HAVE_STRUCT_IN6_ADDR ; then
+       SKIP_IPV6=yes
+fi
+
+# We need to use the keys generated for the regression test because sshd -T
+# will fail if we're not running with SUDO (no permissions for real keys) or
+# if we are # running tests on a system that has never had sshd installed
+# (keys won't exist).
+
+grep "HostKey " $OBJ/sshd_config > $OBJ/sshd_config_minimal
+SSHD_KEYS="`cat $OBJ/sshd_config_minimal`"
+
+verbose "reparse minimal config"
+($SUDO ${SSHD} -T -f $OBJ/sshd_config_minimal >$OBJ/sshd_config.1 &&
+ $SUDO ${SSHD} -T -f $OBJ/sshd_config.1 >$OBJ/sshd_config.2 &&
+ diff $OBJ/sshd_config.1 $OBJ/sshd_config.2) || fail "reparse minimal config"
+
+verbose "reparse regress config"
+($SUDO ${SSHD} -T -f $OBJ/sshd_config >$OBJ/sshd_config.1 &&
+ $SUDO ${SSHD} -T -f $OBJ/sshd_config.1 >$OBJ/sshd_config.2 &&
+ diff $OBJ/sshd_config.1 $OBJ/sshd_config.2) || fail "reparse regress config"
+
+verbose "listenaddress order"
+# expected output
+cat > $OBJ/sshd_config.0 <<EOD
+listenaddress 1.2.3.4:1234
+listenaddress 1.2.3.4:5678
+EOD
+[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.0 <<EOD
+listenaddress [::1]:1234
+listenaddress [::1]:5678
+EOD
+
+# test input sets.  should all result in the output above.
+# test 1: addressfamily and port first
+cat > $OBJ/sshd_config.1 <<EOD
+${SSHD_KEYS}
+addressfamily any
+port 1234
+port 5678
+listenaddress 1.2.3.4
+EOD
+[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.1 <<EOD
+listenaddress ::1
+EOD
+
+($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
+ grep 'listenaddress ' >$OBJ/sshd_config.2 &&
+ diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
+ fail "listenaddress order 1"
+# test 2: listenaddress first
+cat > $OBJ/sshd_config.1 <<EOD
+${SSHD_KEYS}
+listenaddress 1.2.3.4
+port 1234
+port 5678
+addressfamily any
+EOD
+[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.1 <<EOD
+listenaddress ::1
+EOD
+
+($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
+ grep 'listenaddress ' >$OBJ/sshd_config.2 &&
+ diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
+ fail "listenaddress order 2"
+
+# cleanup
+rm -f $OBJ/sshd_config.[012]
diff --git a/regress/check-perm.c b/regress/check-perm.c
new file mode 100644 (file)
index 0000000..dac307d
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * Placed in the public domain
+ */
+
+/* $OpenBSD: modpipe.c,v 1.6 2013/11/21 03:16:47 djm Exp $ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <pwd.h>
+#ifdef HAVE_LIBGEN_H
+#include <libgen.h>
+#endif
+
+static void
+fatal(const char *fmt, ...)
+{
+       va_list args;
+
+       va_start(args, fmt);
+       vfprintf(stderr, fmt, args);
+       fputc('\n', stderr);
+       va_end(args);
+       exit(1);
+}
+/* Based on session.c. NB. keep tests in sync */
+static void
+safely_chroot(const char *path, uid_t uid)
+{
+       const char *cp;
+       char component[PATH_MAX];
+       struct stat st;
+
+       if (*path != '/')
+               fatal("chroot path does not begin at root");
+       if (strlen(path) >= sizeof(component))
+               fatal("chroot path too long");
+
+       /*
+        * Descend the path, checking that each component is a
+        * root-owned directory with strict permissions.
+        */
+       for (cp = path; cp != NULL;) {
+               if ((cp = strchr(cp, '/')) == NULL)
+                       strlcpy(component, path, sizeof(component));
+               else {
+                       cp++;
+                       memcpy(component, path, cp - path);
+                       component[cp - path] = '\0';
+               }
+
+               /* debug3("%s: checking '%s'", __func__, component); */
+
+               if (stat(component, &st) != 0)
+                       fatal("%s: stat(\"%s\"): %s", __func__,
+                           component, strerror(errno));
+               if (st.st_uid != 0 || (st.st_mode & 022) != 0)
+                       fatal("bad ownership or modes for chroot "
+                           "directory %s\"%s\"",
+                           cp == NULL ? "" : "component ", component);
+               if (!S_ISDIR(st.st_mode))
+                       fatal("chroot path %s\"%s\" is not a directory",
+                           cp == NULL ? "" : "component ", component);
+
+       }
+
+       if (chdir(path) == -1)
+               fatal("Unable to chdir to chroot path \"%s\": "
+                   "%s", path, strerror(errno));
+}
+
+/* from platform.c */
+int
+platform_sys_dir_uid(uid_t uid)
+{
+       if (uid == 0)
+               return 1;
+#ifdef PLATFORM_SYS_DIR_UID
+       if (uid == PLATFORM_SYS_DIR_UID)
+               return 1;
+#endif
+       return 0;
+}
+
+/* from auth.c */
+int
+auth_secure_path(const char *name, struct stat *stp, const char *pw_dir,
+    uid_t uid, char *err, size_t errlen)
+{
+       char buf[PATH_MAX], homedir[PATH_MAX];
+       char *cp;
+       int comparehome = 0;
+       struct stat st;
+
+       if (realpath(name, buf) == NULL) {
+               snprintf(err, errlen, "realpath %s failed: %s", name,
+                   strerror(errno));
+               return -1;
+       }
+       if (pw_dir != NULL && realpath(pw_dir, homedir) != NULL)
+               comparehome = 1;
+
+       if (!S_ISREG(stp->st_mode)) {
+               snprintf(err, errlen, "%s is not a regular file", buf);
+               return -1;
+       }
+       if ((!platform_sys_dir_uid(stp->st_uid) && stp->st_uid != uid) ||
+           (stp->st_mode & 022) != 0) {
+               snprintf(err, errlen, "bad ownership or modes for file %s",
+                   buf);
+               return -1;
+       }
+
+       /* for each component of the canonical path, walking upwards */
+       for (;;) {
+               if ((cp = dirname(buf)) == NULL) {
+                       snprintf(err, errlen, "dirname() failed");
+                       return -1;
+               }
+               strlcpy(buf, cp, sizeof(buf));
+
+               if (stat(buf, &st) < 0 ||
+                   (!platform_sys_dir_uid(st.st_uid) && st.st_uid != uid) ||
+                   (st.st_mode & 022) != 0) {
+                       snprintf(err, errlen,
+                           "bad ownership or modes for directory %s", buf);
+                       return -1;
+               }
+
+               /* If are past the homedir then we can stop */
+               if (comparehome && strcmp(homedir, buf) == 0)
+                       break;
+
+               /*
+                * dirname should always complete with a "/" path,
+                * but we can be paranoid and check for "." too
+                */
+               if ((strcmp("/", buf) == 0) || (strcmp(".", buf) == 0))
+                       break;
+       }
+       return 0;
+}
+
+static void
+usage(void)
+{
+       fprintf(stderr, "check-perm -m [chroot | keys-command] [path]\n");
+       exit(1);
+}
+
+int
+main(int argc, char **argv)
+{
+       const char *path = ".";
+       char errmsg[256];
+       int ch, mode = -1;
+       extern char *optarg;
+       extern int optind;
+       struct stat st;
+
+       while ((ch = getopt(argc, argv, "hm:")) != -1) {
+               switch (ch) {
+               case 'm':
+                       if (strcasecmp(optarg, "chroot") == 0)
+                               mode = 1;
+                       else if (strcasecmp(optarg, "keys-command") == 0)
+                               mode = 2;
+                       else {
+                               fprintf(stderr, "Invalid -m option\n"),
+                               usage();
+                       }
+                       break;
+               default:
+                       usage();
+               }
+       }
+       argc -= optind;
+       argv += optind;
+
+       if (argc > 1)
+               usage();
+       else if (argc == 1)
+               path = argv[0];
+
+       if (mode == 1)
+               safely_chroot(path, getuid());
+       else if (mode == 2) {
+               if (stat(path, &st) < 0)
+                       fatal("Could not stat %s: %s", path, strerror(errno));
+               if (auth_secure_path(path, &st, NULL, 0,
+                   errmsg, sizeof(errmsg)) != 0)
+                       fatal("Unsafe %s: %s", path, errmsg);
+       } else {
+               fprintf(stderr, "Invalid mode\n");
+               usage();
+       }
+       return 0;
+}
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh
new file mode 100644 (file)
index 0000000..575dc23
--- /dev/null
@@ -0,0 +1,51 @@
+#      $OpenBSD: cipher-speed.sh,v 1.13 2015/03/24 20:22:17 markus Exp $
+#      Placed in the Public Domain.
+
+tid="cipher speed"
+
+getbytes ()
+{
+       sed -n -e '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p' \
+           -e '/copied/s/.*s, \(.* MB.s\).*/\1/p'
+}
+
+tries="1 2"
+
+for c in `${SSH} -Q cipher`; do n=0; for m in `${SSH} -Q mac`; do
+       trace "proto 2 cipher $c mac $m"
+       for x in $tries; do
+               printf "%-60s" "$c/$m:"
+               ( ${SSH} -o 'compression no' \
+                       -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
+                       exec sh -c \'"dd of=/dev/null obs=32k"\' \
+               < ${DATA} ) 2>&1 | getbytes
+
+               if [ $? -ne 0 ]; then
+                       fail "ssh -2 failed with mac $m cipher $c"
+               fi
+       done
+       # No point trying all MACs for AEAD ciphers since they are ignored.
+       if ${SSH} -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
+               break
+       fi
+       n=`expr $n + 1`
+done; done
+
+if ssh_version 1; then
+       ciphers="3des blowfish"
+else
+       ciphers=""
+fi
+for c in $ciphers; do
+       trace "proto 1 cipher $c"
+       for x in $tries; do
+               printf "%-60s" "$c:"
+               ( ${SSH} -o 'compression no' \
+                       -F $OBJ/ssh_proxy -1 -c $c somehost \
+                       exec sh -c \'"dd of=/dev/null obs=32k"\' \
+               < ${DATA} ) 2>&1 | getbytes
+               if [ $? -ne 0 ]; then
+                       fail "ssh -1 failed with cipher $c"
+               fi
+       done
+done
diff --git a/regress/conch-ciphers.sh b/regress/conch-ciphers.sh
new file mode 100644 (file)
index 0000000..199d863
--- /dev/null
@@ -0,0 +1,28 @@
+#      $OpenBSD: conch-ciphers.sh,v 1.3 2013/05/17 04:29:14 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="conch ciphers"
+
+if test "x$REGRESS_INTEROP_CONCH" != "xyes" ; then
+       echo "conch interop tests not enabled"
+       exit 0
+fi
+
+start_sshd
+
+for c in aes256-ctr aes256-cbc aes192-ctr aes192-cbc aes128-ctr aes128-cbc \
+         cast128-cbc blowfish 3des-cbc ; do
+       verbose "$tid: cipher $c"
+       rm -f ${COPY}
+       # XXX the 2nd "cat" seems to be needed because of buggy FD handling
+       # in conch
+       ${CONCH} --identity $OBJ/rsa --port $PORT --user $USER  -e none \
+           --known-hosts $OBJ/known_hosts --notty --noagent --nox11 -n \
+           127.0.0.1 "cat ${DATA}" 2>/dev/null | cat > ${COPY}
+       if [ $? -ne 0 ]; then
+               fail "ssh cat $DATA failed"
+       fi
+       cmp ${DATA} ${COPY}             || fail "corrupted copy"
+done
+rm -f ${COPY}
+
diff --git a/regress/connect-privsep.sh b/regress/connect-privsep.sh
new file mode 100644 (file)
index 0000000..81cedc7
--- /dev/null
@@ -0,0 +1,41 @@
+#      $OpenBSD: connect-privsep.sh,v 1.8 2016/11/01 13:43:27 tb Exp $
+#      Placed in the Public Domain.
+
+tid="proxy connect with privsep"
+
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
+echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy
+
+for p in ${SSH_PROTOCOLS}; do
+       ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
+       if [ $? -ne 0 ]; then
+               fail "ssh privsep+proxyconnect protocol $p failed"
+       fi
+done
+
+cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
+echo 'UsePrivilegeSeparation sandbox' >> $OBJ/sshd_proxy
+
+for p in ${SSH_PROTOCOLS}; do
+       ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
+       if [ $? -ne 0 ]; then
+               # XXX replace this with fail once sandbox has stabilised
+               warn "ssh privsep/sandbox+proxyconnect protocol $p failed"
+       fi
+done
+
+# Because sandbox is sensitive to changes in libc, especially malloc, retest
+# with every malloc.conf option (and none).
+if [ -z "TEST_MALLOC_OPTIONS" ]; then
+       mopts="C F G J R S U X < >"
+else
+       mopts=`echo $TEST_MALLOC_OPTIONS | sed 's/./& /g'`
+fi
+for m in '' $mopts ; do
+    for p in ${SSH_PROTOCOLS}; do
+       env MALLOC_OPTIONS="$m" ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
+       if [ $? -ne 0 ]; then
+               fail "ssh privsep/sandbox+proxyconnect protocol $p mopt '$m' failed"
+       fi
+    done
+done
diff --git a/regress/connect.sh b/regress/connect.sh
new file mode 100644 (file)
index 0000000..f0d55d3
--- /dev/null
@@ -0,0 +1,13 @@
+#      $OpenBSD: connect.sh,v 1.5 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="simple connect"
+
+start_sshd
+
+for p in ${SSH_PROTOCOLS}; do
+       ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh connect with protocol $p failed"
+       fi
+done
diff --git a/regress/dhgex.sh b/regress/dhgex.sh
new file mode 100644 (file)
index 0000000..e7c5733
--- /dev/null
@@ -0,0 +1,60 @@
+#      $OpenBSD: dhgex.sh,v 1.3 2015/10/23 02:22:01 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="dhgex"
+
+LOG=${TEST_SSH_LOGFILE}
+rm -f ${LOG}
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+
+kexs=`${SSH} -Q kex | grep diffie-hellman-group-exchange`
+
+ssh_test_dhgex()
+{
+       bits="$1"; shift
+       cipher="$1"; shift
+       kex="$1"; shift
+
+       cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+       echo "KexAlgorithms=$kex" >> $OBJ/sshd_proxy
+       echo "Ciphers=$cipher" >> $OBJ/sshd_proxy
+       rm -f ${LOG}
+       opts="-oKexAlgorithms=$kex -oCiphers=$cipher"
+       min=2048
+       max=8192
+       groupsz="$min<$bits<$max"
+       verbose "$tid bits $bits $kex $cipher"
+       ${SSH} ${opts} $@ -vvv -F ${OBJ}/ssh_proxy somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh failed ($@)"
+       fi
+       # check what we request
+       grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null
+       if [ $? != 0 ]; then
+               got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}`
+               fail "$tid unexpected GEX sizes, expected $groupsz, got $got"
+       fi
+       # check what we got (depends on contents of system moduli file)
+       gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`"
+       if [ "$gotbits" -lt "$bits" ]; then
+               fatal "$tid expected $bits bit group, got $gotbits"
+       fi
+}
+
+check()
+{
+       bits="$1"; shift
+
+       for c in $@; do
+               for k in $kexs; do
+                       ssh_test_dhgex $bits $c $k
+               done
+       done
+}
+
+#check 2048 3des-cbc
+check 3072 `${SSH} -Q cipher | grep 128`
+check 3072 arcfour blowfish-cbc
+check 7680 `${SSH} -Q cipher | grep 192`
+check 8192 `${SSH} -Q cipher | grep 256`
+check 8192 rijndael-cbc@lysator.liu.se chacha20-poly1305@openssh.com
diff --git a/regress/dsa_ssh2.prv b/regress/dsa_ssh2.prv
new file mode 100644 (file)
index 0000000..c93b403
--- /dev/null
@@ -0,0 +1,14 @@
+---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----
+Subject: ssh-keygen test
+Comment: "1024-bit dsa, Tue Jan 08 2002 22:00:23 +0100"
+P2/56wAAAgIAAAAmZGwtbW9kcHtzaWdue2RzYS1uaXN0LXNoYTF9LGRoe3BsYWlufX0AAA
+AEbm9uZQAAAcQAAAHAAAAAAAAABACwUfm3AxZTut3icBmwCcD48nY64HzuELlQ+vEqjIcR
+Lo49es/DQTeLNQ+kdKRCfouosGNv0WqxRtF0tUsWdXxS37oHGa4QPugBdHRd7YlZGZv8kg
+x7FsoepY7v7E683/97dv2zxL3AGagTEzWr7fl0yPexAaZoDvtQrrjX44BLmwAABACWQkvv
+MxnD8eFkS1konFfMJ1CkuRfTN34CBZ6dY7VTSGemy4QwtFdMKmoufD0eKgy3p5WOeWCYKt
+F4FhjHKZk/aaxFjjIbtkrnlvXg64QI11dSZyBN6/ViQkHPSkUDF+A6AAEhrNbQbAFSvao1
+kTvNtPCtL0AkUIduEMzGQfLCTAAAAKDeC043YVo9Zo0zAEeIA4uZh4LBCQAAA/9aj7Y5ik
+ehygJ4qTDSlVypsPuV+n59tMS0e2pfrSG87yf5r94AKBmJeho5OO6wYaXCxsVB7AFbSUD6
+75AK8mHF4v1/+7SWKk5f8xlMCMSPZ9K0+j/W1d/q2qkhnnDZolOHDomLA+U00i5ya/jnTV
+zyDPWLFpWK8u3xGBPAYX324gAAAKDHFvooRnaXdZbeWGTTqmgHB1GU9A==
+---- END SSH2 ENCRYPTED PRIVATE KEY ----
diff --git a/regress/dsa_ssh2.pub b/regress/dsa_ssh2.pub
new file mode 100644 (file)
index 0000000..215d73b
--- /dev/null
@@ -0,0 +1,13 @@
+---- BEGIN SSH2 PUBLIC KEY ----
+Subject: ssh-keygen test
+Comment: "1024-bit dsa, Tue Jan 08 2002 22:00:23 +0100"
+AAAAB3NzaC1kc3MAAACBALBR+bcDFlO63eJwGbAJwPjydjrgfO4QuVD68SqMhxEujj16z8
+NBN4s1D6R0pEJ+i6iwY2/RarFG0XS1SxZ1fFLfugcZrhA+6AF0dF3tiVkZm/ySDHsWyh6l
+ju/sTrzf/3t2/bPEvcAZqBMTNavt+XTI97EBpmgO+1CuuNfjgEubAAAAFQDeC043YVo9Zo
+0zAEeIA4uZh4LBCQAAAIEAlkJL7zMZw/HhZEtZKJxXzCdQpLkX0zd+AgWenWO1U0hnpsuE
+MLRXTCpqLnw9HioMt6eVjnlgmCrReBYYxymZP2msRY4yG7ZK55b14OuECNdXUmcgTev1Yk
+JBz0pFAxfgOgABIazW0GwBUr2qNZE7zbTwrS9AJFCHbhDMxkHywkwAAACAWo+2OYpHocoC
+eKkw0pVcqbD7lfp+fbTEtHtqX60hvO8n+a/eACgZiXoaOTjusGGlwsbFQewBW0lA+u+QCv
+JhxeL9f/u0lipOX/MZTAjEj2fStPo/1tXf6tqpIZ5w2aJThw6JiwPlNNIucmv4501c8gz1
+ixaVivLt8RgTwGF99uI=
+---- END SSH2 PUBLIC KEY ----
diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh
new file mode 100644 (file)
index 0000000..dd67c96
--- /dev/null
@@ -0,0 +1,59 @@
+#      $OpenBSD: dynamic-forward.sh,v 1.11 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="dynamic forwarding"
+
+FWDPORT=`expr $PORT + 1`
+
+if have_prog nc && nc -h 2>&1 | grep "proxy address" >/dev/null; then
+       proxycmd="nc -x 127.0.0.1:$FWDPORT -X"
+elif have_prog connect; then
+       proxycmd="connect -S 127.0.0.1:$FWDPORT -"
+else
+       echo "skipped (no suitable ProxyCommand found)"
+       exit 0
+fi
+trace "will use ProxyCommand $proxycmd"
+
+start_sshd
+
+for p in ${SSH_PROTOCOLS}; do
+       n=0
+       error="1"
+       trace "start dynamic forwarding, fork to background"
+       while [ "$error" -ne 0 -a "$n" -lt 3 ]; do
+               n=`expr $n + 1`
+               ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q \
+                   -oExitOnForwardFailure=yes somehost exec sh -c \
+                       \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\'
+               error=$?
+               if [ "$error" -ne 0 ]; then
+                       trace "forward failed proto $p attempt $n err $error"
+                       sleep $n
+               fi
+       done
+       if [ "$error" -ne 0 ]; then
+               fatal "failed to start dynamic forwarding proto $p"
+       fi
+
+       for s in 4 5; do
+           for h in 127.0.0.1 localhost; do
+               trace "testing ssh protocol $p socks version $s host $h"
+               ${SSH} -F $OBJ/ssh_config \
+                       -o "ProxyCommand ${proxycmd}${s} $h $PORT" \
+                       somehost cat $DATA > $OBJ/ls.copy
+               test -f $OBJ/ls.copy     || fail "failed copy $DATA"
+               cmp $DATA $OBJ/ls.copy || fail "corrupted copy of $DATA"
+           done
+       done
+
+       if [ -f $OBJ/remote_pid ]; then
+               remote=`cat $OBJ/remote_pid`
+               trace "terminate remote shell, pid $remote"
+               if [ $remote -gt 1 ]; then
+                       kill -HUP $remote
+               fi
+       else
+               fail "no pid file: $OBJ/remote_pid"
+       fi
+done
diff --git a/regress/envpass.sh b/regress/envpass.sh
new file mode 100644 (file)
index 0000000..af7eafe
--- /dev/null
@@ -0,0 +1,60 @@
+#      $OpenBSD: envpass.sh,v 1.4 2005/03/04 08:48:46 djm Exp $
+#      Placed in the Public Domain.
+
+tid="environment passing"
+
+# NB accepted env vars are in test-exec.sh (_XXX_TEST_* and _XXX_TEST)
+
+# Prepare a custom config to test for a configuration parsing bug fixed in 4.0
+cat << EOF > $OBJ/ssh_proxy_envpass
+Host test-sendenv-confparse-bug
+       SendEnv *
+EOF
+cat $OBJ/ssh_proxy >> $OBJ/ssh_proxy_envpass
+
+trace "pass env, don't accept"
+verbose "test $tid: pass env, don't accept"
+_TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy_envpass otherhost \
+       sh << 'EOF'
+       test -z "$_TEST_ENV"
+EOF
+r=$?
+if [ $r -ne 0 ]; then
+       fail "environment found"
+fi
+
+trace "don't pass env, accept"
+verbose "test $tid: don't pass env, accept"
+_XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -F $OBJ/ssh_proxy_envpass otherhost \
+       sh << 'EOF'
+       test -z "$_XXX_TEST_A" && test -z "$_XXX_TEST_B"
+EOF
+r=$?
+if [ $r -ne 0 ]; then
+       fail "environment found"
+fi
+
+trace "pass single env, accept single env"
+verbose "test $tid: pass single env, accept single env"
+_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy_envpass \
+    otherhost sh << 'EOF'
+       test X"$_XXX_TEST" = X"blah"
+EOF
+r=$?
+if [ $r -ne 0 ]; then
+       fail "environment not found"
+fi
+
+trace "pass multiple env, accept multiple env"
+verbose "test $tid: pass multiple env, accept multiple env"
+_XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -oSendEnv="_XXX_TEST_*" \
+    -F $OBJ/ssh_proxy_envpass otherhost \
+       sh << 'EOF'
+       test X"$_XXX_TEST_A" = X"1" -a X"$_XXX_TEST_B" = X"2"
+EOF
+r=$?
+if [ $r -ne 0 ]; then
+       fail "environment not found"
+fi
+
+rm -f $OBJ/ssh_proxy_envpass
diff --git a/regress/exit-status.sh b/regress/exit-status.sh
new file mode 100644 (file)
index 0000000..397d8d7
--- /dev/null
@@ -0,0 +1,24 @@
+#      $OpenBSD: exit-status.sh,v 1.7 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="remote exit status"
+
+for p in ${SSH_PROTOCOLS}; do
+       for s in 0 1 4 5 44; do
+               trace "proto $p status $s"
+               verbose "test $tid: proto $p status $s"
+               ${SSH} -$p -F $OBJ/ssh_proxy otherhost exit $s
+               r=$?
+               if [ $r -ne $s ]; then
+                       fail "exit code mismatch for protocol $p: $r != $s"
+               fi
+
+               # same with early close of stdout/err
+               ${SSH} -$p -F $OBJ/ssh_proxy -n otherhost \
+                       exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\'
+               r=$?
+               if [ $r -ne $s ]; then
+                       fail "exit code (with sleep) mismatch for protocol $p: $r != $s"
+               fi
+       done
+done
diff --git a/regress/forcecommand.sh b/regress/forcecommand.sh
new file mode 100644 (file)
index 0000000..8a9b090
--- /dev/null
@@ -0,0 +1,44 @@
+#      $OpenBSD: forcecommand.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="forced command"
+
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+
+cp /dev/null $OBJ/authorized_keys_$USER
+for t in ${SSH_KEYTYPES}; do
+       printf 'command="true" ' >>$OBJ/authorized_keys_$USER
+       cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER
+done
+
+for p in ${SSH_PROTOCOLS}; do
+       trace "forced command in key option proto $p"
+       ${SSH} -$p -F $OBJ/ssh_proxy somehost false \ ||
+           fail "forced command in key proto $p"
+done
+
+cp /dev/null $OBJ/authorized_keys_$USER
+for t in ${SSH_KEYTYPES}; do
+       printf 'command="false" ' >> $OBJ/authorized_keys_$USER
+       cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER
+done
+
+cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+echo "ForceCommand true" >> $OBJ/sshd_proxy
+
+for p in ${SSH_PROTOCOLS}; do
+       trace "forced command in sshd_config overrides key option proto $p"
+       ${SSH} -$p -F $OBJ/ssh_proxy somehost false \ ||
+           fail "forced command in key proto $p"
+done
+
+cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+echo "ForceCommand false" >> $OBJ/sshd_proxy
+echo "Match User $USER" >> $OBJ/sshd_proxy
+echo "    ForceCommand true" >> $OBJ/sshd_proxy
+
+for p in ${SSH_PROTOCOLS}; do
+       trace "forced command with match proto $p"
+       ${SSH} -$p -F $OBJ/ssh_proxy somehost false \ ||
+           fail "forced command in key proto $p"
+done
diff --git a/regress/forward-control.sh b/regress/forward-control.sh
new file mode 100644 (file)
index 0000000..9195709
--- /dev/null
@@ -0,0 +1,168 @@
+#      $OpenBSD: forward-control.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="sshd control of local and remote forwarding"
+
+LFWD_PORT=3320
+RFWD_PORT=3321
+CTL=$OBJ/ctl-sock
+READY=$OBJ/ready
+
+wait_for_file_to_appear() {
+       _path=$1
+       _n=0
+       while test ! -f $_path ; do
+               test $_n -eq 1 && trace "waiting for $_path to appear"
+               _n=`expr $_n + 1`
+               test $_n -ge 20 && return 1
+               sleep 1
+       done
+       return 0
+}
+
+wait_for_process_to_exit() {
+       _pid=$1
+       _n=0
+       while kill -0 $_pid 2>/dev/null ; do
+               test $_n -eq 1 && trace "waiting for $_pid to exit"
+               _n=`expr $_n + 1`
+               test $_n -ge 20 && return 1
+               sleep 1
+       done
+       return 0
+}
+
+# usage: check_lfwd protocol Y|N message
+check_lfwd() {
+       _proto=$1
+       _expected=$2
+       _message=$3
+       rm -f $READY
+       ${SSH} -oProtocol=$_proto -F $OBJ/ssh_proxy \
+           -L$LFWD_PORT:127.0.0.1:$PORT \
+           -o ExitOnForwardFailure=yes \
+           -n host exec sh -c \'"sleep 60 & echo \$! > $READY ; wait "\' \
+           >/dev/null 2>&1 &
+       _sshpid=$!
+       wait_for_file_to_appear $READY || \
+               fatal "check_lfwd ssh fail: $_message"
+       ${SSH} -F $OBJ/ssh_config -p $LFWD_PORT \
+           -oConnectionAttempts=4 host true >/dev/null 2>&1
+       _result=$?
+       kill $_sshpid `cat $READY` 2>/dev/null
+       wait_for_process_to_exit $_sshpid
+       if test "x$_expected" = "xY" -a $_result -ne 0 ; then
+               fail "check_lfwd failed (expecting success): $_message"
+       elif test "x$_expected" = "xN" -a $_result -eq 0 ; then
+               fail "check_lfwd succeeded (expecting failure): $_message"
+       elif test "x$_expected" != "xY" -a "x$_expected" != "xN" ; then
+               fatal "check_lfwd invalid argument \"$_expected\""
+       else
+               verbose "check_lfwd done (expecting $_expected): $_message"
+       fi
+}
+
+# usage: check_rfwd protocol Y|N message
+check_rfwd() {
+       _proto=$1
+       _expected=$2
+       _message=$3
+       rm -f $READY
+       ${SSH} -oProtocol=$_proto -F $OBJ/ssh_proxy \
+           -R$RFWD_PORT:127.0.0.1:$PORT \
+           -o ExitOnForwardFailure=yes \
+           -n host exec sh -c \'"sleep 60 & echo \$! > $READY ; wait "\' \
+           >/dev/null 2>&1 &
+       _sshpid=$!
+       wait_for_file_to_appear $READY
+       _result=$?
+       if test $_result -eq 0 ; then
+               ${SSH} -F $OBJ/ssh_config -p $RFWD_PORT \
+                   -oConnectionAttempts=4 host true >/dev/null 2>&1
+               _result=$?
+               kill $_sshpid `cat $READY` 2>/dev/null
+               wait_for_process_to_exit $_sshpid
+       fi
+       if test "x$_expected" = "xY" -a $_result -ne 0 ; then
+               fail "check_rfwd failed (expecting success): $_message"
+       elif test "x$_expected" = "xN" -a $_result -eq 0 ; then
+               fail "check_rfwd succeeded (expecting failure): $_message"
+       elif test "x$_expected" != "xY" -a "x$_expected" != "xN" ; then
+               fatal "check_rfwd invalid argument \"$_expected\""
+       else
+               verbose "check_rfwd done (expecting $_expected): $_message"
+       fi
+}
+
+start_sshd
+cp ${OBJ}/sshd_proxy ${OBJ}/sshd_proxy.bak
+cp ${OBJ}/authorized_keys_${USER} ${OBJ}/authorized_keys_${USER}.bak
+
+# Sanity check: ensure the default config allows forwarding
+for p in ${SSH_PROTOCOLS} ; do
+       check_lfwd $p Y "proto $p, default configuration"
+       check_rfwd $p Y "proto $p, default configuration"
+done
+
+# Usage: all_tests yes|local|remote|no Y|N Y|N Y|N Y|N Y|N Y|N
+all_tests() {
+       _tcpfwd=$1
+       _plain_lfwd=$2
+       _plain_rfwd=$3
+       _nopermit_lfwd=$4
+       _nopermit_rfwd=$5
+       _permit_lfwd=$6
+       _permit_rfwd=$7
+       _badfwd=127.0.0.1:22
+       _goodfwd=127.0.0.1:${PORT}
+       for _proto in ${SSH_PROTOCOLS} ; do
+               cp ${OBJ}/authorized_keys_${USER}.bak \
+                   ${OBJ}/authorized_keys_${USER}
+               _prefix="proto $_proto, AllowTcpForwarding=$_tcpfwd"
+               # No PermitOpen
+               ( cat ${OBJ}/sshd_proxy.bak ;
+                 echo "AllowTcpForwarding $_tcpfwd" ) \
+                   > ${OBJ}/sshd_proxy
+               check_lfwd $_proto $_plain_lfwd "$_prefix"
+               check_rfwd $_proto $_plain_rfwd "$_prefix"
+               # PermitOpen via sshd_config that doesn't match
+               ( cat ${OBJ}/sshd_proxy.bak ;
+                 echo "AllowTcpForwarding $_tcpfwd" ;
+                 echo "PermitOpen $_badfwd" ) \
+                   > ${OBJ}/sshd_proxy
+               check_lfwd $_proto $_nopermit_lfwd "$_prefix, !PermitOpen"
+               check_rfwd $_proto $_nopermit_rfwd "$_prefix, !PermitOpen"
+               # PermitOpen via sshd_config that does match
+               ( cat ${OBJ}/sshd_proxy.bak ;
+                 echo "AllowTcpForwarding $_tcpfwd" ;
+                 echo "PermitOpen $_badfwd $_goodfwd" ) \
+                   > ${OBJ}/sshd_proxy
+               # NB. permitopen via authorized_keys should have same
+               # success/fail as via sshd_config
+               # permitopen via authorized_keys that doesn't match
+               sed "s/^/permitopen=\"$_badfwd\" /" \
+                   < ${OBJ}/authorized_keys_${USER}.bak \
+                   > ${OBJ}/authorized_keys_${USER} || fatal "sed 1 fail"
+               ( cat ${OBJ}/sshd_proxy.bak ;
+                 echo "AllowTcpForwarding $_tcpfwd" ) \
+                   > ${OBJ}/sshd_proxy
+               check_lfwd $_proto $_nopermit_lfwd "$_prefix, !permitopen"
+               check_rfwd $_proto $_nopermit_rfwd "$_prefix, !permitopen"
+               # permitopen via authorized_keys that does match
+               sed "s/^/permitopen=\"$_badfwd\",permitopen=\"$_goodfwd\" /" \
+                   < ${OBJ}/authorized_keys_${USER}.bak \
+                   > ${OBJ}/authorized_keys_${USER} || fatal "sed 2 fail"
+               ( cat ${OBJ}/sshd_proxy.bak ;
+                 echo "AllowTcpForwarding $_tcpfwd" ) \
+                   > ${OBJ}/sshd_proxy
+               check_lfwd $_proto $_permit_lfwd "$_prefix, permitopen"
+               check_rfwd $_proto $_permit_rfwd "$_prefix, permitopen"
+       done
+}
+
+#                      no-permitopen mismatch-permitopen match-permitopen
+#   AllowTcpForwarding  local remote        local remote     local remote
+all_tests          yes      Y      Y            N      Y         Y      Y
+all_tests        local      Y      N            N      N         Y      N
+all_tests       remote      N      Y            N      Y         N      Y
+all_tests           no      N      N            N      N         N      N
diff --git a/regress/forwarding.sh b/regress/forwarding.sh
new file mode 100644 (file)
index 0000000..45c596d
--- /dev/null
@@ -0,0 +1,149 @@
+#      $OpenBSD: forwarding.sh,v 1.19 2017/01/30 05:22:14 djm Exp $
+#      Placed in the Public Domain.
+
+tid="local and remote forwarding"
+
+DATA=/bin/ls${EXEEXT}
+
+start_sshd
+
+base=33
+last=$PORT
+fwd=""
+CTL=/tmp/openssh.regress.ctl-sock.$$
+
+for j in 0 1 2; do
+       for i in 0 1 2; do
+               a=$base$j$i
+               b=`expr $a + 50`
+               c=$last
+               # fwd chain: $a -> $b -> $c
+               fwd="$fwd -L$a:127.0.0.1:$b -R$b:127.0.0.1:$c"
+               last=$a
+       done
+done
+for p in ${SSH_PROTOCOLS}; do
+       q=`expr 3 - $p`
+       if ! ssh_version $q; then
+               q=$p
+       fi
+       trace "start forwarding, fork to background"
+       rm -f $CTL
+       ${SSH} -S $CTL -M -$p -F $OBJ/ssh_config -f $fwd somehost sleep 10
+
+       trace "transfer over forwarded channels and check result"
+       ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \
+               somehost cat ${DATA} > ${COPY}
+       test -s ${COPY}         || fail "failed copy of ${DATA}"
+       cmp ${DATA} ${COPY}     || fail "corrupted copy of ${DATA}"
+
+       ${SSH} -F $OBJ/ssh_config -S $CTL -O exit somehost
+done
+
+for p in ${SSH_PROTOCOLS}; do
+for d in L R; do
+       trace "exit on -$d forward failure, proto $p"
+
+       # this one should succeed
+       ${SSH} -$p -F $OBJ/ssh_config \
+           -$d ${base}01:127.0.0.1:$PORT \
+           -$d ${base}02:127.0.0.1:$PORT \
+           -$d ${base}03:127.0.0.1:$PORT \
+           -$d ${base}04:127.0.0.1:$PORT \
+           -oExitOnForwardFailure=yes somehost true
+       if [ $? != 0 ]; then
+               fatal "connection failed, should not"
+       else
+               # this one should fail
+               ${SSH} -q -$p -F $OBJ/ssh_config \
+                   -$d ${base}01:127.0.0.1:$PORT \
+                   -$d ${base}02:127.0.0.1:$PORT \
+                   -$d ${base}03:127.0.0.1:$PORT \
+                   -$d ${base}01:localhost:$PORT \
+                   -$d ${base}04:127.0.0.1:$PORT \
+                   -oExitOnForwardFailure=yes somehost true
+               r=$?
+               if [ $r != 255 ]; then
+                       fail "connection not termintated, but should ($r)"
+               fi
+       fi
+done
+done
+
+for p in ${SSH_PROTOCOLS}; do
+       trace "simple clear forwarding proto $p"
+       ${SSH} -$p -F $OBJ/ssh_config -oClearAllForwardings=yes somehost true
+
+       trace "clear local forward proto $p"
+       rm -f $CTL
+       ${SSH} -S $CTL -M -$p -f -F $OBJ/ssh_config -L ${base}01:127.0.0.1:$PORT \
+           -oClearAllForwardings=yes somehost sleep 10
+       if [ $? != 0 ]; then
+               fail "connection failed with cleared local forwarding"
+       else
+               # this one should fail
+               ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 somehost true \
+                    >>$TEST_REGRESS_LOGFILE 2>&1 && \
+                       fail "local forwarding not cleared"
+       fi
+       ${SSH} -F $OBJ/ssh_config -S $CTL -O exit somehost
+       
+       trace "clear remote forward proto $p"
+       rm -f $CTL
+       ${SSH} -S $CTL -M -$p -f -F $OBJ/ssh_config -R ${base}01:127.0.0.1:$PORT \
+           -oClearAllForwardings=yes somehost sleep 10
+       if [ $? != 0 ]; then
+               fail "connection failed with cleared remote forwarding"
+       else
+               # this one should fail
+               ${SSH} -$p -F $OBJ/ssh_config -p ${base}01 somehost true \
+                    >>$TEST_REGRESS_LOGFILE 2>&1 && \
+                       fail "remote forwarding not cleared"
+       fi
+       ${SSH} -F $OBJ/ssh_config -S $CTL -O exit somehost
+done
+
+for p in 2; do
+       trace "stdio forwarding proto $p"
+       cmd="${SSH} -$p -F $OBJ/ssh_config"
+       $cmd -o "ProxyCommand $cmd -q -W localhost:$PORT somehost" \
+               somehost true
+       if [ $? != 0 ]; then
+               fail "stdio forwarding proto $p"
+       fi
+done
+
+echo "LocalForward ${base}01 127.0.0.1:$PORT" >> $OBJ/ssh_config
+echo "RemoteForward ${base}02 127.0.0.1:${base}01" >> $OBJ/ssh_config
+for p in ${SSH_PROTOCOLS}; do
+       trace "config file: start forwarding, fork to background"
+       rm -f $CTL
+       ${SSH} -S $CTL -M -$p -F $OBJ/ssh_config -f somehost sleep 10
+
+       trace "config file: transfer over forwarded channels and check result"
+       ${SSH} -F $OBJ/ssh_config -p${base}02 -o 'ConnectionAttempts=4' \
+               somehost cat ${DATA} > ${COPY}
+       test -s ${COPY}         || fail "failed copy of ${DATA}"
+       cmp ${DATA} ${COPY}     || fail "corrupted copy of ${DATA}"
+
+       ${SSH} -F $OBJ/ssh_config -S $CTL -O exit somehost
+done
+
+for p in 2; do
+       trace "transfer over chained unix domain socket forwards and check result"
+       rm -f $OBJ/unix-[123].fwd
+       rm -f $CTL $CTL.[123]
+       ${SSH} -S $CTL -M -f -F $OBJ/ssh_config -R${base}01:[$OBJ/unix-1.fwd] somehost sleep 10
+       ${SSH} -S $CTL.1 -M -f -F $OBJ/ssh_config -L[$OBJ/unix-1.fwd]:[$OBJ/unix-2.fwd] somehost sleep 10
+       ${SSH} -S $CTL.2 -M -f -F $OBJ/ssh_config -R[$OBJ/unix-2.fwd]:[$OBJ/unix-3.fwd] somehost sleep 10
+       ${SSH} -S $CTL.3 -M -f -F $OBJ/ssh_config -L[$OBJ/unix-3.fwd]:127.0.0.1:$PORT somehost sleep 10
+       ${SSH} -F $OBJ/ssh_config -p${base}01 -o 'ConnectionAttempts=4' \
+               somehost cat ${DATA} > ${COPY}
+       test -s ${COPY}                 || fail "failed copy ${DATA}"
+       cmp ${DATA} ${COPY}             || fail "corrupted copy of ${DATA}"
+
+       ${SSH} -F $OBJ/ssh_config -S $CTL -O exit somehost
+       ${SSH} -F $OBJ/ssh_config -S $CTL.1 -O exit somehost
+       ${SSH} -F $OBJ/ssh_config -S $CTL.2 -O exit somehost
+       ${SSH} -F $OBJ/ssh_config -S $CTL.3 -O exit somehost
+done
diff --git a/regress/host-expand.sh b/regress/host-expand.sh
new file mode 100644 (file)
index 0000000..2a95bfe
--- /dev/null
@@ -0,0 +1,19 @@
+#      $OpenBSD: host-expand.sh,v 1.4 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="expand %h and %n"
+
+echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
+printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
+
+cat >$OBJ/expect <<EOE
+somehost
+127.0.0.1
+EOE
+
+for p in ${SSH_PROTOCOLS}; do
+       verbose "test $tid: proto $p"
+       ${SSH} -F $OBJ/ssh_proxy -$p somehost true >$OBJ/actual
+       diff $OBJ/expect $OBJ/actual || fail "$tid proto $p"
+done
+
diff --git a/regress/hostkey-agent.sh b/regress/hostkey-agent.sh
new file mode 100644 (file)
index 0000000..094700d
--- /dev/null
@@ -0,0 +1,53 @@
+#      $OpenBSD: hostkey-agent.sh,v 1.6 2015/07/10 06:23:25 markus Exp $
+#      Placed in the Public Domain.
+
+tid="hostkey agent"
+
+rm -f $OBJ/agent-key.* $OBJ/ssh_proxy.orig $OBJ/known_hosts.orig
+
+trace "start agent"
+eval `${SSHAGENT} -s` > /dev/null
+r=$?
+[ $r -ne 0 ] && fatal "could not start ssh-agent: exit code $r"
+
+grep -vi 'hostkey' $OBJ/sshd_proxy > $OBJ/sshd_proxy.orig
+echo "HostKeyAgent $SSH_AUTH_SOCK" >> $OBJ/sshd_proxy.orig
+
+trace "load hostkeys"
+for k in `${SSH} -Q key-plain` ; do
+       ${SSHKEYGEN} -qt $k -f $OBJ/agent-key.$k -N '' || fatal "ssh-keygen $k"
+       (
+               printf 'localhost-with-alias,127.0.0.1,::1 '
+               cat $OBJ/agent-key.$k.pub
+       ) >> $OBJ/known_hosts.orig
+       ${SSHADD} $OBJ/agent-key.$k >/dev/null 2>&1 || \
+               fatal "couldn't load key $OBJ/agent-key.$k"
+       echo "Hostkey $OBJ/agent-key.${k}" >> $OBJ/sshd_proxy.orig
+       # Remove private key so the server can't use it.
+       rm $OBJ/agent-key.$k || fatal "couldn't rm $OBJ/agent-key.$k"
+done
+cp $OBJ/known_hosts.orig $OBJ/known_hosts
+
+unset SSH_AUTH_SOCK
+
+for ps in no yes; do
+       for k in `${SSH} -Q key-plain` ; do
+               verbose "key type $k privsep=$ps"
+               cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
+               echo "UsePrivilegeSeparation $ps" >> $OBJ/sshd_proxy
+               echo "HostKeyAlgorithms $k" >> $OBJ/sshd_proxy
+               opts="-oHostKeyAlgorithms=$k -F $OBJ/ssh_proxy"
+               cp $OBJ/known_hosts.orig $OBJ/known_hosts
+               SSH_CONNECTION=`${SSH} $opts host 'echo $SSH_CONNECTION'`
+               if [ $? -ne 0 ]; then
+                       fail "protocol $p privsep=$ps failed"
+               fi
+               if [ "$SSH_CONNECTION" != "UNKNOWN 65535 UNKNOWN 65535" ]; then
+                       fail "bad SSH_CONNECTION key type $k privsep=$ps"
+               fi
+       done
+done
+
+trace "kill agent"
+${SSHAGENT} -k > /dev/null
+
diff --git a/regress/hostkey-rotate.sh b/regress/hostkey-rotate.sh
new file mode 100644 (file)
index 0000000..d69de32
--- /dev/null
@@ -0,0 +1,110 @@
+#      $OpenBSD: hostkey-rotate.sh,v 1.5 2015/09/04 04:23:10 djm Exp $
+#      Placed in the Public Domain.
+
+tid="hostkey rotate"
+
+# Need full names here since they are used in HostKeyAlgorithms
+HOSTKEY_TYPES="ecdsa-sha2-nistp256 ssh-ed25519 ssh-rsa ssh-dss"
+
+rm -f $OBJ/hkr.* $OBJ/ssh_proxy.orig
+
+grep -vi 'hostkey' $OBJ/sshd_proxy > $OBJ/sshd_proxy.orig
+echo "UpdateHostkeys=yes" >> $OBJ/ssh_proxy
+rm $OBJ/known_hosts
+
+trace "prepare hostkeys"
+nkeys=0
+all_algs=""
+for k in `${SSH} -Q key-plain` ; do
+       ${SSHKEYGEN} -qt $k -f $OBJ/hkr.$k -N '' || fatal "ssh-keygen $k"
+       echo "Hostkey $OBJ/hkr.${k}" >> $OBJ/sshd_proxy.orig
+       nkeys=`expr $nkeys + 1`
+       test "x$all_algs" = "x" || all_algs="${all_algs},"
+       all_algs="${all_algs}$k"
+done
+
+dossh() {
+       # All ssh should succeed in this test
+       ${SSH} -F $OBJ/ssh_proxy "$@" x true || fail "ssh $@ failed"
+}
+
+expect_nkeys() {
+       _expected=$1
+       _message=$2
+       _n=`wc -l $OBJ/known_hosts | awk '{ print $1 }'` || fatal "wc failed"
+       [ "x$_n" = "x$_expected" ] || fail "$_message (got $_n wanted $_expected)"
+}
+
+check_key_present() {
+       _type=$1
+       _kfile=$2
+       test "x$_kfile" = "x" && _kfile="$OBJ/hkr.${_type}.pub"
+       _kpub=`awk "/$_type /"' { print $2 }' < $_kfile` || \
+               fatal "awk failed"
+       fgrep "$_kpub" $OBJ/known_hosts > /dev/null
+}
+
+cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
+
+# Connect to sshd with StrictHostkeyChecking=no
+verbose "learn hostkey with StrictHostKeyChecking=no"
+>$OBJ/known_hosts
+dossh -oHostKeyAlgorithms=ssh-ed25519 -oStrictHostKeyChecking=no
+# Verify no additional keys learned
+expect_nkeys 1 "unstrict connect keys"
+check_key_present ssh-ed25519 || fail "unstrict didn't learn key"
+
+# Connect to sshd as usual
+verbose "learn additional hostkeys"
+dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=$all_algs
+# Check that other keys learned
+expect_nkeys $nkeys "learn hostkeys"
+check_key_present ssh-rsa || fail "didn't learn keys"
+
+# Check each key type
+for k in `${SSH} -Q key-plain` ; do
+       verbose "learn additional hostkeys, type=$k"
+       dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=$k,$all_algs
+       expect_nkeys $nkeys "learn hostkeys $k"
+       check_key_present $k || fail "didn't learn $k"
+done
+
+# Change one hostkey (non primary) and relearn
+verbose "learn changed non-primary hostkey"
+mv $OBJ/hkr.ssh-rsa.pub $OBJ/hkr.ssh-rsa.pub.old
+rm -f $OBJ/hkr.ssh-rsa
+${SSHKEYGEN} -qt ssh-rsa -f $OBJ/hkr.ssh-rsa -N '' || fatal "ssh-keygen $k"
+dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=$all_algs
+# Check that the key was replaced
+expect_nkeys $nkeys "learn hostkeys"
+check_key_present ssh-rsa $OBJ/hkr.ssh-rsa.pub.old && fail "old key present"
+check_key_present ssh-rsa || fail "didn't learn changed key"
+
+# Add new hostkey (primary type) to sshd and connect
+verbose "learn new primary hostkey"
+${SSHKEYGEN} -qt ssh-rsa -f $OBJ/hkr.ssh-rsa-new -N '' || fatal "ssh-keygen $k"
+( cat $OBJ/sshd_proxy.orig ; echo HostKey $OBJ/hkr.ssh-rsa-new ) \
+    > $OBJ/sshd_proxy
+# Check new hostkey added
+dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=ssh-rsa,$all_algs
+expect_nkeys `expr $nkeys + 1` "learn hostkeys"
+check_key_present ssh-rsa || fail "current key missing"
+check_key_present ssh-rsa $OBJ/hkr.ssh-rsa-new.pub || fail "new key missing"
+
+# Remove old hostkey (primary type) from sshd
+verbose "rotate primary hostkey"
+cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
+mv $OBJ/hkr.ssh-rsa.pub $OBJ/hkr.ssh-rsa.pub.old
+mv $OBJ/hkr.ssh-rsa-new.pub $OBJ/hkr.ssh-rsa.pub
+mv $OBJ/hkr.ssh-rsa-new $OBJ/hkr.ssh-rsa
+# Check old hostkey removed
+dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=ssh-rsa,$all_algs
+expect_nkeys $nkeys "learn hostkeys"
+check_key_present ssh-rsa $OBJ/hkr.ssh-rsa.pub.old && fail "old key present"
+check_key_present ssh-rsa || fail "didn't learn changed key"
+
+# Connect again, forcing rotated key
+verbose "check rotate primary hostkey"
+dossh -oStrictHostKeyChecking=yes -oHostKeyAlgorithms=ssh-rsa
+expect_nkeys 1 "learn hostkeys"
+check_key_present ssh-rsa || fail "didn't learn changed key"
diff --git a/regress/integrity.sh b/regress/integrity.sh
new file mode 100644 (file)
index 0000000..1df2924
--- /dev/null
@@ -0,0 +1,74 @@
+#      $OpenBSD: integrity.sh,v 1.20 2017/01/06 02:26:10 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="integrity"
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+
+# start at byte 2900 (i.e. after kex) and corrupt at different offsets
+tries=10
+startoffset=2900
+macs=`${SSH} -Q mac`
+# The following are not MACs, but ciphers with integrated integrity. They are
+# handled specially below.
+macs="$macs `${SSH} -Q cipher-auth`"
+
+# avoid DH group exchange as the extra traffic makes it harder to get the
+# offset into the stream right.
+echo "KexAlgorithms diffie-hellman-group14-sha1,diffie-hellman-group1-sha1" \
+       >> $OBJ/ssh_proxy
+
+# sshd-command for proxy (see test-exec.sh)
+cmd="$SUDO sh ${SRC}/sshd-log-wrapper.sh ${TEST_SSHD_LOGFILE} ${SSHD} -i -f $OBJ/sshd_proxy"
+
+for m in $macs; do
+       trace "test $tid: mac $m"
+       elen=0
+       epad=0
+       emac=0
+       etmo=0
+       ecnt=0
+       skip=0
+       for off in `jot $tries $startoffset`; do
+               skip=`expr $skip - 1`
+               if [ $skip -gt 0 ]; then
+                       # avoid modifying the high bytes of the length
+                       continue
+               fi
+               cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+               # modify output from sshd at offset $off
+               pxy="proxycommand=$cmd | $OBJ/modpipe -wm xor:$off:1"
+               if ${SSH} -Q cipher-auth | grep "^${m}\$" >/dev/null 2>&1 ; then
+                       echo "Ciphers=$m" >> $OBJ/sshd_proxy
+                       macopt="-c $m"
+               else
+                       echo "Ciphers=aes128-ctr" >> $OBJ/sshd_proxy
+                       echo "MACs=$m" >> $OBJ/sshd_proxy
+                       macopt="-m $m -c aes128-ctr"
+               fi
+               verbose "test $tid: $m @$off"
+               ${SSH} $macopt -2F $OBJ/ssh_proxy -o "$pxy" \
+                   -oServerAliveInterval=1 -oServerAliveCountMax=30 \
+                   999.999.999.999 'printf "%4096s" " "' >/dev/null
+               if [ $? -eq 0 ]; then
+                       fail "ssh -m $m succeeds with bit-flip at $off"
+               fi
+               ecnt=`expr $ecnt + 1`
+               out=$(egrep -v "^debug" $TEST_SSH_LOGFILE | tail -2 | \
+                    tr -s '\r\n' '.')
+               case "$out" in
+               Bad?packet*)    elen=`expr $elen + 1`; skip=3;;
+               Corrupted?MAC* | *message?authentication?code?incorrect*)
+                               emac=`expr $emac + 1`; skip=0;;
+               padding*)       epad=`expr $epad + 1`; skip=0;;
+               *)              fail "unexpected error mac $m at $off: $out";;
+               esac
+       done
+       verbose "test $tid: $ecnt errors: mac $emac padding $epad length $elen"
+       if [ $emac -eq 0 ]; then
+               fail "$m: no mac errors"
+       fi
+       expect=`expr $ecnt - $epad - $elen`
+       if [ $emac -ne $expect ]; then
+               fail "$m: expected $expect mac errors, got $emac"
+       fi
+done
diff --git a/regress/kextype.sh b/regress/kextype.sh
new file mode 100644 (file)
index 0000000..e271899
--- /dev/null
@@ -0,0 +1,25 @@
+#      $OpenBSD: kextype.sh,v 1.6 2015/03/24 20:19:15 markus Exp $
+#      Placed in the Public Domain.
+
+tid="login with different key exchange algorithms"
+
+TIME=/usr/bin/time
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
+
+# Make server accept all key exchanges.
+ALLKEX=`${SSH} -Q kex`
+KEXOPT=`echo $ALLKEX | tr ' ' ,`
+echo "KexAlgorithms=$KEXOPT" >> $OBJ/sshd_proxy
+
+tries="1 2 3 4"
+for k in `${SSH} -Q kex`; do
+       verbose "kex $k"
+       for i in $tries; do
+               ${SSH} -F $OBJ/ssh_proxy -o KexAlgorithms=$k x true
+               if [ $? -ne 0 ]; then
+                       fail "ssh kex $k"
+               fi
+       done
+done
+
diff --git a/regress/key-options.sh b/regress/key-options.sh
new file mode 100644 (file)
index 0000000..7a68ad3
--- /dev/null
@@ -0,0 +1,71 @@
+#      $OpenBSD: key-options.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="key options"
+
+origkeys="$OBJ/authkeys_orig"
+authkeys="$OBJ/authorized_keys_${USER}"
+cp $authkeys $origkeys
+
+# Test command= forced command
+for p in ${SSH_PROTOCOLS}; do
+    for c in 'command="echo bar"' 'no-pty,command="echo bar"'; do
+       sed "s/.*/$c &/" $origkeys >$authkeys
+       verbose "key option proto $p $c"
+       r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost echo foo`
+       if [ "$r" = "foo" ]; then
+               fail "key option forced command not restricted"
+       fi
+       if [ "$r" != "bar" ]; then
+               fail "key option forced command not executed"
+       fi
+    done
+done
+
+# Test no-pty
+sed 's/.*/no-pty &/' $origkeys >$authkeys
+for p in ${SSH_PROTOCOLS}; do
+       verbose "key option proto $p no-pty"
+       r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost tty`
+       if [ -f "$r" ]; then
+               fail "key option failed proto $p no-pty (pty $r)"
+       fi
+done
+
+# Test environment=
+echo 'PermitUserEnvironment yes' >> $OBJ/sshd_proxy
+sed 's/.*/environment="FOO=bar" &/' $origkeys >$authkeys
+for p in ${SSH_PROTOCOLS}; do
+       verbose "key option proto $p environment"
+       r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo $FOO'`
+       if [ "$r" != "bar" ]; then
+               fail "key option environment not set"
+       fi
+done
+
+# Test from= restriction
+start_sshd
+for p in ${SSH_PROTOCOLS}; do
+    for f in 127.0.0.1 '127.0.0.0\/8'; do
+       cat  $origkeys >$authkeys
+       ${SSH} -$p -q -F $OBJ/ssh_proxy somehost true
+       if [ $? -ne 0 ]; then
+               fail "key option proto $p failed without restriction"
+       fi
+
+       sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
+       from=`head -1 $authkeys | cut -f1 -d ' '`
+       verbose "key option proto $p $from"
+       r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo true'`
+       if [ "$r" = "true" ]; then
+               fail "key option proto $p $from not restricted"
+       fi
+
+       r=`${SSH} -$p -q -F $OBJ/ssh_config somehost 'echo true'`
+       if [ "$r" != "true" ]; then
+               fail "key option proto $p $from not allowed but should be"
+       fi
+    done
+done
+
+rm -f "$origkeys"
diff --git a/regress/keygen-change.sh b/regress/keygen-change.sh
new file mode 100644 (file)
index 0000000..e561850
--- /dev/null
@@ -0,0 +1,28 @@
+#      $OpenBSD: keygen-change.sh,v 1.5 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="change passphrase for key"
+
+S1="secret1"
+S2="2secret"
+
+KEYTYPES=`${SSH} -Q key-plain`
+if ssh_version 1; then
+       KEYTYPES="${KEYTYPES} rsa1"
+fi
+
+for t in $KEYTYPES; do
+       # generate user key for agent
+       trace "generating $t key"
+       rm -f $OBJ/$t-key
+       ${SSHKEYGEN} -q -N ${S1} -t $t -f $OBJ/$t-key
+       if [ $? -eq 0 ]; then
+               ${SSHKEYGEN} -p -P ${S1} -N ${S2} -f $OBJ/$t-key > /dev/null
+               if [ $? -ne 0 ]; then
+                       fail "ssh-keygen -p failed for $t-key"
+               fi
+       else
+               fail "ssh-keygen for $t-key failed"
+       fi
+       rm -f $OBJ/$t-key $OBJ/$t-key.pub
+done
diff --git a/regress/keygen-convert.sh b/regress/keygen-convert.sh
new file mode 100644 (file)
index 0000000..ad0e9c6
--- /dev/null
@@ -0,0 +1,33 @@
+#      $OpenBSD: keygen-convert.sh,v 1.1 2009/11/09 04:20:04 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="convert keys"
+
+for t in rsa dsa; do
+       # generate user key for agent
+       trace "generating $t key"
+       rm -f $OBJ/$t-key
+       ${SSHKEYGEN} -q -N "" -t $t -f $OBJ/$t-key
+
+       trace "export $t private to rfc4716 public"
+       ${SSHKEYGEN} -q -e -f $OBJ/$t-key >$OBJ/$t-key-rfc || \
+           fail "export $t private to rfc4716 public"
+
+       trace "export $t public to rfc4716 public"
+       ${SSHKEYGEN} -q -e -f $OBJ/$t-key.pub >$OBJ/$t-key-rfc.pub || \
+           fail "$t public to rfc4716 public"
+
+       cmp $OBJ/$t-key-rfc $OBJ/$t-key-rfc.pub || \
+           fail "$t rfc4716 exports differ between public and private"
+
+       trace "import $t rfc4716 public"
+       ${SSHKEYGEN} -q -i -f $OBJ/$t-key-rfc >$OBJ/$t-rfc-imported || \
+           fail "$t import rfc4716 public"
+
+       cut -f1,2 -d " " $OBJ/$t-key.pub >$OBJ/$t-key-nocomment.pub
+       cmp $OBJ/$t-key-nocomment.pub $OBJ/$t-rfc-imported || \
+           fail "$t imported differs from original"
+
+       rm -f $OBJ/$t-key $OBJ/$t-key.pub $OBJ/$t-key-rfc $OBJ/$t-key-rfc.pub \
+           $OBJ/$t-rfc-imported $OBJ/$t-key-nocomment.pub
+done
diff --git a/regress/keygen-knownhosts.sh b/regress/keygen-knownhosts.sh
new file mode 100644 (file)
index 0000000..693cd0e
--- /dev/null
@@ -0,0 +1,197 @@
+#      $OpenBSD: keygen-knownhosts.sh,v 1.3 2015/07/17 03:34:27 djm Exp $
+#      Placed in the Public Domain.
+
+tid="ssh-keygen known_hosts"
+
+rm -f $OBJ/kh.*
+
+# Generate some keys for testing (just ed25519 for speed) and make a hosts file.
+for x in host-a host-b host-c host-d host-e host-f host-a2 host-b2; do
+       ${SSHKEYGEN} -qt ed25519 -f $OBJ/kh.$x -C "$x" -N "" || \
+               fatal "ssh-keygen failed"
+       # Add a comment that we expect should be preserved.
+       echo "# $x" >> $OBJ/kh.hosts
+       (
+               case "$x" in
+               host-a|host-b)  printf "$x " ;;
+               host-c)         printf "@cert-authority $x " ;;
+               host-d)         printf "@revoked $x " ;;
+               host-e)         printf "host-e* " ;;
+               host-f)         printf "host-f,host-g,host-h " ;;
+               host-a2)        printf "host-a " ;;
+               host-b2)        printf "host-b " ;;
+               esac
+               cat $OBJ/kh.${x}.pub
+               # Blank line should be preserved.
+               echo "" >> $OBJ/kh.hosts
+       ) >> $OBJ/kh.hosts
+done
+
+# Generate a variant with an invalid line. We'll use this for most tests,
+# because keygen should be able to cope and it should be preserved in any
+# output file.
+cat $OBJ/kh.hosts >> $OBJ/kh.invalid
+echo "host-i " >> $OBJ/kh.invalid
+
+cp $OBJ/kh.invalid $OBJ/kh.invalid.orig
+cp $OBJ/kh.hosts $OBJ/kh.hosts.orig
+
+expect_key() {
+       _host=$1
+       _hosts=$2
+       _key=$3
+       _line=$4
+       _mark=$5
+       _marker=""
+       test "x$_mark" = "xCA" && _marker="@cert-authority "
+       test "x$_mark" = "xREVOKED" && _marker="@revoked "
+       test "x$_line" != "x" &&
+           echo "# Host $_host found: line $_line $_mark" >> $OBJ/kh.expect
+       printf "${_marker}$_hosts " >> $OBJ/kh.expect
+       cat $OBJ/kh.${_key}.pub >> $OBJ/kh.expect ||
+           fatal "${_key}.pub missing"
+}
+
+check_find() {
+       _host=$1
+       _name=$2
+       _keygenopt=$3
+       ${SSHKEYGEN} $_keygenopt -f $OBJ/kh.invalid -F $_host > $OBJ/kh.result
+       if ! diff -w $OBJ/kh.expect $OBJ/kh.result ; then
+               fail "didn't find $_name"
+       fi
+}
+
+# Find key
+rm -f $OBJ/kh.expect
+expect_key host-a host-a host-a 2
+expect_key host-a host-a host-a2 20
+check_find host-a "simple find"
+
+# find CA key
+rm -f $OBJ/kh.expect
+expect_key host-c host-c host-c 8 CA
+check_find host-c "find CA key"
+
+# find revoked key
+rm -f $OBJ/kh.expect
+expect_key host-d host-d host-d 11 REVOKED
+check_find host-d "find revoked key"
+
+# find key with wildcard
+rm -f $OBJ/kh.expect
+expect_key host-e.somedomain "host-e*" host-e 14
+check_find host-e.somedomain "find wildcard key"
+
+# find key among multiple hosts
+rm -f $OBJ/kh.expect
+expect_key host-h "host-f,host-g,host-h " host-f 17
+check_find host-h "find multiple hosts"
+
+check_hashed_find() {
+       _host=$1
+       _name=$2
+       _file=$3
+       test "x$_file" = "x" && _file=$OBJ/kh.invalid
+       ${SSHKEYGEN} -f $_file -HF $_host | grep '|1|' | \
+           sed "s/^[^ ]*/$_host/" > $OBJ/kh.result
+       if ! diff -w $OBJ/kh.expect $OBJ/kh.result ; then
+               fail "didn't find $_name"
+       fi
+}
+
+# Find key and hash
+rm -f $OBJ/kh.expect
+expect_key host-a host-a host-a
+expect_key host-a host-a host-a2
+check_hashed_find host-a "find simple and hash"
+
+# Find CA key and hash
+rm -f $OBJ/kh.expect
+expect_key host-c host-c host-c "" CA
+# CA key output is not hashed.
+check_find host-c "find simple and hash" -H
+
+# Find revoked key and hash
+rm -f $OBJ/kh.expect
+expect_key host-d host-d host-d "" REVOKED
+# Revoked key output is not hashed.
+check_find host-d "find simple and hash" -H
+
+# find key with wildcard and hash
+rm -f $OBJ/kh.expect
+expect_key host-e "host-e*" host-e ""
+# Key with wildcard hostname should not be hashed.
+check_find host-e "find wildcard key" -H
+
+# find key among multiple hosts
+rm -f $OBJ/kh.expect
+# Comma-separated hostnames should be expanded and hashed.
+expect_key host-f "host-h " host-f
+expect_key host-g "host-h " host-f
+expect_key host-h "host-h " host-f
+check_hashed_find host-h "find multiple hosts"
+
+# Attempt remove key on invalid file.
+cp $OBJ/kh.invalid.orig $OBJ/kh.invalid
+${SSHKEYGEN} -qf $OBJ/kh.invalid -R host-a 2>/dev/null
+diff $OBJ/kh.invalid $OBJ/kh.invalid.orig || fail "remove on invalid succeeded"
+
+# Remove key
+cp $OBJ/kh.hosts.orig $OBJ/kh.hosts
+${SSHKEYGEN} -qf $OBJ/kh.hosts -R host-a 2>/dev/null
+grep -v "^host-a " $OBJ/kh.hosts.orig > $OBJ/kh.expect
+diff $OBJ/kh.hosts $OBJ/kh.expect || fail "remove simple"
+
+# Remove CA key
+cp $OBJ/kh.hosts.orig $OBJ/kh.hosts
+${SSHKEYGEN} -qf $OBJ/kh.hosts -R host-c 2>/dev/null
+# CA key should not be removed.
+diff $OBJ/kh.hosts $OBJ/kh.hosts.orig || fail "remove CA"
+
+# Remove revoked key
+cp $OBJ/kh.hosts.orig $OBJ/kh.hosts
+${SSHKEYGEN} -qf $OBJ/kh.hosts -R host-d 2>/dev/null
+# revoked key should not be removed.
+diff $OBJ/kh.hosts $OBJ/kh.hosts.orig || fail "remove revoked"
+
+# Remove wildcard
+cp $OBJ/kh.hosts.orig $OBJ/kh.hosts
+${SSHKEYGEN} -qf $OBJ/kh.hosts -R host-e.blahblah 2>/dev/null
+grep -v "^host-e[*] " $OBJ/kh.hosts.orig > $OBJ/kh.expect
+diff $OBJ/kh.hosts $OBJ/kh.expect || fail "remove wildcard"
+
+# Remove multiple
+cp $OBJ/kh.hosts.orig $OBJ/kh.hosts
+${SSHKEYGEN} -qf $OBJ/kh.hosts -R host-h 2>/dev/null
+grep -v "^host-f," $OBJ/kh.hosts.orig > $OBJ/kh.expect
+diff $OBJ/kh.hosts $OBJ/kh.expect || fail "remove wildcard"
+
+# Attempt hash on invalid file
+cp $OBJ/kh.invalid.orig $OBJ/kh.invalid
+${SSHKEYGEN} -qf $OBJ/kh.invalid -H 2>/dev/null && fail "hash invalid succeeded"
+diff $OBJ/kh.invalid $OBJ/kh.invalid.orig || fail "invalid file modified"
+
+# Hash valid file
+cp $OBJ/kh.hosts.orig $OBJ/kh.hosts
+${SSHKEYGEN} -qf $OBJ/kh.hosts -H 2>/dev/null || fail "hash failed"
+diff $OBJ/kh.hosts.old $OBJ/kh.hosts.orig || fail "backup differs"
+grep "^host-[abfgh]" $OBJ/kh.hosts && fail "original hostnames persist"
+
+cp $OBJ/kh.hosts $OBJ/kh.hashed.orig
+
+# Test lookup
+rm -f $OBJ/kh.expect
+expect_key host-a host-a host-a
+expect_key host-a host-a host-a2
+check_hashed_find host-a "find simple in hashed" $OBJ/kh.hosts
+
+# Test multiple expanded
+rm -f $OBJ/kh.expect
+expect_key host-h host-h host-f
+check_hashed_find host-h "find simple in hashed" $OBJ/kh.hosts
+
+# Test remove
+cp $OBJ/kh.hashed.orig $OBJ/kh.hashed
+${SSHKEYGEN} -qf $OBJ/kh.hashed -R host-a 2>/dev/null
+${SSHKEYGEN} -qf $OBJ/kh.hashed -F host-a && fail "found key after hashed remove"
diff --git a/regress/keygen-moduli.sh b/regress/keygen-moduli.sh
new file mode 100644 (file)
index 0000000..d4e7713
--- /dev/null
@@ -0,0 +1,18 @@
+#      $OpenBSD: keygen-moduli.sh,v 1.2 2016/09/14 00:45:31 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="keygen moduli"
+
+# Try "start at the beginning and stop after 1", "skip 1 then stop after 1"
+# and "skip 2 and run to the end with checkpointing".  Since our test data
+# file has 3 lines, these should always result in 1 line of output.
+for i in "-J1" "-j1 -J1" "-j2 -K $OBJ/moduli.ckpt"; do
+       trace "keygen $i"
+       rm -f $OBJ/moduli.out $OBJ/moduli.ckpt
+       ${SSHKEYGEN} -T $OBJ/moduli.out -f ${SRC}/moduli.in $i 2>/dev/null || \
+           fail "keygen screen failed $i"
+       lines=`wc -l <$OBJ/moduli.out`
+       test "$lines" -eq "1" || fail "expected 1 line, got $lines"
+done
+
+rm -f $OBJ/moduli.out $OBJ/moduli.ckpt
diff --git a/regress/keys-command.sh b/regress/keys-command.sh
new file mode 100644 (file)
index 0000000..9c9ada7
--- /dev/null
@@ -0,0 +1,82 @@
+#      $OpenBSD: keys-command.sh,v 1.3 2015/05/21 06:40:02 djm Exp $
+#      Placed in the Public Domain.
+
+tid="authorized keys from command"
+
+if [ -z "$SUDO" -a ! -w /var/run ]; then
+       echo "skipped (SUDO not set)"
+       echo "need SUDO to create file in /var/run, test won't work without"
+       exit 0
+fi
+
+rm -f $OBJ/keys-command-args
+
+touch $OBJ/keys-command-args
+chmod a+rw $OBJ/keys-command-args
+
+expected_key_text=`awk '{ print $2 }' < $OBJ/rsa.pub`
+expected_key_fp=`$SSHKEYGEN -lf $OBJ/rsa.pub | awk '{ print $2 }'`
+
+# Establish a AuthorizedKeysCommand in /var/run where it will have
+# acceptable directory permissions.
+KEY_COMMAND="/var/run/keycommand_${LOGNAME}"
+cat << _EOF | $SUDO sh -c "rm -f '$KEY_COMMAND' ; cat > '$KEY_COMMAND'"
+#!/bin/sh
+echo args: "\$@" >> $OBJ/keys-command-args
+echo "$PATH" | grep -q mekmitasdigoat && exit 7
+test "x\$1" != "x${LOGNAME}" && exit 1
+if test $# -eq 6 ; then
+       test "x\$2" != "xblah" && exit 2
+       test "x\$3" != "x${expected_key_text}" && exit 3
+       test "x\$4" != "xssh-rsa" && exit 4
+       test "x\$5" != "x${expected_key_fp}" && exit 5
+       test "x\$6" != "xblah" && exit 6
+fi
+exec cat "$OBJ/authorized_keys_${LOGNAME}"
+_EOF
+$SUDO chmod 0755 "$KEY_COMMAND"
+
+if ! $OBJ/check-perm -m keys-command $KEY_COMMAND ; then
+       echo "skipping: $KEY_COMMAND is unsuitable as AuthorizedKeysCommand"
+       $SUDO rm -f $KEY_COMMAND
+       exit 0
+fi
+
+if [ -x $KEY_COMMAND ]; then
+       cp $OBJ/sshd_proxy $OBJ/sshd_proxy.bak
+
+       verbose "AuthorizedKeysCommand with arguments"
+       (
+               grep -vi AuthorizedKeysFile $OBJ/sshd_proxy.bak
+               echo AuthorizedKeysFile none
+               echo AuthorizedKeysCommand $KEY_COMMAND %u blah %k %t %f blah
+               echo AuthorizedKeysCommandUser ${LOGNAME}
+       ) > $OBJ/sshd_proxy
+
+       # Ensure that $PATH is sanitised in sshd
+       env PATH=$PATH:/sbin/mekmitasdigoat \
+           ${SSH} -F $OBJ/ssh_proxy somehost true
+       if [ $? -ne 0 ]; then
+               fail "connect failed"
+       fi
+
+       verbose "AuthorizedKeysCommand without arguments"
+       # Check legacy behavior of no-args resulting in username being passed.
+       (
+               grep -vi AuthorizedKeysFile $OBJ/sshd_proxy.bak
+               echo AuthorizedKeysFile none
+               echo AuthorizedKeysCommand $KEY_COMMAND
+               echo AuthorizedKeysCommandUser ${LOGNAME}
+       ) > $OBJ/sshd_proxy
+
+       # Ensure that $PATH is sanitised in sshd
+       env PATH=$PATH:/sbin/mekmitasdigoat \
+           ${SSH} -F $OBJ/ssh_proxy somehost true
+       if [ $? -ne 0 ]; then
+               fail "connect failed"
+       fi
+else
+       echo "SKIPPED: $KEY_COMMAND not executable (/var/run mounted noexec?)"
+fi
+
+$SUDO rm -f $KEY_COMMAND
diff --git a/regress/keyscan.sh b/regress/keyscan.sh
new file mode 100644 (file)
index 0000000..f97364b
--- /dev/null
@@ -0,0 +1,24 @@
+#      $OpenBSD: keyscan.sh,v 1.5 2015/09/11 03:44:21 djm Exp $
+#      Placed in the Public Domain.
+
+tid="keyscan"
+
+# remove DSA hostkey
+rm -f ${OBJ}/host.dsa
+
+start_sshd
+
+KEYTYPES=`${SSH} -Q key-plain`
+if ssh_version 1; then
+       KEYTYPES="${KEYTYPES} rsa1"
+fi
+
+for t in $KEYTYPES; do
+       trace "keyscan type $t"
+       ${SSHKEYSCAN} -t $t -p $PORT 127.0.0.1 127.0.0.1 127.0.0.1 \
+               > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-keyscan -t $t failed with: $r"
+       fi
+done
diff --git a/regress/keytype.sh b/regress/keytype.sh
new file mode 100644 (file)
index 0000000..8f69778
--- /dev/null
@@ -0,0 +1,73 @@
+#      $OpenBSD: keytype.sh,v 1.4 2015/07/10 06:23:25 markus Exp $
+#      Placed in the Public Domain.
+
+tid="login with different key types"
+
+TIME=`which time 2>/dev/null`
+if test ! -x "$TIME"; then
+       TIME=""
+fi
+
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
+
+# Traditional and builtin key types.
+ktypes="dsa-1024 rsa-2048 rsa-3072 ed25519-512"
+# Types not present in all OpenSSL versions.
+for i in `$SSH -Q key`; do
+       case "$i" in
+               ecdsa-sha2-nistp256)    ktypes="$ktypes ecdsa-256" ;;
+               ecdsa-sha2-nistp384)    ktypes="$ktypes ecdsa-384" ;;
+               ecdsa-sha2-nistp521)    ktypes="$ktypes ecdsa-521" ;;
+       esac
+done
+
+for kt in $ktypes; do 
+       rm -f $OBJ/key.$kt
+       bits=`echo ${kt} | awk -F- '{print $2}'`
+       type=`echo ${kt}  | awk -F- '{print $1}'`
+       printf "keygen $type, $bits bits:\t"
+       ${TIME} ${SSHKEYGEN} -b $bits -q -N '' -t $type  -f $OBJ/key.$kt ||\
+               fail "ssh-keygen for type $type, $bits bits failed"
+done
+
+tries="1 2 3"
+for ut in $ktypes; do 
+       htypes=$ut
+       #htypes=$ktypes
+       for ht in $htypes; do 
+               case $ht in
+               dsa-1024)       t=ssh-dss;;
+               ecdsa-256)      t=ecdsa-sha2-nistp256;;
+               ecdsa-384)      t=ecdsa-sha2-nistp384;;
+               ecdsa-521)      t=ecdsa-sha2-nistp521;;
+               ed25519-512)    t=ssh-ed25519;;
+               rsa-*)          t=ssh-rsa;;
+               esac
+               trace "ssh connect, userkey $ut, hostkey $ht"
+               (
+                       grep -v HostKey $OBJ/sshd_proxy_bak
+                       echo HostKey $OBJ/key.$ht 
+                       echo PubkeyAcceptedKeyTypes $t
+                       echo HostKeyAlgorithms $t
+               ) > $OBJ/sshd_proxy
+               (
+                       grep -v IdentityFile $OBJ/ssh_proxy_bak
+                       echo IdentityFile $OBJ/key.$ut 
+                       echo PubkeyAcceptedKeyTypes $t
+                       echo HostKeyAlgorithms $t
+               ) > $OBJ/ssh_proxy
+               (
+                       printf 'localhost-with-alias,127.0.0.1,::1 '
+                       cat $OBJ/key.$ht.pub
+               ) > $OBJ/known_hosts
+               cat $OBJ/key.$ut.pub > $OBJ/authorized_keys_$USER
+               for i in $tries; do
+                       printf "userkey $ut, hostkey ${ht}:\t"
+                       ${TIME} ${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
+                       if [ $? -ne 0 ]; then
+                               fail "ssh userkey $ut, hostkey $ht failed"
+                       fi
+               done
+       done
+done
diff --git a/regress/krl.sh b/regress/krl.sh
new file mode 100644 (file)
index 0000000..1077358
--- /dev/null
@@ -0,0 +1,185 @@
+#      $OpenBSD: krl.sh,v 1.6 2015/01/30 01:11:39 djm Exp $
+#      Placed in the Public Domain.
+
+tid="key revocation lists"
+
+# If we don't support ecdsa keys then this tell will be much slower.
+ECDSA=ecdsa
+if test "x$TEST_SSH_ECC" != "xyes"; then
+       ECDSA=rsa
+fi
+
+# Do most testing with ssh-keygen; it uses the same verification code as sshd.
+
+# Old keys will interfere with ssh-keygen.
+rm -f $OBJ/revoked-* $OBJ/krl-*
+
+# Generate a CA key
+$SSHKEYGEN -t $ECDSA -f $OBJ/revoked-ca  -C "" -N "" > /dev/null ||
+       fatal "$SSHKEYGEN CA failed"
+$SSHKEYGEN -t ed25519 -f $OBJ/revoked-ca2  -C "" -N "" > /dev/null ||
+       fatal "$SSHKEYGEN CA2 failed"
+
+# A specification that revokes some certificates by serial numbers
+# The serial pattern is chosen to ensure the KRL includes list, range and
+# bitmap sections.
+cat << EOF >> $OBJ/revoked-serials
+serial: 1-4
+serial: 10
+serial: 15
+serial: 30
+serial: 50
+serial: 999
+# The following sum to 500-799
+serial: 500
+serial: 501
+serial: 502
+serial: 503-600
+serial: 700-797
+serial: 798
+serial: 799
+serial: 599-701
+# Some multiple consecutive serial number ranges
+serial: 10000-20000
+serial: 30000-40000
+EOF
+
+# A specification that revokes some certificated by key ID.
+touch $OBJ/revoked-keyid
+for n in 1 2 3 4 10 15 30 50 `jot 500 300` 999 1000 1001 1002; do
+       test "x$n" = "x499" && continue
+       # Fill in by-ID revocation spec.
+       echo "id: revoked $n" >> $OBJ/revoked-keyid
+done
+
+keygen() {
+       N=$1
+       f=$OBJ/revoked-`printf "%04d" $N`
+       # Vary the keytype. We use mostly ECDSA since this is fastest by far.
+       keytype=$ECDSA
+       case $N in
+       2 | 10 | 510 | 1001)    keytype=rsa;;
+       4 | 30 | 520 | 1002)    keytype=ed25519;;
+       esac
+       $SSHKEYGEN -t $keytype -f $f -C "" -N "" > /dev/null \
+               || fatal "$SSHKEYGEN failed"
+       # Sign cert
+       $SSHKEYGEN -s $OBJ/revoked-ca -z $n -I "revoked $N" $f >/dev/null 2>&1 \
+               || fatal "$SSHKEYGEN sign failed"
+       echo $f
+}
+
+# Generate some keys.
+verbose "$tid: generating test keys"
+REVOKED_SERIALS="1 4 10 50 500 510 520 799 999"
+for n in $REVOKED_SERIALS ; do
+       f=`keygen $n`
+       RKEYS="$RKEYS ${f}.pub"
+       RCERTS="$RCERTS ${f}-cert.pub"
+done
+UNREVOKED_SERIALS="5 9 14 16 29 49 51 499 800 1010 1011"
+UNREVOKED=""
+for n in $UNREVOKED_SERIALS ; do
+       f=`keygen $n`
+       UKEYS="$UKEYS ${f}.pub"
+       UCERTS="$UCERTS ${f}-cert.pub"
+done
+
+genkrls() {
+       OPTS=$1
+$SSHKEYGEN $OPTS -kf $OBJ/krl-empty - </dev/null \
+       >/dev/null || fatal "$SSHKEYGEN KRL failed"
+$SSHKEYGEN $OPTS -kf $OBJ/krl-keys $RKEYS \
+       >/dev/null || fatal "$SSHKEYGEN KRL failed"
+$SSHKEYGEN $OPTS -kf $OBJ/krl-cert $RCERTS \
+       >/dev/null || fatal "$SSHKEYGEN KRL failed"
+$SSHKEYGEN $OPTS -kf $OBJ/krl-all $RKEYS $RCERTS \
+       >/dev/null || fatal "$SSHKEYGEN KRL failed"
+$SSHKEYGEN $OPTS -kf $OBJ/krl-ca $OBJ/revoked-ca.pub \
+       >/dev/null || fatal "$SSHKEYGEN KRL failed"
+# This should fail as KRLs from serial/key-id spec need the CA specified.
+$SSHKEYGEN $OPTS -kf $OBJ/krl-serial $OBJ/revoked-serials \
+       >/dev/null 2>&1 && fatal "$SSHKEYGEN KRL succeeded unexpectedly"
+$SSHKEYGEN $OPTS -kf $OBJ/krl-keyid $OBJ/revoked-keyid \
+       >/dev/null 2>&1 && fatal "$SSHKEYGEN KRL succeeded unexpectedly"
+# These should succeed; they specify an explicit CA key.
+$SSHKEYGEN $OPTS -kf $OBJ/krl-serial -s $OBJ/revoked-ca \
+       $OBJ/revoked-serials >/dev/null || fatal "$SSHKEYGEN KRL failed"
+$SSHKEYGEN $OPTS -kf $OBJ/krl-keyid -s $OBJ/revoked-ca.pub \
+       $OBJ/revoked-keyid >/dev/null || fatal "$SSHKEYGEN KRL failed"
+# These should succeed; they specify an wildcard CA key.
+$SSHKEYGEN $OPTS -kf $OBJ/krl-serial-wild -s NONE $OBJ/revoked-serials \
+       >/dev/null || fatal "$SSHKEYGEN KRL failed"
+$SSHKEYGEN $OPTS -kf $OBJ/krl-keyid-wild -s NONE $OBJ/revoked-keyid \
+       >/dev/null || fatal "$SSHKEYGEN KRL failed"
+# Revoke the same serials with the second CA key to ensure a multi-CA
+# KRL is generated.
+$SSHKEYGEN $OPTS -kf $OBJ/krl-serial -u -s $OBJ/revoked-ca2 \
+       $OBJ/revoked-serials >/dev/null || fatal "$SSHKEYGEN KRL failed"
+}
+
+## XXX dump with trace and grep for set cert serials
+## XXX test ranges near (u64)-1, etc.
+
+verbose "$tid: generating KRLs"
+genkrls
+
+check_krl() {
+       KEY=$1
+       KRL=$2
+       EXPECT_REVOKED=$3
+       TAG=$4
+       $SSHKEYGEN -Qf $KRL $KEY >/dev/null
+       result=$?
+       if test "x$EXPECT_REVOKED" = "xyes" -a $result -eq 0 ; then
+               fatal "key $KEY not revoked by KRL $KRL: $TAG"
+       elif test "x$EXPECT_REVOKED" = "xno" -a $result -ne 0 ; then
+               fatal "key $KEY unexpectedly revoked by KRL $KRL: $TAG"
+       fi
+}
+test_rev() {
+       FILES=$1
+       TAG=$2
+       KEYS_RESULT=$3
+       ALL_RESULT=$4
+       SERIAL_RESULT=$5
+       KEYID_RESULT=$6
+       CERTS_RESULT=$7
+       CA_RESULT=$8
+       SERIAL_WRESULT=$9
+       KEYID_WRESULT=$10
+       verbose "$tid: checking revocations for $TAG"
+       for f in $FILES ; do
+               check_krl $f $OBJ/krl-empty             no              "$TAG"
+               check_krl $f $OBJ/krl-keys              $KEYS_RESULT    "$TAG"
+               check_krl $f $OBJ/krl-all               $ALL_RESULT     "$TAG"
+               check_krl $f $OBJ/krl-serial            $SERIAL_RESULT  "$TAG"
+               check_krl $f $OBJ/krl-keyid             $KEYID_RESULT   "$TAG"
+               check_krl $f $OBJ/krl-cert              $CERTS_RESULT   "$TAG"
+               check_krl $f $OBJ/krl-ca                $CA_RESULT      "$TAG"
+               check_krl $f $OBJ/krl-serial-wild       $SERIAL_WRESULT "$TAG"
+               check_krl $f $OBJ/krl-keyid-wild        $KEYID_WRESULT  "$TAG"
+       done
+}
+
+test_all() {
+       #                                                               wildcard
+       #                                   keys all sr# k.ID cert  CA sr.# k.ID
+       test_rev "$RKEYS"     "revoked keys" yes yes  no   no   no  no   no   no
+       test_rev "$UKEYS"   "unrevoked keys"  no  no  no   no   no  no   no   no
+       test_rev "$RCERTS"   "revoked certs" yes yes yes  yes  yes yes  yes  yes
+       test_rev "$UCERTS" "unrevoked certs"  no  no  no   no   no yes   no   no
+}
+
+test_all
+
+# Check update. Results should be identical.
+verbose "$tid: testing KRL update"
+for f in $OBJ/krl-keys $OBJ/krl-cert $OBJ/krl-all \
+    $OBJ/krl-ca $OBJ/krl-serial $OBJ/krl-keyid \
+    $OBJ/krl-serial-wild $OBJ/krl-keyid-wild; do
+       cp -f $OBJ/krl-empty $f
+       genkrls -u
+done
+
+test_all
diff --git a/regress/limit-keytype.sh b/regress/limit-keytype.sh
new file mode 100644 (file)
index 0000000..c0cf2fe
--- /dev/null
@@ -0,0 +1,97 @@
+#      $OpenBSD: limit-keytype.sh,v 1.4 2015/10/29 08:05:17 djm Exp $
+#      Placed in the Public Domain.
+
+tid="restrict pubkey type"
+
+rm -f $OBJ/authorized_keys_$USER $OBJ/user_ca_key* $OBJ/user_key*
+rm -f $OBJ/authorized_principals_$USER $OBJ/cert_user_key*
+
+mv $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
+mv $OBJ/ssh_proxy $OBJ/ssh_proxy.orig
+
+# Create a CA key
+${SSHKEYGEN} -q -N '' -t ed25519  -f $OBJ/user_ca_key ||\
+       fatal "ssh-keygen failed"
+
+# Make some keys and a certificate.
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key1 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t rsa -f $OBJ/user_key2 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t rsa -f $OBJ/user_key3 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t dsa -f $OBJ/user_key4 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -s $OBJ/user_ca_key -I "regress user key for $USER" \
+       -z $$ -n ${USER},mekmitasdigoat $OBJ/user_key3 ||
+               fatal "couldn't sign user_key1"
+# Copy the private key alongside the cert to allow better control of when
+# it is offered.
+mv $OBJ/user_key3-cert.pub $OBJ/cert_user_key3.pub
+
+grep -v IdentityFile $OBJ/ssh_proxy.orig > $OBJ/ssh_proxy
+
+opts="-oProtocol=2 -F $OBJ/ssh_proxy -oIdentitiesOnly=yes"
+certopts="$opts -i $OBJ/user_key3 -oCertificateFile=$OBJ/cert_user_key3.pub"
+
+echo mekmitasdigoat > $OBJ/authorized_principals_$USER
+cat $OBJ/user_key1.pub > $OBJ/authorized_keys_$USER
+cat $OBJ/user_key2.pub >> $OBJ/authorized_keys_$USER
+
+prepare_config() {
+       (
+               grep -v "Protocol"  $OBJ/sshd_proxy.orig
+               echo "Protocol 2"
+               echo "AuthenticationMethods publickey"
+               echo "TrustedUserCAKeys $OBJ/user_ca_key.pub"
+               echo "AuthorizedPrincipalsFile $OBJ/authorized_principals_%u"
+               for x in "$@" ; do
+                       echo "$x"
+               done
+       ) > $OBJ/sshd_proxy
+}
+
+prepare_config
+
+# Check we can log in with all key types.
+${SSH} $certopts proxy true || fatal "cert failed"
+${SSH} $opts -i $OBJ/user_key1 proxy true || fatal "key1 failed"
+${SSH} $opts -i $OBJ/user_key2 proxy true || fatal "key2 failed"
+
+# Allow plain Ed25519 and RSA. The certificate should fail.
+verbose "allow rsa,ed25519"
+prepare_config "PubkeyAcceptedKeyTypes ssh-rsa,ssh-ed25519"
+${SSH} $certopts proxy true && fatal "cert succeeded"
+${SSH} $opts -i $OBJ/user_key1 proxy true || fatal "key1 failed"
+${SSH} $opts -i $OBJ/user_key2 proxy true || fatal "key2 failed"
+
+# Allow Ed25519 only.
+verbose "allow ed25519"
+prepare_config "PubkeyAcceptedKeyTypes ssh-ed25519"
+${SSH} $certopts proxy true && fatal "cert succeeded"
+${SSH} $opts -i $OBJ/user_key1 proxy true || fatal "key1 failed"
+${SSH} $opts -i $OBJ/user_key2 proxy true && fatal "key2 succeeded"
+
+# Allow all certs. Plain keys should fail.
+verbose "allow cert only"
+prepare_config "PubkeyAcceptedKeyTypes ssh-*-cert-v01@openssh.com"
+${SSH} $certopts proxy true || fatal "cert failed"
+${SSH} $opts -i $OBJ/user_key1 proxy true && fatal "key1 succeeded"
+${SSH} $opts -i $OBJ/user_key2 proxy true && fatal "key2 succeeded"
+
+# Allow RSA in main config, Ed25519 for non-existent user.
+verbose "match w/ no match"
+prepare_config "PubkeyAcceptedKeyTypes ssh-rsa" \
+       "Match user x$USER" "PubkeyAcceptedKeyTypes +ssh-ed25519"
+${SSH} $certopts proxy true && fatal "cert succeeded"
+${SSH} $opts -i $OBJ/user_key1 proxy true && fatal "key1 succeeded"
+${SSH} $opts -i $OBJ/user_key2 proxy true || fatal "key2 failed"
+
+# Allow only DSA in main config, Ed25519 for user.
+verbose "match w/ matching"
+prepare_config "PubkeyAcceptedKeyTypes ssh-dss" \
+       "Match user $USER" "PubkeyAcceptedKeyTypes +ssh-ed25519"
+${SSH} $certopts proxy true || fatal "cert failed"
+${SSH} $opts -i $OBJ/user_key1 proxy true || fatal "key1 failed"
+${SSH} $opts -i $OBJ/user_key4 proxy true && fatal "key4 succeeded"
+
diff --git a/regress/localcommand.sh b/regress/localcommand.sh
new file mode 100644 (file)
index 0000000..220f19a
--- /dev/null
@@ -0,0 +1,15 @@
+#      $OpenBSD: localcommand.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="localcommand"
+
+echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
+echo 'LocalCommand echo foo' >> $OBJ/ssh_proxy
+
+for p in ${SSH_PROTOCOLS}; do
+       verbose "test $tid: proto $p localcommand"
+       a=`${SSH} -F $OBJ/ssh_proxy -$p somehost true`
+       if [ "$a" != "foo" ] ; then
+               fail "$tid proto $p"
+       fi
+done
diff --git a/regress/login-timeout.sh b/regress/login-timeout.sh
new file mode 100644 (file)
index 0000000..12207fd
--- /dev/null
@@ -0,0 +1,32 @@
+#      $OpenBSD: login-timeout.sh,v 1.8 2016/12/16 01:06:27 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="connect after login grace timeout"
+
+trace "test login grace with privsep"
+cp $OBJ/sshd_config $OBJ/sshd_config.orig
+grep -vi LoginGraceTime $OBJ/sshd_config.orig > $OBJ/sshd_config
+echo "LoginGraceTime 10s" >> $OBJ/sshd_config
+echo "MaxStartups 1" >> $OBJ/sshd_config
+start_sshd
+
+(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 & 
+sleep 15
+${SSH} -F $OBJ/ssh_config somehost true
+if [ $? -ne 0 ]; then
+       fail "ssh connect after login grace timeout failed with privsep"
+fi
+
+stop_sshd
+
+trace "test login grace without privsep"
+echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config
+start_sshd
+sleep 1
+
+(echo SSH-2.0-fake; sleep 60) | telnet 127.0.0.1 ${PORT} >/dev/null 2>&1 & 
+sleep 15
+${SSH} -F $OBJ/ssh_config somehost true
+if [ $? -ne 0 ]; then
+       fail "ssh connect after login grace timeout failed without privsep"
+fi
diff --git a/regress/misc/Makefile b/regress/misc/Makefile
new file mode 100644 (file)
index 0000000..14c0c27
--- /dev/null
@@ -0,0 +1,3 @@
+SUBDIR=                kexfuzz
+
+.include <bsd.subdir.mk>
diff --git a/regress/misc/kexfuzz/Makefile b/regress/misc/kexfuzz/Makefile
new file mode 100644 (file)
index 0000000..3018b63
--- /dev/null
@@ -0,0 +1,78 @@
+#      $OpenBSD: Makefile,v 1.1 2016/03/04 02:30:37 djm Exp $
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+
+# XXX detect from ssh binary?
+SSH1?=         no
+OPENSSL?=      yes
+
+PROG=  kexfuzz
+SRCS=  kexfuzz.c
+NOMAN= 1
+
+.if (${OPENSSL:L} == "yes")
+CFLAGS+=       -DWITH_OPENSSL
+.else
+# SSH v.1 requires OpenSSL.
+SSH1=          no
+.endif
+
+.if (${SSH1:L} == "yes")
+CFLAGS+=       -DWITH_SSH1
+.endif
+
+# enable warnings
+WARNINGS=Yes
+
+DEBUG=-g
+CFLAGS+=       -fstack-protector-all
+CDIAGFLAGS=    -Wall
+CDIAGFLAGS+=   -Wextra
+CDIAGFLAGS+=   -Werror
+CDIAGFLAGS+=   -Wchar-subscripts
+CDIAGFLAGS+=   -Wcomment
+CDIAGFLAGS+=   -Wformat
+CDIAGFLAGS+=   -Wformat-security
+CDIAGFLAGS+=   -Wimplicit
+CDIAGFLAGS+=   -Winline
+CDIAGFLAGS+=   -Wmissing-declarations
+CDIAGFLAGS+=   -Wmissing-prototypes
+CDIAGFLAGS+=   -Wparentheses
+CDIAGFLAGS+=   -Wpointer-arith
+CDIAGFLAGS+=   -Wreturn-type
+CDIAGFLAGS+=   -Wshadow
+CDIAGFLAGS+=   -Wsign-compare
+CDIAGFLAGS+=   -Wstrict-aliasing
+CDIAGFLAGS+=   -Wstrict-prototypes
+CDIAGFLAGS+=   -Wswitch
+CDIAGFLAGS+=   -Wtrigraphs
+CDIAGFLAGS+=   -Wuninitialized
+CDIAGFLAGS+=   -Wunused
+.if ${COMPILER_VERSION} == "gcc4"
+CDIAGFLAGS+=   -Wpointer-sign
+CDIAGFLAGS+=   -Wold-style-definition
+.endif
+
+SSHREL=../../../../../usr.bin/ssh
+
+CFLAGS+=-I${.CURDIR}/${SSHREL}
+
+.if exists(${.CURDIR}/${SSHREL}/lib/${__objdir})
+LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh
+DPADD+=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a
+.else
+LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh
+DPADD+=${.CURDIR}/${SSHREL}/lib/libssh.a
+.endif
+
+LDADD+= -lutil -lz
+DPADD+= ${LIBUTIL} ${LIBZ}
+
+.if (${OPENSSL:L} == "yes")
+LDADD+= -lcrypto
+DPADD+= ${LIBCRYPTO}
+.endif
+
+.include <bsd.prog.mk>
+
diff --git a/regress/misc/kexfuzz/README b/regress/misc/kexfuzz/README
new file mode 100644 (file)
index 0000000..abd7b50
--- /dev/null
@@ -0,0 +1,32 @@
+This is a harness to help with fuzzing KEX.
+
+To use it, you first set it to count packets in each direction:
+
+./kexfuzz -K diffie-hellman-group1-sha1 -k host_ed25519_key -c
+S2C: 29
+C2S: 31
+
+Then get it to record a particular packet (in this case the 4th
+packet from client->server):
+
+./kexfuzz -K diffie-hellman-group1-sha1 -k host_ed25519_key \
+    -d -D C2S -i 3 -f packet_3
+
+Fuzz the packet somehow:
+
+dd if=/dev/urandom of=packet_3 bs=32 count=1 # Just for example
+
+Then re-run the key exchange substituting the modified packet in
+its original sequence:
+
+./kexfuzz -K diffie-hellman-group1-sha1 -k host_ed25519_key \
+    -r -D C2S -i 3 -f packet_3
+
+A comprehensive KEX fuzz run would fuzz every packet in both
+directions for each key exchange type and every hostkey type.
+This will take some time.
+
+Limitations: kexfuzz can't change the ordering of packets at
+present. It is limited to replacing individual packets with
+fuzzed variants with the same type. It really should allow
+insertion, deletion on replacement of packets too.
diff --git a/regress/misc/kexfuzz/kexfuzz.c b/regress/misc/kexfuzz/kexfuzz.c
new file mode 100644 (file)
index 0000000..6705802
--- /dev/null
@@ -0,0 +1,459 @@
+/*     $OpenBSD: kexfuzz.c,v 1.3 2016/10/11 21:49:54 djm Exp $ */
+/*
+ * Fuzz harness for KEX code
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#ifdef HAVE_ERR_H
+# include <err.h>
+#endif
+
+#include "ssherr.h"
+#include "ssh_api.h"
+#include "sshbuf.h"
+#include "packet.h"
+#include "myproposal.h"
+#include "authfile.h"
+#include "log.h"
+
+struct ssh *active_state = NULL; /* XXX - needed for linking */
+
+void kex_tests(void);
+static int do_debug = 0;
+
+enum direction { S2C, C2S };
+
+struct hook_ctx {
+       struct ssh *client, *server, *server2;
+       int *c2s, *s2c;
+       int trigger_direction, packet_index;
+       const char *dump_path;
+       struct sshbuf *replace_data;
+};
+
+static int
+packet_hook(struct ssh *ssh, struct sshbuf *packet, u_char *typep, void *_ctx)
+{
+       struct hook_ctx *ctx = (struct hook_ctx *)_ctx;
+       int mydirection = ssh == ctx->client ? S2C : C2S;
+       int *packet_count = mydirection == S2C ? ctx->s2c : ctx->c2s;
+       FILE *dumpfile;
+       int r;
+
+       if (do_debug) {
+               printf("%s packet %d type %u:\n",
+                   mydirection == S2C ? "s2c" : "c2s",
+                   *packet_count, *typep);
+               sshbuf_dump(packet, stdout);
+       }
+       if (mydirection == ctx->trigger_direction &&
+           ctx->packet_index == *packet_count) {
+               if (ctx->replace_data != NULL) {
+                       sshbuf_reset(packet);
+                       /* Type is first byte of packet */
+                       if ((r = sshbuf_get_u8(ctx->replace_data,
+                           typep)) != 0 ||
+                           (r = sshbuf_putb(packet, ctx->replace_data)) != 0)
+                               return r;
+                       if (do_debug) {
+                               printf("***** replaced packet type %u\n",
+                                   *typep);
+                               sshbuf_dump(packet, stdout);
+                       }
+               } else if (ctx->dump_path != NULL) {
+                       if ((dumpfile = fopen(ctx->dump_path, "w+")) == NULL)
+                               err(1, "fopen %s", ctx->dump_path);
+                       /* Write { type, packet } */
+                       if (fwrite(typep, 1, 1, dumpfile) != 1)
+                               err(1, "fwrite type %s", ctx->dump_path);
+                       if (sshbuf_len(packet) != 0 &&
+                           fwrite(sshbuf_ptr(packet), sshbuf_len(packet),
+                           1, dumpfile) != 1)
+                               err(1, "fwrite body %s", ctx->dump_path);
+                       if (do_debug) {
+                               printf("***** dumped packet type %u len %zu\n",
+                                   *typep, sshbuf_len(packet));
+                       }
+                       fclose(dumpfile);
+                       /* No point in continuing */
+                       exit(0);
+               }
+       }
+       (*packet_count)++;
+       return 0;
+}
+
+static int
+do_send_and_receive(struct ssh *from, struct ssh *to)
+{
+       u_char type;
+       size_t len;
+       const u_char *buf;
+       int r;
+
+       for (;;) {
+               if ((r = ssh_packet_next(from, &type)) != 0) {
+                       fprintf(stderr, "ssh_packet_next: %s\n", ssh_err(r));
+                       return r;
+               }
+
+               if (type != 0)
+                       return 0;
+               buf = ssh_output_ptr(from, &len);
+               if (len == 0)
+                       return 0;
+               if ((r = ssh_input_append(to, buf, len)) != 0) {
+                       debug("ssh_input_append: %s", ssh_err(r));
+                       return r;
+               }
+               if ((r = ssh_output_consume(from, len)) != 0) {
+                       debug("ssh_output_consume: %s", ssh_err(r));
+                       return r;
+               }
+       }
+}
+
+/* Minimal test_helper.c scaffholding to make this standalone */
+const char *in_test = NULL;
+#define TEST_START(a)  \
+       do { \
+               in_test = (a); \
+               if (do_debug) \
+                       fprintf(stderr, "test %s starting\n", in_test); \
+       } while (0)
+#define TEST_DONE()    \
+       do { \
+               if (do_debug) \
+                       fprintf(stderr, "test %s done\n", \
+                           in_test ? in_test : "???"); \
+               in_test = NULL; \
+       } while(0)
+#define ASSERT_INT_EQ(a, b) \
+       do { \
+               if ((int)(a) != (int)(b)) { \
+                       fprintf(stderr, "%s %s:%d " \
+                           "%s (%d) != expected %s (%d)\n", \
+                           in_test ? in_test : "(none)", \
+                           __func__, __LINE__, #a, (int)(a), #b, (int)(b)); \
+                       exit(2); \
+               } \
+       } while (0)
+#define ASSERT_INT_GE(a, b) \
+       do { \
+               if ((int)(a) < (int)(b)) { \
+                       fprintf(stderr, "%s %s:%d " \
+                           "%s (%d) < expected %s (%d)\n", \
+                           in_test ? in_test : "(none)", \
+                           __func__, __LINE__, #a, (int)(a), #b, (int)(b)); \
+                       exit(2); \
+               } \
+       } while (0)
+#define ASSERT_PTR_NE(a, b) \
+       do { \
+               if ((a) == (b)) { \
+                       fprintf(stderr, "%s %s:%d " \
+                           "%s (%p) != expected %s (%p)\n", \
+                           in_test ? in_test : "(none)", \
+                           __func__, __LINE__, #a, (a), #b, (b)); \
+                       exit(2); \
+               } \
+       } while (0)
+
+
+static void
+run_kex(struct ssh *client, struct ssh *server)
+{
+       int r = 0;
+
+       while (!server->kex->done || !client->kex->done) {
+               if ((r = do_send_and_receive(server, client)) != 0) {
+                       debug("do_send_and_receive S2C: %s", ssh_err(r));
+                       break;
+               }
+               if ((r = do_send_and_receive(client, server)) != 0) {
+                       debug("do_send_and_receive C2S: %s", ssh_err(r));
+                       break;
+               }
+       }
+       if (do_debug)
+               printf("done: %s\n", ssh_err(r));
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_INT_EQ(server->kex->done, 1);
+       ASSERT_INT_EQ(client->kex->done, 1);
+}
+
+static void
+do_kex_with_key(const char *kex, struct sshkey *prvkey, int *c2s, int *s2c,
+    int direction, int packet_index,
+    const char *dump_path, struct sshbuf *replace_data)
+{
+       struct ssh *client = NULL, *server = NULL, *server2 = NULL;
+       struct sshkey *pubkey = NULL;
+       struct sshbuf *state;
+       struct kex_params kex_params;
+       char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT };
+       char *keyname = NULL;
+       struct hook_ctx hook_ctx;
+
+       TEST_START("sshkey_from_private");
+       ASSERT_INT_EQ(sshkey_from_private(prvkey, &pubkey), 0);
+       TEST_DONE();
+
+       TEST_START("ssh_init");
+       memcpy(kex_params.proposal, myproposal, sizeof(myproposal));
+       if (kex != NULL)
+               kex_params.proposal[PROPOSAL_KEX_ALGS] = strdup(kex);
+       keyname = strdup(sshkey_ssh_name(prvkey));
+       ASSERT_PTR_NE(keyname, NULL);
+       kex_params.proposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = keyname;
+       ASSERT_INT_EQ(ssh_init(&client, 0, &kex_params), 0);
+       ASSERT_INT_EQ(ssh_init(&server, 1, &kex_params), 0);
+       ASSERT_INT_EQ(ssh_init(&server2, 1, NULL), 0);
+       ASSERT_PTR_NE(client, NULL);
+       ASSERT_PTR_NE(server, NULL);
+       ASSERT_PTR_NE(server2, NULL);
+       TEST_DONE();
+
+       hook_ctx.c2s = c2s;
+       hook_ctx.s2c = s2c;
+       hook_ctx.trigger_direction = direction;
+       hook_ctx.packet_index = packet_index;
+       hook_ctx.dump_path = dump_path;
+       hook_ctx.replace_data = replace_data;
+       hook_ctx.client = client;
+       hook_ctx.server = server;
+       hook_ctx.server2 = server2;
+       ssh_packet_set_input_hook(client, packet_hook, &hook_ctx);
+       ssh_packet_set_input_hook(server, packet_hook, &hook_ctx);
+       ssh_packet_set_input_hook(server2, packet_hook, &hook_ctx);
+
+       TEST_START("ssh_add_hostkey");
+       ASSERT_INT_EQ(ssh_add_hostkey(server, prvkey), 0);
+       ASSERT_INT_EQ(ssh_add_hostkey(client, pubkey), 0);
+       TEST_DONE();
+
+       TEST_START("kex");
+       run_kex(client, server);
+       TEST_DONE();
+
+       TEST_START("rekeying client");
+       ASSERT_INT_EQ(kex_send_kexinit(client), 0);
+       run_kex(client, server);
+       TEST_DONE();
+
+       TEST_START("rekeying server");
+       ASSERT_INT_EQ(kex_send_kexinit(server), 0);
+       run_kex(client, server);
+       TEST_DONE();
+
+       TEST_START("ssh_packet_get_state");
+       state = sshbuf_new();
+       ASSERT_PTR_NE(state, NULL);
+       ASSERT_INT_EQ(ssh_packet_get_state(server, state), 0);
+       ASSERT_INT_GE(sshbuf_len(state), 1);
+       TEST_DONE();
+
+       TEST_START("ssh_packet_set_state");
+       ASSERT_INT_EQ(ssh_add_hostkey(server2, prvkey), 0);
+       kex_free(server2->kex); /* XXX or should ssh_packet_set_state()? */
+       ASSERT_INT_EQ(ssh_packet_set_state(server2, state), 0);
+       ASSERT_INT_EQ(sshbuf_len(state), 0);
+       sshbuf_free(state);
+       ASSERT_PTR_NE(server2->kex, NULL);
+       /* XXX we need to set the callbacks */
+#ifdef WITH_OPENSSL
+       server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
+       server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
+       server2->kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server;
+       server2->kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server;
+       server2->kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server;
+       server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
+       server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
+# ifdef OPENSSL_HAS_ECC
+       server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
+# endif
+#endif
+       server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server;
+       server2->kex->load_host_public_key = server->kex->load_host_public_key;
+       server2->kex->load_host_private_key = server->kex->load_host_private_key;
+       server2->kex->sign = server->kex->sign;
+       TEST_DONE();
+
+       TEST_START("rekeying server2");
+       ASSERT_INT_EQ(kex_send_kexinit(server2), 0);
+       run_kex(client, server2);
+       ASSERT_INT_EQ(kex_send_kexinit(client), 0);
+       run_kex(client, server2);
+       TEST_DONE();
+
+       TEST_START("cleanup");
+       sshkey_free(pubkey);
+       ssh_free(client);
+       ssh_free(server);
+       ssh_free(server2);
+       free(keyname);
+       TEST_DONE();
+}
+
+static void
+usage(void)
+{
+       fprintf(stderr,
+           "Usage: kexfuzz [-hcdrv] [-D direction] [-f data_file]\n"
+           "               [-K kex_alg] [-k private_key] [-i packet_index]\n"
+           "\n"
+           "Options:\n"
+           "    -h               Display this help\n"
+           "    -c               Count packets sent during KEX\n"
+           "    -d               Dump mode: record KEX packet to data file\n"
+           "    -r               Replace mode: replace packet with data file\n"
+           "    -v               Turn on verbose logging\n"
+           "    -D S2C|C2S       Packet direction for replacement or dump\n"
+           "    -f data_file     Path to data file for replacement or dump\n"
+           "    -K kex_alg       Name of KEX algorithm to test (see below)\n"
+           "    -k private_key   Path to private key file\n"
+           "    -i packet_index  Index of packet to replace or dump (from 0)\n"
+           "\n"
+           "Available KEX algorithms: %s\n", kex_alg_list(' '));
+}
+
+static void
+badusage(const char *bad)
+{
+       fprintf(stderr, "Invalid options\n");
+       fprintf(stderr, "%s\n", bad);
+       usage();
+       exit(1);
+}
+
+int
+main(int argc, char **argv)
+{
+       int ch, fd, r;
+       int count_flag = 0, dump_flag = 0, replace_flag = 0;
+       int packet_index = -1, direction = -1;
+       int s2c = 0, c2s = 0; /* packet counts */
+       const char *kex = NULL, *kpath = NULL, *data_path = NULL;
+       struct sshkey *key = NULL;
+       struct sshbuf *replace_data = NULL;
+
+       setvbuf(stdout, NULL, _IONBF, 0);
+       while ((ch = getopt(argc, argv, "hcdrvD:f:K:k:i:")) != -1) {
+               switch (ch) {
+               case 'h':
+                       usage();
+                       return 0;
+               case 'c':
+                       count_flag = 1;
+                       break;
+               case 'd':
+                       dump_flag = 1;
+                       break;
+               case 'r':
+                       replace_flag = 1;
+                       break;
+               case 'v':
+                       do_debug = 1;
+                       break;
+
+               case 'D':
+                       if (strcasecmp(optarg, "s2c") == 0)
+                               direction = S2C;
+                       else if (strcasecmp(optarg, "c2s") == 0)
+                               direction = C2S;
+                       else
+                               badusage("Invalid direction (-D)");
+                       break;
+               case 'f':
+                       data_path = optarg;
+                       break;
+               case 'K':
+                       kex = optarg;
+                       break;
+               case 'k':
+                       kpath = optarg;
+                       break;
+               case 'i':
+                       packet_index = atoi(optarg);
+                       if (packet_index < 0)
+                               badusage("Invalid packet index");
+                       break;
+               default:
+                       badusage("unsupported flag");
+               }
+       }
+       argc -= optind;
+       argv += optind;
+
+       log_init(argv[0], do_debug ? SYSLOG_LEVEL_DEBUG3 : SYSLOG_LEVEL_INFO,
+           SYSLOG_FACILITY_USER, 1);
+
+       /* Must select a single mode */
+       if ((count_flag + dump_flag + replace_flag) != 1)
+               badusage("Must select one mode: -c, -d or -r");
+       /* KEX type is mandatory */
+       if (kex == NULL || !kex_names_valid(kex) || strchr(kex, ',') != NULL)
+               badusage("Missing or invalid kex type (-K flag)");
+       /* Valid key is mandatory */
+       if (kpath == NULL)
+               badusage("Missing private key (-k flag)");
+       if ((fd = open(kpath, O_RDONLY)) == -1)
+               err(1, "open %s", kpath);
+       if ((r = sshkey_load_private_type_fd(fd, KEY_UNSPEC, NULL,
+           &key, NULL)) != 0)
+               errx(1, "Unable to load key %s: %s", kpath, ssh_err(r));
+       close(fd);
+       /* XXX check that it is a private key */
+       /* XXX support certificates */
+       if (key == NULL || key->type == KEY_UNSPEC || key->type == KEY_RSA1)
+               badusage("Invalid key file (-k flag)");
+
+       /* Replace (fuzz) mode */
+       if (replace_flag) {
+               if (packet_index == -1 || direction == -1 || data_path == NULL)
+                       badusage("Replace (-r) mode must specify direction "
+                           "(-D) packet index (-i) and data path (-f)");
+               if ((fd = open(data_path, O_RDONLY)) == -1)
+                       err(1, "open %s", data_path);
+               replace_data = sshbuf_new();
+               if ((r = sshkey_load_file(fd, replace_data)) != 0)
+                       errx(1, "read %s: %s", data_path, ssh_err(r));
+               close(fd);
+       }
+
+       /* Dump mode */
+       if (dump_flag) {
+               if (packet_index == -1 || direction == -1 || data_path == NULL)
+                       badusage("Dump (-d) mode must specify direction "
+                           "(-D), packet index (-i) and data path (-f)");
+       }
+
+       /* Count mode needs no further flags */
+
+       do_kex_with_key(kex, key, &c2s, &s2c,
+           direction, packet_index,
+           dump_flag ? data_path : NULL,
+           replace_flag ? replace_data : NULL);
+       sshkey_free(key);
+       sshbuf_free(replace_data);
+
+       if (count_flag) {
+               printf("S2C: %d\n", s2c);
+               printf("C2S: %d\n", c2s);
+       }
+
+       return 0;
+}
diff --git a/regress/modpipe.c b/regress/modpipe.c
new file mode 100755 (executable)
index 0000000..5f4824b
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2012 Damien Miller <djm@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $OpenBSD: modpipe.c,v 1.6 2013/11/21 03:16:47 djm Exp $ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <errno.h>
+#ifdef HAVE_ERR_H
+# include <err.h>
+#endif
+#include "openbsd-compat/getopt_long.c"
+
+static void
+usage(void)
+{
+       fprintf(stderr, "Usage: modpipe -w [-m modspec ...] < in > out\n");
+       fprintf(stderr, "modspec is one of:\n");
+       fprintf(stderr, "    xor:offset:value       - XOR \"value\" at \"offset\"\n");
+       fprintf(stderr, "    andor:offset:val1:val2 - AND \"val1\" then OR \"val2\" at \"offset\"\n");
+       exit(1);
+}
+
+#define MAX_MODIFICATIONS 256
+struct modification {
+       enum { MOD_XOR, MOD_AND_OR } what;
+       unsigned long long offset;
+       u_int8_t m1, m2;
+};
+
+static void
+parse_modification(const char *s, struct modification *m)
+{
+       char what[16+1];
+       int n, m1, m2;
+
+       bzero(m, sizeof(*m));
+       if ((n = sscanf(s, "%16[^:]%*[:]%llu%*[:]%i%*[:]%i",
+           what, &m->offset, &m1, &m2)) < 3)
+               errx(1, "Invalid modification spec \"%s\"", s);
+       if (strcasecmp(what, "xor") == 0) {
+               if (n > 3)
+                       errx(1, "Invalid modification spec \"%s\"", s);
+               if (m1 < 0 || m1 > 0xff)
+                       errx(1, "Invalid XOR modification value");
+               m->what = MOD_XOR;
+               m->m1 = m1;
+       } else if (strcasecmp(what, "andor") == 0) {
+               if (n != 4)
+                       errx(1, "Invalid modification spec \"%s\"", s);
+               if (m1 < 0 || m1 > 0xff)
+                       errx(1, "Invalid AND modification value");
+               if (m2 < 0 || m2 > 0xff)
+                       errx(1, "Invalid OR modification value");
+               m->what = MOD_AND_OR;
+               m->m1 = m1;
+               m->m2 = m2;
+       } else
+               errx(1, "Invalid modification type \"%s\"", what);
+}
+
+int
+main(int argc, char **argv)
+{
+       int ch;
+       u_char buf[8192];
+       size_t total;
+       ssize_t r, s, o;
+       struct modification mods[MAX_MODIFICATIONS];
+       u_int i, wflag = 0, num_mods = 0;
+
+       while ((ch = getopt(argc, argv, "wm:")) != -1) {
+               switch (ch) {
+               case 'm':
+                       if (num_mods >= MAX_MODIFICATIONS)
+                               errx(1, "Too many modifications");
+                       parse_modification(optarg, &(mods[num_mods++]));
+                       break;
+               case 'w':
+                       wflag = 1;
+                       break;
+               default:
+                       usage();
+                       /* NOTREACHED */
+               }
+       }
+       for (total = 0;;) {
+               r = s = read(STDIN_FILENO, buf, sizeof(buf));
+               if (r == 0)
+                       break;
+               if (r < 0) {
+                       if (errno == EAGAIN || errno == EINTR)
+                               continue;
+                       err(1, "read");
+               }
+               for (i = 0; i < num_mods; i++) {
+                       if (mods[i].offset < total ||
+                           mods[i].offset >= total + s)
+                               continue;
+                       switch (mods[i].what) {
+                       case MOD_XOR:
+                               buf[mods[i].offset - total] ^= mods[i].m1;
+                               break;
+                       case MOD_AND_OR:
+                               buf[mods[i].offset - total] &= mods[i].m1;
+                               buf[mods[i].offset - total] |= mods[i].m2;
+                               break;
+                       }
+               }
+               for (o = 0; o < s; o += r) {
+                       r = write(STDOUT_FILENO, buf, s - o);
+                       if (r == 0)
+                               break;
+                       if (r < 0) {
+                               if (errno == EAGAIN || errno == EINTR)
+                                       continue;
+                               err(1, "write");
+                       }
+               }
+               total += s;
+       }
+       /* Warn if modifications not reached in input stream */
+       r = 0;
+       for (i = 0; wflag && i < num_mods; i++) {
+               if (mods[i].offset < total)
+                       continue;
+               r = 1;
+               fprintf(stderr, "modpipe: warning - mod %u not reached\n", i);
+       }
+       return r;
+}
diff --git a/regress/moduli.in b/regress/moduli.in
new file mode 100644 (file)
index 0000000..e69c902
--- /dev/null
@@ -0,0 +1,3 @@
+20160301052556 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D19F4647
+20160301052601 2 6 100 2047 2 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1A5C13B
+20160301052612 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA0290514EA426DE6FEF897CB858243511DCE5170420C799D888DCFDC4502FF49B66F34E75C00E98A55408A791FF5CFEA7C288F8E6664226A6A90BE237D2E40C207B5AD0CAEDFDA4946E63AEA351A09EF462515FED4098694241CD07E2CB7727B39B8B1B9467D72DFB908D8169F5DB3CD5A6BEBE1344C585A882508B760402E86EB9B5548A7B98635ECFCDC02FF62B29C53847142FC598ADC66F622F6E9F73BDF02B3D795C0DF23D00E5A3A7748F3E1D5B06F46D4568CE3F4CC57E67D4C36DF5C12800620698C727CC5F5BCACF3B7E17E37D1B7A3EF
diff --git a/regress/multiplex.sh b/regress/multiplex.sh
new file mode 100644 (file)
index 0000000..acb9234
--- /dev/null
@@ -0,0 +1,190 @@
+#      $OpenBSD: multiplex.sh,v 1.27 2014/12/22 06:14:29 djm Exp $
+#      Placed in the Public Domain.
+
+CTL=/tmp/openssh.regress.ctl-sock.$$
+
+tid="connection multiplexing"
+
+NC=$OBJ/netcat
+
+trace "will use ProxyCommand $proxycmd"
+if config_defined DISABLE_FD_PASSING ; then
+       echo "skipped (not supported on this platform)"
+       exit 0
+fi
+
+P=3301  # test port
+
+wait_for_mux_master_ready()
+{
+       for i in 1 2 3 4 5; do
+               ${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost \
+                   >/dev/null 2>&1 && return 0
+               sleep $i
+       done
+       fatal "mux master never becomes ready"
+}
+
+start_sshd
+
+start_mux_master()
+{
+       trace "start master, fork to background"
+       ${SSH} -Nn2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost \
+           -E $TEST_REGRESS_LOGFILE 2>&1 &
+       # NB. $SSH_PID will be killed by test-exec.sh:cleanup on fatal errors.
+       SSH_PID=$!
+       wait_for_mux_master_ready
+}
+
+start_mux_master
+
+verbose "test $tid: envpass"
+trace "env passing over multiplexed connection"
+_XXX_TEST=blah ${SSH} -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -S$CTL otherhost sh << 'EOF'
+       test X"$_XXX_TEST" = X"blah"
+EOF
+if [ $? -ne 0 ]; then
+       fail "environment not found"
+fi
+
+verbose "test $tid: transfer"
+rm -f ${COPY}
+trace "ssh transfer over multiplexed connection and check result"
+${SSH} -F $OBJ/ssh_config -S$CTL otherhost cat ${DATA} > ${COPY}
+test -f ${COPY}                        || fail "ssh -Sctl: failed copy ${DATA}" 
+cmp ${DATA} ${COPY}            || fail "ssh -Sctl: corrupted copy of ${DATA}"
+
+rm -f ${COPY}
+trace "ssh transfer over multiplexed connection and check result"
+${SSH} -F $OBJ/ssh_config -S $CTL otherhost cat ${DATA} > ${COPY}
+test -f ${COPY}                        || fail "ssh -S ctl: failed copy ${DATA}" 
+cmp ${DATA} ${COPY}            || fail "ssh -S ctl: corrupted copy of ${DATA}"
+
+rm -f ${COPY}
+trace "sftp transfer over multiplexed connection and check result"
+echo "get ${DATA} ${COPY}" | \
+       ${SFTP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost >>$TEST_REGRESS_LOGFILE 2>&1
+test -f ${COPY}                        || fail "sftp: failed copy ${DATA}" 
+cmp ${DATA} ${COPY}            || fail "sftp: corrupted copy of ${DATA}"
+
+rm -f ${COPY}
+trace "scp transfer over multiplexed connection and check result"
+${SCP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost:${DATA} ${COPY} >>$TEST_REGRESS_LOGFILE 2>&1
+test -f ${COPY}                        || fail "scp: failed copy ${DATA}" 
+cmp ${DATA} ${COPY}            || fail "scp: corrupted copy of ${DATA}"
+
+rm -f ${COPY}
+verbose "test $tid: forward"
+trace "forward over TCP/IP and check result"
+$NC -N -l 127.0.0.1 $((${PORT} + 1)) < ${DATA} > /dev/null &
+netcat_pid=$!
+${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L127.0.0.1:$((${PORT} + 2)):127.0.0.1:$((${PORT} + 1)) otherhost >>$TEST_SSH_LOGFILE 2>&1
+$NC 127.0.0.1 $((${PORT} + 2)) < /dev/null > ${COPY}
+cmp ${DATA} ${COPY}            || fail "ssh: corrupted copy of ${DATA}"
+kill $netcat_pid 2>/dev/null
+rm -f ${COPY} $OBJ/unix-[123].fwd
+
+trace "forward over UNIX and check result"
+$NC -N -Ul $OBJ/unix-1.fwd < ${DATA} > /dev/null &
+netcat_pid=$!
+${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L$OBJ/unix-2.fwd:$OBJ/unix-1.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1
+${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R$OBJ/unix-3.fwd:$OBJ/unix-2.fwd otherhost >>$TEST_SSH_LOGFILE 2>&1
+$NC -U $OBJ/unix-3.fwd < /dev/null > ${COPY} 2>/dev/null
+cmp ${DATA} ${COPY}            || fail "ssh: corrupted copy of ${DATA}"
+kill $netcat_pid 2>/dev/null
+rm -f ${COPY} $OBJ/unix-[123].fwd
+
+for s in 0 1 4 5 44; do
+       trace "exit status $s over multiplexed connection"
+       verbose "test $tid: status $s"
+       ${SSH} -F $OBJ/ssh_config -S $CTL otherhost exit $s
+       r=$?
+       if [ $r -ne $s ]; then
+               fail "exit code mismatch for protocol $p: $r != $s"
+       fi
+
+       # same with early close of stdout/err
+       trace "exit status $s with early close over multiplexed connection"
+       ${SSH} -F $OBJ/ssh_config -S $CTL -n otherhost \
+                exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\'
+       r=$?
+       if [ $r -ne $s ]; then
+               fail "exit code (with sleep) mismatch for protocol $p: $r != $s"
+       fi
+done
+
+verbose "test $tid: cmd check"
+${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
+    || fail "check command failed" 
+
+verbose "test $tid: cmd forward local (TCP)"
+${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $P:localhost:$PORT otherhost \
+     || fail "request local forward failed"
+${SSH} -F $OBJ/ssh_config -p$P otherhost true \
+     || fail "connect to local forward port failed"
+${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $P:localhost:$PORT otherhost \
+     || fail "cancel local forward failed"
+${SSH} -F $OBJ/ssh_config -p$P otherhost true \
+     && fail "local forward port still listening"
+
+verbose "test $tid: cmd forward remote (TCP)"
+${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $P:localhost:$PORT otherhost \
+     || fail "request remote forward failed"
+${SSH} -F $OBJ/ssh_config -p$P otherhost true \
+     || fail "connect to remote forwarded port failed"
+${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $P:localhost:$PORT otherhost \
+     || fail "cancel remote forward failed"
+${SSH} -F $OBJ/ssh_config -p$P otherhost true \
+     && fail "remote forward port still listening"
+
+verbose "test $tid: cmd forward local (UNIX)"
+${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \
+     || fail "request local forward failed"
+echo "" | $NC -U $OBJ/unix-1.fwd | grep "Protocol mismatch" >/dev/null 2>&1 \
+     || fail "connect to local forward path failed"
+${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -L $OBJ/unix-1.fwd:localhost:$PORT otherhost \
+     || fail "cancel local forward failed"
+N=$(echo "xyzzy" | $NC -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l)
+test ${N} -eq 0 || fail "local forward path still listening"
+rm -f $OBJ/unix-1.fwd
+
+verbose "test $tid: cmd forward remote (UNIX)"
+${SSH} -F $OBJ/ssh_config -S $CTL -Oforward -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \
+     || fail "request remote forward failed"
+echo "" | $NC -U $OBJ/unix-1.fwd | grep "Protocol mismatch" >/dev/null 2>&1 \
+     || fail "connect to remote forwarded path failed"
+${SSH} -F $OBJ/ssh_config -S $CTL -Ocancel -R $OBJ/unix-1.fwd:localhost:$PORT otherhost \
+     || fail "cancel remote forward failed"
+N=$(echo "xyzzy" | $NC -U $OBJ/unix-1.fwd 2>&1 | grep "xyzzy" | wc -l)
+test ${N} -eq 0 || fail "remote forward path still listening"
+rm -f $OBJ/unix-1.fwd
+
+verbose "test $tid: cmd exit"
+${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
+    || fail "send exit command failed" 
+
+# Wait for master to exit
+wait $SSH_PID
+kill -0 $SSH_PID >/dev/null 2>&1 && fail "exit command failed"
+
+# Restart master and test -O stop command with master using -N
+verbose "test $tid: cmd stop"
+trace "restart master, fork to background"
+start_mux_master
+
+# start a long-running command then immediately request a stop
+${SSH} -F $OBJ/ssh_config -S $CTL otherhost "sleep 10; exit 0" \
+     >>$TEST_REGRESS_LOGFILE 2>&1 &
+SLEEP_PID=$!
+${SSH} -F $OBJ/ssh_config -S $CTL -Ostop otherhost >>$TEST_REGRESS_LOGFILE 2>&1 \
+    || fail "send stop command failed"
+
+# wait until both long-running command and master have exited.
+wait $SLEEP_PID
+[ $! != 0 ] || fail "waiting for concurrent command"
+wait $SSH_PID
+[ $! != 0 ] || fail "waiting for master stop"
+kill -0 $SSH_PID >/dev/null 2>&1 && fatal "stop command failed"
+SSH_PID="" # Already gone, so don't kill in cleanup
+
diff --git a/regress/multipubkey.sh b/regress/multipubkey.sh
new file mode 100644 (file)
index 0000000..e9d1530
--- /dev/null
@@ -0,0 +1,66 @@
+#      $OpenBSD: multipubkey.sh,v 1.1 2014/12/22 08:06:03 djm Exp $
+#      Placed in the Public Domain.
+
+tid="multiple pubkey"
+
+rm -f $OBJ/authorized_keys_$USER $OBJ/user_ca_key* $OBJ/user_key*
+rm -f $OBJ/authorized_principals_$USER $OBJ/cert_user_key*
+
+mv $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
+mv $OBJ/ssh_proxy $OBJ/ssh_proxy.orig
+
+# Create a CA key
+${SSHKEYGEN} -q -N '' -t ed25519  -f $OBJ/user_ca_key ||\
+       fatal "ssh-keygen failed"
+
+# Make some keys and a certificate.
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key1 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -N '' -t ed25519 -f $OBJ/user_key2 || \
+       fatal "ssh-keygen failed"
+${SSHKEYGEN} -q -s $OBJ/user_ca_key -I "regress user key for $USER" \
+       -z $$ -n ${USER},mekmitasdigoat $OBJ/user_key1 ||
+               fail "couldn't sign user_key1"
+# Copy the private key alongside the cert to allow better control of when
+# it is offered.
+mv $OBJ/user_key1-cert.pub $OBJ/cert_user_key1.pub
+cp -p $OBJ/user_key1 $OBJ/cert_user_key1
+
+grep -v IdentityFile $OBJ/ssh_proxy.orig > $OBJ/ssh_proxy
+
+opts="-oProtocol=2 -F $OBJ/ssh_proxy -oIdentitiesOnly=yes"
+opts="$opts -i $OBJ/cert_user_key1 -i $OBJ/user_key1 -i $OBJ/user_key2"
+
+for privsep in no yes; do
+       (
+               grep -v "Protocol"  $OBJ/sshd_proxy.orig
+               echo "Protocol 2"
+               echo "UsePrivilegeSeparation $privsep"
+               echo "AuthenticationMethods publickey,publickey"
+               echo "TrustedUserCAKeys $OBJ/user_ca_key.pub"
+               echo "AuthorizedPrincipalsFile $OBJ/authorized_principals_%u"
+       ) > $OBJ/sshd_proxy
+
+       # Single key should fail.
+       rm -f $OBJ/authorized_principals_$USER
+       cat $OBJ/user_key1.pub > $OBJ/authorized_keys_$USER
+       ${SSH} $opts proxy true && fail "ssh succeeded with key"
+
+       # Single key with same-public cert should fail.
+       echo mekmitasdigoat > $OBJ/authorized_principals_$USER
+       cat $OBJ/user_key1.pub > $OBJ/authorized_keys_$USER
+       ${SSH} $opts proxy true && fail "ssh succeeded with key+cert"
+
+       # Multiple plain keys should succeed.
+       rm -f $OBJ/authorized_principals_$USER
+       cat $OBJ/user_key1.pub $OBJ/user_key2.pub > \
+           $OBJ/authorized_keys_$USER
+       ${SSH} $opts proxy true || fail "ssh failed with multiple keys"
+       # Cert and different key should succeed
+
+       # Key and different-public cert should succeed.
+       echo mekmitasdigoat > $OBJ/authorized_principals_$USER
+       cat $OBJ/user_key2.pub > $OBJ/authorized_keys_$USER
+       ${SSH} $opts proxy true || fail "ssh failed with key/cert"
+done
+
diff --git a/regress/netcat.c b/regress/netcat.c
new file mode 100644 (file)
index 0000000..98a08b1
--- /dev/null
@@ -0,0 +1,1659 @@
+/* $OpenBSD: netcat.c,v 1.126 2014/10/30 16:08:31 tedu Exp $ */
+/*
+ * Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Re-written nc(1) for OpenBSD. Original implementation by
+ * *Hobbit* <hobbit@avian.org>.
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/uio.h>
+#include <sys/un.h>
+
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <netinet/ip.h>
+
+#include <errno.h>
+#include <netdb.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <limits.h>
+#include "atomicio.h"
+
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+# ifdef HAVE_SYS_POLL_H
+#  include <sys/poll.h>
+# endif
+#endif
+#ifdef HAVE_ERR_H
+# include <err.h>
+#endif
+
+/* Telnet options from arpa/telnet.h */
+#define IAC    255
+#define DONT   254
+#define DO     253
+#define WONT   252
+#define WILL   251
+
+#ifndef SUN_LEN
+#define SUN_LEN(su) \
+       (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+#endif
+
+#define PORT_MAX       65535
+#define PORT_MAX_LEN   6
+#define UNIX_DG_TMP_SOCKET_SIZE        19
+
+#define POLL_STDIN 0
+#define POLL_NETOUT 1
+#define POLL_NETIN 2
+#define POLL_STDOUT 3
+#define BUFSIZE 16384
+
+/* Command Line Options */
+int    dflag;                                  /* detached, no stdin */
+int    Fflag;                                  /* fdpass sock to stdout */
+unsigned int iflag;                            /* Interval Flag */
+int    kflag;                                  /* More than one connect */
+int    lflag;                                  /* Bind to local port */
+int    Nflag;                                  /* shutdown() network socket */
+int    nflag;                                  /* Don't do name look up */
+char   *Pflag;                                 /* Proxy username */
+char   *pflag;                                 /* Localport flag */
+int    rflag;                                  /* Random ports flag */
+char   *sflag;                                 /* Source Address */
+int    tflag;                                  /* Telnet Emulation */
+int    uflag;                                  /* UDP - Default to TCP */
+int    vflag;                                  /* Verbosity */
+int    xflag;                                  /* Socks proxy */
+int    zflag;                                  /* Port Scan Flag */
+int    Dflag;                                  /* sodebug */
+int    Iflag;                                  /* TCP receive buffer size */
+int    Oflag;                                  /* TCP send buffer size */
+int    Sflag;                                  /* TCP MD5 signature option */
+int    Tflag = -1;                             /* IP Type of Service */
+int    rtableid = -1;
+
+int timeout = -1;
+int family = AF_UNSPEC;
+char *portlist[PORT_MAX+1];
+char *unix_dg_tmp_socket;
+
+void   atelnet(int, unsigned char *, unsigned int);
+void   build_ports(char *);
+void   help(void);
+int    local_listen(char *, char *, struct addrinfo);
+void   readwrite(int);
+void   fdpass(int nfd) __attribute__((noreturn));
+int    remote_connect(const char *, const char *, struct addrinfo);
+int    timeout_connect(int, const struct sockaddr *, socklen_t);
+int    socks_connect(const char *, const char *, struct addrinfo,
+           const char *, const char *, struct addrinfo, int, const char *);
+int    udptest(int);
+int    unix_bind(char *);
+int    unix_connect(char *);
+int    unix_listen(char *);
+void   set_common_sockopts(int);
+int    map_tos(char *, int *);
+void   report_connect(const struct sockaddr *, socklen_t);
+void   usage(int);
+ssize_t drainbuf(int, unsigned char *, size_t *);
+ssize_t fillbuf(int, unsigned char *, size_t *);
+
+
+int
+main(int argc, char *argv[])
+{
+       int ch, s, ret, socksv;
+       char *host, *uport;
+       struct addrinfo hints;
+       struct servent *sv;
+       socklen_t len;
+       struct sockaddr_storage cliaddr;
+       char *proxy = NULL;
+       const char *errstr, *proxyhost = "", *proxyport = NULL;
+       struct addrinfo proxyhints;
+       char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
+
+       ret = 1;
+       s = 0;
+       socksv = 5;
+       host = NULL;
+       uport = NULL;
+       sv = NULL;
+
+       while ((ch = getopt(argc, argv,
+           "46DdFhI:i:klNnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) {
+               switch (ch) {
+               case '4':
+                       family = AF_INET;
+                       break;
+               case '6':
+                       family = AF_INET6;
+                       break;
+               case 'U':
+                       family = AF_UNIX;
+                       break;
+               case 'X':
+                       if (strcasecmp(optarg, "connect") == 0)
+                               socksv = -1; /* HTTP proxy CONNECT */
+                       else if (strcmp(optarg, "4") == 0)
+                               socksv = 4; /* SOCKS v.4 */
+                       else if (strcmp(optarg, "5") == 0)
+                               socksv = 5; /* SOCKS v.5 */
+                       else
+                               errx(1, "unsupported proxy protocol");
+                       break;
+               case 'd':
+                       dflag = 1;
+                       break;
+               case 'F':
+                       Fflag = 1;
+                       break;
+               case 'h':
+                       help();
+                       break;
+               case 'i':
+                       iflag = strtonum(optarg, 0, UINT_MAX, &errstr);
+                       if (errstr)
+                               errx(1, "interval %s: %s", errstr, optarg);
+                       break;
+               case 'k':
+                       kflag = 1;
+                       break;
+               case 'l':
+                       lflag = 1;
+                       break;
+               case 'N':
+                       Nflag = 1;
+                       break;
+               case 'n':
+                       nflag = 1;
+                       break;
+               case 'P':
+                       Pflag = optarg;
+                       break;
+               case 'p':
+                       pflag = optarg;
+                       break;
+               case 'r':
+                       rflag = 1;
+                       break;
+               case 's':
+                       sflag = optarg;
+                       break;
+               case 't':
+                       tflag = 1;
+                       break;
+               case 'u':
+                       uflag = 1;
+                       break;
+#ifdef SO_RTABLE
+               case 'V':
+                       rtableid = (int)strtonum(optarg, 0,
+                           RT_TABLEID_MAX, &errstr);
+                       if (errstr)
+                               errx(1, "rtable %s: %s", errstr, optarg);
+                       break;
+#endif
+               case 'v':
+                       vflag = 1;
+                       break;
+               case 'w':
+                       timeout = strtonum(optarg, 0, INT_MAX / 1000, &errstr);
+                       if (errstr)
+                               errx(1, "timeout %s: %s", errstr, optarg);
+                       timeout *= 1000;
+                       break;
+               case 'x':
+                       xflag = 1;
+                       if ((proxy = strdup(optarg)) == NULL)
+                               errx(1, "strdup");
+                       break;
+               case 'z':
+                       zflag = 1;
+                       break;
+               case 'D':
+                       Dflag = 1;
+                       break;
+               case 'I':
+                       Iflag = strtonum(optarg, 1, 65536 << 14, &errstr);
+                       if (errstr != NULL)
+                               errx(1, "TCP receive window %s: %s",
+                                   errstr, optarg);
+                       break;
+               case 'O':
+                       Oflag = strtonum(optarg, 1, 65536 << 14, &errstr);
+                       if (errstr != NULL)
+                               errx(1, "TCP send window %s: %s",
+                                   errstr, optarg);
+                       break;
+               case 'S':
+                       Sflag = 1;
+                       break;
+               case 'T':
+                       errstr = NULL;
+                       errno = 0;
+                       if (map_tos(optarg, &Tflag))
+                               break;
+                       if (strlen(optarg) > 1 && optarg[0] == '0' &&
+                           optarg[1] == 'x')
+                               Tflag = (int)strtol(optarg, NULL, 16);
+                       else
+                               Tflag = (int)strtonum(optarg, 0, 255,
+                                   &errstr);
+                       if (Tflag < 0 || Tflag > 255 || errstr || errno)
+                               errx(1, "illegal tos value %s", optarg);
+                       break;
+               default:
+                       usage(1);
+               }
+       }
+       argc -= optind;
+       argv += optind;
+
+       /* Cruft to make sure options are clean, and used properly. */
+       if (argv[0] && !argv[1] && family == AF_UNIX) {
+               host = argv[0];
+               uport = NULL;
+       } else if (argv[0] && !argv[1]) {
+               if  (!lflag)
+                       usage(1);
+               uport = argv[0];
+               host = NULL;
+       } else if (argv[0] && argv[1]) {
+               host = argv[0];
+               uport = argv[1];
+       } else
+               usage(1);
+
+       if (lflag && sflag)
+               errx(1, "cannot use -s and -l");
+       if (lflag && pflag)
+               errx(1, "cannot use -p and -l");
+       if (lflag && zflag)
+               errx(1, "cannot use -z and -l");
+       if (!lflag && kflag)
+               errx(1, "must use -l with -k");
+
+       /* Get name of temporary socket for unix datagram client */
+       if ((family == AF_UNIX) && uflag && !lflag) {
+               if (sflag) {
+                       unix_dg_tmp_socket = sflag;
+               } else {
+                       strlcpy(unix_dg_tmp_socket_buf, "/tmp/nc.XXXXXXXXXX",
+                               UNIX_DG_TMP_SOCKET_SIZE);
+                       if (mktemp(unix_dg_tmp_socket_buf) == NULL)
+                               err(1, "mktemp");
+                       unix_dg_tmp_socket = unix_dg_tmp_socket_buf;
+               }
+       }
+
+       /* Initialize addrinfo structure. */
+       if (family != AF_UNIX) {
+               memset(&hints, 0, sizeof(struct addrinfo));
+               hints.ai_family = family;
+               hints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
+               hints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP;
+               if (nflag)
+                       hints.ai_flags |= AI_NUMERICHOST;
+       }
+
+       if (xflag) {
+               if (uflag)
+                       errx(1, "no proxy support for UDP mode");
+
+               if (lflag)
+                       errx(1, "no proxy support for listen");
+
+               if (family == AF_UNIX)
+                       errx(1, "no proxy support for unix sockets");
+
+               /* XXX IPv6 transport to proxy would probably work */
+               if (family == AF_INET6)
+                       errx(1, "no proxy support for IPv6");
+
+               if (sflag)
+                       errx(1, "no proxy support for local source address");
+
+               proxyhost = strsep(&proxy, ":");
+               proxyport = proxy;
+
+               memset(&proxyhints, 0, sizeof(struct addrinfo));
+               proxyhints.ai_family = family;
+               proxyhints.ai_socktype = SOCK_STREAM;
+               proxyhints.ai_protocol = IPPROTO_TCP;
+               if (nflag)
+                       proxyhints.ai_flags |= AI_NUMERICHOST;
+       }
+
+       if (lflag) {
+               int connfd;
+               ret = 0;
+
+               if (family == AF_UNIX) {
+                       if (uflag)
+                               s = unix_bind(host);
+                       else
+                               s = unix_listen(host);
+               }
+
+               /* Allow only one connection at a time, but stay alive. */
+               for (;;) {
+                       if (family != AF_UNIX)
+                               s = local_listen(host, uport, hints);
+                       if (s < 0)
+                               err(1, "local_listen");
+                       /*
+                        * For UDP and -k, don't connect the socket, let it
+                        * receive datagrams from multiple socket pairs.
+                        */
+                       if (uflag && kflag)
+                               readwrite(s);
+                       /*
+                        * For UDP and not -k, we will use recvfrom() initially
+                        * to wait for a caller, then use the regular functions
+                        * to talk to the caller.
+                        */
+                       else if (uflag && !kflag) {
+                               int rv, plen;
+                               char buf[16384];
+                               struct sockaddr_storage z;
+
+                               len = sizeof(z);
+                               plen = 2048;
+                               rv = recvfrom(s, buf, plen, MSG_PEEK,
+                                   (struct sockaddr *)&z, &len);
+                               if (rv < 0)
+                                       err(1, "recvfrom");
+
+                               rv = connect(s, (struct sockaddr *)&z, len);
+                               if (rv < 0)
+                                       err(1, "connect");
+
+                               if (vflag)
+                                       report_connect((struct sockaddr *)&z, len);
+
+                               readwrite(s);
+                       } else {
+                               len = sizeof(cliaddr);
+                               connfd = accept(s, (struct sockaddr *)&cliaddr,
+                                   &len);
+                               if (connfd == -1) {
+                                       /* For now, all errnos are fatal */
+                                       err(1, "accept");
+                               }
+                               if (vflag)
+                                       report_connect((struct sockaddr *)&cliaddr, len);
+
+                               readwrite(connfd);
+                               close(connfd);
+                       }
+
+                       if (family != AF_UNIX)
+                               close(s);
+                       else if (uflag) {
+                               if (connect(s, NULL, 0) < 0)
+                                       err(1, "connect");
+                       }
+
+                       if (!kflag)
+                               break;
+               }
+       } else if (family == AF_UNIX) {
+               ret = 0;
+
+               if ((s = unix_connect(host)) > 0 && !zflag) {
+                       readwrite(s);
+                       close(s);
+               } else
+                       ret = 1;
+
+               if (uflag)
+                       unlink(unix_dg_tmp_socket);
+               exit(ret);
+
+       } else {
+               int i = 0;
+
+               /* Construct the portlist[] array. */
+               build_ports(uport);
+
+               /* Cycle through portlist, connecting to each port. */
+               for (i = 0; portlist[i] != NULL; i++) {
+                       if (s)
+                               close(s);
+
+                       if (xflag)
+                               s = socks_connect(host, portlist[i], hints,
+                                   proxyhost, proxyport, proxyhints, socksv,
+                                   Pflag);
+                       else
+                               s = remote_connect(host, portlist[i], hints);
+
+                       if (s < 0)
+                               continue;
+
+                       ret = 0;
+                       if (vflag || zflag) {
+                               /* For UDP, make sure we are connected. */
+                               if (uflag) {
+                                       if (udptest(s) == -1) {
+                                               ret = 1;
+                                               continue;
+                                       }
+                               }
+
+                               /* Don't look up port if -n. */
+                               if (nflag)
+                                       sv = NULL;
+                               else {
+                                       sv = getservbyport(
+                                           ntohs(atoi(portlist[i])),
+                                           uflag ? "udp" : "tcp");
+                               }
+
+                               fprintf(stderr,
+                                   "Connection to %s %s port [%s/%s] "
+                                   "succeeded!\n", host, portlist[i],
+                                   uflag ? "udp" : "tcp",
+                                   sv ? sv->s_name : "*");
+                       }
+                       if (Fflag)
+                               fdpass(s);
+                       else if (!zflag)
+                               readwrite(s);
+               }
+       }
+
+       if (s)
+               close(s);
+
+       exit(ret);
+}
+
+/*
+ * unix_bind()
+ * Returns a unix socket bound to the given path
+ */
+int
+unix_bind(char *path)
+{
+       struct sockaddr_un sun_sa;
+       int s;
+
+       /* Create unix domain socket. */
+       if ((s = socket(AF_UNIX, uflag ? SOCK_DGRAM : SOCK_STREAM,
+            0)) < 0)
+               return (-1);
+
+       memset(&sun_sa, 0, sizeof(struct sockaddr_un));
+       sun_sa.sun_family = AF_UNIX;
+
+       if (strlcpy(sun_sa.sun_path, path, sizeof(sun_sa.sun_path)) >=
+           sizeof(sun_sa.sun_path)) {
+               close(s);
+               errno = ENAMETOOLONG;
+               return (-1);
+       }
+
+       if (bind(s, (struct sockaddr *)&sun_sa, SUN_LEN(&sun_sa)) < 0) {
+               close(s);
+               return (-1);
+       }
+       return (s);
+}
+
+/*
+ * unix_connect()
+ * Returns a socket connected to a local unix socket. Returns -1 on failure.
+ */
+int
+unix_connect(char *path)
+{
+       struct sockaddr_un sun_sa;
+       int s;
+
+       if (uflag) {
+               if ((s = unix_bind(unix_dg_tmp_socket)) < 0)
+                       return (-1);
+       } else {
+               if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
+                       return (-1);
+       }
+       (void)fcntl(s, F_SETFD, FD_CLOEXEC);
+
+       memset(&sun_sa, 0, sizeof(struct sockaddr_un));
+       sun_sa.sun_family = AF_UNIX;
+
+       if (strlcpy(sun_sa.sun_path, path, sizeof(sun_sa.sun_path)) >=
+           sizeof(sun_sa.sun_path)) {
+               close(s);
+               errno = ENAMETOOLONG;
+               return (-1);
+       }
+       if (connect(s, (struct sockaddr *)&sun_sa, SUN_LEN(&sun_sa)) < 0) {
+               close(s);
+               return (-1);
+       }
+       return (s);
+
+}
+
+/*
+ * unix_listen()
+ * Create a unix domain socket, and listen on it.
+ */
+int
+unix_listen(char *path)
+{
+       int s;
+       if ((s = unix_bind(path)) < 0)
+               return (-1);
+
+       if (listen(s, 5) < 0) {
+               close(s);
+               return (-1);
+       }
+       return (s);
+}
+
+/*
+ * remote_connect()
+ * Returns a socket connected to a remote host. Properly binds to a local
+ * port or source address if needed. Returns -1 on failure.
+ */
+int
+remote_connect(const char *host, const char *port, struct addrinfo hints)
+{
+       struct addrinfo *res, *res0;
+       int s, error;
+#if defined(SO_RTABLE) || defined(SO_BINDANY)
+       int on = 1;
+#endif
+
+       if ((error = getaddrinfo(host, port, &hints, &res)))
+               errx(1, "getaddrinfo: %s", gai_strerror(error));
+
+       res0 = res;
+       do {
+               if ((s = socket(res0->ai_family, res0->ai_socktype,
+                   res0->ai_protocol)) < 0)
+                       continue;
+
+#ifdef SO_RTABLE
+               if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_RTABLE,
+                   &rtableid, sizeof(rtableid)) == -1))
+                       err(1, "setsockopt SO_RTABLE");
+#endif
+               /* Bind to a local port or source address if specified. */
+               if (sflag || pflag) {
+                       struct addrinfo ahints, *ares;
+
+#ifdef SO_BINDANY
+                       /* try SO_BINDANY, but don't insist */
+                       setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
+#endif
+                       memset(&ahints, 0, sizeof(struct addrinfo));
+                       ahints.ai_family = res0->ai_family;
+                       ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
+                       ahints.ai_protocol = uflag ? IPPROTO_UDP : IPPROTO_TCP;
+                       ahints.ai_flags = AI_PASSIVE;
+                       if ((error = getaddrinfo(sflag, pflag, &ahints, &ares)))
+                               errx(1, "getaddrinfo: %s", gai_strerror(error));
+
+                       if (bind(s, (struct sockaddr *)ares->ai_addr,
+                           ares->ai_addrlen) < 0)
+                               err(1, "bind failed");
+                       freeaddrinfo(ares);
+               }
+
+               set_common_sockopts(s);
+
+               if (timeout_connect(s, res0->ai_addr, res0->ai_addrlen) == 0)
+                       break;
+               else if (vflag)
+                       warn("connect to %s port %s (%s) failed", host, port,
+                           uflag ? "udp" : "tcp");
+
+               close(s);
+               s = -1;
+       } while ((res0 = res0->ai_next) != NULL);
+
+       freeaddrinfo(res);
+
+       return (s);
+}
+
+int
+timeout_connect(int s, const struct sockaddr *name, socklen_t namelen)
+{
+       struct pollfd pfd;
+       socklen_t optlen;
+       int flags = 0, optval;
+       int ret;
+
+       if (timeout != -1) {
+               flags = fcntl(s, F_GETFL, 0);
+               if (fcntl(s, F_SETFL, flags | O_NONBLOCK) == -1)
+                       err(1, "set non-blocking mode");
+       }
+
+       if ((ret = connect(s, name, namelen)) != 0 && errno == EINPROGRESS) {
+               pfd.fd = s;
+               pfd.events = POLLOUT;
+               if ((ret = poll(&pfd, 1, timeout)) == 1) {
+                       optlen = sizeof(optval);
+                       if ((ret = getsockopt(s, SOL_SOCKET, SO_ERROR,
+                           &optval, &optlen)) == 0) {
+                               errno = optval;
+                               ret = optval == 0 ? 0 : -1;
+                       }
+               } else if (ret == 0) {
+                       errno = ETIMEDOUT;
+                       ret = -1;
+               } else
+                       err(1, "poll failed");
+       }
+
+       if (timeout != -1 && fcntl(s, F_SETFL, flags) == -1)
+               err(1, "restoring flags");
+
+       return (ret);
+}
+
+/*
+ * local_listen()
+ * Returns a socket listening on a local port, binds to specified source
+ * address. Returns -1 on failure.
+ */
+int
+local_listen(char *host, char *port, struct addrinfo hints)
+{
+       struct addrinfo *res, *res0;
+       int s, ret, x = 1;
+       int error;
+
+       /* Allow nodename to be null. */
+       hints.ai_flags |= AI_PASSIVE;
+
+       /*
+        * In the case of binding to a wildcard address
+        * default to binding to an ipv4 address.
+        */
+       if (host == NULL && hints.ai_family == AF_UNSPEC)
+               hints.ai_family = AF_INET;
+
+       if ((error = getaddrinfo(host, port, &hints, &res)))
+               errx(1, "getaddrinfo: %s", gai_strerror(error));
+
+       res0 = res;
+       do {
+               if ((s = socket(res0->ai_family, res0->ai_socktype,
+                   res0->ai_protocol)) < 0)
+                       continue;
+
+#ifdef SO_RTABLE
+               if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_RTABLE,
+                   &rtableid, sizeof(rtableid)) == -1))
+                       err(1, "setsockopt SO_RTABLE");
+#endif
+#ifdef SO_REUSEPORT
+               ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
+               if (ret == -1)
+                       err(1, "setsockopt");
+#endif
+               set_common_sockopts(s);
+
+               if (bind(s, (struct sockaddr *)res0->ai_addr,
+                   res0->ai_addrlen) == 0)
+                       break;
+
+               close(s);
+               s = -1;
+       } while ((res0 = res0->ai_next) != NULL);
+
+       if (!uflag && s != -1) {
+               if (listen(s, 1) < 0)
+                       err(1, "listen");
+       }
+
+       freeaddrinfo(res);
+
+       return (s);
+}
+
+/*
+ * readwrite()
+ * Loop that polls on the network file descriptor and stdin.
+ */
+void
+readwrite(int net_fd)
+{
+       struct pollfd pfd[4];
+       int stdin_fd = STDIN_FILENO;
+       int stdout_fd = STDOUT_FILENO;
+       unsigned char netinbuf[BUFSIZE];
+       size_t netinbufpos = 0;
+       unsigned char stdinbuf[BUFSIZE];
+       size_t stdinbufpos = 0;
+       int n, num_fds;
+       ssize_t ret;
+
+       /* don't read from stdin if requested */
+       if (dflag)
+               stdin_fd = -1;
+
+       /* stdin */
+       pfd[POLL_STDIN].fd = stdin_fd;
+       pfd[POLL_STDIN].events = POLLIN;
+
+       /* network out */
+       pfd[POLL_NETOUT].fd = net_fd;
+       pfd[POLL_NETOUT].events = 0;
+
+       /* network in */
+       pfd[POLL_NETIN].fd = net_fd;
+       pfd[POLL_NETIN].events = POLLIN;
+
+       /* stdout */
+       pfd[POLL_STDOUT].fd = stdout_fd;
+       pfd[POLL_STDOUT].events = 0;
+
+       while (1) {
+               /* both inputs are gone, buffers are empty, we are done */
+               if (pfd[POLL_STDIN].fd == -1 && pfd[POLL_NETIN].fd == -1
+                   && stdinbufpos == 0 && netinbufpos == 0) {
+                       close(net_fd);
+                       return;
+               }
+               /* both outputs are gone, we can't continue */
+               if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) {
+                       close(net_fd);
+                       return;
+               }
+               /* listen and net in gone, queues empty, done */
+               if (lflag && pfd[POLL_NETIN].fd == -1
+                   && stdinbufpos == 0 && netinbufpos == 0) {
+                       close(net_fd);
+                       return;
+               }
+
+               /* help says -i is for "wait between lines sent". We read and
+                * write arbitrary amounts of data, and we don't want to start
+                * scanning for newlines, so this is as good as it gets */
+               if (iflag)
+                       sleep(iflag);
+
+               /* poll */
+               num_fds = poll(pfd, 4, timeout);
+
+               /* treat poll errors */
+               if (num_fds == -1) {
+                       close(net_fd);
+                       err(1, "polling error");
+               }
+
+               /* timeout happened */
+               if (num_fds == 0)
+                       return;
+
+               /* treat socket error conditions */
+               for (n = 0; n < 4; n++) {
+                       if (pfd[n].revents & (POLLERR|POLLNVAL)) {
+                               pfd[n].fd = -1;
+                       }
+               }
+               /* reading is possible after HUP */
+               if (pfd[POLL_STDIN].events & POLLIN &&
+                   pfd[POLL_STDIN].revents & POLLHUP &&
+                   ! (pfd[POLL_STDIN].revents & POLLIN))
+                               pfd[POLL_STDIN].fd = -1;
+
+               if (pfd[POLL_NETIN].events & POLLIN &&
+                   pfd[POLL_NETIN].revents & POLLHUP &&
+                   ! (pfd[POLL_NETIN].revents & POLLIN))
+                               pfd[POLL_NETIN].fd = -1;
+
+               if (pfd[POLL_NETOUT].revents & POLLHUP) {
+                       if (Nflag)
+                               shutdown(pfd[POLL_NETOUT].fd, SHUT_WR);
+                       pfd[POLL_NETOUT].fd = -1;
+               }
+               /* if HUP, stop watching stdout */
+               if (pfd[POLL_STDOUT].revents & POLLHUP)
+                       pfd[POLL_STDOUT].fd = -1;
+               /* if no net out, stop watching stdin */
+               if (pfd[POLL_NETOUT].fd == -1)
+                       pfd[POLL_STDIN].fd = -1;
+               /* if no stdout, stop watching net in */
+               if (pfd[POLL_STDOUT].fd == -1) {
+                       if (pfd[POLL_NETIN].fd != -1)
+                               shutdown(pfd[POLL_NETIN].fd, SHUT_RD);
+                       pfd[POLL_NETIN].fd = -1;
+               }
+
+               /* try to read from stdin */
+               if (pfd[POLL_STDIN].revents & POLLIN && stdinbufpos < BUFSIZE) {
+                       ret = fillbuf(pfd[POLL_STDIN].fd, stdinbuf,
+                           &stdinbufpos);
+                       /* error or eof on stdin - remove from pfd */
+                       if (ret == 0 || ret == -1)
+                               pfd[POLL_STDIN].fd = -1;
+                       /* read something - poll net out */
+                       if (stdinbufpos > 0)
+                               pfd[POLL_NETOUT].events = POLLOUT;
+                       /* filled buffer - remove self from polling */
+                       if (stdinbufpos == BUFSIZE)
+                               pfd[POLL_STDIN].events = 0;
+               }
+               /* try to write to network */
+               if (pfd[POLL_NETOUT].revents & POLLOUT && stdinbufpos > 0) {
+                       ret = drainbuf(pfd[POLL_NETOUT].fd, stdinbuf,
+                           &stdinbufpos);
+                       if (ret == -1)
+                               pfd[POLL_NETOUT].fd = -1;
+                       /* buffer empty - remove self from polling */
+                       if (stdinbufpos == 0)
+                               pfd[POLL_NETOUT].events = 0;
+                       /* buffer no longer full - poll stdin again */
+                       if (stdinbufpos < BUFSIZE)
+                               pfd[POLL_STDIN].events = POLLIN;
+               }
+               /* try to read from network */
+               if (pfd[POLL_NETIN].revents & POLLIN && netinbufpos < BUFSIZE) {
+                       ret = fillbuf(pfd[POLL_NETIN].fd, netinbuf,
+                           &netinbufpos);
+                       if (ret == -1)
+                               pfd[POLL_NETIN].fd = -1;
+                       /* eof on net in - remove from pfd */
+                       if (ret == 0) {
+                               shutdown(pfd[POLL_NETIN].fd, SHUT_RD);
+                               pfd[POLL_NETIN].fd = -1;
+                       }
+                       /* read something - poll stdout */
+                       if (netinbufpos > 0)
+                               pfd[POLL_STDOUT].events = POLLOUT;
+                       /* filled buffer - remove self from polling */
+                       if (netinbufpos == BUFSIZE)
+                               pfd[POLL_NETIN].events = 0;
+                       /* handle telnet */
+                       if (tflag)
+                               atelnet(pfd[POLL_NETIN].fd, netinbuf,
+                                   netinbufpos);
+               }
+               /* try to write to stdout */
+               if (pfd[POLL_STDOUT].revents & POLLOUT && netinbufpos > 0) {
+                       ret = drainbuf(pfd[POLL_STDOUT].fd, netinbuf,
+                           &netinbufpos);
+                       if (ret == -1)
+                               pfd[POLL_STDOUT].fd = -1;
+                       /* buffer empty - remove self from polling */
+                       if (netinbufpos == 0)
+                               pfd[POLL_STDOUT].events = 0;
+                       /* buffer no longer full - poll net in again */
+                       if (netinbufpos < BUFSIZE)
+                               pfd[POLL_NETIN].events = POLLIN;
+               }
+
+               /* stdin gone and queue empty? */
+               if (pfd[POLL_STDIN].fd == -1 && stdinbufpos == 0) {
+                       if (pfd[POLL_NETOUT].fd != -1 && Nflag)
+                               shutdown(pfd[POLL_NETOUT].fd, SHUT_WR);
+                       pfd[POLL_NETOUT].fd = -1;
+               }
+               /* net in gone and queue empty? */
+               if (pfd[POLL_NETIN].fd == -1 && netinbufpos == 0) {
+                       pfd[POLL_STDOUT].fd = -1;
+               }
+       }
+}
+
+ssize_t
+drainbuf(int fd, unsigned char *buf, size_t *bufpos)
+{
+       ssize_t n;
+       ssize_t adjust;
+
+       n = write(fd, buf, *bufpos);
+       /* don't treat EAGAIN, EINTR as error */
+       if (n == -1 && (errno == EAGAIN || errno == EINTR))
+               n = -2;
+       if (n <= 0)
+               return n;
+       /* adjust buffer */
+       adjust = *bufpos - n;
+       if (adjust > 0)
+               memmove(buf, buf + n, adjust);
+       *bufpos -= n;
+       return n;
+}
+
+
+ssize_t
+fillbuf(int fd, unsigned char *buf, size_t *bufpos)
+{
+       size_t num = BUFSIZE - *bufpos;
+       ssize_t n;
+
+       n = read(fd, buf + *bufpos, num);
+       /* don't treat EAGAIN, EINTR as error */
+       if (n == -1 && (errno == EAGAIN || errno == EINTR))
+               n = -2;
+       if (n <= 0)
+               return n;
+       *bufpos += n;
+       return n;
+}
+
+/*
+ * fdpass()
+ * Pass the connected file descriptor to stdout and exit.
+ */
+void
+fdpass(int nfd)
+{
+#if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
+       struct msghdr msg;
+#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
+       union {
+               struct cmsghdr hdr;
+               char buf[CMSG_SPACE(sizeof(int))];
+       } cmsgbuf;
+       struct cmsghdr *cmsg;
+#endif
+       struct iovec vec;
+       char ch = '\0';
+       struct pollfd pfd;
+       ssize_t r;
+
+       memset(&msg, 0, sizeof(msg));
+#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
+       msg.msg_accrights = (caddr_t)&nfd;
+       msg.msg_accrightslen = sizeof(nfd);
+#else
+       memset(&cmsgbuf, 0, sizeof(cmsgbuf));
+       msg.msg_control = (caddr_t)&cmsgbuf.buf;
+       msg.msg_controllen = sizeof(cmsgbuf.buf);
+       cmsg = CMSG_FIRSTHDR(&msg);
+       cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+       cmsg->cmsg_level = SOL_SOCKET;
+       cmsg->cmsg_type = SCM_RIGHTS;
+       *(int *)CMSG_DATA(cmsg) = nfd;
+#endif
+
+       vec.iov_base = &ch;
+       vec.iov_len = 1;
+       msg.msg_iov = &vec;
+       msg.msg_iovlen = 1;
+
+       bzero(&pfd, sizeof(pfd));
+       pfd.fd = STDOUT_FILENO;
+       for (;;) {
+               r = sendmsg(STDOUT_FILENO, &msg, 0);
+               if (r == -1) {
+                       if (errno == EAGAIN || errno == EINTR) {
+                               pfd.events = POLLOUT;
+                               if (poll(&pfd, 1, -1) == -1)
+                                       err(1, "poll");
+                               continue;
+                       }
+                       err(1, "sendmsg");
+               } else if (r == -1)
+                       errx(1, "sendmsg: unexpected return value %zd", r);
+               else
+                       break;
+       }
+       exit(0);
+#else
+       errx(1, "%s: file descriptor passing not supported", __func__);
+#endif
+}
+
+/* Deal with RFC 854 WILL/WONT DO/DONT negotiation. */
+void
+atelnet(int nfd, unsigned char *buf, unsigned int size)
+{
+       unsigned char *p, *end;
+       unsigned char obuf[4];
+
+       if (size < 3)
+               return;
+       end = buf + size - 2;
+
+       for (p = buf; p < end; p++) {
+               if (*p != IAC)
+                       continue;
+
+               obuf[0] = IAC;
+               p++;
+               if ((*p == WILL) || (*p == WONT))
+                       obuf[1] = DONT;
+               else if ((*p == DO) || (*p == DONT))
+                       obuf[1] = WONT;
+               else
+                       continue;
+
+               p++;
+               obuf[2] = *p;
+               if (atomicio(vwrite, nfd, obuf, 3) != 3)
+                       warn("Write Error!");
+       }
+}
+
+/*
+ * build_ports()
+ * Build an array of ports in portlist[], listing each port
+ * that we should try to connect to.
+ */
+void
+build_ports(char *p)
+{
+       const char *errstr;
+       char *n;
+       int hi, lo, cp;
+       int x = 0;
+
+       if ((n = strchr(p, '-')) != NULL) {
+               *n = '\0';
+               n++;
+
+               /* Make sure the ports are in order: lowest->highest. */
+               hi = strtonum(n, 1, PORT_MAX, &errstr);
+               if (errstr)
+                       errx(1, "port number %s: %s", errstr, n);
+               lo = strtonum(p, 1, PORT_MAX, &errstr);
+               if (errstr)
+                       errx(1, "port number %s: %s", errstr, p);
+
+               if (lo > hi) {
+                       cp = hi;
+                       hi = lo;
+                       lo = cp;
+               }
+
+               /* Load ports sequentially. */
+               for (cp = lo; cp <= hi; cp++) {
+                       portlist[x] = calloc(1, PORT_MAX_LEN);
+                       if (portlist[x] == NULL)
+                               errx(1, "calloc");
+                       snprintf(portlist[x], PORT_MAX_LEN, "%d", cp);
+                       x++;
+               }
+
+               /* Randomly swap ports. */
+               if (rflag) {
+                       int y;
+                       char *c;
+
+                       for (x = 0; x <= (hi - lo); x++) {
+                               y = (arc4random() & 0xFFFF) % (hi - lo);
+                               c = portlist[x];
+                               portlist[x] = portlist[y];
+                               portlist[y] = c;
+                       }
+               }
+       } else {
+               hi = strtonum(p, 1, PORT_MAX, &errstr);
+               if (errstr)
+                       errx(1, "port number %s: %s", errstr, p);
+               portlist[0] = strdup(p);
+               if (portlist[0] == NULL)
+                       errx(1, "strdup");
+       }
+}
+
+/*
+ * udptest()
+ * Do a few writes to see if the UDP port is there.
+ * Fails once PF state table is full.
+ */
+int
+udptest(int s)
+{
+       int i, ret;
+
+       for (i = 0; i <= 3; i++) {
+               if (write(s, "X", 1) == 1)
+                       ret = 1;
+               else
+                       ret = -1;
+       }
+       return (ret);
+}
+
+void
+set_common_sockopts(int s)
+{
+       int x = 1;
+
+#ifdef TCP_MD5SIG
+       if (Sflag) {
+               if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG,
+                       &x, sizeof(x)) == -1)
+                       err(1, "setsockopt");
+       }
+#endif
+       if (Dflag) {
+               if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
+                       &x, sizeof(x)) == -1)
+                       err(1, "setsockopt");
+       }
+       if (Tflag != -1) {
+               if (setsockopt(s, IPPROTO_IP, IP_TOS,
+                   &Tflag, sizeof(Tflag)) == -1)
+                       err(1, "set IP ToS");
+       }
+       if (Iflag) {
+               if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
+                   &Iflag, sizeof(Iflag)) == -1)
+                       err(1, "set TCP receive buffer size");
+       }
+       if (Oflag) {
+               if (setsockopt(s, SOL_SOCKET, SO_SNDBUF,
+                   &Oflag, sizeof(Oflag)) == -1)
+                       err(1, "set TCP send buffer size");
+       }
+}
+
+int
+map_tos(char *s, int *val)
+{
+       /* DiffServ Codepoints and other TOS mappings */
+       const struct toskeywords {
+               const char      *keyword;
+               int              val;
+       } *t, toskeywords[] = {
+               { "af11",               IPTOS_DSCP_AF11 },
+               { "af12",               IPTOS_DSCP_AF12 },
+               { "af13",               IPTOS_DSCP_AF13 },
+               { "af21",               IPTOS_DSCP_AF21 },
+               { "af22",               IPTOS_DSCP_AF22 },
+               { "af23",               IPTOS_DSCP_AF23 },
+               { "af31",               IPTOS_DSCP_AF31 },
+               { "af32",               IPTOS_DSCP_AF32 },
+               { "af33",               IPTOS_DSCP_AF33 },
+               { "af41",               IPTOS_DSCP_AF41 },
+               { "af42",               IPTOS_DSCP_AF42 },
+               { "af43",               IPTOS_DSCP_AF43 },
+               { "critical",           IPTOS_PREC_CRITIC_ECP },
+               { "cs0",                IPTOS_DSCP_CS0 },
+               { "cs1",                IPTOS_DSCP_CS1 },
+               { "cs2",                IPTOS_DSCP_CS2 },
+               { "cs3",                IPTOS_DSCP_CS3 },
+               { "cs4",                IPTOS_DSCP_CS4 },
+               { "cs5",                IPTOS_DSCP_CS5 },
+               { "cs6",                IPTOS_DSCP_CS6 },
+               { "cs7",                IPTOS_DSCP_CS7 },
+               { "ef",                 IPTOS_DSCP_EF },
+               { "inetcontrol",        IPTOS_PREC_INTERNETCONTROL },
+               { "lowdelay",           IPTOS_LOWDELAY },
+               { "netcontrol",         IPTOS_PREC_NETCONTROL },
+               { "reliability",        IPTOS_RELIABILITY },
+               { "throughput",         IPTOS_THROUGHPUT },
+               { NULL,                 -1 },
+       };
+
+       for (t = toskeywords; t->keyword != NULL; t++) {
+               if (strcmp(s, t->keyword) == 0) {
+                       *val = t->val;
+                       return (1);
+               }
+       }
+
+       return (0);
+}
+
+void
+report_connect(const struct sockaddr *sa, socklen_t salen)
+{
+       char remote_host[NI_MAXHOST];
+       char remote_port[NI_MAXSERV];
+       int herr;
+       int flags = NI_NUMERICSERV;
+       
+       if (nflag)
+               flags |= NI_NUMERICHOST;
+       
+       if ((herr = getnameinfo(sa, salen,
+           remote_host, sizeof(remote_host),
+           remote_port, sizeof(remote_port),
+           flags)) != 0) {
+               if (herr == EAI_SYSTEM)
+                       err(1, "getnameinfo");
+               else
+                       errx(1, "getnameinfo: %s", gai_strerror(herr));
+       }
+       
+       fprintf(stderr,
+           "Connection from %s %s "
+           "received!\n", remote_host, remote_port);
+}
+
+void
+help(void)
+{
+       usage(0);
+       fprintf(stderr, "\tCommand Summary:\n\
+       \t-4            Use IPv4\n\
+       \t-6            Use IPv6\n\
+       \t-D            Enable the debug socket option\n\
+       \t-d            Detach from stdin\n\
+       \t-F            Pass socket fd\n\
+       \t-h            This help text\n\
+       \t-I length     TCP receive buffer length\n\
+       \t-i secs\t     Delay interval for lines sent, ports scanned\n\
+       \t-k            Keep inbound sockets open for multiple connects\n\
+       \t-l            Listen mode, for inbound connects\n\
+       \t-N            Shutdown the network socket after EOF on stdin\n\
+       \t-n            Suppress name/port resolutions\n\
+       \t-O length     TCP send buffer length\n\
+       \t-P proxyuser\tUsername for proxy authentication\n\
+       \t-p port\t     Specify local port for remote connects\n\
+       \t-r            Randomize remote ports\n\
+       \t-S            Enable the TCP MD5 signature option\n\
+       \t-s addr\t     Local source address\n\
+       \t-T toskeyword\tSet IP Type of Service\n\
+       \t-t            Answer TELNET negotiation\n\
+       \t-U            Use UNIX domain socket\n\
+       \t-u            UDP mode\n\
+       \t-V rtable     Specify alternate routing table\n\
+       \t-v            Verbose\n\
+       \t-w secs\t     Timeout for connects and final net reads\n\
+       \t-X proto      Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\
+       \t-x addr[:port]\tSpecify proxy address and port\n\
+       \t-z            Zero-I/O mode [used for scanning]\n\
+       Port numbers can be individual or ranges: lo-hi [inclusive]\n");
+       exit(1);
+}
+
+void
+usage(int ret)
+{
+       fprintf(stderr,
+           "usage: nc [-46DdFhklNnrStUuvz] [-I length] [-i interval] [-O length]\n"
+           "\t  [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n"
+           "\t  [-V rtable] [-w timeout] [-X proxy_protocol]\n"
+           "\t  [-x proxy_address[:port]] [destination] [port]\n");
+       if (ret)
+               exit(1);
+}
+
+/* *** src/usr.bin/nc/socks.c *** */
+
+
+/*     $OpenBSD: socks.c,v 1.20 2012/03/08 09:56:28 espie Exp $        */
+
+/*
+ * Copyright (c) 1999 Niklas Hallqvist.  All rights reserved.
+ * Copyright (c) 2004, 2005 Damien Miller.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <errno.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <resolv.h>
+
+#define SOCKS_PORT     "1080"
+#define HTTP_PROXY_PORT        "3128"
+#define HTTP_MAXHDRS   64
+#define SOCKS_V5       5
+#define SOCKS_V4       4
+#define SOCKS_NOAUTH   0
+#define SOCKS_NOMETHOD 0xff
+#define SOCKS_CONNECT  1
+#define SOCKS_IPV4     1
+#define SOCKS_DOMAIN   3
+#define SOCKS_IPV6     4
+
+int    remote_connect(const char *, const char *, struct addrinfo);
+int    socks_connect(const char *, const char *, struct addrinfo,
+           const char *, const char *, struct addrinfo, int,
+           const char *);
+
+static int
+decode_addrport(const char *h, const char *p, struct sockaddr *addr,
+    socklen_t addrlen, int v4only, int numeric)
+{
+       int r;
+       struct addrinfo hints, *res;
+
+       bzero(&hints, sizeof(hints));
+       hints.ai_family = v4only ? PF_INET : PF_UNSPEC;
+       hints.ai_flags = numeric ? AI_NUMERICHOST : 0;
+       hints.ai_socktype = SOCK_STREAM;
+       r = getaddrinfo(h, p, &hints, &res);
+       /* Don't fatal when attempting to convert a numeric address */
+       if (r != 0) {
+               if (!numeric) {
+                       errx(1, "getaddrinfo(\"%.64s\", \"%.64s\"): %s", h, p,
+                           gai_strerror(r));
+               }
+               return (-1);
+       }
+       if (addrlen < res->ai_addrlen) {
+               freeaddrinfo(res);
+               errx(1, "internal error: addrlen < res->ai_addrlen");
+       }
+       memcpy(addr, res->ai_addr, res->ai_addrlen);
+       freeaddrinfo(res);
+       return (0);
+}
+
+static int
+proxy_read_line(int fd, char *buf, size_t bufsz)
+{
+       size_t off;
+
+       for(off = 0;;) {
+               if (off >= bufsz)
+                       errx(1, "proxy read too long");
+               if (atomicio(read, fd, buf + off, 1) != 1)
+                       err(1, "proxy read");
+               /* Skip CR */
+               if (buf[off] == '\r')
+                       continue;
+               if (buf[off] == '\n') {
+                       buf[off] = '\0';
+                       break;
+               }
+               off++;
+       }
+       return (off);
+}
+
+static const char *
+getproxypass(const char *proxyuser, const char *proxyhost)
+{
+       char prompt[512];
+       static char pw[256];
+
+       snprintf(prompt, sizeof(prompt), "Proxy password for %s@%s: ",
+          proxyuser, proxyhost);
+       if (readpassphrase(prompt, pw, sizeof(pw), RPP_REQUIRE_TTY) == NULL)
+               errx(1, "Unable to read proxy passphrase");
+       return (pw);
+}
+
+int
+socks_connect(const char *host, const char *port,
+    struct addrinfo hints __attribute__ ((__unused__)),
+    const char *proxyhost, const char *proxyport, struct addrinfo proxyhints,
+    int socksv, const char *proxyuser)
+{
+       int proxyfd, r, authretry = 0;
+       size_t hlen, wlen = 0;
+       unsigned char buf[1024];
+       size_t cnt;
+       struct sockaddr_storage addr;
+       struct sockaddr_in *in4 = (struct sockaddr_in *)&addr;
+       struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)&addr;
+       in_port_t serverport;
+       const char *proxypass = NULL;
+
+       if (proxyport == NULL)
+               proxyport = (socksv == -1) ? HTTP_PROXY_PORT : SOCKS_PORT;
+
+       /* Abuse API to lookup port */
+       if (decode_addrport("0.0.0.0", port, (struct sockaddr *)&addr,
+           sizeof(addr), 1, 1) == -1)
+               errx(1, "unknown port \"%.64s\"", port);
+       serverport = in4->sin_port;
+
+ again:
+       if (authretry++ > 3)
+               errx(1, "Too many authentication failures");
+
+       proxyfd = remote_connect(proxyhost, proxyport, proxyhints);
+
+       if (proxyfd < 0)
+               return (-1);
+
+       if (socksv == 5) {
+               if (decode_addrport(host, port, (struct sockaddr *)&addr,
+                   sizeof(addr), 0, 1) == -1)
+                       addr.ss_family = 0; /* used in switch below */
+
+               /* Version 5, one method: no authentication */
+               buf[0] = SOCKS_V5;
+               buf[1] = 1;
+               buf[2] = SOCKS_NOAUTH;
+               cnt = atomicio(vwrite, proxyfd, buf, 3);
+               if (cnt != 3)
+                       err(1, "write failed (%zu/3)", cnt);
+
+               cnt = atomicio(read, proxyfd, buf, 2);
+               if (cnt != 2)
+                       err(1, "read failed (%zu/3)", cnt);
+
+               if (buf[1] == SOCKS_NOMETHOD)
+                       errx(1, "authentication method negotiation failed");
+
+               switch (addr.ss_family) {
+               case 0:
+                       /* Version 5, connect: domain name */
+
+                       /* Max domain name length is 255 bytes */
+                       hlen = strlen(host);
+                       if (hlen > 255)
+                               errx(1, "host name too long for SOCKS5");
+                       buf[0] = SOCKS_V5;
+                       buf[1] = SOCKS_CONNECT;
+                       buf[2] = 0;
+                       buf[3] = SOCKS_DOMAIN;
+                       buf[4] = hlen;
+                       memcpy(buf + 5, host, hlen);                    
+                       memcpy(buf + 5 + hlen, &serverport, sizeof serverport);
+                       wlen = 7 + hlen;
+                       break;
+               case AF_INET:
+                       /* Version 5, connect: IPv4 address */
+                       buf[0] = SOCKS_V5;
+                       buf[1] = SOCKS_CONNECT;
+                       buf[2] = 0;
+                       buf[3] = SOCKS_IPV4;
+                       memcpy(buf + 4, &in4->sin_addr, sizeof in4->sin_addr);
+                       memcpy(buf + 8, &in4->sin_port, sizeof in4->sin_port);
+                       wlen = 10;
+                       break;
+               case AF_INET6:
+                       /* Version 5, connect: IPv6 address */
+                       buf[0] = SOCKS_V5;
+                       buf[1] = SOCKS_CONNECT;
+                       buf[2] = 0;
+                       buf[3] = SOCKS_IPV6;
+                       memcpy(buf + 4, &in6->sin6_addr, sizeof in6->sin6_addr);
+                       memcpy(buf + 20, &in6->sin6_port,
+                           sizeof in6->sin6_port);
+                       wlen = 22;
+                       break;
+               default:
+                       errx(1, "internal error: silly AF");
+               }
+
+               cnt = atomicio(vwrite, proxyfd, buf, wlen);
+               if (cnt != wlen)
+                       err(1, "write failed (%zu/%zu)", cnt, wlen);
+
+               cnt = atomicio(read, proxyfd, buf, 4);
+               if (cnt != 4)
+                       err(1, "read failed (%zu/4)", cnt);
+               if (buf[1] != 0)
+                       errx(1, "connection failed, SOCKS error %d", buf[1]);
+               switch (buf[3]) {
+               case SOCKS_IPV4:
+                       cnt = atomicio(read, proxyfd, buf + 4, 6);
+                       if (cnt != 6)
+                               err(1, "read failed (%zu/6)", cnt);
+                       break;
+               case SOCKS_IPV6:
+                       cnt = atomicio(read, proxyfd, buf + 4, 18);
+                       if (cnt != 18)
+                               err(1, "read failed (%zu/18)", cnt);
+                       break;
+               default:
+                       errx(1, "connection failed, unsupported address type");
+               }
+       } else if (socksv == 4) {
+               /* This will exit on lookup failure */
+               decode_addrport(host, port, (struct sockaddr *)&addr,
+                   sizeof(addr), 1, 0);
+
+               /* Version 4 */
+               buf[0] = SOCKS_V4;
+               buf[1] = SOCKS_CONNECT; /* connect */
+               memcpy(buf + 2, &in4->sin_port, sizeof in4->sin_port);
+               memcpy(buf + 4, &in4->sin_addr, sizeof in4->sin_addr);
+               buf[8] = 0;     /* empty username */
+               wlen = 9;
+
+               cnt = atomicio(vwrite, proxyfd, buf, wlen);
+               if (cnt != wlen)
+                       err(1, "write failed (%zu/%zu)", cnt, wlen);
+
+               cnt = atomicio(read, proxyfd, buf, 8);
+               if (cnt != 8)
+                       err(1, "read failed (%zu/8)", cnt);
+               if (buf[1] != 90)
+                       errx(1, "connection failed, SOCKS error %d", buf[1]);
+       } else if (socksv == -1) {
+               /* HTTP proxy CONNECT */
+
+               /* Disallow bad chars in hostname */
+               if (strcspn(host, "\r\n\t []:") != strlen(host))
+                       errx(1, "Invalid hostname");
+
+               /* Try to be sane about numeric IPv6 addresses */
+               if (strchr(host, ':') != NULL) {
+                       r = snprintf(buf, sizeof(buf),
+                           "CONNECT [%s]:%d HTTP/1.0\r\n",
+                           host, ntohs(serverport));
+               } else {
+                       r = snprintf(buf, sizeof(buf),
+                           "CONNECT %s:%d HTTP/1.0\r\n",
+                           host, ntohs(serverport));
+               }
+               if (r == -1 || (size_t)r >= sizeof(buf))
+                       errx(1, "hostname too long");
+               r = strlen(buf);
+
+               cnt = atomicio(vwrite, proxyfd, buf, r);
+               if (cnt != (size_t)r)
+                       err(1, "write failed (%zu/%d)", cnt, r);
+
+               if (authretry > 1) {
+                       char resp[1024];
+
+                       proxypass = getproxypass(proxyuser, proxyhost);
+                       r = snprintf(buf, sizeof(buf), "%s:%s",
+                           proxyuser, proxypass);
+                       if (r == -1 || (size_t)r >= sizeof(buf) ||
+                           b64_ntop(buf, strlen(buf), resp,
+                           sizeof(resp)) == -1)
+                               errx(1, "Proxy username/password too long");
+                       r = snprintf(buf, sizeof(buf), "Proxy-Authorization: "
+                           "Basic %s\r\n", resp);
+                       if (r == -1 || (size_t)r >= sizeof(buf))
+                               errx(1, "Proxy auth response too long");
+                       r = strlen(buf);
+                       if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != (size_t)r)
+                               err(1, "write failed (%zu/%d)", cnt, r);
+               }
+
+               /* Terminate headers */
+               if ((r = atomicio(vwrite, proxyfd, "\r\n", 2)) != 2)
+                       err(1, "write failed (2/%d)", r);
+
+               /* Read status reply */
+               proxy_read_line(proxyfd, buf, sizeof(buf));
+               if (proxyuser != NULL &&
+                   strncmp(buf, "HTTP/1.0 407 ", 12) == 0) {
+                       if (authretry > 1) {
+                               fprintf(stderr, "Proxy authentication "
+                                   "failed\n");
+                       }
+                       close(proxyfd);
+                       goto again;
+               } else if (strncmp(buf, "HTTP/1.0 200 ", 12) != 0 &&
+                   strncmp(buf, "HTTP/1.1 200 ", 12) != 0)
+                       errx(1, "Proxy error: \"%s\"", buf);
+
+               /* Headers continue until we hit an empty line */
+               for (r = 0; r < HTTP_MAXHDRS; r++) {
+                       proxy_read_line(proxyfd, buf, sizeof(buf));
+                       if (*buf == '\0')
+                               break;
+               }
+               if (*buf != '\0')
+                       errx(1, "Too many proxy headers received");
+       } else
+               errx(1, "Unknown proxy protocol %d", socksv);
+
+       return (proxyfd);
+}
+
diff --git a/regress/portnum.sh b/regress/portnum.sh
new file mode 100644 (file)
index 0000000..c56b869
--- /dev/null
@@ -0,0 +1,34 @@
+#      $OpenBSD: portnum.sh,v 1.2 2013/05/17 10:34:30 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="port number parsing"
+
+badport() {
+       port=$1
+       verbose "$tid: invalid port $port"
+       if ${SSH} -F $OBJ/ssh_proxy -p $port somehost true 2>/dev/null ; then
+               fail "$tid accepted invalid port $port"
+       fi
+}
+goodport() {
+       port=$1
+       verbose "$tid: valid port $port"
+       if ${SSH} -F $OBJ/ssh_proxy -p $port somehost true 2>/dev/null ; then
+               :
+       else
+               fail "$tid rejected valid port $port"
+       fi
+}
+
+badport 0
+badport 65536
+badport 131073
+badport 2000blah
+badport blah2000
+
+goodport 1
+goodport 22
+goodport 2222
+goodport 22222
+goodport 65535
+
diff --git a/regress/principals-command.sh b/regress/principals-command.sh
new file mode 100644 (file)
index 0000000..9b38eb1
--- /dev/null
@@ -0,0 +1,168 @@
+#      $OpenBSD: principals-command.sh,v 1.3 2016/09/26 21:34:38 bluhm Exp $
+#      Placed in the Public Domain.
+
+tid="authorized principals command"
+
+rm -f $OBJ/user_ca_key* $OBJ/cert_user_key*
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+
+if [ -z "$SUDO" -a ! -w /var/run ]; then
+       echo "skipped (SUDO not set)"
+       echo "need SUDO to create file in /var/run, test won't work without"
+       exit 0
+fi
+
+SERIAL=$$
+
+# Create a CA key and a user certificate.
+${SSHKEYGEN} -q -N '' -t ed25519  -f $OBJ/user_ca_key || \
+       fatal "ssh-keygen of user_ca_key failed"
+${SSHKEYGEN} -q -N '' -t rsa -f $OBJ/cert_user_key || \
+       fatal "ssh-keygen of cert_user_key failed"
+${SSHKEYGEN} -q -s $OBJ/user_ca_key -I "Joanne User" \
+    -z $$ -n ${USER},mekmitasdigoat $OBJ/cert_user_key || \
+       fatal "couldn't sign cert_user_key"
+
+CERT_BODY=`cat $OBJ/cert_user_key-cert.pub | awk '{ print $2 }'`
+CA_BODY=`cat $OBJ/user_ca_key.pub | awk '{ print $2 }'`
+CERT_FP=`${SSHKEYGEN} -lf $OBJ/cert_user_key-cert.pub | awk '{ print $2 }'`
+CA_FP=`${SSHKEYGEN} -lf $OBJ/user_ca_key.pub | awk '{ print $2 }'`
+
+# Establish a AuthorizedPrincipalsCommand in /var/run where it will have
+# acceptable directory permissions.
+PRINCIPALS_COMMAND="/var/run/principals_command_${LOGNAME}"
+cat << _EOF | $SUDO sh -c "cat > '$PRINCIPALS_COMMAND'"
+#!/bin/sh
+test "x\$1" != "x${LOGNAME}" && exit 1
+test "x\$2" != "xssh-rsa-cert-v01@openssh.com" && exit 1
+test "x\$3" != "xssh-ed25519" && exit 1
+test "x\$4" != "xJoanne User" && exit 1
+test "x\$5" != "x${SERIAL}" && exit 1
+test "x\$6" != "x${CA_FP}" && exit 1
+test "x\$7" != "x${CERT_FP}" && exit 1
+test "x\$8" != "x${CERT_BODY}" && exit 1
+test "x\$9" != "x${CA_BODY}" && exit 1
+test -f "$OBJ/authorized_principals_${LOGNAME}" &&
+       exec cat "$OBJ/authorized_principals_${LOGNAME}"
+_EOF
+test $? -eq 0 || fatal "couldn't prepare principals command"
+$SUDO chmod 0755 "$PRINCIPALS_COMMAND"
+
+if ! $OBJ/check-perm -m keys-command $PRINCIPALS_COMMAND ; then
+       echo "skipping: $PRINCIPALS_COMMAND is unsuitable as " \
+           "AuthorizedPrincipalsCommand"
+       $SUDO rm -f $PRINCIPALS_COMMAND
+       exit 0
+fi
+
+if [ -x $PRINCIPALS_COMMAND ]; then
+       # Test explicitly-specified principals
+       for privsep in yes no ; do
+               _prefix="privsep $privsep"
+
+               # Setup for AuthorizedPrincipalsCommand
+               rm -f $OBJ/authorized_keys_$USER
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo "UsePrivilegeSeparation $privsep"
+                       echo "AuthorizedKeysFile none"
+                       echo "AuthorizedPrincipalsCommand $PRINCIPALS_COMMAND" \
+                           "%u %t %T %i %s %F %f %k %K"
+                       echo "AuthorizedPrincipalsCommandUser ${LOGNAME}"
+                       echo "TrustedUserCAKeys $OBJ/user_ca_key.pub"
+               ) > $OBJ/sshd_proxy
+
+               # XXX test missing command
+               # XXX test failing command
+
+               # Empty authorized_principals
+               verbose "$tid: ${_prefix} empty authorized_principals"
+               echo > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # Wrong authorized_principals
+               verbose "$tid: ${_prefix} wrong authorized_principals"
+               echo gregorsamsa > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # Correct authorized_principals
+               verbose "$tid: ${_prefix} correct authorized_principals"
+               echo mekmitasdigoat > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh cert connect failed"
+               fi
+
+               # authorized_principals with bad key option
+               verbose "$tid: ${_prefix} authorized_principals bad key opt"
+               echo 'blah mekmitasdigoat' > $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # authorized_principals with command=false
+               verbose "$tid: ${_prefix} authorized_principals command=false"
+               echo 'command="false" mekmitasdigoat' > \
+                   $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # authorized_principals with command=true
+               verbose "$tid: ${_prefix} authorized_principals command=true"
+               echo 'command="true" mekmitasdigoat' > \
+                   $OBJ/authorized_principals_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost false >/dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh cert connect failed"
+               fi
+
+               # Setup for principals= key option
+               rm -f $OBJ/authorized_principals_$USER
+               (
+                       cat $OBJ/sshd_proxy_bak
+                       echo "UsePrivilegeSeparation $privsep"
+               ) > $OBJ/sshd_proxy
+
+               # Wrong principals list
+               verbose "$tid: ${_prefix} wrong principals key option"
+               (
+                       printf 'cert-authority,principals="gregorsamsa" '
+                       cat $OBJ/user_ca_key.pub
+               ) > $OBJ/authorized_keys_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -eq 0 ]; then
+                       fail "ssh cert connect succeeded unexpectedly"
+               fi
+
+               # Correct principals list
+               verbose "$tid: ${_prefix} correct principals key option"
+               (
+                       printf 'cert-authority,principals="mekmitasdigoat" '
+                       cat $OBJ/user_ca_key.pub
+               ) > $OBJ/authorized_keys_$USER
+               ${SSH} -2i $OBJ/cert_user_key \
+                   -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh cert connect failed"
+               fi
+       done
+else
+       echo "SKIPPED: $PRINCIPALS_COMMAND not executable " \
+           "(/var/run mounted noexec?)"
+fi
diff --git a/regress/proto-mismatch.sh b/regress/proto-mismatch.sh
new file mode 100644 (file)
index 0000000..9e8024b
--- /dev/null
@@ -0,0 +1,21 @@
+#      $OpenBSD: proto-mismatch.sh,v 1.4 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="protocol version mismatch"
+
+mismatch ()
+{
+       server=$1
+       client=$2
+       banner=`echo ${client} | ${SSHD} -o "Protocol=${server}" -i -f ${OBJ}/sshd_proxy`
+       r=$?
+       trace "sshd prints ${banner}"
+       if [ $r -ne 255 ]; then
+               fail "sshd prints ${banner} and accepts connect with version ${client}"
+       fi
+}
+
+mismatch       2       SSH-1.5-HALLO
+if ssh_version 1; then
+       mismatch        1       SSH-2.0-HALLO
+fi
diff --git a/regress/proto-version.sh b/regress/proto-version.sh
new file mode 100644 (file)
index 0000000..cf49461
--- /dev/null
@@ -0,0 +1,36 @@
+#      $OpenBSD: proto-version.sh,v 1.5 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="sshd version with different protocol combinations"
+
+# we just start sshd in inetd mode and check the banner
+check_version ()
+{
+       version=$1
+       expect=$2
+       banner=`printf '' | ${SSHD} -o "Protocol=${version}" -i -f ${OBJ}/sshd_proxy`
+       case ${banner} in
+       SSH-1.99-*)
+               proto=199
+               ;;
+       SSH-2.0-*)
+               proto=20
+               ;;
+       SSH-1.5-*)
+               proto=15
+               ;;
+       *)
+               proto=0
+               ;;
+       esac
+       if [ ${expect} -ne ${proto} ]; then
+               fail "wrong protocol version ${banner} for ${version}"
+       fi
+}
+
+check_version  2       20
+if ssh_version 1; then
+       check_version   2,1     199
+       check_version   1,2     199
+       check_version   1       15
+fi
diff --git a/regress/proxy-connect.sh b/regress/proxy-connect.sh
new file mode 100644 (file)
index 0000000..b7a43fa
--- /dev/null
@@ -0,0 +1,32 @@
+#      $OpenBSD: proxy-connect.sh,v 1.9 2016/02/17 02:24:17 djm Exp $
+#      Placed in the Public Domain.
+
+tid="proxy connect"
+
+mv $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
+
+for ps in no yes; do
+  cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
+  echo "UsePrivilegeSeparation $ps" >> $OBJ/sshd_proxy
+
+  for p in ${SSH_PROTOCOLS}; do
+    for c in no yes; do
+       verbose "plain username protocol $p privsep=$ps comp=$c"
+       opts="-$p -oCompression=$c -F $OBJ/ssh_proxy"
+       SSH_CONNECTION=`${SSH} $opts 999.999.999.999 'echo $SSH_CONNECTION'`
+       if [ $? -ne 0 ]; then
+               fail "ssh proxyconnect protocol $p privsep=$ps comp=$c failed"
+       fi
+       if [ "$SSH_CONNECTION" != "UNKNOWN 65535 UNKNOWN 65535" ]; then
+               fail "bad SSH_CONNECTION protocol $p privsep=$ps comp=$c: " \
+                   "$SSH_CONNECTION"
+       fi
+    done
+  done
+done
+
+for p in ${SSH_PROTOCOLS}; do
+       verbose "username with style protocol $p"
+       ${SSH} -$p -F $OBJ/ssh_proxy ${USER}:style@999.999.999.999 true || \
+               fail "ssh proxyconnect protocol $p failed"
+done
diff --git a/regress/putty-ciphers.sh b/regress/putty-ciphers.sh
new file mode 100644 (file)
index 0000000..9adba67
--- /dev/null
@@ -0,0 +1,26 @@
+#      $OpenBSD: putty-ciphers.sh,v 1.5 2016/11/25 03:02:01 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="putty ciphers"
+
+if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
+       echo "putty interop tests not enabled"
+       exit 0
+fi
+
+for c in aes blowfish 3des arcfour aes128-ctr aes192-ctr aes256-ctr ; do
+       verbose "$tid: cipher $c"
+       cp ${OBJ}/.putty/sessions/localhost_proxy \
+           ${OBJ}/.putty/sessions/cipher_$c
+       echo "Cipher=$c" >> ${OBJ}/.putty/sessions/cipher_$c
+
+       rm -f ${COPY}
+       env HOME=$PWD ${PLINK} -load cipher_$c -batch -i putty.rsa2 \
+           cat ${DATA} > ${COPY}
+       if [ $? -ne 0 ]; then
+               fail "ssh cat $DATA failed"
+       fi
+       cmp ${DATA} ${COPY}             || fail "corrupted copy"
+done
+rm -f ${COPY}
+
diff --git a/regress/putty-kex.sh b/regress/putty-kex.sh
new file mode 100644 (file)
index 0000000..9d3c6a9
--- /dev/null
@@ -0,0 +1,22 @@
+#      $OpenBSD: putty-kex.sh,v 1.4 2016/11/25 03:02:01 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="putty KEX"
+
+if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
+       echo "putty interop tests not enabled"
+       exit 0
+fi
+
+for k in dh-gex-sha1 dh-group1-sha1 dh-group14-sha1 ; do
+       verbose "$tid: kex $k"
+       cp ${OBJ}/.putty/sessions/localhost_proxy \
+           ${OBJ}/.putty/sessions/kex_$k
+       echo "KEX=$k" >> ${OBJ}/.putty/sessions/kex_$k
+
+       env HOME=$PWD ${PLINK} -load kex_$k -batch -i putty.rsa2 true
+       if [ $? -ne 0 ]; then
+               fail "KEX $k failed"
+       fi
+done
+
diff --git a/regress/putty-transfer.sh b/regress/putty-transfer.sh
new file mode 100644 (file)
index 0000000..8eb6ae0
--- /dev/null
@@ -0,0 +1,41 @@
+#      $OpenBSD: putty-transfer.sh,v 1.4 2016/11/25 03:02:01 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="putty transfer data"
+
+if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
+       echo "putty interop tests not enabled"
+       exit 0
+fi
+
+# XXX support protocol 1 too
+for p in 2; do
+       for c in 0 1 ; do 
+       verbose "$tid: proto $p compression $c"
+               rm -f ${COPY}
+               cp ${OBJ}/.putty/sessions/localhost_proxy \
+                   ${OBJ}/.putty/sessions/compression_$c
+               echo "Compression=$c" >> ${OBJ}/.putty/sessions/kex_$k
+               env HOME=$PWD ${PLINK} -load compression_$c -batch \
+                   -i putty.rsa$p cat ${DATA} > ${COPY}
+               if [ $? -ne 0 ]; then
+                       fail "ssh cat $DATA failed"
+               fi
+               cmp ${DATA} ${COPY}             || fail "corrupted copy"
+       
+               for s in 10 100 1k 32k 64k 128k 256k; do
+                       trace "proto $p compression $c dd-size ${s}"
+                       rm -f ${COPY}
+                       dd if=$DATA obs=${s} 2> /dev/null | \
+                               env HOME=$PWD ${PLINK} -load compression_$c \
+                                   -batch -i putty.rsa$p \
+                                   "cat > ${COPY}"
+                       if [ $? -ne 0 ]; then
+                               fail "ssh cat $DATA failed"
+                       fi
+                       cmp $DATA ${COPY}       || fail "corrupted copy"
+               done
+       done
+done
+rm -f ${COPY}
+
diff --git a/regress/reconfigure.sh b/regress/reconfigure.sh
new file mode 100644 (file)
index 0000000..eecddd3
--- /dev/null
@@ -0,0 +1,47 @@
+#      $OpenBSD: reconfigure.sh,v 1.5 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="simple connect after reconfigure"
+
+# we need the full path to sshd for -HUP
+if test "x$USE_VALGRIND" = "x" ; then
+       case $SSHD in
+       /*)
+               # full path is OK
+               ;;
+       *)
+               # otherwise make fully qualified
+               SSHD=$OBJ/$SSHD
+       esac
+fi
+
+start_sshd
+
+trace "connect before restart"
+for p in ${SSH_PROTOCOLS} ; do
+       ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh connect with protocol $p failed before reconfigure"
+       fi
+done
+
+PID=`$SUDO cat $PIDFILE`
+rm -f $PIDFILE
+$SUDO kill -HUP $PID
+
+trace "wait for sshd to restart"
+i=0;
+while [ ! -f $PIDFILE -a $i -lt 10 ]; do
+       i=`expr $i + 1`
+       sleep $i
+done
+
+test -f $PIDFILE || fatal "sshd did not restart"
+
+trace "connect after restart"
+for p in ${SSH_PROTOCOLS} ; do
+       ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh connect with protocol $p failed after reconfigure"
+       fi
+done
diff --git a/regress/reexec.sh b/regress/reexec.sh
new file mode 100644 (file)
index 0000000..72957d4
--- /dev/null
@@ -0,0 +1,70 @@
+#      $OpenBSD: reexec.sh,v 1.10 2016/12/16 01:06:27 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="reexec tests"
+
+SSHD_ORIG=$SSHD
+SSHD_COPY=$OBJ/sshd
+
+# Start a sshd and then delete it
+start_sshd_copy ()
+{
+       cp $SSHD_ORIG $SSHD_COPY
+       SSHD=$SSHD_COPY
+       start_sshd
+       SSHD=$SSHD_ORIG
+}
+
+# Do basic copy tests
+copy_tests ()
+{
+       rm -f ${COPY}
+       for p in ${SSH_PROTOCOLS} ; do
+               verbose "$tid: proto $p"
+               ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
+                   cat ${DATA} > ${COPY}
+               if [ $? -ne 0 ]; then
+                       fail "ssh cat $DATA failed"
+               fi
+               cmp ${DATA} ${COPY}             || fail "corrupted copy"
+               rm -f ${COPY}
+       done
+}
+
+verbose "test config passing"
+
+cp $OBJ/sshd_config $OBJ/sshd_config.orig
+start_sshd
+echo "InvalidXXX=no" >> $OBJ/sshd_config
+
+copy_tests
+
+stop_sshd
+
+cp $OBJ/sshd_config.orig $OBJ/sshd_config
+
+# cygwin can't fork a deleted binary
+if [ "$os" != "cygwin" ]; then
+
+verbose "test reexec fallback"
+
+start_sshd_copy
+rm -f $SSHD_COPY
+
+copy_tests
+
+stop_sshd
+
+verbose "test reexec fallback without privsep"
+
+cp $OBJ/sshd_config.orig $OBJ/sshd_config
+echo "UsePrivilegeSeparation=no" >> $OBJ/sshd_config
+
+start_sshd_copy
+rm -f $SSHD_COPY
+
+copy_tests
+
+stop_sshd
+
+fi
diff --git a/regress/rekey.sh b/regress/rekey.sh
new file mode 100644 (file)
index 0000000..ae145bc
--- /dev/null
@@ -0,0 +1,172 @@
+#      $OpenBSD: rekey.sh,v 1.17 2016/01/29 05:18:15 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="rekey"
+
+LOG=${TEST_SSH_LOGFILE}
+
+rm -f ${LOG}
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+
+# Test rekeying based on data volume only.
+# Arguments will be passed to ssh.
+ssh_data_rekeying()
+{
+       _kexopt=$1 ; shift
+       _opts="$@"
+       if ! test -z "$_kexopts" ; then
+               cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+               echo "$_kexopt" >> $OBJ/sshd_proxy
+               _opts="$_opts -o$_kexopt"
+       fi
+       rm -f ${COPY} ${LOG}
+       _opts="$_opts -oCompression=no"
+       ${SSH} <${DATA} $_opts -v -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
+       if [ $? -ne 0 ]; then
+               fail "ssh failed ($@)"
+       fi
+       cmp ${DATA} ${COPY}             || fail "corrupted copy ($@)"
+       n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
+       n=`expr $n - 1`
+       trace "$n rekeying(s)"
+       if [ $n -lt 1 ]; then
+               fail "no rekeying occured ($@)"
+       fi
+}
+
+increase_datafile_size 300
+
+opts=""
+for i in `${SSH} -Q kex`; do
+       opts="$opts KexAlgorithms=$i"
+done
+for i in `${SSH} -Q cipher`; do
+       opts="$opts Ciphers=$i"
+done
+for i in `${SSH} -Q mac`; do
+       opts="$opts MACs=$i"
+done
+
+for opt in $opts; do
+       verbose "client rekey $opt"
+       ssh_data_rekeying "$opt" -oRekeyLimit=256k
+done
+
+# AEAD ciphers are magical so test with all KexAlgorithms
+if ${SSH} -Q cipher-auth | grep '^.*$' >/dev/null 2>&1 ; then
+  for c in `${SSH} -Q cipher-auth`; do
+    for kex in `${SSH} -Q kex`; do
+       verbose "client rekey $c $kex"
+       ssh_data_rekeying "KexAlgorithms=$kex" -oRekeyLimit=256k -oCiphers=$c
+    done
+  done
+fi
+
+for s in 16 1k 128k 256k; do
+       verbose "client rekeylimit ${s}"
+       ssh_data_rekeying "" -oCompression=no -oRekeyLimit=$s
+done
+
+for s in 5 10; do
+       verbose "client rekeylimit default ${s}"
+       rm -f ${COPY} ${LOG}
+       ${SSH} < ${DATA} -oCompression=no -oRekeyLimit="default $s" -F \
+               $OBJ/ssh_proxy somehost "cat >${COPY};sleep $s;sleep 3"
+       if [ $? -ne 0 ]; then
+               fail "ssh failed"
+       fi
+       cmp ${DATA} ${COPY}             || fail "corrupted copy"
+       n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
+       n=`expr $n - 1`
+       trace "$n rekeying(s)"
+       if [ $n -lt 1 ]; then
+               fail "no rekeying occured"
+       fi
+done
+
+for s in 5 10; do
+       verbose "client rekeylimit default ${s} no data"
+       rm -f ${COPY} ${LOG}
+       ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \
+               $OBJ/ssh_proxy somehost "sleep $s;sleep 3"
+       if [ $? -ne 0 ]; then
+               fail "ssh failed"
+       fi
+       n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
+       n=`expr $n - 1`
+       trace "$n rekeying(s)"
+       if [ $n -lt 1 ]; then
+               fail "no rekeying occured"
+       fi
+done
+
+for s in 16 1k 128k 256k; do
+       verbose "server rekeylimit ${s}"
+       cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+       echo "rekeylimit ${s}" >>$OBJ/sshd_proxy
+       rm -f ${COPY} ${LOG}
+       ${SSH} -oCompression=no -F $OBJ/ssh_proxy somehost "cat ${DATA}" \
+           > ${COPY}
+       if [ $? -ne 0 ]; then
+               fail "ssh failed"
+       fi
+       cmp ${DATA} ${COPY}             || fail "corrupted copy"
+       n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
+       n=`expr $n - 1`
+       trace "$n rekeying(s)"
+       if [ $n -lt 1 ]; then
+               fail "no rekeying occured"
+       fi
+done
+
+for s in 5 10; do
+       verbose "server rekeylimit default ${s} no data"
+       cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+       echo "rekeylimit default ${s}" >>$OBJ/sshd_proxy
+       rm -f ${COPY} ${LOG}
+       ${SSH} -oCompression=no -F $OBJ/ssh_proxy somehost "sleep $s;sleep 3"
+       if [ $? -ne 0 ]; then
+               fail "ssh failed"
+       fi
+       n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
+       n=`expr $n - 1`
+       trace "$n rekeying(s)"
+       if [ $n -lt 1 ]; then
+               fail "no rekeying occured"
+       fi
+done
+
+verbose "rekeylimit parsing"
+for size in 16 1k 1K 1m 1M 1g 1G 4G 8G; do
+    for time in 1 1m 1M 1h 1H 1d 1D 1w 1W; do
+       case $size in
+               16)     bytes=16 ;;
+               1k|1K)  bytes=1024 ;;
+               1m|1M)  bytes=1048576 ;;
+               1g|1G)  bytes=1073741824 ;;
+               4g|4G)  bytes=4294967296 ;;
+               8g|8G)  bytes=8589934592 ;;
+       esac
+       case $time in
+               1)      seconds=1 ;;
+               1m|1M)  seconds=60 ;;
+               1h|1H)  seconds=3600 ;;
+               1d|1D)  seconds=86400 ;;
+               1w|1W)  seconds=604800 ;;
+       esac
+
+       b=`$SUDO ${SSHD} -T -o "rekeylimit $size $time" -f $OBJ/sshd_proxy | \
+           awk '/rekeylimit/{print $2}'`
+       s=`$SUDO ${SSHD} -T -o "rekeylimit $size $time" -f $OBJ/sshd_proxy | \
+           awk '/rekeylimit/{print $3}'`
+
+       if [ "$bytes" != "$b" ]; then
+               fatal "rekeylimit size: expected $bytes bytes got $b"
+       fi
+       if [ "$seconds" != "$s" ]; then
+               fatal "rekeylimit time: expected $time seconds got $s"
+       fi
+    done
+done
+
+rm -f ${COPY} ${DATA}
diff --git a/regress/rsa_openssh.prv b/regress/rsa_openssh.prv
new file mode 100644 (file)
index 0000000..2675555
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWgIBAAKBgQDsilwKcaKN6wSMNd1WgQ9+HRqQEkD0kCTVttrazGu0OhBU3Uko
++dFD1Ip0CxdXmN25JQWxOYF7h/Ocu8P3jzv3RTX87xKR0YzlXTLX+SLtF/ySebS3
+xWPrlfRUDhh03hR5V+8xxvvy9widPYKw/oItwGSueOsEq1LTczCDv2dAjQIDAQAB
+An8nH5VzvHkMbSqJ6eOYDsVwomRvYbH5IEaYl1x6VATITNvAu9kUdQ4NsSpuMc+7
+Jj9gKZvmO1y2YCKc0P/iO+i/eV0L+yQh1Rw18jQZll+12T+LZrKRav03YNvMx0gN
+wqWY48Kt6hv2/N/ebQzKRe79+D0t2cTh92hT7xENFLIBAkEBGnoGKFjAUkJCwO1V
+mzpUqMHpRZVOrqP9hUmPjzNJ5oBPFGe4+h1hoSRFOAzaNuZt8ssbqaLCkzB8bfzj
+qhZqAQJBANZekuUpp8iBLeLSagw5FkcPwPzq6zfExbhvsZXb8Bo/4SflNs4JHXwI
+7SD9Z8aJLvM4uQ/5M70lblDMQ40i3o0CQQDIJvBYBFL5tlOgakq/O7yi+wt0L5BZ
+9H79w5rCSAA0IHRoK/qI1urHiHC3f3vbbLk5UStfrqEaND/mm0shyNIBAkBLsYdC
+/ctt5Bc0wUGK4Vl5bBmj9LtrrMJ4FpBpLwj/69BwCuKoK9XKZ0h73p6XHveCEGRg
+PIlFX4MtaoLrwgU9AkBV2k4dgIws+X8YX65EsyyFjnlDqX4x0nSOjQB1msIKfHBr
+dh5XLDBTTCxnKhMJ0Yx/opgOvf09XHBFwaQntR5i
+-----END RSA PRIVATE KEY-----
diff --git a/regress/rsa_openssh.pub b/regress/rsa_openssh.pub
new file mode 100644 (file)
index 0000000..b504730
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDsilwKcaKN6wSMNd1WgQ9+HRqQEkD0kCTVttrazGu0OhBU3Uko+dFD1Ip0CxdXmN25JQWxOYF7h/Ocu8P3jzv3RTX87xKR0YzlXTLX+SLtF/ySebS3xWPrlfRUDhh03hR5V+8xxvvy9widPYKw/oItwGSueOsEq1LTczCDv2dAjQ==
diff --git a/regress/rsa_ssh2.prv b/regress/rsa_ssh2.prv
new file mode 100644 (file)
index 0000000..1ece3d7
--- /dev/null
@@ -0,0 +1,16 @@
+---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----
+Subject: ssh-keygen test
+Comment: "1024-bit rsa, Sat Jun 23 2001 12:21:26 -0400"
+P2/56wAAAi4AAAA3aWYtbW9kbntzaWdue3JzYS1wa2NzMS1zaGExfSxlbmNyeXB0e3JzYS
+1wa2NzMXYyLW9hZXB9fQAAAARub25lAAAB3wAAAdsAAAARAQABAAAD9icflXO8eQxtKonp
+45gOxXCiZG9hsfkgRpiXXHpUBMhM28C72RR1Dg2xKm4xz7smP2Apm+Y7XLZgIpzQ/+I76L
+95XQv7JCHVHDXyNBmWX7XZP4tmspFq/Tdg28zHSA3CpZjjwq3qG/b8395tDMpF7v34PS3Z
+xOH3aFPvEQ0UsgEAAAQA7IpcCnGijesEjDXdVoEPfh0akBJA9JAk1bba2sxrtDoQVN1JKP
+nRQ9SKdAsXV5jduSUFsTmBe4fznLvD948790U1/O8SkdGM5V0y1/ki7Rf8knm0t8Vj65X0
+VA4YdN4UeVfvMcb78vcInT2CsP6CLcBkrnjrBKtS03Mwg79nQI0AAAH/VdpOHYCMLPl/GF
++uRLMshY55Q6l+MdJ0jo0AdZrCCnxwa3YeVywwU0wsZyoTCdGMf6KYDr39PVxwRcGkJ7Ue
+YgAAAgDWXpLlKafIgS3i0moMORZHD8D86us3xMW4b7GV2/AaP+En5TbOCR18CO0g/WfGiS
+7zOLkP+TO9JW5QzEONIt6NAAACAQEaegYoWMBSQkLA7VWbOlSowelFlU6uo/2FSY+PM0nm
+gE8UZ7j6HWGhJEU4DNo25m3yyxuposKTMHxt/OOqFmoB
+---- END SSH2 ENCRYPTED PRIVATE KEY ----
+---
diff --git a/regress/scp-ssh-wrapper.sh b/regress/scp-ssh-wrapper.sh
new file mode 100644 (file)
index 0000000..59f1ff6
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+#       $OpenBSD: scp-ssh-wrapper.sh,v 1.3 2014/01/26 10:49:17 djm Exp $
+#       Placed in the Public Domain.
+
+printname () {
+       NAME=$1
+       save_IFS=$IFS
+       IFS=/
+       set -- `echo "$NAME"`
+       IFS="$save_IFS"
+       while [ $# -ge 1 ] ; do
+               if [ "x$1" != "x" ]; then
+                       echo "D0755 0 $1"
+               fi
+               shift;
+       done
+}
+
+# Discard all but last argument.  We use arg later.
+while test "x$1" != "x"; do
+       arg="$1"
+       shift
+done
+
+BAD="../../../../../../../../../../../../../${DIR}/dotpathdir"
+
+case "$SCPTESTMODE" in
+badserver_0)
+       echo "D0755 0 /${DIR}/rootpathdir"
+       echo "C755 2 rootpathfile"
+       echo "X"
+       ;;
+badserver_1)
+       echo "D0755 0 $BAD"
+       echo "C755 2 file"
+       echo "X"
+       ;;
+badserver_2)
+       echo "D0755 0 $BAD"
+       echo "C755 2 file"
+       echo "X"
+       ;;
+badserver_3)
+       printname $BAD
+       echo "C755 2 file"
+       echo "X"
+       ;;
+badserver_4)
+       printname $BAD
+       echo "D0755 0 .."
+       echo "C755 2 file"
+       echo "X"
+       ;;
+*)
+       set -- $arg
+       shift
+       exec $SCP "$@"
+       ;;
+esac
diff --git a/regress/scp.sh b/regress/scp.sh
new file mode 100644 (file)
index 0000000..57cc770
--- /dev/null
@@ -0,0 +1,126 @@
+#      $OpenBSD: scp.sh,v 1.10 2014/01/26 10:49:17 djm Exp $
+#      Placed in the Public Domain.
+
+tid="scp"
+
+#set -x
+
+# Figure out if diff understands "-N"
+if diff -N ${SRC}/scp.sh ${SRC}/scp.sh 2>/dev/null; then
+       DIFFOPT="-rN"
+else
+       DIFFOPT="-r"
+fi
+
+COPY2=${OBJ}/copy2
+DIR=${COPY}.dd
+DIR2=${COPY}.dd2
+
+SRC=`dirname ${SCRIPT}`
+cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
+chmod 755 ${OBJ}/scp-ssh-wrapper.scp
+scpopts="-q -S ${OBJ}/scp-ssh-wrapper.scp"
+export SCP # used in scp-ssh-wrapper.scp
+
+scpclean() {
+       rm -rf ${COPY} ${COPY2} ${DIR} ${DIR2}
+       mkdir ${DIR} ${DIR2}
+}
+
+verbose "$tid: simple copy local file to local file"
+scpclean
+$SCP $scpopts ${DATA} ${COPY} || fail "copy failed"
+cmp ${DATA} ${COPY} || fail "corrupted copy"
+
+verbose "$tid: simple copy local file to remote file"
+scpclean
+$SCP $scpopts ${DATA} somehost:${COPY} || fail "copy failed"
+cmp ${DATA} ${COPY} || fail "corrupted copy"
+
+verbose "$tid: simple copy remote file to local file"
+scpclean
+$SCP $scpopts somehost:${DATA} ${COPY} || fail "copy failed"
+cmp ${DATA} ${COPY} || fail "corrupted copy"
+
+verbose "$tid: simple copy local file to remote dir"
+scpclean
+cp ${DATA} ${COPY}
+$SCP $scpopts ${COPY} somehost:${DIR} || fail "copy failed"
+cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
+
+verbose "$tid: simple copy local file to local dir"
+scpclean
+cp ${DATA} ${COPY}
+$SCP $scpopts ${COPY} ${DIR} || fail "copy failed"
+cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
+
+verbose "$tid: simple copy remote file to local dir"
+scpclean
+cp ${DATA} ${COPY}
+$SCP $scpopts somehost:${COPY} ${DIR} || fail "copy failed"
+cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
+
+verbose "$tid: recursive local dir to remote dir"
+scpclean
+rm -rf ${DIR2}
+cp ${DATA} ${DIR}/copy
+$SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed"
+diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+
+verbose "$tid: recursive local dir to local dir"
+scpclean
+rm -rf ${DIR2}
+cp ${DATA} ${DIR}/copy
+$SCP $scpopts -r ${DIR} ${DIR2} || fail "copy failed"
+diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+
+verbose "$tid: recursive remote dir to local dir"
+scpclean
+rm -rf ${DIR2}
+cp ${DATA} ${DIR}/copy
+$SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed"
+diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+
+verbose "$tid: shell metacharacters"
+scpclean
+(cd ${DIR} && \
+touch '`touch metachartest`' && \
+$SCP $scpopts *metachar* ${DIR2} 2>/dev/null; \
+[ ! -f metachartest ] ) || fail "shell metacharacters"
+
+if [ ! -z "$SUDO" ]; then
+       verbose "$tid: skipped file after scp -p with failed chown+utimes"
+       scpclean
+       cp -p ${DATA} ${DIR}/copy
+       cp -p ${DATA} ${DIR}/copy2
+       cp ${DATA} ${DIR2}/copy
+       chmod 660 ${DIR2}/copy
+       $SUDO chown root ${DIR2}/copy
+       $SCP -p $scpopts somehost:${DIR}/\* ${DIR2} >/dev/null 2>&1
+       $SUDO diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+       $SUDO rm ${DIR2}/copy
+fi
+
+for i in 0 1 2 3 4; do
+       verbose "$tid: disallow bad server #$i"
+       SCPTESTMODE=badserver_$i
+       export DIR SCPTESTMODE
+       scpclean
+       $SCP $scpopts somehost:${DATA} ${DIR} >/dev/null 2>/dev/null
+       [ -d {$DIR}/rootpathdir ] && fail "allows dir relative to root dir"
+       [ -d ${DIR}/dotpathdir ] && fail "allows dir creation in non-recursive mode"
+
+       scpclean
+       $SCP -r $scpopts somehost:${DATA} ${DIR2} >/dev/null 2>/dev/null
+       [ -d ${DIR}/dotpathdir ] && fail "allows dir creation outside of subdir"
+done
+
+verbose "$tid: detect non-directory target"
+scpclean
+echo a > ${COPY}
+echo b > ${COPY2}
+$SCP $scpopts ${DATA} ${COPY} ${COPY2}
+cmp ${COPY} ${COPY2} >/dev/null && fail "corrupt target"
+
+scpclean
+rm -f ${OBJ}/scp-ssh-wrapper.scp
similarity index 52%
rename from roaming_dummy.c
rename to regress/setuid-allowed.c
index 837de69..7a0527f 100644 (file)
@@ -1,6 +1,5 @@
-/* $OpenBSD: roaming_dummy.c,v 1.4 2015/01/19 19:52:16 markus Exp $ */
 /*
- * Copyright (c) 2004-2009 AppGate Network Security AB
+ * Copyright (c) 2013 Damien Miller <djm@mindrot.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/*
- * This file is included in the client programs which should not
- * support roaming.
- */
+/* $OpenBSD$ */
 
 #include "includes.h"
 
 #include <sys/types.h>
-#include <unistd.h>
-
-#include "roaming.h"
-
-int resume_in_progress = 0;
-
-u_int64_t
-get_recv_bytes(void)
-{
-       return 0;
-}
-
-u_int64_t
-get_sent_bytes(void)
-{
-       return 0;
-}
-
-void
-roam_set_bytes(u_int64_t sent, u_int64_t recvd)
+#ifdef HAVE_SYS_STATVFS_H
+# include <sys/statvfs.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+static void
+usage(void)
 {
+       fprintf(stderr, "check-setuid [path]\n");
+       exit(1);
 }
 
-ssize_t
-roaming_write(int fd, const void *buf, size_t count, int *cont)
-{
-       return write(fd, buf, count);
-}
-
-ssize_t
-roaming_read(int fd, void *buf, size_t count, int *cont)
+int
+main(int argc, char **argv)
 {
-       if (cont)
-               *cont = 0;
-       return read(fd, buf, count);
+       const char *path = ".";
+       struct statvfs sb;
+
+       if (argc > 2)
+               usage();
+       else if (argc == 2)
+               path = argv[1];
+
+       if (statvfs(path, &sb) != 0) {
+               /* Don't return an error if the host doesn't support statvfs */
+               if (errno == ENOSYS)
+                       return 0;
+               fprintf(stderr, "statvfs for \"%s\" failed: %s\n",
+                    path, strerror(errno));
+       }
+       return (sb.f_flag & ST_NOSUID) ? 1 : 0;
 }
 
-void
-add_recv_bytes(u_int64_t num)
-{
-}
 
-int
-resume_kex(void)
-{
-       return 1;
-}
diff --git a/regress/sftp-badcmds.sh b/regress/sftp-badcmds.sh
new file mode 100644 (file)
index 0000000..7f85c4f
--- /dev/null
@@ -0,0 +1,65 @@
+#      $OpenBSD: sftp-badcmds.sh,v 1.6 2013/05/17 10:26:26 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="sftp invalid commands"
+
+DATA2=/bin/sh${EXEEXT}
+NONEXIST=/NONEXIST.$$
+GLOBFILES=`(cd /bin;echo l*)`
+
+rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd
+
+rm -f ${COPY}
+verbose "$tid: get nonexistent"
+echo "get $NONEXIST $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "get nonexistent failed"
+test -f ${COPY} && fail "existing copy after get nonexistent"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: glob get to nonexistent directory"
+echo "get /bin/l* $NONEXIST" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+        || fail "get nonexistent failed"
+for x in $GLOBFILES; do
+        test -f ${COPY}.dd/$x && fail "existing copy after get nonexistent"
+done
+
+rm -f ${COPY}
+verbose "$tid: put nonexistent"
+echo "put $NONEXIST $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "put nonexistent failed"
+test -f ${COPY} && fail "existing copy after put nonexistent"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: glob put to nonexistent directory"
+echo "put /bin/l* ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+        || fail "put nonexistent failed"
+for x in $GLOBFILES; do
+        test -f ${COPY}.dd/$x && fail "existing copy after nonexistent"
+done
+
+rm -f ${COPY}
+verbose "$tid: rename nonexistent"
+echo "rename $NONEXIST ${COPY}.1" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "rename nonexist failed"
+test -f ${COPY}.1 && fail "file exists after rename nonexistent"
+
+rm -rf ${COPY} ${COPY}.dd
+cp $DATA $COPY
+mkdir ${COPY}.dd
+verbose "$tid: rename target exists (directory)"
+echo "rename $COPY ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "rename target exists (directory) failed"
+test -f ${COPY} || fail "oldname missing after rename target exists (directory)"
+test -d ${COPY}.dd || fail "newname missing after rename target exists (directory)"
+cmp $DATA ${COPY} >/dev/null 2>&1 || fail "corrupted oldname after rename target exists (directory)"
+
+rm -f ${COPY}.dd/*
+rm -rf ${COPY}
+cp ${DATA2} ${COPY}
+verbose "$tid: glob put files to local file"
+echo "put /bin/l* $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 
+cmp ${DATA2} ${COPY} || fail "put successed when it should have failed"
+
+rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd
+
+
diff --git a/regress/sftp-batch.sh b/regress/sftp-batch.sh
new file mode 100644 (file)
index 0000000..4101154
--- /dev/null
@@ -0,0 +1,55 @@
+#      $OpenBSD: sftp-batch.sh,v 1.5 2013/05/17 04:29:14 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="sftp batchfile"
+
+BATCH=${OBJ}/sftp.bb
+
+rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.*
+
+cat << EOF > ${BATCH}.pass.1
+       get $DATA $COPY
+       put ${COPY} ${COPY}.1
+       rm ${COPY}
+       -put ${COPY} ${COPY}.2
+EOF
+
+cat << EOF > ${BATCH}.pass.2
+       # This is a comment
+
+       # That was a blank line
+       ls
+EOF
+
+cat << EOF > ${BATCH}.fail.1
+       get $DATA $COPY
+       put ${COPY} ${COPY}.3
+       rm ${COPY}.*
+       # The next command should fail
+       put ${COPY}.3 ${COPY}.4
+EOF
+
+cat << EOF > ${BATCH}.fail.2
+       # The next command should fail
+       jajajajaja
+EOF
+
+verbose "$tid: good commands"
+${SFTP} -b ${BATCH}.pass.1 -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "good commands failed"
+
+verbose "$tid: bad commands"
+${SFTP} -b ${BATCH}.fail.1 -D ${SFTPSERVER} >/dev/null 2>&1 \
+       && fail "bad commands succeeded"
+
+verbose "$tid: comments and blanks"
+${SFTP} -b ${BATCH}.pass.2 -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "comments & blanks failed"
+
+verbose "$tid: junk command"
+${SFTP} -b ${BATCH}.fail.2 -D ${SFTPSERVER} >/dev/null 2>&1 \
+       && fail "junk command succeeded"
+
+rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.*
+
+
diff --git a/regress/sftp-chroot.sh b/regress/sftp-chroot.sh
new file mode 100644 (file)
index 0000000..4ea2fce
--- /dev/null
@@ -0,0 +1,31 @@
+#      $OpenBSD: sftp-chroot.sh,v 1.5 2016/09/26 21:34:38 bluhm Exp $
+#      Placed in the Public Domain.
+
+tid="sftp in chroot"
+
+CHROOT=/var/run
+FILENAME=testdata_${USER}
+PRIVDATA=${CHROOT}/${FILENAME}
+
+if [ -z "$SUDO" -a ! -w /var/run ]; then
+  echo "skipped: need SUDO to create file in /var/run, test won't work without"
+  exit 0
+fi
+
+if ! $OBJ/check-perm -m chroot "$CHROOT" ; then
+  echo "skipped: $CHROOT is unsuitable as ChrootDirectory"
+  exit 0
+fi
+
+$SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \
+       fatal "create $PRIVDATA failed"
+
+start_sshd -oChrootDirectory=$CHROOT -oForceCommand="internal-sftp -d /"
+
+verbose "test $tid: get"
+${SFTP} -S "$SSH" -F $OBJ/ssh_config host:/${FILENAME} $COPY \
+    >>$TEST_REGRESS_LOGFILE 2>&1 || \
+       fatal "Fetch ${FILENAME} failed"
+cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ"
+
+$SUDO rm $PRIVDATA
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh
new file mode 100644 (file)
index 0000000..aad7fca
--- /dev/null
@@ -0,0 +1,232 @@
+#      $OpenBSD: sftp-cmds.sh,v 1.14 2013/06/21 02:26:26 djm Exp $
+#      Placed in the Public Domain.
+
+# XXX - TODO: 
+# - chmod / chown / chgrp
+# - -p flag for get & put
+
+tid="sftp commands"
+
+# test that these files are readable!
+for i in `(cd /bin;echo l*)`
+do
+       if [ -r $i ]; then
+               GLOBFILES="$GLOBFILES $i"
+       fi
+done
+
+# Path with embedded quote
+QUOTECOPY=${COPY}".\"blah\""
+QUOTECOPY_ARG=${COPY}'.\"blah\"'
+# File with spaces
+SPACECOPY="${COPY} this has spaces.txt"
+SPACECOPY_ARG="${COPY}\ this\ has\ spaces.txt"
+# File with glob metacharacters
+GLOBMETACOPY="${COPY} [metachar].txt"
+
+rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2
+mkdir ${COPY}.dd
+
+verbose "$tid: lls"
+(echo "lcd ${OBJ}" ; echo "lls") | ${SFTP} -D ${SFTPSERVER} 2>&1 | \
+       grep copy.dd >/dev/null 2>&1 || fail "lls failed"
+
+verbose "$tid: lls w/path"
+echo "lls ${OBJ}" | ${SFTP} -D ${SFTPSERVER} 2>&1 | \
+       grep copy.dd >/dev/null 2>&1 || fail "lls w/path failed"
+
+verbose "$tid: ls"
+echo "ls ${OBJ}" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "ls failed"
+# XXX always successful
+
+verbose "$tid: shell"
+echo "!echo hi there" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "shell failed"
+# XXX always successful
+
+verbose "$tid: pwd"
+echo "pwd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "pwd failed"
+# XXX always successful
+
+verbose "$tid: lpwd"
+echo "lpwd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "lpwd failed"
+# XXX always successful
+
+verbose "$tid: quit"
+echo "quit" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "quit failed"
+# XXX always successful
+
+verbose "$tid: help"
+echo "help" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "help failed"
+# XXX always successful
+
+rm -f ${COPY}
+verbose "$tid: get"
+echo "get $DATA $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "get failed"
+cmp $DATA ${COPY} || fail "corrupted copy after get"
+
+rm -f ${COPY}
+verbose "$tid: get quoted"
+echo "get \"$DATA\" $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "get failed"
+cmp $DATA ${COPY} || fail "corrupted copy after get"
+
+if [ "$os" != "cygwin" ]; then
+rm -f ${QUOTECOPY}
+cp $DATA ${QUOTECOPY}
+verbose "$tid: get filename with quotes"
+echo "get \"$QUOTECOPY_ARG\" ${COPY}" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "get failed"
+cmp ${COPY} ${QUOTECOPY} || fail "corrupted copy after get with quotes"
+rm -f ${QUOTECOPY} ${COPY}
+fi
+
+rm -f "$SPACECOPY" ${COPY}
+cp $DATA "$SPACECOPY"
+verbose "$tid: get filename with spaces"
+echo "get ${SPACECOPY_ARG} ${COPY}" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+        || fail "get failed"
+cmp ${COPY} "$SPACECOPY" || fail "corrupted copy after get with spaces"
+
+rm -f "$GLOBMETACOPY" ${COPY}
+cp $DATA "$GLOBMETACOPY"
+verbose "$tid: get filename with glob metacharacters"
+echo "get \"${GLOBMETACOPY}\" ${COPY}" | \
+       ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "get failed"
+cmp ${COPY} "$GLOBMETACOPY" || \
+       fail "corrupted copy after get with glob metacharacters"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: get to directory"
+echo "get $DATA ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+        || fail "get failed"
+cmp $DATA ${COPY}.dd/$DATANAME || fail "corrupted copy after get"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: glob get to directory"
+echo "get /bin/l* ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+        || fail "get failed"
+for x in $GLOBFILES; do
+        cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get"
+done
+
+rm -f ${COPY}.dd/*
+verbose "$tid: get to local dir"
+(echo "lcd ${COPY}.dd"; echo "get $DATA" ) | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+        || fail "get failed"
+cmp $DATA ${COPY}.dd/$DATANAME || fail "corrupted copy after get"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: glob get to local dir"
+(echo "lcd ${COPY}.dd"; echo "get /bin/l*") | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+        || fail "get failed"
+for x in $GLOBFILES; do
+        cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get"
+done
+
+rm -f ${COPY}
+verbose "$tid: put"
+echo "put $DATA $COPY" | \
+       ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
+cmp $DATA ${COPY} || fail "corrupted copy after put"
+
+if [ "$os" != "cygwin" ]; then
+rm -f ${QUOTECOPY}
+verbose "$tid: put filename with quotes"
+echo "put $DATA \"$QUOTECOPY_ARG\"" | \
+       ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
+cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes"
+fi
+
+rm -f "$SPACECOPY"
+verbose "$tid: put filename with spaces"
+echo "put $DATA ${SPACECOPY_ARG}" | \
+       ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
+cmp $DATA "$SPACECOPY" || fail "corrupted copy after put with spaces"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: put to directory"
+echo "put $DATA ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "put failed"
+cmp $DATA ${COPY}.dd/$DATANAME || fail "corrupted copy after put"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: glob put to directory"
+echo "put /bin/l? ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "put failed"
+for x in $GLOBFILES; do
+       cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put"
+done
+
+rm -f ${COPY}.dd/*
+verbose "$tid: put to local dir"
+(echo "cd ${COPY}.dd"; echo "put $DATA") | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "put failed"
+cmp $DATA ${COPY}.dd/$DATANAME || fail "corrupted copy after put"
+
+rm -f ${COPY}.dd/*
+verbose "$tid: glob put to local dir"
+(echo "cd ${COPY}.dd"; echo "put /bin/l?") | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "put failed"
+for x in $GLOBFILES; do
+        cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put"
+done
+
+verbose "$tid: rename"
+echo "rename $COPY ${COPY}.1" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "rename failed"
+test -f ${COPY}.1 || fail "missing file after rename"
+cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename"
+
+verbose "$tid: rename directory"
+echo "rename ${COPY}.dd ${COPY}.dd2" | \
+       ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || \
+       fail "rename directory failed"
+test -d ${COPY}.dd && fail "oldname exists after rename directory"
+test -d ${COPY}.dd2 || fail "missing newname after rename directory"
+
+verbose "$tid: ln"
+echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed"
+test -f ${COPY}.2 || fail "missing file after ln"
+cmp ${COPY}.1 ${COPY}.2 || fail "created file is not equal after ln"
+
+verbose "$tid: ln -s"
+rm -f ${COPY}.2
+echo "ln -s ${COPY}.1 ${COPY}.2" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "ln -s failed"
+test -h ${COPY}.2 || fail "missing file after ln -s"
+
+verbose "$tid: mkdir"
+echo "mkdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "mkdir failed"
+test -d ${COPY}.dd || fail "missing directory after mkdir"
+
+# XXX do more here
+verbose "$tid: chdir"
+echo "chdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "chdir failed"
+
+verbose "$tid: rmdir"
+echo "rmdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "rmdir failed"
+test -d ${COPY}.1 && fail "present directory after rmdir"
+
+verbose "$tid: lmkdir"
+echo "lmkdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "lmkdir failed"
+test -d ${COPY}.dd || fail "missing directory after lmkdir"
+
+# XXX do more here
+verbose "$tid: lchdir"
+echo "lchdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
+       || fail "lchdir failed"
+
+rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2
+rm -rf ${QUOTECOPY} "$SPACECOPY" "$GLOBMETACOPY"
+
+
diff --git a/regress/sftp-glob.sh b/regress/sftp-glob.sh
new file mode 100644 (file)
index 0000000..8d4df2c
--- /dev/null
@@ -0,0 +1,75 @@
+#      $OpenBSD: sftp-glob.sh,v 1.4 2009/08/13 01:11:55 djm Exp $
+#      Placed in the Public Domain.
+
+tid="sftp glob"
+
+config_defined FILESYSTEM_NO_BACKSLASH && nobs="not supported on this platform"
+
+sftp_ls() {
+       target=$1
+       errtag=$2
+       expected=$3
+       unexpected=$4
+       skip=$5
+       if test "x$skip" != "x" ; then
+               verbose "$tid: $errtag (skipped: $skip)"
+               return
+       fi
+       verbose "$tid: $errtag"
+       printf "ls -l %s" "${target}" | \
+               ${SFTP} -b - -D ${SFTPSERVER} 2>/dev/null | \
+               grep -v "^sftp>" > ${RESULTS}
+       if [ $? -ne 0 ]; then
+               fail "$errtag failed"
+       fi
+       if test "x$expected" != "x" ; then
+           if fgrep "$expected" ${RESULTS} >/dev/null 2>&1 ; then
+               :
+           else
+               fail "$expected missing from $errtag results"
+           fi
+       fi
+       if test "x$unexpected" != "x" && \
+          fgrep "$unexpected" ${RESULTS} >/dev/null 2>&1 ; then
+               fail "$unexpected present in $errtag results"
+       fi
+       rm -f ${RESULTS}
+}
+
+BASE=${OBJ}/glob
+RESULTS=${OBJ}/results
+DIR=${BASE}/dir
+DATA=${DIR}/file
+
+GLOB1="${DIR}/g-wild*"
+GLOB2="${DIR}/g-wildx"
+QUOTE="${DIR}/g-quote\""
+SLASH="${DIR}/g-sl\\ash"
+ESLASH="${DIR}/g-slash\\"
+QSLASH="${DIR}/g-qs\\\""
+SPACE="${DIR}/g-q space"
+
+rm -rf ${BASE}
+mkdir -p ${DIR}
+touch "${DATA}" "${GLOB1}" "${GLOB2}" "${QUOTE}" "${SPACE}"
+test "x$nobs" = "x" && touch "${QSLASH}" "${ESLASH}" "${SLASH}"
+
+#       target                   message                expected     unexpected
+sftp_ls "${DIR}/fil*"            "file glob"            "${DATA}"    ""
+sftp_ls "${BASE}/d*"             "dir glob"             "`basename ${DATA}`" ""
+sftp_ls "${DIR}/g-wild\"*\""     "quoted glob"          "g-wild*"    "g-wildx"
+sftp_ls "${DIR}/g-wild\*"        "escaped glob"         "g-wild*"    "g-wildx"
+sftp_ls "${DIR}/g-quote\\\""     "escaped quote"        "g-quote\""  ""
+sftp_ls "\"${DIR}/g-quote\\\"\"" "quoted quote"         "g-quote\""  ""
+sftp_ls "'${DIR}/g-quote\"'"     "single-quoted quote"  "g-quote\""  ""
+sftp_ls "${DIR}/g-q\\ space"     "escaped space"        "g-q space"  ""
+sftp_ls "'${DIR}/g-q space'"     "quoted space"         "g-q space"  ""
+sftp_ls "${DIR}/g-sl\\\\ash"     "escaped slash"        "g-sl\\ash"  "" "$nobs"
+sftp_ls "'${DIR}/g-sl\\\\ash'"   "quoted slash"         "g-sl\\ash"  "" "$nobs"
+sftp_ls "${DIR}/g-slash\\\\"     "escaped slash at EOL" "g-slash\\"  "" "$nobs"
+sftp_ls "'${DIR}/g-slash\\\\'"   "quoted slash at EOL"  "g-slash\\"  "" "$nobs"
+sftp_ls "${DIR}/g-qs\\\\\\\""    "escaped slash+quote"  "g-qs\\\""   "" "$nobs"
+sftp_ls "'${DIR}/g-qs\\\\\"'"    "quoted slash+quote"   "g-qs\\\""   "" "$nobs"
+
+rm -rf ${BASE}
+
diff --git a/regress/sftp-perm.sh b/regress/sftp-perm.sh
new file mode 100644 (file)
index 0000000..304ca0a
--- /dev/null
@@ -0,0 +1,269 @@
+#      $OpenBSD: sftp-perm.sh,v 1.2 2013/10/17 22:00:18 djm Exp $
+#      Placed in the Public Domain.
+
+tid="sftp permissions"
+
+SERVER_LOG=${OBJ}/sftp-server.log
+CLIENT_LOG=${OBJ}/sftp.log
+TEST_SFTP_SERVER=${OBJ}/sftp-server.sh
+
+prepare_server() {
+       printf "#!/bin/sh\nexec $SFTPSERVER -el debug3 $* 2>$SERVER_LOG\n" \
+       > $TEST_SFTP_SERVER
+       chmod a+x $TEST_SFTP_SERVER
+}
+
+run_client() {
+       echo "$@" | ${SFTP} -D ${TEST_SFTP_SERVER} -vvvb - >$CLIENT_LOG 2>&1
+}
+
+prepare_files() {
+       _prep="$1"
+       rm -f ${COPY} ${COPY}.1
+       test -d ${COPY}.dd && { rmdir ${COPY}.dd || fatal "rmdir ${COPY}.dd"; }
+       test -z "$_prep" && return
+       sh -c "$_prep" || fail "preparation failed: \"$_prep\""
+}
+
+postcondition() {
+       _title="$1"
+       _check="$2"
+       test -z "$_check" && return
+       ${TEST_SHELL} -c "$_check" || fail "postcondition check failed: $_title"
+}
+
+ro_test() {
+       _desc=$1
+       _cmd="$2"
+       _prep="$3"
+       _expect_success_post="$4"
+       _expect_fail_post="$5"
+       verbose "$tid: read-only $_desc"
+       # Plain (no options, mostly to test that _cmd is good)
+       prepare_files "$_prep"
+       prepare_server
+       run_client "$_cmd" || fail "plain $_desc failed"
+       postcondition "$_desc no-readonly" "$_expect_success_post"
+       # Read-only enabled
+       prepare_files "$_prep"
+       prepare_server -R
+       run_client "$_cmd" && fail "read-only $_desc succeeded"
+       postcondition "$_desc readonly" "$_expect_fail_post"
+}
+
+perm_test() {
+       _op=$1
+       _whitelist_ops=$2
+       _cmd="$3"
+       _prep="$4"
+       _expect_success_post="$5"
+       _expect_fail_post="$6"
+       verbose "$tid: explicit $_op"
+       # Plain (no options, mostly to test that _cmd is good)
+       prepare_files "$_prep"
+       prepare_server
+       run_client "$_cmd" || fail "plain $_op failed"
+       postcondition "$_op no white/blacklists" "$_expect_success_post"
+       # Whitelist
+       prepare_files "$_prep"
+       prepare_server -p $_op,$_whitelist_ops
+       run_client "$_cmd" || fail "whitelisted $_op failed"
+       postcondition "$_op whitelisted" "$_expect_success_post"
+       # Blacklist
+       prepare_files "$_prep"
+       prepare_server -P $_op
+       run_client "$_cmd" && fail "blacklisted $_op succeeded"
+       postcondition "$_op blacklisted" "$_expect_fail_post"
+       # Whitelist with op missing.
+       prepare_files "$_prep"
+       prepare_server -p $_whitelist_ops
+       run_client "$_cmd" && fail "no whitelist $_op succeeded"
+       postcondition "$_op not in whitelist" "$_expect_fail_post"
+}
+
+ro_test \
+       "upload" \
+       "put $DATA $COPY" \
+       "" \
+       "cmp $DATA $COPY" \
+       "test ! -f $COPY"
+
+ro_test \
+       "setstat" \
+       "chmod 0700 $COPY" \
+       "touch $COPY; chmod 0400 $COPY" \
+       "test -x $COPY" \
+       "test ! -x $COPY"
+
+ro_test \
+       "rm" \
+       "rm $COPY" \
+       "touch $COPY" \
+       "test ! -f $COPY" \
+       "test -f $COPY"
+
+ro_test \
+       "mkdir" \
+       "mkdir ${COPY}.dd" \
+       "" \
+       "test -d ${COPY}.dd" \
+       "test ! -d ${COPY}.dd"
+
+ro_test \
+       "rmdir" \
+       "rmdir ${COPY}.dd" \
+       "mkdir ${COPY}.dd" \
+       "test ! -d ${COPY}.dd" \
+       "test -d ${COPY}.dd"
+
+ro_test \
+       "posix-rename" \
+       "rename $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -f ${COPY}.1 -a ! -f $COPY" \
+       "test -f $COPY -a ! -f ${COPY}.1"
+
+ro_test \
+       "oldrename" \
+       "rename -l $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -f ${COPY}.1 -a ! -f $COPY" \
+       "test -f $COPY -a ! -f ${COPY}.1"
+
+ro_test \
+       "symlink" \
+       "ln -s $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -h ${COPY}.1" \
+       "test ! -h ${COPY}.1"
+
+ro_test \
+       "hardlink" \
+       "ln $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -f ${COPY}.1" \
+       "test ! -f ${COPY}.1"
+
+# Test explicit permissions
+
+perm_test \
+       "open" \
+       "realpath,stat,lstat,read,close" \
+       "get $DATA $COPY" \
+       "" \
+       "cmp $DATA $COPY" \
+       "! cmp $DATA $COPY 2>/dev/null"
+
+perm_test \
+       "read" \
+       "realpath,stat,lstat,open,close" \
+       "get $DATA $COPY" \
+       "" \
+       "cmp $DATA $COPY" \
+       "! cmp $DATA $COPY 2>/dev/null"
+
+perm_test \
+       "write" \
+       "realpath,stat,lstat,open,close" \
+       "put $DATA $COPY" \
+       "" \
+       "cmp $DATA $COPY" \
+       "! cmp $DATA $COPY 2>/dev/null"
+
+perm_test \
+       "lstat" \
+       "realpath,stat,open,read,close" \
+       "get $DATA $COPY" \
+       "" \
+       "cmp $DATA $COPY" \
+       "! cmp $DATA $COPY 2>/dev/null"
+
+perm_test \
+       "opendir" \
+       "realpath,readdir,stat,lstat" \
+       "ls -ln $OBJ"
+
+perm_test \
+       "readdir" \
+       "realpath,opendir,stat,lstat" \
+       "ls -ln $OBJ"
+
+perm_test \
+       "setstat" \
+       "realpath,stat,lstat" \
+       "chmod 0700 $COPY" \
+       "touch $COPY; chmod 0400 $COPY" \
+       "test -x $COPY" \
+       "test ! -x $COPY"
+
+perm_test \
+       "remove" \
+       "realpath,stat,lstat" \
+       "rm $COPY" \
+       "touch $COPY" \
+       "test ! -f $COPY" \
+       "test -f $COPY"
+
+perm_test \
+       "mkdir" \
+       "realpath,stat,lstat" \
+       "mkdir ${COPY}.dd" \
+       "" \
+       "test -d ${COPY}.dd" \
+       "test ! -d ${COPY}.dd"
+
+perm_test \
+       "rmdir" \
+       "realpath,stat,lstat" \
+       "rmdir ${COPY}.dd" \
+       "mkdir ${COPY}.dd" \
+       "test ! -d ${COPY}.dd" \
+       "test -d ${COPY}.dd"
+
+perm_test \
+       "posix-rename" \
+       "realpath,stat,lstat" \
+       "rename $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -f ${COPY}.1 -a ! -f $COPY" \
+       "test -f $COPY -a ! -f ${COPY}.1"
+
+perm_test \
+       "rename" \
+       "realpath,stat,lstat" \
+       "rename -l $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -f ${COPY}.1 -a ! -f $COPY" \
+       "test -f $COPY -a ! -f ${COPY}.1"
+
+perm_test \
+       "symlink" \
+       "realpath,stat,lstat" \
+       "ln -s $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -h ${COPY}.1" \
+       "test ! -h ${COPY}.1"
+
+perm_test \
+       "hardlink" \
+       "realpath,stat,lstat" \
+       "ln $COPY ${COPY}.1" \
+       "touch $COPY" \
+       "test -f ${COPY}.1" \
+       "test ! -f ${COPY}.1"
+
+perm_test \
+       "statvfs" \
+       "realpath,stat,lstat" \
+       "df /"
+
+# XXX need good tests for:
+# fstat
+# fsetstat
+# realpath
+# stat
+# readlink
+# fstatvfs
+
+rm -rf ${COPY} ${COPY}.1 ${COPY}.dd
+
diff --git a/regress/sftp.sh b/regress/sftp.sh
new file mode 100644 (file)
index 0000000..b8e9f75
--- /dev/null
@@ -0,0 +1,32 @@
+#      $OpenBSD: sftp.sh,v 1.5 2013/05/17 10:28:11 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="basic sftp put/get"
+
+SFTPCMDFILE=${OBJ}/batch
+cat >$SFTPCMDFILE <<EOF
+version
+get $DATA ${COPY}.1
+put $DATA ${COPY}.2
+EOF
+
+BUFFERSIZE="5 1000 32000 64000"
+REQUESTS="1 2 10"
+
+for B in ${BUFFERSIZE}; do
+       for R in ${REQUESTS}; do
+                verbose "test $tid: buffer_size $B num_requests $R"
+               rm -f ${COPY}.1 ${COPY}.2
+               ${SFTP} -D ${SFTPSERVER} -B $B -R $R -b $SFTPCMDFILE \
+               > /dev/null 2>&1
+               r=$?
+               if [ $r -ne 0 ]; then
+                       fail "sftp failed with $r"
+               else 
+                       cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
+                       cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
+               fi
+       done
+done
+rm -f ${COPY}.1 ${COPY}.2                
+rm -f $SFTPCMDFILE
diff --git a/regress/ssh-com-client.sh b/regress/ssh-com-client.sh
new file mode 100644 (file)
index 0000000..e4f80cf
--- /dev/null
@@ -0,0 +1,130 @@
+#      $OpenBSD: ssh-com-client.sh,v 1.7 2013/05/17 04:29:14 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="connect with ssh.com client"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.1.0
+       2.2.0
+       2.3.0
+       2.3.1
+       2.4.0
+       3.0.0
+       3.1.0
+       3.2.0
+       3.2.2
+       3.2.3
+       3.2.5
+       3.2.9
+       3.2.9.1
+       3.3.0"
+
+# 2.0.10 2.0.12 2.0.13 don't like the test setup
+
+# setup authorized keys
+SRC=`dirname ${SCRIPT}`
+cp ${SRC}/dsa_ssh2.prv ${OBJ}/id.com
+chmod 600 ${OBJ}/id.com
+${SSHKEYGEN} -i -f ${OBJ}/id.com       > $OBJ/id.openssh
+chmod 600 ${OBJ}/id.openssh
+${SSHKEYGEN} -y -f ${OBJ}/id.openssh   > $OBJ/authorized_keys_$USER
+${SSHKEYGEN} -e -f ${OBJ}/id.openssh   > $OBJ/id.com.pub
+echo IdKey ${OBJ}/id.com > ${OBJ}/id.list
+
+# we need a DSA host key
+t=dsa
+rm -f                             ${OBJ}/$t ${OBJ}/$t.pub
+${SSHKEYGEN} -q -N '' -t $t -f   ${OBJ}/$t
+$SUDO cp $OBJ/$t $OBJ/host.$t
+echo HostKey $OBJ/host.$t >> $OBJ/sshd_config
+
+# add hostkeys to known hosts
+mkdir -p ${OBJ}/${USER}/hostkeys
+HK=${OBJ}/${USER}/hostkeys/key_${PORT}_127.0.0.1
+${SSHKEYGEN} -e -f ${OBJ}/rsa.pub > ${HK}.ssh-rsa.pub
+${SSHKEYGEN} -e -f ${OBJ}/dsa.pub > ${HK}.ssh-dss.pub
+
+cat > ${OBJ}/ssh2_config << EOF
+*:
+       QuietMode                       yes
+       StrictHostKeyChecking           yes
+       Port                            ${PORT}
+       User                            ${USER}
+       Host                            127.0.0.1
+       IdentityFile                    ${OBJ}/id.list
+       RandomSeedFile                  ${OBJ}/random_seed
+        UserConfigDirectory             ${OBJ}/%U
+       AuthenticationSuccessMsg        no
+       BatchMode                       yes
+       ForwardX11                      no
+EOF
+
+# we need a real server (no ProxyConnect option)
+start_sshd
+
+# go for it
+for v in ${VERSIONS}; do
+       ssh2=${TEST_COMBASE}/${v}/ssh2
+       if [ ! -x ${ssh2} ]; then
+               continue
+       fi
+       verbose "ssh2 ${v}"
+       key=ssh-dss
+       skipcat=0
+        case $v in
+        2.1.*|2.3.0)
+                skipcat=1
+                ;;
+        3.0.*)
+                key=ssh-rsa
+                ;;
+        esac
+       cp ${HK}.$key.pub ${HK}.pub
+
+       # check exit status
+       ${ssh2} -q -F ${OBJ}/ssh2_config somehost exit 42
+       r=$?
+        if [ $r -ne 42 ]; then
+                fail "ssh2 ${v} exit code test failed (got $r, expected 42)"
+        fi
+
+       # data transfer
+       rm -f ${COPY}
+       ${ssh2} -F ${OBJ}/ssh2_config somehost cat ${DATA} > ${COPY}
+        if [ $? -ne 0 ]; then
+                fail "ssh2 ${v} cat test (receive) failed"
+        fi
+       cmp ${DATA} ${COPY}     || fail "ssh2 ${v} cat test (receive) data mismatch"
+
+       # data transfer, again
+       if [ $skipcat -eq 0 ]; then
+               rm -f ${COPY}
+               cat ${DATA} | \
+                       ${ssh2} -F ${OBJ}/ssh2_config host "cat > ${COPY}"
+               if [ $? -ne 0 ]; then
+                       fail "ssh2 ${v} cat test (send) failed"
+               fi
+               cmp ${DATA} ${COPY}     || \
+                       fail "ssh2 ${v} cat test (send) data mismatch"
+       fi
+
+       # no stderr after eof
+       rm -f ${COPY}
+       ${ssh2} -F ${OBJ}/ssh2_config somehost \
+               exec sh -c \'"exec > /dev/null; sleep 1; echo bla 1>&2; exit 0"\' \
+               2> /dev/null
+        if [ $? -ne 0 ]; then
+                fail "ssh2 ${v} stderr test failed"
+        fi
+done
+
+rm -rf ${OBJ}/${USER}
+for i in ssh2_config random_seed dsa.pub dsa host.dsa \
+    id.list id.com id.com.pub id.openssh; do
+       rm -f ${OBJ}/$i
+done
diff --git a/regress/ssh-com-keygen.sh b/regress/ssh-com-keygen.sh
new file mode 100644 (file)
index 0000000..29b02d9
--- /dev/null
@@ -0,0 +1,74 @@
+#      $OpenBSD: ssh-com-keygen.sh,v 1.4 2004/02/24 17:06:52 markus Exp $
+#      Placed in the Public Domain.
+
+tid="ssh.com key import"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.0.10
+       2.0.12
+       2.0.13
+       2.1.0
+       2.2.0
+       2.3.0
+       2.3.1
+       2.4.0
+       3.0.0
+       3.1.0
+       3.2.0
+       3.2.2
+       3.2.3
+       3.2.5
+       3.2.9
+       3.2.9.1
+       3.3.0"
+
+COMPRV=${OBJ}/comkey
+COMPUB=${COMPRV}.pub
+OPENSSHPRV=${OBJ}/opensshkey
+OPENSSHPUB=${OPENSSHPRV}.pub
+
+# go for it
+for v in ${VERSIONS}; do
+       keygen=${TEST_COMBASE}/${v}/ssh-keygen2
+       if [ ! -x ${keygen} ]; then
+               continue
+       fi
+       types="dss"
+        case $v in
+        2.3.1|3.*)
+                types="$types rsa"
+                ;;
+        esac
+       for t in $types; do
+               verbose "ssh-keygen $v/$t"
+               rm -f $COMPRV $COMPUB $OPENSSHPRV $OPENSSHPUB
+               ${keygen} -q -P -t $t ${COMPRV} > /dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "${keygen} -t $t failed"
+                       continue
+               fi
+               ${SSHKEYGEN} -if ${COMPUB} > ${OPENSSHPUB}
+               if [ $? -ne 0 ]; then
+                       fail "import public key ($v/$t) failed"
+                       continue
+               fi
+               ${SSHKEYGEN} -if ${COMPRV} > ${OPENSSHPRV}
+               if [ $? -ne 0 ]; then
+                       fail "import private key ($v/$t) failed"
+                       continue
+               fi
+               chmod 600 ${OPENSSHPRV}
+               ${SSHKEYGEN} -yf ${OPENSSHPRV} |\
+                       diff - ${OPENSSHPUB}
+               if [ $? -ne 0 ]; then
+                       fail "public keys ($v/$t) differ"
+               fi
+       done
+done
+
+rm -f $COMPRV $COMPUB $OPENSSHPRV $OPENSSHPUB
diff --git a/regress/ssh-com-sftp.sh b/regress/ssh-com-sftp.sh
new file mode 100644 (file)
index 0000000..fabfa49
--- /dev/null
@@ -0,0 +1,65 @@
+#      $OpenBSD: ssh-com-sftp.sh,v 1.7 2013/05/17 04:29:14 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="basic sftp put/get with ssh.com server"
+
+SFTPCMDFILE=${OBJ}/batch
+
+cat >$SFTPCMDFILE <<EOF
+version
+get $DATA ${COPY}.1
+put $DATA ${COPY}.2
+EOF
+
+BUFFERSIZE="5 1000 32000 64000"
+REQUESTS="1 2 10"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.0.10
+       2.0.12
+       2.0.13
+       2.1.0
+       2.2.0
+       2.3.0
+       2.3.1
+       2.4.0
+       3.0.0
+       3.1.0
+       3.2.0
+       3.2.2
+       3.2.3
+       3.2.5
+       3.2.9
+       3.2.9.1
+       3.3.0"
+
+# go for it
+for v in ${VERSIONS}; do
+       server=${TEST_COMBASE}/${v}/sftp-server2
+       if [ ! -x ${server} ]; then
+               continue
+       fi
+       verbose "sftp-server $v"
+       for B in ${BUFFERSIZE}; do
+               for R in ${REQUESTS}; do
+                       verbose "test $tid: buffer_size $B num_requests $R"
+                       rm -f ${COPY}.1 ${COPY}.2
+                       ${SFTP} -D ${server} -B $B -R $R -b $SFTPCMDFILE \
+                       > /dev/null 2>&1
+                       r=$?
+                       if [ $r -ne 0 ]; then
+                               fail "sftp failed with $r"
+                       else                                
+                               cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
+                               cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
+                       fi
+               done
+       done
+done
+rm -f ${COPY}.1 ${COPY}.2                
+rm -f $SFTPCMDFILE
diff --git a/regress/ssh-com.sh b/regress/ssh-com.sh
new file mode 100644 (file)
index 0000000..4371d52
--- /dev/null
@@ -0,0 +1,119 @@
+#      $OpenBSD: ssh-com.sh,v 1.9 2015/05/08 07:29:00 djm Exp $
+#      Placed in the Public Domain.
+
+tid="connect to ssh.com server"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.0.12
+       2.0.13
+       2.1.0
+       2.2.0
+       2.3.0
+       2.4.0
+       3.0.0
+       3.1.0
+       3.2.0
+       3.2.2
+       3.2.3
+       3.2.5
+       3.2.9
+       3.2.9.1
+       3.3.0"
+# 2.0.10 does not support UserConfigDirectory
+# 2.3.1 requires a config in $HOME/.ssh2
+
+SRC=`dirname ${SCRIPT}`
+
+# ssh.com
+cat << EOF > $OBJ/sshd2_config
+#*:
+       # Port and ListenAddress are not used.
+       QuietMode                       yes
+       Port                            4343
+       ListenAddress                   127.0.0.1
+       UserConfigDirectory             ${OBJ}/%U
+       Ciphers                         AnyCipher
+       PubKeyAuthentication            yes
+       #AllowedAuthentications         publickey
+       AuthorizationFile               authorization
+       HostKeyFile                     ${SRC}/dsa_ssh2.prv
+       PublicHostKeyFile               ${SRC}/dsa_ssh2.pub
+       RandomSeedFile                  ${OBJ}/random_seed
+       MaxConnections                  0
+       PermitRootLogin                 yes
+       VerboseMode                     no
+       CheckMail                       no
+       Ssh1Compatibility               no
+EOF
+
+# create client config
+sed "s/HostKeyAlias.*/HostKeyAlias ssh2-localhost-with-alias/" \
+       < $OBJ/ssh_config > $OBJ/ssh_config_com
+
+# we need a DSA key for
+rm -f                             ${OBJ}/dsa ${OBJ}/dsa.pub
+${SSHKEYGEN} -q -N '' -t dsa -f          ${OBJ}/dsa
+
+# setup userdir, try rsa first
+mkdir -p ${OBJ}/${USER}
+cp /dev/null ${OBJ}/${USER}/authorization
+for t in rsa dsa; do
+       ${SSHKEYGEN} -e -f ${OBJ}/$t.pub        >  ${OBJ}/${USER}/$t.com
+       echo Key $t.com                 >> ${OBJ}/${USER}/authorization
+       echo IdentityFile ${OBJ}/$t     >> ${OBJ}/ssh_config_com
+done
+
+# convert and append DSA hostkey
+(
+       printf 'ssh2-localhost-with-alias,127.0.0.1,::1 '
+       ${SSHKEYGEN} -if ${SRC}/dsa_ssh2.pub
+) >> $OBJ/known_hosts
+
+# go for it
+for v in ${VERSIONS}; do
+       sshd2=${TEST_COMBASE}/${v}/sshd2
+       if [ ! -x ${sshd2} ]; then
+               continue
+       fi
+       trace "sshd2 ${v}"
+       PROXY="proxycommand ${sshd2} -qif ${OBJ}/sshd2_config 2> /dev/null"
+       ${SSH} -qF ${OBJ}/ssh_config_com -o "${PROXY}" dummy exit 0
+        if [ $? -ne 0 ]; then
+                fail "ssh connect to sshd2 ${v} failed"
+        fi
+
+       ciphers="3des-cbc blowfish-cbc arcfour"
+       macs="hmac-md5"
+       case $v in
+       2.4.*)
+               ciphers="$ciphers cast128-cbc"
+               macs="$macs hmac-sha1 hmac-sha1-96 hmac-md5-96"
+               ;;
+       3.*)
+               ciphers="$ciphers aes128-cbc cast128-cbc"
+               macs="$macs hmac-sha1 hmac-sha1-96 hmac-md5-96"
+               ;;
+       esac
+       #ciphers="3des-cbc"
+       for m in $macs; do
+       for c in $ciphers; do
+               trace "sshd2 ${v} cipher $c mac $m"
+               verbose "test ${tid}: sshd2 ${v} cipher $c mac $m"
+               ${SSH} -c $c -m $m -qF ${OBJ}/ssh_config_com -o "${PROXY}" dummy exit 0
+               if [ $? -ne 0 ]; then
+                       fail "ssh connect to sshd2 ${v} with $c/$m failed"
+               fi
+       done
+       done
+done
+
+rm -rf ${OBJ}/${USER}
+for i in sshd_config_proxy ssh_config_proxy random_seed \
+       sshd2_config dsa.pub dsa ssh_config_com; do
+       rm -f ${OBJ}/$i
+done
diff --git a/regress/ssh2putty.sh b/regress/ssh2putty.sh
new file mode 100755 (executable)
index 0000000..bcf83af
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+#      $OpenBSD: ssh2putty.sh,v 1.3 2015/05/08 07:26:13 djm Exp $
+
+if test "x$1" = "x" -o "x$2" = "x" -o "x$3" = "x" ; then
+       echo "Usage: ssh2putty hostname port ssh-private-key"
+       exit 1
+fi
+
+HOST=$1
+PORT=$2
+KEYFILE=$3
+
+# XXX - support DSA keys too
+if grep "BEGIN RSA PRIVATE KEY" $KEYFILE >/dev/null 2>&1 ; then
+       :
+else
+       echo "Unsupported private key format"
+       exit 1
+fi
+
+public_exponent=`
+       openssl rsa -noout -text -in $KEYFILE | grep ^publicExponent |
+       sed 's/.*(//;s/).*//'
+`
+test $? -ne 0 && exit 1
+
+modulus=`
+       openssl rsa -noout -modulus -in $KEYFILE | grep ^Modulus= |
+       sed 's/^Modulus=/0x/' | tr A-Z a-z
+`
+test $? -ne 0 && exit 1
+
+echo "rsa2@$PORT:$HOST $public_exponent,$modulus"
+
diff --git a/regress/sshcfgparse.sh b/regress/sshcfgparse.sh
new file mode 100644 (file)
index 0000000..010e028
--- /dev/null
@@ -0,0 +1,29 @@
+#      $OpenBSD: sshcfgparse.sh,v 1.2 2016/07/14 01:24:21 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="ssh config parse"
+
+verbose "reparse minimal config"
+(${SSH} -G -F $OBJ/ssh_config somehost >$OBJ/ssh_config.1 &&
+ ${SSH} -G -F $OBJ/ssh_config.1 somehost >$OBJ/ssh_config.2 &&
+ diff $OBJ/ssh_config.1 $OBJ/ssh_config.2) || fail "reparse minimal config"
+
+verbose "ssh -W opts"
+f=`${SSH} -GF $OBJ/ssh_config host | awk '/exitonforwardfailure/{print $2}'`
+test "$f" = "no" || fail "exitonforwardfailure default"
+f=`${SSH} -GF $OBJ/ssh_config -W a:1 h | awk '/exitonforwardfailure/{print $2}'`
+test "$f" = "yes" || fail "exitonforwardfailure enable"
+f=`${SSH} -GF $OBJ/ssh_config -W a:1 -o exitonforwardfailure=no h | \
+    awk '/exitonforwardfailure/{print $2}'`
+test "$f" = "no" || fail "exitonforwardfailure override"
+
+f=`${SSH} -GF $OBJ/ssh_config host | awk '/clearallforwardings/{print $2}'`
+test "$f" = "no" || fail "clearallforwardings default"
+f=`${SSH} -GF $OBJ/ssh_config -W a:1 h | awk '/clearallforwardings/{print $2}'`
+test "$f" = "yes" || fail "clearallforwardings enable"
+f=`${SSH} -GF $OBJ/ssh_config -W a:1 -o clearallforwardings=no h | \
+    awk '/clearallforwardings/{print $2}'`
+test "$f" = "no" || fail "clearallforwardings override"
+
+# cleanup
+rm -f $OBJ/ssh_config.[012]
diff --git a/regress/sshd-log-wrapper.sh b/regress/sshd-log-wrapper.sh
new file mode 100644 (file)
index 0000000..c00934c
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+#       $OpenBSD: sshd-log-wrapper.sh,v 1.3 2013/04/07 02:16:03 dtucker Exp $
+#       Placed in the Public Domain.
+#
+# simple wrapper for sshd proxy mode to catch stderr output
+# sh sshd-log-wrapper.sh /path/to/logfile /path/to/sshd [args...]
+
+log=$1
+shift
+
+exec "$@" -E$log
diff --git a/regress/stderr-after-eof.sh b/regress/stderr-after-eof.sh
new file mode 100644 (file)
index 0000000..218ac6b
--- /dev/null
@@ -0,0 +1,24 @@
+#      $OpenBSD: stderr-after-eof.sh,v 1.2 2013/05/17 04:29:14 dtucker Exp $
+#      Placed in the Public Domain.
+
+tid="stderr data after eof"
+
+# setup data
+rm -f ${DATA} ${COPY}
+cp /dev/null ${DATA}
+for i in 1 2 3 4 5 6; do
+       (date;echo $i) | md5 >> ${DATA}
+done
+
+${SSH} -2 -F $OBJ/ssh_proxy otherhost \
+       exec sh -c \'"exec > /dev/null; sleep 2; cat ${DATA} 1>&2 $s"\' \
+       2> ${COPY}
+r=$?
+if [ $r -ne 0 ]; then
+       fail "ssh failed with exit code $r"
+fi
+egrep 'Disconnecting: Received extended_data after EOF' ${COPY} &&
+       fail "ext data received after eof"
+cmp ${DATA} ${COPY}    || fail "stderr corrupt"
+
+rm -f ${DATA} ${COPY}
diff --git a/regress/stderr-data.sh b/regress/stderr-data.sh
new file mode 100644 (file)
index 0000000..8c8149a
--- /dev/null
@@ -0,0 +1,29 @@
+#      $OpenBSD: stderr-data.sh,v 1.4 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="stderr data transfer"
+
+for n in '' -n; do
+for p in ${SSH_PROTOCOLS}; do
+       verbose "test $tid: proto $p ($n)"
+       ${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
+               exec sh -c \'"exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
+               2> ${COPY}
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh failed with exit code $r"
+       fi
+       cmp ${DATA} ${COPY}     || fail "stderr corrupt"
+       rm -f ${COPY}
+
+       ${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
+               exec sh -c \'"echo a; exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
+               > /dev/null 2> ${COPY}
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh failed with exit code $r"
+       fi
+       cmp ${DATA} ${COPY}     || fail "stderr corrupt"
+       rm -f ${COPY}
+done
+done
diff --git a/regress/t11.ok b/regress/t11.ok
new file mode 100644 (file)
index 0000000..1925bb4
--- /dev/null
@@ -0,0 +1 @@
+SHA256:4w1rnrek3klTJOTVhwuCIFd5k+pq9Bfo5KTxxb8BqbY
diff --git a/regress/t4.ok b/regress/t4.ok
new file mode 100644 (file)
index 0000000..4631ea8
--- /dev/null
@@ -0,0 +1 @@
+MD5:3b:dd:44:e9:49:18:84:95:f1:e7:33:6b:9d:93:b1:36
diff --git a/regress/t5.ok b/regress/t5.ok
new file mode 100644 (file)
index 0000000..bd622f3
--- /dev/null
@@ -0,0 +1 @@
+xokes-lylis-byleh-zebib-kalus-bihas-tevah-haroz-suhar-foved-noxex
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
new file mode 100644 (file)
index 0000000..dc033cd
--- /dev/null
@@ -0,0 +1,580 @@
+#      $OpenBSD: test-exec.sh,v 1.59 2017/02/07 23:03:11 dtucker Exp $
+#      Placed in the Public Domain.
+
+#SUDO=sudo
+
+# Unbreak GNU head(1)
+_POSIX2_VERSION=199209
+export _POSIX2_VERSION
+
+case `uname -s 2>/dev/null` in
+OSF1*)
+       BIN_SH=xpg4
+       export BIN_SH
+       ;;
+CYGWIN_NT-5.0)
+       os=cygwin
+       TEST_SSH_IPV6=no
+       ;;
+CYGWIN*)
+       os=cygwin
+       ;;
+esac
+
+if [ ! -z "$TEST_SSH_PORT" ]; then
+       PORT="$TEST_SSH_PORT"
+else
+       PORT=4242
+fi
+
+if [ -x /usr/ucb/whoami ]; then
+       USER=`/usr/ucb/whoami`
+elif whoami >/dev/null 2>&1; then
+       USER=`whoami`
+elif logname >/dev/null 2>&1; then
+       USER=`logname`
+else
+       USER=`id -un`
+fi
+
+OBJ=$1
+if [ "x$OBJ" = "x" ]; then
+       echo '$OBJ not defined'
+       exit 2
+fi
+if [ ! -d $OBJ ]; then
+       echo "not a directory: $OBJ"
+       exit 2
+fi
+SCRIPT=$2
+if [ "x$SCRIPT" = "x" ]; then
+       echo '$SCRIPT not defined'
+       exit 2
+fi
+if [ ! -f $SCRIPT ]; then
+       echo "not a file: $SCRIPT"
+       exit 2
+fi
+if $TEST_SHELL -n $SCRIPT; then
+       true
+else
+       echo "syntax error in $SCRIPT"
+       exit 2
+fi
+unset SSH_AUTH_SOCK
+
+SRC=`dirname ${SCRIPT}`
+
+# defaults
+SSH=ssh
+SSHD=sshd
+SSHAGENT=ssh-agent
+SSHADD=ssh-add
+SSHKEYGEN=ssh-keygen
+SSHKEYSCAN=ssh-keyscan
+SFTP=sftp
+SFTPSERVER=/usr/libexec/openssh/sftp-server
+SCP=scp
+
+# Interop testing
+PLINK=plink
+PUTTYGEN=puttygen
+CONCH=conch
+
+if [ "x$TEST_SSH_SSH" != "x" ]; then
+       SSH="${TEST_SSH_SSH}"
+fi
+if [ "x$TEST_SSH_SSHD" != "x" ]; then
+       SSHD="${TEST_SSH_SSHD}"
+fi
+if [ "x$TEST_SSH_SSHAGENT" != "x" ]; then
+       SSHAGENT="${TEST_SSH_SSHAGENT}"
+fi
+if [ "x$TEST_SSH_SSHADD" != "x" ]; then
+       SSHADD="${TEST_SSH_SSHADD}"
+fi
+if [ "x$TEST_SSH_SSHKEYGEN" != "x" ]; then
+       SSHKEYGEN="${TEST_SSH_SSHKEYGEN}"
+fi
+if [ "x$TEST_SSH_SSHKEYSCAN" != "x" ]; then
+       SSHKEYSCAN="${TEST_SSH_SSHKEYSCAN}"
+fi
+if [ "x$TEST_SSH_SFTP" != "x" ]; then
+       SFTP="${TEST_SSH_SFTP}"
+fi
+if [ "x$TEST_SSH_SFTPSERVER" != "x" ]; then
+       SFTPSERVER="${TEST_SSH_SFTPSERVER}"
+fi
+if [ "x$TEST_SSH_SCP" != "x" ]; then
+       SCP="${TEST_SSH_SCP}"
+fi
+if [ "x$TEST_SSH_PLINK" != "x" ]; then
+       # Find real binary, if it exists
+       case "${TEST_SSH_PLINK}" in
+       /*) PLINK="${TEST_SSH_PLINK}" ;;
+       *) PLINK=`which ${TEST_SSH_PLINK} 2>/dev/null` ;;
+       esac
+fi
+if [ "x$TEST_SSH_PUTTYGEN" != "x" ]; then
+       # Find real binary, if it exists
+       case "${TEST_SSH_PUTTYGEN}" in
+       /*) PUTTYGEN="${TEST_SSH_PUTTYGEN}" ;;
+       *) PUTTYGEN=`which ${TEST_SSH_PUTTYGEN} 2>/dev/null` ;;
+       esac
+fi
+if [ "x$TEST_SSH_CONCH" != "x" ]; then
+       # Find real binary, if it exists
+       case "${TEST_SSH_CONCH}" in
+       /*) CONCH="${TEST_SSH_CONCH}" ;;
+       *) CONCH=`which ${TEST_SSH_CONCH} 2>/dev/null` ;;
+       esac
+fi
+
+SSH_PROTOCOLS=2
+#SSH_PROTOCOLS=`$SSH -Q protocol-version`
+if [ "x$TEST_SSH_PROTOCOLS" != "x" ]; then
+       SSH_PROTOCOLS="${TEST_SSH_PROTOCOLS}"
+fi
+
+# Path to sshd must be absolute for rexec
+case "$SSHD" in
+/*) ;;
+*) SSHD=`which $SSHD` ;;
+esac
+
+case "$SSHAGENT" in
+/*) ;;
+*) SSHAGENT=`which $SSHAGENT` ;;
+esac
+
+# Record the actual binaries used.
+SSH_BIN=${SSH}
+SSHD_BIN=${SSHD}
+SSHAGENT_BIN=${SSHAGENT}
+SSHADD_BIN=${SSHADD}
+SSHKEYGEN_BIN=${SSHKEYGEN}
+SSHKEYSCAN_BIN=${SSHKEYSCAN}
+SFTP_BIN=${SFTP}
+SFTPSERVER_BIN=${SFTPSERVER}
+SCP_BIN=${SCP}
+
+if [ "x$USE_VALGRIND" != "x" ]; then
+       mkdir -p $OBJ/valgrind-out
+       VG_TEST=`basename $SCRIPT .sh`
+
+       # Some tests are difficult to fix.
+       case "$VG_TEST" in
+       connect-privsep|reexec)
+               VG_SKIP=1 ;;
+       esac
+
+       if [ x"$VG_SKIP" = "x" ]; then
+               VG_IGNORE="/bin/*,/sbin/*,/usr/*,/var/*"
+               VG_LOG="$OBJ/valgrind-out/${VG_TEST}."
+               VG_OPTS="--track-origins=yes --leak-check=full"
+               VG_OPTS="$VG_OPTS --trace-children=yes"
+               VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}"
+               VG_PATH="valgrind"
+               if [ "x$VALGRIND_PATH" != "x" ]; then
+                       VG_PATH="$VALGRIND_PATH"
+               fi
+               VG="$VG_PATH $VG_OPTS"
+               SSH="$VG --log-file=${VG_LOG}ssh.%p $SSH"
+               SSHD="$VG --log-file=${VG_LOG}sshd.%p $SSHD"
+               SSHAGENT="$VG --log-file=${VG_LOG}ssh-agent.%p $SSHAGENT"
+               SSHADD="$VG --log-file=${VG_LOG}ssh-add.%p $SSHADD"
+               SSHKEYGEN="$VG --log-file=${VG_LOG}ssh-keygen.%p $SSHKEYGEN"
+               SSHKEYSCAN="$VG --log-file=${VG_LOG}ssh-keyscan.%p $SSHKEYSCAN"
+               SFTP="$VG --log-file=${VG_LOG}sftp.%p ${SFTP}"
+               SCP="$VG --log-file=${VG_LOG}scp.%p $SCP"
+               cat > $OBJ/valgrind-sftp-server.sh << EOF
+#!/bin/sh
+exec $VG --log-file=${VG_LOG}sftp-server.%p $SFTPSERVER "\$@"
+EOF
+               chmod a+rx $OBJ/valgrind-sftp-server.sh
+               SFTPSERVER="$OBJ/valgrind-sftp-server.sh"
+       fi
+fi
+
+# Logfiles.
+# SSH_LOGFILE should be the debug output of ssh(1) only
+# SSHD_LOGFILE should be the debug output of sshd(8) only
+# REGRESS_LOGFILE is the output of the test itself stdout and stderr
+if [ "x$TEST_SSH_LOGFILE" = "x" ]; then
+       TEST_SSH_LOGFILE=$OBJ/ssh.log
+fi
+if [ "x$TEST_SSHD_LOGFILE" = "x" ]; then
+       TEST_SSHD_LOGFILE=$OBJ/sshd.log
+fi
+if [ "x$TEST_REGRESS_LOGFILE" = "x" ]; then
+       TEST_REGRESS_LOGFILE=$OBJ/regress.log
+fi
+
+# truncate logfiles
+>$TEST_SSH_LOGFILE
+>$TEST_SSHD_LOGFILE
+>$TEST_REGRESS_LOGFILE
+
+# Create wrapper ssh with logging.  We can't just specify "SSH=ssh -E..."
+# because sftp and scp don't handle spaces in arguments.
+SSHLOGWRAP=$OBJ/ssh-log-wrapper.sh
+echo "#!/bin/sh" > $SSHLOGWRAP
+echo "exec ${SSH} -E${TEST_SSH_LOGFILE} "'"$@"' >>$SSHLOGWRAP
+
+chmod a+rx $OBJ/ssh-log-wrapper.sh
+REAL_SSH="$SSH"
+SSH="$SSHLOGWRAP"
+
+# Some test data.  We make a copy because some tests will overwrite it.
+# The tests may assume that $DATA exists and is writable and $COPY does
+# not exist.  Tests requiring larger data files can call increase_datafile_size
+# [kbytes] to ensure the file is at least that large.
+DATANAME=data
+DATA=$OBJ/${DATANAME}
+cat ${SSHAGENT_BIN} >${DATA}
+chmod u+w ${DATA}
+COPY=$OBJ/copy
+rm -f ${COPY}
+
+increase_datafile_size()
+{
+       while [ `du -k ${DATA} | cut -f1` -lt $1 ]; do
+               cat ${SSHAGENT_BIN} >>${DATA}
+       done
+}
+
+# these should be used in tests
+export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP
+#echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP
+
+# Portable specific functions
+have_prog()
+{
+       saved_IFS="$IFS"
+       IFS=":"
+       for i in $PATH
+       do
+               if [ -x $i/$1 ]; then
+                       IFS="$saved_IFS"
+                       return 0
+               fi
+       done
+       IFS="$saved_IFS"
+       return 1
+}
+
+jot() {
+       awk "BEGIN { for (i = $2; i < $2 + $1; i++) { printf \"%d\n\", i } exit }"
+}
+
+# Check whether preprocessor symbols are defined in config.h.
+config_defined ()
+{
+       str=$1
+       while test "x$2" != "x" ; do
+               str="$str|$2"
+               shift
+       done
+       egrep "^#define.*($str)" ${BUILDDIR}/config.h >/dev/null 2>&1
+}
+
+md5 () {
+       if have_prog md5sum; then
+               md5sum
+       elif have_prog openssl; then
+               openssl md5
+       elif have_prog cksum; then
+               cksum
+       elif have_prog sum; then
+               sum
+       else
+               wc -c
+       fi
+}
+# End of portable specific functions
+
+stop_sshd ()
+{
+       if [ -f $PIDFILE ]; then
+               pid=`$SUDO cat $PIDFILE`
+               if [ "X$pid" = "X" ]; then
+                       echo no sshd running
+               else
+                       if [ $pid -lt 2 ]; then
+                               echo bad pid for sshd: $pid
+                       else
+                               $SUDO kill $pid
+                               trace "wait for sshd to exit"
+                               i=0;
+                               while [ -f $PIDFILE -a $i -lt 5 ]; do
+                                       i=`expr $i + 1`
+                                       sleep $i
+                               done
+                               test -f $PIDFILE && \
+                                   fatal "sshd didn't exit port $PORT pid $pid"
+                       fi
+               fi
+       fi
+}
+
+# helper
+cleanup ()
+{
+       if [ "x$SSH_PID" != "x" ]; then
+               if [ $SSH_PID -lt 2 ]; then
+                       echo bad pid for ssh: $SSH_PID
+               else
+                       kill $SSH_PID
+               fi
+       fi
+       stop_sshd
+}
+
+start_debug_log ()
+{
+       echo "trace: $@" >$TEST_REGRESS_LOGFILE
+       echo "trace: $@" >$TEST_SSH_LOGFILE
+       echo "trace: $@" >$TEST_SSHD_LOGFILE
+}
+
+save_debug_log ()
+{
+       echo $@ >>$TEST_REGRESS_LOGFILE
+       echo $@ >>$TEST_SSH_LOGFILE
+       echo $@ >>$TEST_SSHD_LOGFILE
+       (cat $TEST_REGRESS_LOGFILE; echo) >>$OBJ/failed-regress.log
+       (cat $TEST_SSH_LOGFILE; echo) >>$OBJ/failed-ssh.log
+       (cat $TEST_SSHD_LOGFILE; echo) >>$OBJ/failed-sshd.log
+}
+
+trace ()
+{
+       start_debug_log $@
+       if [ "X$TEST_SSH_TRACE" = "Xyes" ]; then
+               echo "$@"
+       fi
+}
+
+verbose ()
+{
+       start_debug_log $@
+       if [ "X$TEST_SSH_QUIET" != "Xyes" ]; then
+               echo "$@"
+       fi
+}
+
+warn ()
+{
+       echo "WARNING: $@" >>$TEST_SSH_LOGFILE
+       echo "WARNING: $@"
+}
+
+fail ()
+{
+       save_debug_log "FAIL: $@"
+       RESULT=1
+       echo "$@"
+
+}
+
+fatal ()
+{
+       save_debug_log "FATAL: $@"
+       printf "FATAL: "
+       fail "$@"
+       cleanup
+       exit $RESULT
+}
+
+ssh_version ()
+{
+       echo ${SSH_PROTOCOLS} | grep "$1" >/dev/null
+}
+
+RESULT=0
+PIDFILE=$OBJ/pidfile
+
+trap fatal 3 2
+
+if ssh_version 1; then
+       PROTO="2,1"
+else
+       PROTO="2"
+fi
+
+# create server config
+cat << EOF > $OBJ/sshd_config
+       StrictModes             no
+       Port                    $PORT
+       AddressFamily           inet
+       ListenAddress           127.0.0.1
+       #ListenAddress          ::1
+       PidFile                 $PIDFILE
+       AuthorizedKeysFile      $OBJ/authorized_keys_%u
+       LogLevel                DEBUG3
+       AcceptEnv               _XXX_TEST_*
+       AcceptEnv               _XXX_TEST
+       Subsystem       sftp    $SFTPSERVER
+EOF
+
+# This may be necessary if /usr/src and/or /usr/obj are group-writable,
+# but if you aren't careful with permissions then the unit tests could
+# be abused to locally escalate privileges.
+if [ ! -z "$TEST_SSH_UNSAFE_PERMISSIONS" ]; then
+       echo "StrictModes no" >> $OBJ/sshd_config
+fi
+
+if [ ! -z "$TEST_SSH_SSHD_CONFOPTS" ]; then
+       trace "adding sshd_config option $TEST_SSH_SSHD_CONFOPTS"
+       echo "$TEST_SSH_SSHD_CONFOPTS" >> $OBJ/sshd_config
+fi
+
+# server config for proxy connects
+cp $OBJ/sshd_config $OBJ/sshd_proxy
+
+# allow group-writable directories in proxy-mode
+echo 'StrictModes no' >> $OBJ/sshd_proxy
+
+# create client config
+cat << EOF > $OBJ/ssh_config
+Host *
+       Hostname                127.0.0.1
+       HostKeyAlias            localhost-with-alias
+       Port                    $PORT
+       User                    $USER
+       GlobalKnownHostsFile    $OBJ/known_hosts
+       UserKnownHostsFile      $OBJ/known_hosts
+       PubkeyAuthentication    yes
+       ChallengeResponseAuthentication no
+       HostbasedAuthentication no
+       PasswordAuthentication  no
+       BatchMode               yes
+       StrictHostKeyChecking   yes
+       LogLevel                DEBUG3
+EOF
+
+if [ ! -z "$TEST_SSH_SSH_CONFOPTS" ]; then
+       trace "adding ssh_config option $TEST_SSH_SSH_CONFOPTS"
+       echo "$TEST_SSH_SSH_CONFOPTS" >> $OBJ/ssh_config
+fi
+
+rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER
+
+if ssh_version 1; then
+       SSH_KEYTYPES="rsa rsa1"
+else
+       SSH_KEYTYPES="rsa ed25519"
+fi
+trace "generate keys"
+for t in ${SSH_KEYTYPES}; do
+       # generate user key
+       if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN_BIN} -nt $OBJ/$t ]; then
+               rm -f $OBJ/$t
+               ${SSHKEYGEN} -q -N '' -t $t  -f $OBJ/$t ||\
+                       fail "ssh-keygen for $t failed"
+       fi
+
+       # known hosts file for client
+       (
+               printf 'localhost-with-alias,127.0.0.1,::1 '
+               cat $OBJ/$t.pub
+       ) >> $OBJ/known_hosts
+
+       # setup authorized keys
+       cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER
+       echo IdentityFile $OBJ/$t >> $OBJ/ssh_config
+
+       # use key as host key, too
+       $SUDO cp $OBJ/$t $OBJ/host.$t
+       echo HostKey $OBJ/host.$t >> $OBJ/sshd_config
+
+       # don't use SUDO for proxy connect
+       echo HostKey $OBJ/$t >> $OBJ/sshd_proxy
+done
+chmod 644 $OBJ/authorized_keys_$USER
+
+# Activate Twisted Conch tests if the binary is present
+REGRESS_INTEROP_CONCH=no
+if test -x "$CONCH" ; then
+       REGRESS_INTEROP_CONCH=yes
+fi
+
+# If PuTTY is present and we are running a PuTTY test, prepare keys and
+# configuration
+REGRESS_INTEROP_PUTTY=no
+if test -x "$PUTTYGEN" -a -x "$PLINK" ; then
+       REGRESS_INTEROP_PUTTY=yes
+fi
+case "$SCRIPT" in
+*putty*)       ;;
+*)             REGRESS_INTEROP_PUTTY=no ;;
+esac
+
+if test "$REGRESS_INTEROP_PUTTY" = "yes" ; then
+       mkdir -p ${OBJ}/.putty
+
+       # Add a PuTTY key to authorized_keys
+       rm -f ${OBJ}/putty.rsa2
+       if ! puttygen -t rsa -o ${OBJ}/putty.rsa2 \
+           --new-passphrase /dev/null < /dev/null > /dev/null; then
+               echo "Your installed version of PuTTY is too old to support --new-passphrase; trying without (may require manual interaction) ..." >&2
+               puttygen -t rsa -o ${OBJ}/putty.rsa2 < /dev/null > /dev/null
+       fi
+       puttygen -O public-openssh ${OBJ}/putty.rsa2 \
+           >> $OBJ/authorized_keys_$USER
+
+       # Convert rsa2 host key to PuTTY format
+       ${SRC}/ssh2putty.sh 127.0.0.1 $PORT $OBJ/rsa > \
+           ${OBJ}/.putty/sshhostkeys
+       ${SRC}/ssh2putty.sh 127.0.0.1 22 $OBJ/rsa >> \
+           ${OBJ}/.putty/sshhostkeys
+
+       # Setup proxied session
+       mkdir -p ${OBJ}/.putty/sessions
+       rm -f ${OBJ}/.putty/sessions/localhost_proxy
+       echo "Protocol=ssh" >> ${OBJ}/.putty/sessions/localhost_proxy
+       echo "HostName=127.0.0.1" >> ${OBJ}/.putty/sessions/localhost_proxy
+       echo "PortNumber=$PORT" >> ${OBJ}/.putty/sessions/localhost_proxy
+       echo "ProxyMethod=5" >> ${OBJ}/.putty/sessions/localhost_proxy
+       echo "ProxyTelnetCommand=sh ${SRC}/sshd-log-wrapper.sh ${TEST_SSHD_LOGFILE} ${SSHD} -i -f $OBJ/sshd_proxy" >> ${OBJ}/.putty/sessions/localhost_proxy
+       echo "ProxyLocalhost=1" >> ${OBJ}/.putty/sessions/localhost_proxy
+
+       REGRESS_INTEROP_PUTTY=yes
+fi
+
+# create a proxy version of the client config
+(
+       cat $OBJ/ssh_config
+       echo proxycommand ${SUDO} sh ${SRC}/sshd-log-wrapper.sh ${TEST_SSHD_LOGFILE} ${SSHD} -i -f $OBJ/sshd_proxy
+) > $OBJ/ssh_proxy
+
+# check proxy config
+${SSHD} -t -f $OBJ/sshd_proxy  || fatal "sshd_proxy broken"
+
+start_sshd ()
+{
+       # start sshd
+       $SUDO ${SSHD} -f $OBJ/sshd_config "$@" -t || fatal "sshd_config broken"
+       $SUDO ${SSHD} -f $OBJ/sshd_config "$@" -E$TEST_SSHD_LOGFILE
+
+       trace "wait for sshd"
+       i=0;
+       while [ ! -f $PIDFILE -a $i -lt 10 ]; do
+               i=`expr $i + 1`
+               sleep $i
+       done
+
+       test -f $PIDFILE || fatal "no sshd running on port $PORT"
+}
+
+# source test body
+. $SCRIPT
+
+# kill sshd
+cleanup
+if [ $RESULT -eq 0 ]; then
+       verbose ok $tid
+else
+       echo failed $tid
+fi
+exit $RESULT
diff --git a/regress/transfer.sh b/regress/transfer.sh
new file mode 100644 (file)
index 0000000..36c1463
--- /dev/null
@@ -0,0 +1,26 @@
+#      $OpenBSD: transfer.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="transfer data"
+
+for p in ${SSH_PROTOCOLS}; do
+       verbose "$tid: proto $p"
+       rm -f ${COPY}
+       ${SSH} -n -q -$p -F $OBJ/ssh_proxy somehost cat ${DATA} > ${COPY}
+       if [ $? -ne 0 ]; then
+               fail "ssh cat $DATA failed"
+       fi
+       cmp ${DATA} ${COPY}             || fail "corrupted copy"
+
+       for s in 10 100 1k 32k 64k 128k 256k; do
+               trace "proto $p dd-size ${s}"
+               rm -f ${COPY}
+               dd if=$DATA obs=${s} 2> /dev/null | \
+                       ${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
+               if [ $? -ne 0 ]; then
+                       fail "ssh cat $DATA failed"
+               fi
+               cmp $DATA ${COPY}               || fail "corrupted copy"
+       done
+done
+rm -f ${COPY}
diff --git a/regress/try-ciphers.sh b/regress/try-ciphers.sh
new file mode 100644 (file)
index 0000000..889a735
--- /dev/null
@@ -0,0 +1,42 @@
+#      $OpenBSD: try-ciphers.sh,v 1.25 2015/03/24 20:22:17 markus Exp $
+#      Placed in the Public Domain.
+
+tid="try ciphers"
+
+cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
+
+for c in `${SSH} -Q cipher`; do
+       n=0
+       for m in `${SSH} -Q mac`; do
+               trace "proto 2 cipher $c mac $m"
+               verbose "test $tid: proto 2 cipher $c mac $m"
+               cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
+               echo "Ciphers=$c" >> $OBJ/sshd_proxy
+               echo "MACs=$m" >> $OBJ/sshd_proxy
+               ${SSH} -F $OBJ/ssh_proxy -2 -m $m -c $c somehost true
+               if [ $? -ne 0 ]; then
+                       fail "ssh -2 failed with mac $m cipher $c"
+               fi
+               # No point trying all MACs for AEAD ciphers since they
+               # are ignored.
+               if ${SSH} -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
+                       break
+               fi
+               n=`expr $n + 1`
+       done
+done
+
+if ssh_version 1; then
+       ciphers="3des blowfish"
+else
+       ciphers=""
+fi
+for c in $ciphers; do
+       trace "proto 1 cipher $c"
+       verbose "test $tid: proto 1 cipher $c"
+       ${SSH} -F $OBJ/ssh_proxy -1 -c $c somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh -1 failed with cipher $c"
+       fi
+done
+
diff --git a/regress/unittests/Makefile b/regress/unittests/Makefile
new file mode 100644 (file)
index 0000000..e975f6c
--- /dev/null
@@ -0,0 +1,6 @@
+#      $OpenBSD: Makefile,v 1.9 2017/03/14 01:20:29 dtucker Exp $
+
+REGRESS_FAIL_EARLY?=   yes
+SUBDIR=        test_helper sshbuf sshkey bitmap kex hostkeys utf8 match conversion
+
+.include <bsd.subdir.mk>
diff --git a/regress/unittests/Makefile.inc b/regress/unittests/Makefile.inc
new file mode 100644 (file)
index 0000000..3d9eaba
--- /dev/null
@@ -0,0 +1,63 @@
+#      $OpenBSD: Makefile.inc,v 1.9 2016/11/01 13:43:27 tb Exp $
+
+.include <bsd.own.mk>
+.include <bsd.obj.mk>
+
+# enable warnings
+WARNINGS=Yes
+
+DEBUG=-g
+CFLAGS+=       -fstack-protector-all
+CDIAGFLAGS=    -Wall
+CDIAGFLAGS+=   -Wextra
+CDIAGFLAGS+=   -Werror
+CDIAGFLAGS+=   -Wchar-subscripts
+CDIAGFLAGS+=   -Wcomment
+CDIAGFLAGS+=   -Wformat
+CDIAGFLAGS+=   -Wformat-security
+CDIAGFLAGS+=   -Wimplicit
+CDIAGFLAGS+=   -Winline
+CDIAGFLAGS+=   -Wmissing-declarations
+CDIAGFLAGS+=   -Wmissing-prototypes
+CDIAGFLAGS+=   -Wparentheses
+CDIAGFLAGS+=   -Wpointer-arith
+CDIAGFLAGS+=   -Wreturn-type
+CDIAGFLAGS+=   -Wshadow
+CDIAGFLAGS+=   -Wsign-compare
+CDIAGFLAGS+=   -Wstrict-aliasing
+CDIAGFLAGS+=   -Wstrict-prototypes
+CDIAGFLAGS+=   -Wswitch
+CDIAGFLAGS+=   -Wtrigraphs
+CDIAGFLAGS+=   -Wuninitialized
+CDIAGFLAGS+=   -Wunused
+.if ${COMPILER_VERSION} == "gcc4"
+CDIAGFLAGS+=   -Wpointer-sign
+CDIAGFLAGS+=   -Wold-style-definition
+.endif
+
+SSHREL=../../../../../usr.bin/ssh
+
+CFLAGS+=-I${.CURDIR}/../test_helper -I${.CURDIR}/${SSHREL}
+
+.if exists(${.CURDIR}/../test_helper/${__objdir})
+LDADD+=-L${.CURDIR}/../test_helper/${__objdir} -ltest_helper
+DPADD+=${.CURDIR}/../test_helper/${__objdir}/libtest_helper.a
+.else
+LDADD+=-L${.CURDIR}/../test_helper -ltest_helper
+DPADD+=${.CURDIR}/../test_helper/libtest_helper.a
+.endif
+
+.if exists(${.CURDIR}/${SSHREL}/lib/${__objdir})
+LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh
+LIBSSH=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a
+.else
+LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh
+LIBSSH=${.CURDIR}/${SSHREL}/lib/libssh.a
+.endif
+DPADD+=${LIBSSH}
+${PROG}: ${LIBSSH}
+${LIBSSH}:
+       cd ${.CURDIR}/${SSHREL} && ${MAKE} lib
+
+LDADD+= -lcrypto
+DPADD+= ${LIBCRYPTO}
diff --git a/regress/unittests/bitmap/Makefile b/regress/unittests/bitmap/Makefile
new file mode 100644 (file)
index 0000000..bd21949
--- /dev/null
@@ -0,0 +1,10 @@
+#      $OpenBSD: Makefile,v 1.3 2016/11/01 13:43:27 tb Exp $
+
+PROG=test_bitmap
+SRCS=tests.c
+REGRESS_TARGETS=run-regress-${PROG}
+
+run-regress-${PROG}: ${PROG}
+       env ${TEST_ENV} ./${PROG}
+
+.include <bsd.regress.mk>
diff --git a/regress/unittests/bitmap/tests.c b/regress/unittests/bitmap/tests.c
new file mode 100644 (file)
index 0000000..23025f9
--- /dev/null
@@ -0,0 +1,135 @@
+/*     $OpenBSD: tests.c,v 1.1 2015/01/15 07:36:28 djm Exp $ */
+/*
+ * Regress test for bitmap.h bitmap API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include <openssl/bn.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "bitmap.h"
+
+#define NTESTS 131
+
+void
+tests(void)
+{
+       struct bitmap *b;
+       BIGNUM *bn;
+       size_t len;
+       int i, j, k, n;
+       u_char bbuf[1024], bnbuf[1024];
+       int r;
+
+       TEST_START("bitmap_new");
+       b = bitmap_new();
+       ASSERT_PTR_NE(b, NULL);
+       bn = BN_new();
+       ASSERT_PTR_NE(bn, NULL);
+       TEST_DONE();
+
+       TEST_START("bitmap_set_bit / bitmap_test_bit");
+       for (i = -1; i < NTESTS; i++) {
+               for (j = -1; j < NTESTS; j++) {
+                       for (k = -1; k < NTESTS; k++) {
+                               bitmap_zero(b);
+                               BN_clear(bn);
+
+                               test_subtest_info("set %d/%d/%d", i, j, k);
+                               /* Set bits */
+                               if (i >= 0) {
+                                       ASSERT_INT_EQ(bitmap_set_bit(b, i), 0);
+                                       ASSERT_INT_EQ(BN_set_bit(bn, i), 1);
+                               }
+                               if (j >= 0) {
+                                       ASSERT_INT_EQ(bitmap_set_bit(b, j), 0);
+                                       ASSERT_INT_EQ(BN_set_bit(bn, j), 1);
+                               }
+                               if (k >= 0) {
+                                       ASSERT_INT_EQ(bitmap_set_bit(b, k), 0);
+                                       ASSERT_INT_EQ(BN_set_bit(bn, k), 1);
+                               }
+
+                               /* Check perfect match between bitmap and bn */
+                               test_subtest_info("match %d/%d/%d", i, j, k);
+                               for (n = 0; n < NTESTS; n++) {
+                                       ASSERT_INT_EQ(BN_is_bit_set(bn, n),
+                                           bitmap_test_bit(b, n));
+                               }
+
+                               /* Test length calculations */
+                               test_subtest_info("length %d/%d/%d", i, j, k);
+                               ASSERT_INT_EQ(BN_num_bits(bn),
+                                   (int)bitmap_nbits(b));
+                               ASSERT_INT_EQ(BN_num_bytes(bn),
+                                   (int)bitmap_nbytes(b));
+
+                               /* Test serialisation */
+                               test_subtest_info("serialise %d/%d/%d",
+                                   i, j, k);
+                               len = bitmap_nbytes(b);
+                               memset(bbuf, 0xfc, sizeof(bbuf));
+                               ASSERT_INT_EQ(bitmap_to_string(b, bbuf,
+                                   sizeof(bbuf)), 0);
+                               for (n = len; n < (int)sizeof(bbuf); n++)
+                                       ASSERT_U8_EQ(bbuf[n], 0xfc);
+                               r = BN_bn2bin(bn, bnbuf);
+                               ASSERT_INT_GE(r, 0);
+                               ASSERT_INT_EQ(r, (int)len);
+                               ASSERT_MEM_EQ(bbuf, bnbuf, len);
+
+                               /* Test deserialisation */
+                               test_subtest_info("deserialise %d/%d/%d",
+                                   i, j, k);
+                               bitmap_zero(b);
+                               ASSERT_INT_EQ(bitmap_from_string(b, bnbuf,
+                                   len), 0);
+                               for (n = 0; n < NTESTS; n++) {
+                                       ASSERT_INT_EQ(BN_is_bit_set(bn, n),
+                                           bitmap_test_bit(b, n));
+                               }
+
+                               /* Test clearing bits */
+                               test_subtest_info("clear %d/%d/%d",
+                                   i, j, k);
+                               for (n = 0; n < NTESTS; n++) {
+                                       ASSERT_INT_EQ(bitmap_set_bit(b, n), 0);
+                                       ASSERT_INT_EQ(BN_set_bit(bn, n), 1);
+                               }
+                               if (i >= 0) {
+                                       bitmap_clear_bit(b, i);
+                                       BN_clear_bit(bn, i);
+                               }
+                               if (j >= 0) {
+                                       bitmap_clear_bit(b, j);
+                                       BN_clear_bit(bn, j);
+                               }
+                               if (k >= 0) {
+                                       bitmap_clear_bit(b, k);
+                                       BN_clear_bit(bn, k);
+                               }
+                               for (n = 0; n < NTESTS; n++) {
+                                       ASSERT_INT_EQ(BN_is_bit_set(bn, n),
+                                           bitmap_test_bit(b, n));
+                               }
+                       }
+               }
+       }
+       bitmap_free(b);
+       BN_free(bn);
+       TEST_DONE();
+}
+
diff --git a/regress/unittests/conversion/Makefile b/regress/unittests/conversion/Makefile
new file mode 100644 (file)
index 0000000..cde97dc
--- /dev/null
@@ -0,0 +1,10 @@
+#      $OpenBSD: Makefile,v 1.1 2017/03/14 01:20:29 dtucker Exp $
+
+PROG=test_conversion
+SRCS=tests.c
+REGRESS_TARGETS=run-regress-${PROG}
+
+run-regress-${PROG}: ${PROG}
+       env ${TEST_ENV} ./${PROG}
+
+.include <bsd.regress.mk>
diff --git a/regress/unittests/conversion/tests.c b/regress/unittests/conversion/tests.c
new file mode 100644 (file)
index 0000000..6dd77ef
--- /dev/null
@@ -0,0 +1,51 @@
+/*     $OpenBSD: tests.c,v 1.1 2017/03/14 01:20:29 dtucker Exp $ */
+/*
+ * Regress test for conversions
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "misc.h"
+
+void
+tests(void)
+{
+       char buf[1024];
+
+       TEST_START("conversion_convtime");
+       ASSERT_LONG_EQ(convtime("0"), 0);
+       ASSERT_LONG_EQ(convtime("1"), 1);
+       ASSERT_LONG_EQ(convtime("1S"), 1);
+       /* from the examples in the comment above the function */
+       ASSERT_LONG_EQ(convtime("90m"), 5400);
+       ASSERT_LONG_EQ(convtime("1h30m"), 5400);
+       ASSERT_LONG_EQ(convtime("2d"), 172800);
+       ASSERT_LONG_EQ(convtime("1w"), 604800);
+
+       /* negative time is not allowed */
+       ASSERT_LONG_EQ(convtime("-7"), -1);
+       ASSERT_LONG_EQ(convtime("-9d"), -1);
+       
+       /* overflow */
+       snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX + 1);
+       ASSERT_LONG_EQ(convtime(buf), -1);
+
+       /* overflow with multiplier */
+       snprintf(buf, sizeof buf, "%lluM", (unsigned long long)LONG_MAX/60 + 1);
+       ASSERT_LONG_EQ(convtime(buf), -1);
+       ASSERT_LONG_EQ(convtime("1000000000000000000000w"), -1);
+       TEST_DONE();
+}
diff --git a/regress/unittests/hostkeys/Makefile b/regress/unittests/hostkeys/Makefile
new file mode 100644 (file)
index 0000000..ae3c342
--- /dev/null
@@ -0,0 +1,10 @@
+#      $OpenBSD: Makefile,v 1.3 2016/11/01 13:43:27 tb Exp $
+
+PROG=test_hostkeys
+SRCS=tests.c test_iterate.c
+REGRESS_TARGETS=run-regress-${PROG}
+
+run-regress-${PROG}: ${PROG}
+       env ${TEST_ENV} ./${PROG} -d ${.CURDIR}/testdata
+
+.include <bsd.regress.mk>
diff --git a/regress/unittests/hostkeys/mktestdata.sh b/regress/unittests/hostkeys/mktestdata.sh
new file mode 100644 (file)
index 0000000..36890ba
--- /dev/null
@@ -0,0 +1,94 @@
+#!/bin/sh
+# $OpenBSD: mktestdata.sh,v 1.1 2015/02/16 22:18:34 djm Exp $
+
+set -ex
+
+cd testdata
+
+rm -f rsa1* rsa* dsa* ecdsa* ed25519*
+rm -f known_hosts*
+
+gen_all() {
+       _n=$1
+       _ecdsa_bits=256
+       test "x$_n" = "x1" && _ecdsa_bits=384
+       test "x$_n" = "x2" && _ecdsa_bits=521
+       ssh-keygen -qt rsa1 -b 1024 -C "RSA1 #$_n" -N "" -f rsa1_$_n
+       ssh-keygen -qt rsa -b 1024 -C "RSA #$_n" -N "" -f rsa_$_n
+       ssh-keygen -qt dsa -b 1024 -C "DSA #$_n" -N "" -f dsa_$_n
+       ssh-keygen -qt ecdsa -b $_ecdsa_bits -C "ECDSA #$_n" -N "" -f ecdsa_$_n
+       ssh-keygen -qt ed25519 -C "ED25519 #$_n" -N "" -f ed25519_$_n
+       # Don't need private keys
+       rm -f rsa1_$_n  rsa_$_n dsa_$_n ecdsa_$_n ed25519_$_n
+}
+
+hentries() {
+       _preamble=$1
+       _kspec=$2
+       for k in `ls -1 $_kspec | sort` ; do
+               printf "$_preamble "
+               cat $k
+       done
+       echo
+}
+
+gen_all 1
+gen_all 2
+gen_all 3
+gen_all 4
+gen_all 5
+gen_all 6
+
+# A section of known_hosts with hashed hostnames.
+(
+       hentries "sisyphus.example.com" "*_5.pub"
+       hentries "prometheus.example.com,192.0.2.1,2001:db8::1" "*_6.pub"
+) > known_hosts_hash_frag
+ssh-keygen -Hf known_hosts_hash_frag
+rm -f known_hosts_hash_frag.old
+
+# Populated known_hosts, including comments, hashed names and invalid lines
+(
+       echo "# Plain host keys, plain host names"
+       hentries "sisyphus.example.com" "*_1.pub"
+
+       echo "# Plain host keys, hostnames + addresses"
+       hentries "prometheus.example.com,192.0.2.1,2001:db8::1" "*_2.pub"
+
+       echo "# Some hosts with wildcard names / IPs"
+       hentries "*.example.com,192.0.2.*,2001:*" "*_3.pub"
+
+       echo "# Hashed hostname and address entries"
+       cat known_hosts_hash_frag
+       rm -f known_hosts_hash_frag
+       echo
+
+       echo "# Revoked and CA keys"
+       printf "@revoked sisyphus.example.com " ; cat rsa1_4.pub
+       printf "@revoked sisyphus.example.com " ; cat ed25519_4.pub
+       printf "@cert-authority prometheus.example.com " ; cat ecdsa_4.pub
+       printf "@cert-authority *.example.com " ; cat dsa_4.pub
+
+       printf "\n"
+       echo "# Some invalid lines"
+       # Invalid marker
+       printf "@what sisyphus.example.com " ; cat rsa1_1.pub
+       # Key missing
+       echo "sisyphus.example.com      "
+       # Key blob missing
+       echo "prometheus.example.com ssh-ed25519 "
+       # Key blob truncated
+       echo "sisyphus.example.com ssh-dsa AAAATgAAAAdz"
+       # RSA1 key truncated after key bits
+       echo "prometheus.example.com 1024   "
+       # RSA1 key truncated after exponent
+       echo "sisyphus.example.com 1024 65535   "
+       # RSA1 key incorrect key bits
+       printf "prometheus.example.com 1025 " ; cut -d' ' -f2- < rsa1_1.pub
+       # Invalid type
+       echo "sisyphus.example.com ssh-XXX AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg=="
+       # Type mismatch with blob
+       echo "prometheus.example.com ssh-rsa AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg=="
+) > known_hosts
+
+echo OK
diff --git a/regress/unittests/hostkeys/test_iterate.c b/regress/unittests/hostkeys/test_iterate.c
new file mode 100644 (file)
index 0000000..2eaaf06
--- /dev/null
@@ -0,0 +1,1171 @@
+/*     $OpenBSD: test_iterate.c,v 1.4 2015/03/31 22:59:01 djm Exp $ */
+/*
+ * Regress test for hostfile.h hostkeys_foreach()
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "sshkey.h"
+#include "authfile.h"
+#include "hostfile.h"
+
+struct expected {
+       const char *key_file;           /* Path for key, NULL for none */
+       int no_parse_status;            /* Expected status w/o key parsing */
+       int no_parse_keytype;           /* Expected keytype w/o key parsing */
+       int match_host_p;               /* Match 'prometheus.example.com' */
+       int match_host_s;               /* Match 'sisyphus.example.com' */
+       int match_ipv4;                 /* Match '192.0.2.1' */
+       int match_ipv6;                 /* Match '2001:db8::1' */
+       int match_flags;                /* Expected flags from match */
+       struct hostkey_foreach_line l;  /* Expected line contents */
+};
+
+struct cbctx {
+       const struct expected *expected;
+       size_t nexpected;
+       size_t i;
+       int flags;
+       int match_host_p;
+       int match_host_s;
+       int match_ipv4;
+       int match_ipv6;
+};
+
+/*
+ * hostkeys_foreach() iterator callback that verifies the line passed
+ * against an array of expected entries.
+ */
+static int
+check(struct hostkey_foreach_line *l, void *_ctx)
+{
+       struct cbctx *ctx = (struct cbctx *)_ctx;
+       const struct expected *expected;
+       int parse_key = (ctx->flags & HKF_WANT_PARSE_KEY) != 0;
+       const int matching = (ctx->flags & HKF_WANT_MATCH) != 0;
+       u_int expected_status, expected_match;
+       int expected_keytype;
+
+       test_subtest_info("entry %zu/%zu, file line %ld",
+           ctx->i + 1, ctx->nexpected, l->linenum);
+
+       for (;;) {
+               ASSERT_SIZE_T_LT(ctx->i, ctx->nexpected);
+               expected = ctx->expected + ctx->i++;
+               /* If we are matching host/IP then skip entries that don't */
+               if (!matching)
+                       break;
+               if (ctx->match_host_p && expected->match_host_p)
+                       break;
+               if (ctx->match_host_s && expected->match_host_s)
+                       break;
+               if (ctx->match_ipv4 && expected->match_ipv4)
+                       break;
+               if (ctx->match_ipv6 && expected->match_ipv6)
+                       break;
+       }
+       expected_status = (parse_key || expected->no_parse_status < 0) ?
+           expected->l.status : (u_int)expected->no_parse_status;
+       expected_match = expected->l.match;
+#define UPDATE_MATCH_STATUS(x) do { \
+               if (ctx->x && expected->x) { \
+                       expected_match |= expected->x; \
+                       if (expected_status == HKF_STATUS_OK) \
+                               expected_status = HKF_STATUS_MATCHED; \
+               } \
+       } while (0)
+       expected_keytype = (parse_key || expected->no_parse_keytype < 0) ?
+           expected->l.keytype : expected->no_parse_keytype;
+
+#ifndef WITH_SSH1
+       if (parse_key && (expected->l.keytype == KEY_RSA1 ||
+           expected->no_parse_keytype == KEY_RSA1)) {
+               expected_status = HKF_STATUS_INVALID;
+               expected_keytype = KEY_UNSPEC;
+               parse_key = 0;
+       }
+#endif
+#ifndef OPENSSL_HAS_ECC
+       if (expected->l.keytype == KEY_ECDSA ||
+           expected->no_parse_keytype == KEY_ECDSA) {
+               expected_status = HKF_STATUS_INVALID;
+               expected_keytype = KEY_UNSPEC;
+               parse_key = 0;
+       }
+#endif
+
+       UPDATE_MATCH_STATUS(match_host_p);
+       UPDATE_MATCH_STATUS(match_host_s);
+       UPDATE_MATCH_STATUS(match_ipv4);
+       UPDATE_MATCH_STATUS(match_ipv6);
+
+       ASSERT_PTR_NE(l->path, NULL); /* Don't care about path */
+       ASSERT_LONG_LONG_EQ(l->linenum, expected->l.linenum);
+       ASSERT_U_INT_EQ(l->status, expected_status);
+       ASSERT_U_INT_EQ(l->match, expected_match);
+       /* Not all test entries contain fulltext */
+       if (expected->l.line != NULL)
+               ASSERT_STRING_EQ(l->line, expected->l.line);
+       ASSERT_INT_EQ(l->marker, expected->l.marker);
+       /* XXX we skip hashed hostnames for now; implement checking */
+       if (expected->l.hosts != NULL)
+               ASSERT_STRING_EQ(l->hosts, expected->l.hosts);
+       /* Not all test entries contain raw keys */
+       if (expected->l.rawkey != NULL)
+               ASSERT_STRING_EQ(l->rawkey, expected->l.rawkey);
+       /* XXX synthesise raw key for cases lacking and compare */
+       ASSERT_INT_EQ(l->keytype, expected_keytype);
+       if (parse_key) {
+               if (expected->l.key == NULL)
+                       ASSERT_PTR_EQ(l->key, NULL);
+               if (expected->l.key != NULL) {
+                       ASSERT_PTR_NE(l->key, NULL);
+                       ASSERT_INT_EQ(sshkey_equal(l->key, expected->l.key), 1);
+               }
+       }
+       if (parse_key && !(l->comment == NULL && expected->l.comment == NULL))
+               ASSERT_STRING_EQ(l->comment, expected->l.comment);
+       return 0;
+}
+
+/* Loads public keys for a set of expected results */
+static void
+prepare_expected(struct expected *expected, size_t n)
+{
+       size_t i;
+
+       for (i = 0; i < n; i++) {
+               if (expected[i].key_file == NULL)
+                       continue;
+#ifndef WITH_SSH1
+               if (expected[i].l.keytype == KEY_RSA1)
+                       continue;
+#endif
+#ifndef OPENSSL_HAS_ECC
+               if (expected[i].l.keytype == KEY_ECDSA)
+                       continue;
+#endif
+               ASSERT_INT_EQ(sshkey_load_public(
+                   test_data_file(expected[i].key_file), &expected[i].l.key,
+                   NULL), 0);
+       }
+}
+
+struct expected expected_full[] = {
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,                           /* path, don't care */
+               1,                              /* line number */
+               HKF_STATUS_COMMENT,             /* status */
+               0,                              /* match flags */
+               "# Plain host keys, plain host names", /* full line, optional */
+               MRK_NONE,                       /* marker (CA / revoked) */
+               NULL,                           /* hosts text */
+               NULL,                           /* raw key, optional */
+               KEY_UNSPEC,                     /* key type */
+               NULL,                           /* deserialised key */
+               NULL,                           /* comment */
+       } },
+       { "dsa_1.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               2,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #1",
+       } },
+       { "ecdsa_1.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               3,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #1",
+       } },
+       { "ed25519_1.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               4,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #1",
+       } },
+       { "rsa1_1.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               5,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #1",
+       } },
+       { "rsa_1.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               6,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_RSA,
+               NULL,   /* filled at runtime */
+               "RSA #1",
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               7,
+               HKF_STATUS_COMMENT,
+               0,
+               "",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               8,
+               HKF_STATUS_COMMENT,
+               0,
+               "# Plain host keys, hostnames + addresses",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { "dsa_2.pub" , -1, -1, HKF_MATCH_HOST, 0, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               9,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com,192.0.2.1,2001:db8::1",
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #2",
+       } },
+       { "ecdsa_2.pub" , -1, -1, HKF_MATCH_HOST, 0, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               10,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com,192.0.2.1,2001:db8::1",
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #2",
+       } },
+       { "ed25519_2.pub" , -1, -1, HKF_MATCH_HOST, 0, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               11,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com,192.0.2.1,2001:db8::1",
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #2",
+       } },
+       { "rsa1_2.pub" , -1, -1, HKF_MATCH_HOST, 0, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               12,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com,192.0.2.1,2001:db8::1",
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #2",
+       } },
+       { "rsa_2.pub" , -1, -1, HKF_MATCH_HOST, 0, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               13,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com,192.0.2.1,2001:db8::1",
+               NULL,
+               KEY_RSA,
+               NULL,   /* filled at runtime */
+               "RSA #2",
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               14,
+               HKF_STATUS_COMMENT,
+               0,
+               "",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               15,
+               HKF_STATUS_COMMENT,
+               0,
+               "# Some hosts with wildcard names / IPs",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { "dsa_3.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               16,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "*.example.com,192.0.2.*,2001:*",
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #3",
+       } },
+       { "ecdsa_3.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               17,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "*.example.com,192.0.2.*,2001:*",
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #3",
+       } },
+       { "ed25519_3.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               18,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "*.example.com,192.0.2.*,2001:*",
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #3",
+       } },
+       { "rsa1_3.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               19,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "*.example.com,192.0.2.*,2001:*",
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #3",
+       } },
+       { "rsa_3.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, HKF_MATCH_IP, HKF_MATCH_IP, -1, {
+               NULL,
+               20,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               "*.example.com,192.0.2.*,2001:*",
+               NULL,
+               KEY_RSA,
+               NULL,   /* filled at runtime */
+               "RSA #3",
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               21,
+               HKF_STATUS_COMMENT,
+               0,
+               "",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               22,
+               HKF_STATUS_COMMENT,
+               0,
+               "# Hashed hostname and address entries",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { "dsa_5.pub" , -1, -1, 0, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, -1, {
+               NULL,
+               23,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #5",
+       } },
+       { "ecdsa_5.pub" , -1, -1, 0, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, -1, {
+               NULL,
+               24,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #5",
+       } },
+       { "ed25519_5.pub" , -1, -1, 0, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, -1, {
+               NULL,
+               25,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #5",
+       } },
+       { "rsa1_5.pub" , -1, -1, 0, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, -1, {
+               NULL,
+               26,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #5",
+       } },
+       { "rsa_5.pub" , -1, -1, 0, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, -1, {
+               NULL,
+               27,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA,
+               NULL,   /* filled at runtime */
+               "RSA #5",
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               28,
+               HKF_STATUS_COMMENT,
+               0,
+               "",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       /*
+        * The next series have each key listed multiple times, as the
+        * hostname and addresses in the pre-hashed known_hosts are split
+        * to separate lines.
+        */
+       { "dsa_6.pub" , -1, -1, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, 0, -1, {
+               NULL,
+               29,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #6",
+       } },
+       { "dsa_6.pub" , -1, -1, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, 0, -1, {
+               NULL,
+               30,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #6",
+       } },
+       { "dsa_6.pub" , -1, -1, 0, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, -1, {
+               NULL,
+               31,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #6",
+       } },
+       { "ecdsa_6.pub" , -1, -1, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, 0, -1, {
+               NULL,
+               32,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #6",
+       } },
+       { "ecdsa_6.pub" , -1, -1, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, 0, -1, {
+               NULL,
+               33,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #6",
+       } },
+       { "ecdsa_6.pub" , -1, -1, 0, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, -1, {
+               NULL,
+               34,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #6",
+       } },
+       { "ed25519_6.pub" , -1, -1, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, 0, -1, {
+               NULL,
+               35,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #6",
+       } },
+       { "ed25519_6.pub" , -1, -1, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, 0, -1, {
+               NULL,
+               36,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #6",
+       } },
+       { "ed25519_6.pub" , -1, -1, 0, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, -1, {
+               NULL,
+               37,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #6",
+       } },
+       { "rsa1_6.pub" , -1, -1, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, 0, -1, {
+               NULL,
+               38,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #6",
+       } },
+       { "rsa1_6.pub" , -1, -1, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, 0, -1, {
+               NULL,
+               39,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #6",
+       } },
+       { "rsa1_6.pub" , -1, -1, 0, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, -1, {
+               NULL,
+               40,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #6",
+       } },
+       { "rsa_6.pub" , -1, -1, HKF_MATCH_HOST|HKF_MATCH_HOST_HASHED, 0, 0, 0, -1, {
+               NULL,
+               41,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA,
+               NULL,   /* filled at runtime */
+               "RSA #6",
+       } },
+       { "rsa_6.pub" , -1, -1, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, 0, -1, {
+               NULL,
+               42,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA,
+               NULL,   /* filled at runtime */
+               "RSA #6",
+       } },
+       { "rsa_6.pub" , -1, -1, 0, 0, 0, HKF_MATCH_IP|HKF_MATCH_IP_HASHED, -1, {
+               NULL,
+               43,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_RSA,
+               NULL,   /* filled at runtime */
+               "RSA #6",
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               44,
+               HKF_STATUS_COMMENT,
+               0,
+               "",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               45,
+               HKF_STATUS_COMMENT,
+               0,
+               "",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               46,
+               HKF_STATUS_COMMENT,
+               0,
+               "# Revoked and CA keys",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { "rsa1_4.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               47,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_REVOKE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_RSA1,
+               NULL,   /* filled at runtime */
+               "RSA1 #4",
+       } },
+       { "ed25519_4.pub" , -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               48,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_REVOKE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_ED25519,
+               NULL,   /* filled at runtime */
+               "ED25519 #4",
+       } },
+       { "ecdsa_4.pub" , -1, -1, HKF_MATCH_HOST, 0, 0, 0, -1, {
+               NULL,
+               49,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_CA,
+               "prometheus.example.com",
+               NULL,
+               KEY_ECDSA,
+               NULL,   /* filled at runtime */
+               "ECDSA #4",
+       } },
+       { "dsa_4.pub" , -1, -1, HKF_MATCH_HOST, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               50,
+               HKF_STATUS_OK,
+               0,
+               NULL,
+               MRK_CA,
+               "*.example.com",
+               NULL,
+               KEY_DSA,
+               NULL,   /* filled at runtime */
+               "DSA #4",
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               51,
+               HKF_STATUS_COMMENT,
+               0,
+               "",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               52,
+               HKF_STATUS_COMMENT,
+               0,
+               "# Some invalid lines",
+               MRK_NONE,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, 0, 0, 0, -1, {
+               NULL,
+               53,
+               HKF_STATUS_INVALID,
+               0,
+               NULL,
+               MRK_ERROR,
+               NULL,
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               54,
+               HKF_STATUS_INVALID,
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, HKF_MATCH_HOST, 0, 0, 0, -1, {
+               NULL,
+               55,
+               HKF_STATUS_INVALID,
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               56,
+               HKF_STATUS_INVALID,     /* Would be ok if key not parsed */
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, -1, -1, HKF_MATCH_HOST, 0, 0, 0, -1, {
+               NULL,
+               57,
+               HKF_STATUS_INVALID,     /* Would be ok if key not parsed */
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, HKF_STATUS_OK, KEY_RSA1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               58,
+               HKF_STATUS_INVALID,     /* Would be ok if key not parsed */
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,
+               NULL,
+       } },
+       { NULL, HKF_STATUS_OK, KEY_RSA1, HKF_MATCH_HOST, 0, 0, 0, -1, {
+               NULL,
+               59,
+               HKF_STATUS_INVALID,     /* Would be ok if key not parsed */
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,   /* filled at runtime */
+               NULL,
+       } },
+       { NULL, -1, -1, 0, HKF_MATCH_HOST, 0, 0, -1, {
+               NULL,
+               60,
+               HKF_STATUS_INVALID,
+               0,
+               NULL,
+               MRK_NONE,
+               "sisyphus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,   /* filled at runtime */
+               NULL,
+       } },
+       { NULL, HKF_STATUS_OK, KEY_RSA, HKF_MATCH_HOST, 0, 0, 0, -1, {
+               NULL,
+               61,
+               HKF_STATUS_INVALID,     /* Would be ok if key not parsed */
+               0,
+               NULL,
+               MRK_NONE,
+               "prometheus.example.com",
+               NULL,
+               KEY_UNSPEC,
+               NULL,   /* filled at runtime */
+               NULL,
+       } },
+};
+
+void test_iterate(void);
+
+void
+test_iterate(void)
+{
+       struct cbctx ctx;
+
+       TEST_START("hostkeys_iterate all with key parse");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_PARSE_KEY;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, NULL, NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate all without key parse");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, NULL, NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify host 1");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       ctx.match_host_p = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "prometheus.example.com", NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify host 2");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       ctx.match_host_s = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "sisyphus.example.com", NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match host 1");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH;
+       ctx.match_host_p = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "prometheus.example.com", NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match host 2");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH;
+       ctx.match_host_s = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "sisyphus.example.com", NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify host missing");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "actaeon.example.org", NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match host missing");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "actaeon.example.org", NULL, ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify IPv4");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       ctx.match_ipv4 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "tiresias.example.org", "192.0.2.1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify IPv6");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       ctx.match_ipv6 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "tiresias.example.org", "2001:db8::1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match IPv4");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH;
+       ctx.match_ipv4 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "tiresias.example.org", "192.0.2.1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match IPv6");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH;
+       ctx.match_ipv6 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "tiresias.example.org", "2001:db8::1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify addr missing");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "tiresias.example.org", "192.168.0.1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match addr missing");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "tiresias.example.org", "::1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify host 2 and IPv4");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = 0;
+       ctx.match_host_s = 1;
+       ctx.match_ipv4 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "sisyphus.example.com", "192.0.2.1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match host 1 and IPv6");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH;
+       ctx.match_host_p = 1;
+       ctx.match_ipv6 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "prometheus.example.com", "2001:db8::1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate specify host 2 and IPv4 w/ key parse");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_PARSE_KEY;
+       ctx.match_host_s = 1;
+       ctx.match_ipv4 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "sisyphus.example.com", "192.0.2.1", ctx.flags), 0);
+       TEST_DONE();
+
+       TEST_START("hostkeys_iterate match host 1 and IPv6 w/ key parse");
+       memset(&ctx, 0, sizeof(ctx));
+       ctx.expected = expected_full;
+       ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
+       ctx.flags = HKF_WANT_MATCH|HKF_WANT_PARSE_KEY;
+       ctx.match_host_p = 1;
+       ctx.match_ipv6 = 1;
+       prepare_expected(expected_full, ctx.nexpected);
+       ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"),
+           check, &ctx, "prometheus.example.com", "2001:db8::1", ctx.flags), 0);
+       TEST_DONE();
+}
+
diff --git a/regress/unittests/hostkeys/testdata/dsa_1.pub b/regress/unittests/hostkeys/testdata/dsa_1.pub
new file mode 100644 (file)
index 0000000..56e1e37
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAOqffHxEW4c+Z9q/r3l4sYK8F7qrBsU8XF9upGsW62T9InROFFq9IO0x3pQ6mDA0Wtw0sqcDmkPCHPyP4Ok/fU3/drLaZusHoVYu8pBBrWsIDrKgkeX9TEodBsSrYdl4Sqtqq9EZv9+DttV6LStZrgYyUTOKwOF95wGantpLynX5AAAAFQDdt+zjRNlETDsgmxcSYFgREirJrQAAAIBQlrPaiPhR24FhnMLcHH4016vL7AqDDID6Qw7PhbXGa4/XlxWMIigjBKrIPKvnZ6p712LSnCKtcbfdx0MtmJlNa01CYqPaRhgRaf+uGdvTkTUcdaq8R5lLJL+JMNwUhcC8ijm3NqEjXjffuebGe1EzIeiITbA7Nndcd+GytwRDegAAAIEAkRYPjSVcUxfUHhHdpP6V8CuY1+CYSs9EPJ7iiWTDuXWVIBTU32oJLAnrmAcOwtIzEfPvm+rff5FI/Yhon2pB3VTXhPPEBjYzE5qANanAT4e6tzAVc5f3DUhHaDknwRYfDz86GFvuLtDjeE/UZ9t6OofYoEsCBpYozLAprBvNIQY= DSA #1
diff --git a/regress/unittests/hostkeys/testdata/dsa_2.pub b/regress/unittests/hostkeys/testdata/dsa_2.pub
new file mode 100644 (file)
index 0000000..394e0bf
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAI38Hy/61/O5Bp6yUG8J5XQCeNjRS0xvjlCdzKLyXCueMa+L+X2L/u9PWUsy5SVbTjGgpB8sF6UkCNsV+va7S8zCCHas2MZ7GPlxP6GZBkRPTIFR0N/Pu7wfBzDQz0t0iL4VmxBfTBQv/SxkGWZg+yHihIQP9fwdSAwD/7aVh6ItAAAAFQDSyihIUlINlswM0PJ8wXSti3yIMwAAAIB+oqzaB6ozqs8YxpN5oQOBa/9HEBQEsp8RSIlQmVubXRNgktp42n+Ii1waU9UUk8DX5ahhIeR6B7ojWkqmDAji4SKpoHf4kmr6HvYo85ZSTSx0W4YK/gJHSpDJwhlT52tAfb1JCbWSObjl09B4STv7KedCHcR5oXQvvrV+XoKOSAAAAIAue/EXrs2INw1RfaKNHC0oqOMxmRitv0BFMuNVPo1VDj39CE5kA7AHjwvS1TNeaHtK5Hhgeb6vsmLmNPTOc8xCob0ilyQbt9O0GbONeF2Ge7D2UJyULA/hxql+tCYFIC6yUrmo35fF9XiNisXLoaflk9fjp7ROWWVwnki/jstaQw== DSA #2
diff --git a/regress/unittests/hostkeys/testdata/dsa_3.pub b/regress/unittests/hostkeys/testdata/dsa_3.pub
new file mode 100644 (file)
index 0000000..e506ea4
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAI6lz2Ip9bzE7TGuDD4SjO9S4Ac90gq0h6ai1O06eI8t/Ot2uJ5Jk2QyVr2jvIZHDl/5bwBx7+5oyjlwRoUrAPPD814wf5tU2tSnmdu1Wbf0cBswif5q0r4tevzmopp/AtgH11QHo3u0/pfyJd10qBDLV2FaYSKMmZvyPfZJ0s9pAAAAFQD5Eqjl6Rx2qVePodD9OwAPT0bU6wAAAIAfnDm6csZF0sFaJR3NIJvaYgSGr8s7cqlsk2gLltB/1wOOO2yX+NeEC+B0H93hlMfaUsPa08bwgmYxnavSMqEBpmtPceefJiEd68zwYqXd38f88wyWZ9Z5iwaI/6OVZPHzCbDxOa4ewVTevRNYUKP1xUTZNT8/gSMfZLYPk4T2AQAAAIAUKroozRMyV+3V/rxt0gFnNxRXBKk+9cl3vgsQ7ktkI9cYg7V1T2K0XF21AVMK9gODszy6PBJjV6ruXBV6TRiqIbQauivp3bHHKYsG6wiJNqwdbVwIjfvv8nn1qFoZQLXG3sdONr9NwN8KzrX89OV0BlR2dVM5qqp+YxOXymP9yg== DSA #3
diff --git a/regress/unittests/hostkeys/testdata/dsa_4.pub b/regress/unittests/hostkeys/testdata/dsa_4.pub
new file mode 100644 (file)
index 0000000..8552c38
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAKvjnFHm0VvMr5h2Zu3nURsxQKGoxm+DCzYDxRYcilK07Cm5c4XTrFbA2X86+9sGs++W7QRMcTJUYIg0a+UtIMtAjwORd6ZPXM2K5dBW+gh1oHyvKi767tWX7I2c+1ZPJDY95mUUfZQUEfdy9eGDSBmw/pSsveQ1ur6XNUh/MtP/AAAAFQDHnXk/9jBJAdce1pHtLWnbdPSGdQAAAIEAm2OLy8tZBfiEO3c3X1yyB/GTcDwrQCqRMDkhnsmrliec3dWkOfNTzu+MrdvF8ymTWLEqPpbMheYtvNyZ3TF0HO5W7aVBpdGZbOdOAIfB+6skqGbI8A5Up1d7dak/bSsqL2r5NjwbDOdq+1hBzzvbl/qjh+sQarV2zHrpKoQaV28AAACANtkBVedBbqIAdphCrN/LbUi9WlyuF9UZz+tlpVLYrj8GJVwnplV2tvOmUw6yP5/pzCimTsao8dpL5PWxm7fKxLWVxA+lEsA4WeC885CiZn8xhdaJOCN+NyJ2bqkz+4VPI7oDGBm0aFwUqJn+M1PiSgvI50XdF2dBsFRTRNY0wzA= DSA #4
diff --git a/regress/unittests/hostkeys/testdata/dsa_5.pub b/regress/unittests/hostkeys/testdata/dsa_5.pub
new file mode 100644 (file)
index 0000000..149e1ef
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBALrFy7w5ihlaOG+qR+6fj+vm5EQaO3qwxgACLcgH+VfShuOG4mkx8qFJmf+OZ3fh5iKngjNZfKtfcqI7zHWdk6378TQfQC52/kbZukjNXOLCpyNkogahcjA00onIoTK1RUDuMW28edAHwPFbpttXDTaqis+8JPMY8hZwsZGENCzTAAAAFQD6+It5vozwGgaN9ROYPMlByhi6jwAAAIBz2mcAC694vNzz9b6614gkX9d9E99PzJYfU1MPkXDziKg7MrjBw7Opd5y1jL09S3iL6lSTlHkKwVKvQ3pOwWRwXXRrKVus4I0STveoApm526jmp6mY0YEtqR98vMJ0v97h1ydt8FikKlihefCsnXVicb8887PXs2Y8C6GuFT3tfQAAAIBbmHtV5tPcrMRDkULhaQ/Whap2VKvT2DUhIHA7lx6oy/KpkltOpxDZOIGUHKqffGbiR7Jh01/y090AY5L2eCf0S2Ytx93+eADwVVpJbFJo6zSwfeey2Gm6L2oA+rCz9zTdmtZoekpD3/RAOQjnJIAPwbs7mXwabZTw4xRtiYIRrw== DSA #5
diff --git a/regress/unittests/hostkeys/testdata/dsa_6.pub b/regress/unittests/hostkeys/testdata/dsa_6.pub
new file mode 100644 (file)
index 0000000..edbb976
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAIutigAse65TCW6hHDOEGXenE9L4L0talHbs65hj3UUNtWflKdQeXLofqXgW8AwaDKmnuRPrxRoxVNXj84n45wtBEdt4ztmdAZteAbXSnHqpcxME3jDxh3EtxzGPXLs+RUmKPVguraSgo7W2oN7KFx6VM+AcAtxANSTlvDid3s47AAAAFQCd9Q3kkHSLWe77sW0eRaayI45ovwAAAIAw6srGF6xvFasI44Y3r9JJ2K+3ezozl3ldL3p2+p2HG3iWafC4SdV8pB6ZIxKlYAywiiFb3LzH/JweGFq1jtoFDRM3MlYORBevydU4zPz7b5QLDVB0sY4evYtWmg2BFJvoWRfhLnlZVW7h5N8v4fNIwdVmVsw4Ljes7iF2HRGhHgAAAIBDFT3fww2Oby1xUA6G9pDAcVikrQFqp1sJRylNTUyeyQ37SNAGzYxwHJFgQr8gZLdRQ1UW+idYpqVbVNcYFMOiw/zSqK2OfVwPZ9U+TTKdc992ChSup6vJEKM/ZVIyDWDbJr7igQ4ahy7jo9mFvm8ljN926EnspQzCvs0Dxk6tHA== DSA #6
diff --git a/regress/unittests/hostkeys/testdata/ecdsa_1.pub b/regress/unittests/hostkeys/testdata/ecdsa_1.pub
new file mode 100644 (file)
index 0000000..16a535b
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBF6yQEtD9yBw9gmDRf477WBBzvWhAa0ioBI3nbA4emKykj0RbuQd5C4XdQAEOZGzE7v//FcCjwB2wi+JH5eKkxCtN6CjohDASZ1huoIV2UVyYIicZJEEOg1IWjjphvaxtw== ECDSA #1
diff --git a/regress/unittests/hostkeys/testdata/ecdsa_2.pub b/regress/unittests/hostkeys/testdata/ecdsa_2.pub
new file mode 100644 (file)
index 0000000..d2bad11
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAB8qVcXwgBM92NCmReQlPrZAoui4Bz/mW0VUBFOpHXXW1n+15b/Y7Pc6UBd/ITTZmaBciXY+PWaSBGdwc5GdqGdLgFyJ/QAGrFMPNpVutm/82gNQzlxpNwjbMcKyiZEXzSgnjS6DzMQ0WuSMdzIBXq8OW/Kafxg4ZkU6YqALUXxlQMZuQ== ECDSA #2
diff --git a/regress/unittests/hostkeys/testdata/ecdsa_3.pub b/regress/unittests/hostkeys/testdata/ecdsa_3.pub
new file mode 100644 (file)
index 0000000..e3ea925
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIb3BhJZk+vUQPg5TQc1koIzuGqloCq7wjr9LjlhG24IBeiFHLsdWw74HDlH4DrOmlxToVYk2lTdnjARleRByjk= ECDSA #3
diff --git a/regress/unittests/hostkeys/testdata/ecdsa_4.pub b/regress/unittests/hostkeys/testdata/ecdsa_4.pub
new file mode 100644 (file)
index 0000000..2d616f5
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHZd0OXHIWwK3xnjAdMZ1tojxWycdu38pORO/UX5cqsKMgGCKQVBWWO3TFk1ePkGIE9VMWT1hCGqWRRwYlH+dSE= ECDSA #4
diff --git a/regress/unittests/hostkeys/testdata/ecdsa_5.pub b/regress/unittests/hostkeys/testdata/ecdsa_5.pub
new file mode 100644 (file)
index 0000000..a3df9b3
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPIudcagzq4QPtP1jkpje34+0POLB0jwT64hqrbCqhTH2T800KDZ0h2vwlJYa3OP3Oqru9AB5pnuHsKw7mAhUGY= ECDSA #5
diff --git a/regress/unittests/hostkeys/testdata/ecdsa_6.pub b/regress/unittests/hostkeys/testdata/ecdsa_6.pub
new file mode 100644 (file)
index 0000000..139f5a7
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK1wRLyKtvK3Mmhd0XPkKwW4ev1KBVf8J4aG8lESq1TsaqqfOXYGyxMq5pN8fCGiD5UPOqyTYz/ZNzClRhJRHao= ECDSA #6
diff --git a/regress/unittests/hostkeys/testdata/ed25519_1.pub b/regress/unittests/hostkeys/testdata/ed25519_1.pub
new file mode 100644 (file)
index 0000000..0b12efe
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK9ks7jkua5YWIwByRnnnc6UPJQWI75O0e/UJdPYU1JI ED25519 #1
diff --git a/regress/unittests/hostkeys/testdata/ed25519_2.pub b/regress/unittests/hostkeys/testdata/ed25519_2.pub
new file mode 100644 (file)
index 0000000..78e262b
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBp6PVW0z2o9C4Ukv/JOgmK7QMFe1pD1s3ADFF7IQob ED25519 #2
diff --git a/regress/unittests/hostkeys/testdata/ed25519_3.pub b/regress/unittests/hostkeys/testdata/ed25519_3.pub
new file mode 100644 (file)
index 0000000..64e5f12
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBlYfExtYZAPqYvYdrlpGlSWhh/XNHcH3v3c2JzsVNbB ED25519 #3
diff --git a/regress/unittests/hostkeys/testdata/ed25519_4.pub b/regress/unittests/hostkeys/testdata/ed25519_4.pub
new file mode 100644 (file)
index 0000000..47b6724
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDFP8L9REfN/iYy1KIRtFqSCn3V2+vOCpoZYENFGLdOF ED25519 #4
diff --git a/regress/unittests/hostkeys/testdata/ed25519_5.pub b/regress/unittests/hostkeys/testdata/ed25519_5.pub
new file mode 100644 (file)
index 0000000..72ccae6
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINf63qSV8rD57N+digID8t28WVhd3Yf2K2UhaoG8TsWQ ED25519 #5
diff --git a/regress/unittests/hostkeys/testdata/ed25519_6.pub b/regress/unittests/hostkeys/testdata/ed25519_6.pub
new file mode 100644 (file)
index 0000000..0f71973
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLW0ZwCkRQldpLa4I5BpwGa/om+WE6OgC8jdVqakt0Z ED25519 #6
diff --git a/regress/unittests/hostkeys/testdata/known_hosts b/regress/unittests/hostkeys/testdata/known_hosts
new file mode 100644 (file)
index 0000000..3740f67
--- /dev/null
@@ -0,0 +1,61 @@
+# Plain host keys, plain host names
+sisyphus.example.com ssh-dss AAAAB3NzaC1kc3MAAACBAOqffHxEW4c+Z9q/r3l4sYK8F7qrBsU8XF9upGsW62T9InROFFq9IO0x3pQ6mDA0Wtw0sqcDmkPCHPyP4Ok/fU3/drLaZusHoVYu8pBBrWsIDrKgkeX9TEodBsSrYdl4Sqtqq9EZv9+DttV6LStZrgYyUTOKwOF95wGantpLynX5AAAAFQDdt+zjRNlETDsgmxcSYFgREirJrQAAAIBQlrPaiPhR24FhnMLcHH4016vL7AqDDID6Qw7PhbXGa4/XlxWMIigjBKrIPKvnZ6p712LSnCKtcbfdx0MtmJlNa01CYqPaRhgRaf+uGdvTkTUcdaq8R5lLJL+JMNwUhcC8ijm3NqEjXjffuebGe1EzIeiITbA7Nndcd+GytwRDegAAAIEAkRYPjSVcUxfUHhHdpP6V8CuY1+CYSs9EPJ7iiWTDuXWVIBTU32oJLAnrmAcOwtIzEfPvm+rff5FI/Yhon2pB3VTXhPPEBjYzE5qANanAT4e6tzAVc5f3DUhHaDknwRYfDz86GFvuLtDjeE/UZ9t6OofYoEsCBpYozLAprBvNIQY= DSA #1
+sisyphus.example.com ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBF6yQEtD9yBw9gmDRf477WBBzvWhAa0ioBI3nbA4emKykj0RbuQd5C4XdQAEOZGzE7v//FcCjwB2wi+JH5eKkxCtN6CjohDASZ1huoIV2UVyYIicZJEEOg1IWjjphvaxtw== ECDSA #1
+sisyphus.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK9ks7jkua5YWIwByRnnnc6UPJQWI75O0e/UJdPYU1JI ED25519 #1
+sisyphus.example.com 1024 65537 153895431603677073925890314548566704948446776958334195280085080329934839226701954473292358821568047724356487621573742372399387931887004184139835510820577359977148363519970774657801798872789118894962853659233045778161859413980935372685480527355016624825696983269800574755126132814333241868538220824608980319407 RSA1 #1
+sisyphus.example.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDg4hB4vAZHJ0PVRiJajOv/GlytFWNpv5/9xgB9+5BIbvp8LOrFZ5D9K0Gsmwpd4G4rfaAz8j896DhMArg0vtkilIPPGt/6VzWMERgvaIQPJ/IE99X3+fjcAG56oAWwy29JX10lQMzBPU6XJIaN/zqpkb6qUBiAHBdLpxrFBBU0/w== RSA #1
+
+# Plain host keys, hostnames + addresses
+prometheus.example.com,192.0.2.1,2001:db8::1 ssh-dss AAAAB3NzaC1kc3MAAACBAI38Hy/61/O5Bp6yUG8J5XQCeNjRS0xvjlCdzKLyXCueMa+L+X2L/u9PWUsy5SVbTjGgpB8sF6UkCNsV+va7S8zCCHas2MZ7GPlxP6GZBkRPTIFR0N/Pu7wfBzDQz0t0iL4VmxBfTBQv/SxkGWZg+yHihIQP9fwdSAwD/7aVh6ItAAAAFQDSyihIUlINlswM0PJ8wXSti3yIMwAAAIB+oqzaB6ozqs8YxpN5oQOBa/9HEBQEsp8RSIlQmVubXRNgktp42n+Ii1waU9UUk8DX5ahhIeR6B7ojWkqmDAji4SKpoHf4kmr6HvYo85ZSTSx0W4YK/gJHSpDJwhlT52tAfb1JCbWSObjl09B4STv7KedCHcR5oXQvvrV+XoKOSAAAAIAue/EXrs2INw1RfaKNHC0oqOMxmRitv0BFMuNVPo1VDj39CE5kA7AHjwvS1TNeaHtK5Hhgeb6vsmLmNPTOc8xCob0ilyQbt9O0GbONeF2Ge7D2UJyULA/hxql+tCYFIC6yUrmo35fF9XiNisXLoaflk9fjp7ROWWVwnki/jstaQw== DSA #2
+prometheus.example.com,192.0.2.1,2001:db8::1 ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAB8qVcXwgBM92NCmReQlPrZAoui4Bz/mW0VUBFOpHXXW1n+15b/Y7Pc6UBd/ITTZmaBciXY+PWaSBGdwc5GdqGdLgFyJ/QAGrFMPNpVutm/82gNQzlxpNwjbMcKyiZEXzSgnjS6DzMQ0WuSMdzIBXq8OW/Kafxg4ZkU6YqALUXxlQMZuQ== ECDSA #2
+prometheus.example.com,192.0.2.1,2001:db8::1 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBp6PVW0z2o9C4Ukv/JOgmK7QMFe1pD1s3ADFF7IQob ED25519 #2
+prometheus.example.com,192.0.2.1,2001:db8::1 1024 65537 135970715082947442639683969597180728933388298633245835186618852623800675939308729462220235058285909679252157995530180587329132927339620517781785310829060832352381015614725360278571924286986474946772141568893116432268565829418506866604294073334978275702221949783314402806080929601995102334442541344606109853641 RSA1 #2
+prometheus.example.com,192.0.2.1,2001:db8::1 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDmbUhNabB5AmBDX6GNHZ3lbn7pRxqfpW+f53QqNGlK0sLV+0gkMIrOfUp1kdE2ZLE6tfzdicatj/RlH6/wuo4yyYb+Pyx3G0vxdmAIiA4aANq38XweDucBC0TZkRWVHK+Gs5V/uV0z7N0axJvkkJujMLvST3CRiiWwlficBc6yVQ== RSA #2
+
+# Some hosts with wildcard names / IPs
+*.example.com,192.0.2.*,2001:* ssh-dss AAAAB3NzaC1kc3MAAACBAI6lz2Ip9bzE7TGuDD4SjO9S4Ac90gq0h6ai1O06eI8t/Ot2uJ5Jk2QyVr2jvIZHDl/5bwBx7+5oyjlwRoUrAPPD814wf5tU2tSnmdu1Wbf0cBswif5q0r4tevzmopp/AtgH11QHo3u0/pfyJd10qBDLV2FaYSKMmZvyPfZJ0s9pAAAAFQD5Eqjl6Rx2qVePodD9OwAPT0bU6wAAAIAfnDm6csZF0sFaJR3NIJvaYgSGr8s7cqlsk2gLltB/1wOOO2yX+NeEC+B0H93hlMfaUsPa08bwgmYxnavSMqEBpmtPceefJiEd68zwYqXd38f88wyWZ9Z5iwaI/6OVZPHzCbDxOa4ewVTevRNYUKP1xUTZNT8/gSMfZLYPk4T2AQAAAIAUKroozRMyV+3V/rxt0gFnNxRXBKk+9cl3vgsQ7ktkI9cYg7V1T2K0XF21AVMK9gODszy6PBJjV6ruXBV6TRiqIbQauivp3bHHKYsG6wiJNqwdbVwIjfvv8nn1qFoZQLXG3sdONr9NwN8KzrX89OV0BlR2dVM5qqp+YxOXymP9yg== DSA #3
+*.example.com,192.0.2.*,2001:* ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIb3BhJZk+vUQPg5TQc1koIzuGqloCq7wjr9LjlhG24IBeiFHLsdWw74HDlH4DrOmlxToVYk2lTdnjARleRByjk= ECDSA #3
+*.example.com,192.0.2.*,2001:* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBlYfExtYZAPqYvYdrlpGlSWhh/XNHcH3v3c2JzsVNbB ED25519 #3
+*.example.com,192.0.2.*,2001:* 1024 65537 125895605498029643697051635076028105429632810811904702876152645261610759866299221305725069141163240694267669117205342283569102183636228981857946763978553664895308762890072813014496700601576921921752482059207749978374872713540759920335553799711267170948655579130584031555334229966603000896364091459595522912269 RSA1 #3
+*.example.com,192.0.2.*,2001:* ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDX8F93W3SH4ZSus4XUQ2cw9dqcuyUETTlKEeGv3zlknV3YCoe2Mp04naDhiuwj8sOsytrZSESzLY1ZEyzrjxE6ZFVv8NKgck/AbRjcwlRFOcx9oKUxOrXRa0IoXlTq0kyjKCJfaHBKnGitZThknCPTbVmpATkm5xx6J0WEDozfoQ== RSA #3
+
+# Hashed hostname and address entries
+|1|6FWxoqTCAfm8sZ7T/q73OmxCFGM=|S4eQmusok4cbyDzzGEFGIAthDbw= ssh-dss AAAAB3NzaC1kc3MAAACBALrFy7w5ihlaOG+qR+6fj+vm5EQaO3qwxgACLcgH+VfShuOG4mkx8qFJmf+OZ3fh5iKngjNZfKtfcqI7zHWdk6378TQfQC52/kbZukjNXOLCpyNkogahcjA00onIoTK1RUDuMW28edAHwPFbpttXDTaqis+8JPMY8hZwsZGENCzTAAAAFQD6+It5vozwGgaN9ROYPMlByhi6jwAAAIBz2mcAC694vNzz9b6614gkX9d9E99PzJYfU1MPkXDziKg7MrjBw7Opd5y1jL09S3iL6lSTlHkKwVKvQ3pOwWRwXXRrKVus4I0STveoApm526jmp6mY0YEtqR98vMJ0v97h1ydt8FikKlihefCsnXVicb8887PXs2Y8C6GuFT3tfQAAAIBbmHtV5tPcrMRDkULhaQ/Whap2VKvT2DUhIHA7lx6oy/KpkltOpxDZOIGUHKqffGbiR7Jh01/y090AY5L2eCf0S2Ytx93+eADwVVpJbFJo6zSwfeey2Gm6L2oA+rCz9zTdmtZoekpD3/RAOQjnJIAPwbs7mXwabZTw4xRtiYIRrw== DSA #5
+|1|hTrfD0CuuB9ZbOa1CHFYvIk/gKE=|tPmW50t7flncm1UyM+DR97ubDNU= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPIudcagzq4QPtP1jkpje34+0POLB0jwT64hqrbCqhTH2T800KDZ0h2vwlJYa3OP3Oqru9AB5pnuHsKw7mAhUGY= ECDSA #5
+|1|fOGqe75X5ZpTz4c7DitP4E8/y30=|Lmcch2fh54bUYoV//S2VqDFVeiY= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINf63qSV8rD57N+digID8t28WVhd3Yf2K2UhaoG8TsWQ ED25519 #5
+|1|0RVzLjY3lwE3MRweguaAXaCCWk8=|DbcIgJQcRZJMYI6NYDOM6oJycPk= 1024 65537 127931411493401587586867047972295564331543694182352197506125410692673654572057908999642645524647232712160516076508316152810117209181150078352725299319149726341058893406440426414316276977768958023952319602422835879783057966985348561111880658922724668687074412548487722084792283453716871417610020757212399252171 RSA1 #5
+|1|4q79XnHpKBNQhyMLAqbPPDN+JKo=|k1Wvjjb52zDdrXWM801+wX5oH8U= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC/C15Q4sfnk7BZff1er8bscay+5s51oD4eWArlHWMK/ZfYeeTAccTy+7B7Jv+MS4nKCpflrvJI2RQz4kS8vF0ATdBbi4jeWefStlHNg0HLhnCY7NAfDIlRdaN9lm3Pqm2vmr+CkqwcJaSpycDg8nPN9yNAuD6pv7NDuUnECezojQ== RSA #5
+
+|1|0M6PIx6THA3ipIOvTl3fcgn2z+A=|bwEJAOwJz+Sm7orFdgj170mD/zY= ssh-dss AAAAB3NzaC1kc3MAAACBAIutigAse65TCW6hHDOEGXenE9L4L0talHbs65hj3UUNtWflKdQeXLofqXgW8AwaDKmnuRPrxRoxVNXj84n45wtBEdt4ztmdAZteAbXSnHqpcxME3jDxh3EtxzGPXLs+RUmKPVguraSgo7W2oN7KFx6VM+AcAtxANSTlvDid3s47AAAAFQCd9Q3kkHSLWe77sW0eRaayI45ovwAAAIAw6srGF6xvFasI44Y3r9JJ2K+3ezozl3ldL3p2+p2HG3iWafC4SdV8pB6ZIxKlYAywiiFb3LzH/JweGFq1jtoFDRM3MlYORBevydU4zPz7b5QLDVB0sY4evYtWmg2BFJvoWRfhLnlZVW7h5N8v4fNIwdVmVsw4Ljes7iF2HRGhHgAAAIBDFT3fww2Oby1xUA6G9pDAcVikrQFqp1sJRylNTUyeyQ37SNAGzYxwHJFgQr8gZLdRQ1UW+idYpqVbVNcYFMOiw/zSqK2OfVwPZ9U+TTKdc992ChSup6vJEKM/ZVIyDWDbJr7igQ4ahy7jo9mFvm8ljN926EnspQzCvs0Dxk6tHA== DSA #6
+|1|a6WGHcL+9gX3e96tMlgDSDJwtSg=|5Dqlb/yqNEf7jgfllrp/ygLmRV8= ssh-dss AAAAB3NzaC1kc3MAAACBAIutigAse65TCW6hHDOEGXenE9L4L0talHbs65hj3UUNtWflKdQeXLofqXgW8AwaDKmnuRPrxRoxVNXj84n45wtBEdt4ztmdAZteAbXSnHqpcxME3jDxh3EtxzGPXLs+RUmKPVguraSgo7W2oN7KFx6VM+AcAtxANSTlvDid3s47AAAAFQCd9Q3kkHSLWe77sW0eRaayI45ovwAAAIAw6srGF6xvFasI44Y3r9JJ2K+3ezozl3ldL3p2+p2HG3iWafC4SdV8pB6ZIxKlYAywiiFb3LzH/JweGFq1jtoFDRM3MlYORBevydU4zPz7b5QLDVB0sY4evYtWmg2BFJvoWRfhLnlZVW7h5N8v4fNIwdVmVsw4Ljes7iF2HRGhHgAAAIBDFT3fww2Oby1xUA6G9pDAcVikrQFqp1sJRylNTUyeyQ37SNAGzYxwHJFgQr8gZLdRQ1UW+idYpqVbVNcYFMOiw/zSqK2OfVwPZ9U+TTKdc992ChSup6vJEKM/ZVIyDWDbJr7igQ4ahy7jo9mFvm8ljN926EnspQzCvs0Dxk6tHA== DSA #6
+|1|OeCpi7Pn5Q6c8la4fPf9G8YctT8=|sC6D7lDXTafIpokZJ1+1xWg2R6Q= ssh-dss AAAAB3NzaC1kc3MAAACBAIutigAse65TCW6hHDOEGXenE9L4L0talHbs65hj3UUNtWflKdQeXLofqXgW8AwaDKmnuRPrxRoxVNXj84n45wtBEdt4ztmdAZteAbXSnHqpcxME3jDxh3EtxzGPXLs+RUmKPVguraSgo7W2oN7KFx6VM+AcAtxANSTlvDid3s47AAAAFQCd9Q3kkHSLWe77sW0eRaayI45ovwAAAIAw6srGF6xvFasI44Y3r9JJ2K+3ezozl3ldL3p2+p2HG3iWafC4SdV8pB6ZIxKlYAywiiFb3LzH/JweGFq1jtoFDRM3MlYORBevydU4zPz7b5QLDVB0sY4evYtWmg2BFJvoWRfhLnlZVW7h5N8v4fNIwdVmVsw4Ljes7iF2HRGhHgAAAIBDFT3fww2Oby1xUA6G9pDAcVikrQFqp1sJRylNTUyeyQ37SNAGzYxwHJFgQr8gZLdRQ1UW+idYpqVbVNcYFMOiw/zSqK2OfVwPZ9U+TTKdc992ChSup6vJEKM/ZVIyDWDbJr7igQ4ahy7jo9mFvm8ljN926EnspQzCvs0Dxk6tHA== DSA #6
+|1|BHESVyiJ7G2NN0lxrw7vT109jmk=|TKof+015J77bXqibsh0N1Lp0MKk= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK1wRLyKtvK3Mmhd0XPkKwW4ev1KBVf8J4aG8lESq1TsaqqfOXYGyxMq5pN8fCGiD5UPOqyTYz/ZNzClRhJRHao= ECDSA #6
+|1|wY53mZNASDJ5/P3JYCJ4FUNa6WQ=|v8p0MfV5lqlZB2J0yLxl/gsWVQo= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK1wRLyKtvK3Mmhd0XPkKwW4ev1KBVf8J4aG8lESq1TsaqqfOXYGyxMq5pN8fCGiD5UPOqyTYz/ZNzClRhJRHao= ECDSA #6
+|1|horeoyFPwfKhyFN+zJZ5LCfOo/I=|2ofvp0tNwCbKsV8FuiFA4gQG2Z8= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK1wRLyKtvK3Mmhd0XPkKwW4ev1KBVf8J4aG8lESq1TsaqqfOXYGyxMq5pN8fCGiD5UPOqyTYz/ZNzClRhJRHao= ECDSA #6
+|1|Aw4fXumZfx6jEIJuDGIyeEMd81A=|5FdLtdm2JeKNsS8IQeQlGYIadOE= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLW0ZwCkRQldpLa4I5BpwGa/om+WE6OgC8jdVqakt0Z ED25519 #6
+|1|+dGUNpv6GblrDd5fgHLlOWpSbEo=|He/pQ1yJjtiCyTNWpGwjBD4sZFI= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLW0ZwCkRQldpLa4I5BpwGa/om+WE6OgC8jdVqakt0Z ED25519 #6
+|1|E/PACGl8m1T7QnPedOoooozstP0=|w6DQAFT8yZgj0Hlkz5R1TppYHCA= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLW0ZwCkRQldpLa4I5BpwGa/om+WE6OgC8jdVqakt0Z ED25519 #6
+|1|SaoyMStgxpYfwedSXBAghi8Zo0s=|Gz78k69GaE6iViV3OOvbStKqyTA= 1024 65537 140883028436203600354693376066567741282115117509696517282419557936340193768851493584179972504103033755515036493433917203732876685813283050574208967197963391667532902202382549275760997891673884333346000558018002659506756213191532156293935482587878596032743105911487673274674568768638010598205190227631909167257 RSA1 #6
+|1|8qfGeiT5WTCzWYbXPQ+lsLg7km4=|1sIBwiSUr8IGkvrUGm3/9QYurmA= 1024 65537 140883028436203600354693376066567741282115117509696517282419557936340193768851493584179972504103033755515036493433917203732876685813283050574208967197963391667532902202382549275760997891673884333346000558018002659506756213191532156293935482587878596032743105911487673274674568768638010598205190227631909167257 RSA1 #6
+|1|87M1OtyHg1BZiDY3rT6lYsZFnAU=|eddAQVcMNbn2OB87XWXFQnYo6R4= 1024 65537 140883028436203600354693376066567741282115117509696517282419557936340193768851493584179972504103033755515036493433917203732876685813283050574208967197963391667532902202382549275760997891673884333346000558018002659506756213191532156293935482587878596032743105911487673274674568768638010598205190227631909167257 RSA1 #6
+|1|60w3wFfC0XWI+rRmRlxIRhh8lwE=|yMhsGrzBJKiesAdSQ/PVgkCrDKk= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQClu/3I6GG1Ai89Imnw0vXmWJ2OW0ftQwRrsbIAD0qzLFYpkJ76QWnzpCehvK9u0L5hcw7z2Y6mRLcSBsqONc+HVU73Qi7M4zHRvtjprPs3SOyLpf0J9sL1WiHBDwg2P0miHMCdqHDd5nVXkJB2d4eeecmgezGLa29NOHZjbza5yw== RSA #6
+|1|5gdEMmLUJC7grqWhRJPy2OTaSyE=|/XTfmLMa/B8npcVCGFRdaHl+d/0= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQClu/3I6GG1Ai89Imnw0vXmWJ2OW0ftQwRrsbIAD0qzLFYpkJ76QWnzpCehvK9u0L5hcw7z2Y6mRLcSBsqONc+HVU73Qi7M4zHRvtjprPs3SOyLpf0J9sL1WiHBDwg2P0miHMCdqHDd5nVXkJB2d4eeecmgezGLa29NOHZjbza5yw== RSA #6
+|1|6FGCWUr42GHdMB/eifnHNCuwgdk=|ONJvYZ/ANmi59R5HrOhLPmvYENM= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQClu/3I6GG1Ai89Imnw0vXmWJ2OW0ftQwRrsbIAD0qzLFYpkJ76QWnzpCehvK9u0L5hcw7z2Y6mRLcSBsqONc+HVU73Qi7M4zHRvtjprPs3SOyLpf0J9sL1WiHBDwg2P0miHMCdqHDd5nVXkJB2d4eeecmgezGLa29NOHZjbza5yw== RSA #6
+
+
+# Revoked and CA keys
+@revoked sisyphus.example.com 1024 65537 174143366122697048196335388217056770310345753698079464367148030836533360510864881734142526411160017107552815906024399248049666856133771656680462456979369587903909343046704480897527203474513676654933090991684252819423129896444427656841613263783484827101210734799449281639493127615902427443211183258155381810593 RSA1 #4
+@revoked sisyphus.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDFP8L9REfN/iYy1KIRtFqSCn3V2+vOCpoZYENFGLdOF ED25519 #4
+@cert-authority prometheus.example.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHZd0OXHIWwK3xnjAdMZ1tojxWycdu38pORO/UX5cqsKMgGCKQVBWWO3TFk1ePkGIE9VMWT1hCGqWRRwYlH+dSE= ECDSA #4
+@cert-authority *.example.com ssh-dss AAAAB3NzaC1kc3MAAACBAKvjnFHm0VvMr5h2Zu3nURsxQKGoxm+DCzYDxRYcilK07Cm5c4XTrFbA2X86+9sGs++W7QRMcTJUYIg0a+UtIMtAjwORd6ZPXM2K5dBW+gh1oHyvKi767tWX7I2c+1ZPJDY95mUUfZQUEfdy9eGDSBmw/pSsveQ1ur6XNUh/MtP/AAAAFQDHnXk/9jBJAdce1pHtLWnbdPSGdQAAAIEAm2OLy8tZBfiEO3c3X1yyB/GTcDwrQCqRMDkhnsmrliec3dWkOfNTzu+MrdvF8ymTWLEqPpbMheYtvNyZ3TF0HO5W7aVBpdGZbOdOAIfB+6skqGbI8A5Up1d7dak/bSsqL2r5NjwbDOdq+1hBzzvbl/qjh+sQarV2zHrpKoQaV28AAACANtkBVedBbqIAdphCrN/LbUi9WlyuF9UZz+tlpVLYrj8GJVwnplV2tvOmUw6yP5/pzCimTsao8dpL5PWxm7fKxLWVxA+lEsA4WeC885CiZn8xhdaJOCN+NyJ2bqkz+4VPI7oDGBm0aFwUqJn+M1PiSgvI50XdF2dBsFRTRNY0wzA= DSA #4
+
+# Some invalid lines
+@what sisyphus.example.com 1024 65537 153895431603677073925890314548566704948446776958334195280085080329934839226701954473292358821568047724356487621573742372399387931887004184139835510820577359977148363519970774657801798872789118894962853659233045778161859413980935372685480527355016624825696983269800574755126132814333241868538220824608980319407 RSA1 #1
+sisyphus.example.com      
+prometheus.example.com ssh-ed25519 
+sisyphus.example.com ssh-dsa AAAATgAAAAdz
+prometheus.example.com 1024   
+sisyphus.example.com 1024 65535   
+prometheus.example.com 1025 65537 153895431603677073925890314548566704948446776958334195280085080329934839226701954473292358821568047724356487621573742372399387931887004184139835510820577359977148363519970774657801798872789118894962853659233045778161859413980935372685480527355016624825696983269800574755126132814333241868538220824608980319407 RSA1 #1
+sisyphus.example.com ssh-XXX AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg==
+prometheus.example.com ssh-rsa AAAATgAAAAdzc2gtWFhYAAAAP0ZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRkZVQ0tPRkZGVUNLT0ZGRlVDS09GRg==
diff --git a/regress/unittests/hostkeys/testdata/rsa1_1.pub b/regress/unittests/hostkeys/testdata/rsa1_1.pub
new file mode 100644 (file)
index 0000000..772ce9c
--- /dev/null
@@ -0,0 +1 @@
+1024 65537 153895431603677073925890314548566704948446776958334195280085080329934839226701954473292358821568047724356487621573742372399387931887004184139835510820577359977148363519970774657801798872789118894962853659233045778161859413980935372685480527355016624825696983269800574755126132814333241868538220824608980319407 RSA1 #1
diff --git a/regress/unittests/hostkeys/testdata/rsa1_2.pub b/regress/unittests/hostkeys/testdata/rsa1_2.pub
new file mode 100644 (file)
index 0000000..78794b9
--- /dev/null
@@ -0,0 +1 @@
+1024 65537 135970715082947442639683969597180728933388298633245835186618852623800675939308729462220235058285909679252157995530180587329132927339620517781785310829060832352381015614725360278571924286986474946772141568893116432268565829418506866604294073334978275702221949783314402806080929601995102334442541344606109853641 RSA1 #2
diff --git a/regress/unittests/hostkeys/testdata/rsa1_3.pub b/regress/unittests/hostkeys/testdata/rsa1_3.pub
new file mode 100644 (file)
index 0000000..0c035fe
--- /dev/null
@@ -0,0 +1 @@
+1024 65537 125895605498029643697051635076028105429632810811904702876152645261610759866299221305725069141163240694267669117205342283569102183636228981857946763978553664895308762890072813014496700601576921921752482059207749978374872713540759920335553799711267170948655579130584031555334229966603000896364091459595522912269 RSA1 #3
diff --git a/regress/unittests/hostkeys/testdata/rsa1_4.pub b/regress/unittests/hostkeys/testdata/rsa1_4.pub
new file mode 100644 (file)
index 0000000..0006442
--- /dev/null
@@ -0,0 +1 @@
+1024 65537 174143366122697048196335388217056770310345753698079464367148030836533360510864881734142526411160017107552815906024399248049666856133771656680462456979369587903909343046704480897527203474513676654933090991684252819423129896444427656841613263783484827101210734799449281639493127615902427443211183258155381810593 RSA1 #4
diff --git a/regress/unittests/hostkeys/testdata/rsa1_5.pub b/regress/unittests/hostkeys/testdata/rsa1_5.pub
new file mode 100644 (file)
index 0000000..bb53c26
--- /dev/null
@@ -0,0 +1 @@
+1024 65537 127931411493401587586867047972295564331543694182352197506125410692673654572057908999642645524647232712160516076508316152810117209181150078352725299319149726341058893406440426414316276977768958023952319602422835879783057966985348561111880658922724668687074412548487722084792283453716871417610020757212399252171 RSA1 #5
diff --git a/regress/unittests/hostkeys/testdata/rsa1_6.pub b/regress/unittests/hostkeys/testdata/rsa1_6.pub
new file mode 100644 (file)
index 0000000..85d6576
--- /dev/null
@@ -0,0 +1 @@
+1024 65537 140883028436203600354693376066567741282115117509696517282419557936340193768851493584179972504103033755515036493433917203732876685813283050574208967197963391667532902202382549275760997891673884333346000558018002659506756213191532156293935482587878596032743105911487673274674568768638010598205190227631909167257 RSA1 #6
diff --git a/regress/unittests/hostkeys/testdata/rsa_1.pub b/regress/unittests/hostkeys/testdata/rsa_1.pub
new file mode 100644 (file)
index 0000000..2b87885
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDg4hB4vAZHJ0PVRiJajOv/GlytFWNpv5/9xgB9+5BIbvp8LOrFZ5D9K0Gsmwpd4G4rfaAz8j896DhMArg0vtkilIPPGt/6VzWMERgvaIQPJ/IE99X3+fjcAG56oAWwy29JX10lQMzBPU6XJIaN/zqpkb6qUBiAHBdLpxrFBBU0/w== RSA #1
diff --git a/regress/unittests/hostkeys/testdata/rsa_2.pub b/regress/unittests/hostkeys/testdata/rsa_2.pub
new file mode 100644 (file)
index 0000000..33f1fd9
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDmbUhNabB5AmBDX6GNHZ3lbn7pRxqfpW+f53QqNGlK0sLV+0gkMIrOfUp1kdE2ZLE6tfzdicatj/RlH6/wuo4yyYb+Pyx3G0vxdmAIiA4aANq38XweDucBC0TZkRWVHK+Gs5V/uV0z7N0axJvkkJujMLvST3CRiiWwlficBc6yVQ== RSA #2
diff --git a/regress/unittests/hostkeys/testdata/rsa_3.pub b/regress/unittests/hostkeys/testdata/rsa_3.pub
new file mode 100644 (file)
index 0000000..c2f6b20
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDX8F93W3SH4ZSus4XUQ2cw9dqcuyUETTlKEeGv3zlknV3YCoe2Mp04naDhiuwj8sOsytrZSESzLY1ZEyzrjxE6ZFVv8NKgck/AbRjcwlRFOcx9oKUxOrXRa0IoXlTq0kyjKCJfaHBKnGitZThknCPTbVmpATkm5xx6J0WEDozfoQ== RSA #3
diff --git a/regress/unittests/hostkeys/testdata/rsa_4.pub b/regress/unittests/hostkeys/testdata/rsa_4.pub
new file mode 100644 (file)
index 0000000..35545a7
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDI8AdjBAozcdRnIikVlt69iyDHKyrtxmpdkbRy9bWaL86OH+PTmLUk5e+T/ufiakpeE2pm0hkE3e4Sh/FsY+rsQdRoraWVNFfchcMeVlKvuy5RZN0ElvmaQebOJUeNeBn2LLw8aL8bJ4CP/bQRKrmrSSqjz3+4H9YNVyyk1OGBPQ== RSA #4
diff --git a/regress/unittests/hostkeys/testdata/rsa_5.pub b/regress/unittests/hostkeys/testdata/rsa_5.pub
new file mode 100644 (file)
index 0000000..befbaa7
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC/C15Q4sfnk7BZff1er8bscay+5s51oD4eWArlHWMK/ZfYeeTAccTy+7B7Jv+MS4nKCpflrvJI2RQz4kS8vF0ATdBbi4jeWefStlHNg0HLhnCY7NAfDIlRdaN9lm3Pqm2vmr+CkqwcJaSpycDg8nPN9yNAuD6pv7NDuUnECezojQ== RSA #5
diff --git a/regress/unittests/hostkeys/testdata/rsa_6.pub b/regress/unittests/hostkeys/testdata/rsa_6.pub
new file mode 100644 (file)
index 0000000..393e116
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQClu/3I6GG1Ai89Imnw0vXmWJ2OW0ftQwRrsbIAD0qzLFYpkJ76QWnzpCehvK9u0L5hcw7z2Y6mRLcSBsqONc+HVU73Qi7M4zHRvtjprPs3SOyLpf0J9sL1WiHBDwg2P0miHMCdqHDd5nVXkJB2d4eeecmgezGLa29NOHZjbza5yw== RSA #6
diff --git a/regress/unittests/hostkeys/tests.c b/regress/unittests/hostkeys/tests.c
new file mode 100644 (file)
index 0000000..92c7646
--- /dev/null
@@ -0,0 +1,16 @@
+/*     $OpenBSD: tests.c,v 1.1 2015/02/16 22:18:34 djm Exp $ */
+/*
+ * Regress test for known_hosts-related API.
+ *
+ * Placed in the public domain
+ */
+
+void tests(void);
+void test_iterate(void); /* test_iterate.c */
+
+void
+tests(void)
+{
+       test_iterate();
+}
+
diff --git a/regress/unittests/kex/Makefile b/regress/unittests/kex/Makefile
new file mode 100644 (file)
index 0000000..7ed3126
--- /dev/null
@@ -0,0 +1,12 @@
+#      $OpenBSD: Makefile,v 1.4 2016/11/01 13:43:27 tb Exp $
+
+PROG=test_kex
+SRCS=tests.c test_kex.c
+REGRESS_TARGETS=run-regress-${PROG}
+
+run-regress-${PROG}: ${PROG}
+       env ${TEST_ENV} ./${PROG}
+
+.include <bsd.regress.mk>
+
+LDADD+=-lz
diff --git a/regress/unittests/kex/test_kex.c b/regress/unittests/kex/test_kex.c
new file mode 100644 (file)
index 0000000..6e5999b
--- /dev/null
@@ -0,0 +1,202 @@
+/*     $OpenBSD: test_kex.c,v 1.2 2015/07/10 06:23:25 markus Exp $ */
+/*
+ * Regress test KEX
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "ssherr.h"
+#include "ssh_api.h"
+#include "sshbuf.h"
+#include "packet.h"
+#include "myproposal.h"
+
+struct ssh *active_state = NULL; /* XXX - needed for linking */
+
+void kex_tests(void);
+static int do_debug = 0;
+
+static int
+do_send_and_receive(struct ssh *from, struct ssh *to)
+{
+       u_char type;
+       size_t len;
+       const u_char *buf;
+       int r;
+
+       for (;;) {
+               if ((r = ssh_packet_next(from, &type)) != 0) {
+                       fprintf(stderr, "ssh_packet_next: %s\n", ssh_err(r));
+                       return r;
+               }
+               if (type != 0)
+                       return 0;
+               buf = ssh_output_ptr(from, &len);
+               if (do_debug)
+                       printf("%zu", len);
+               if (len == 0)
+                       return 0;
+               if ((r = ssh_output_consume(from, len)) != 0 ||
+                   (r = ssh_input_append(to, buf, len)) != 0)
+                       return r;
+       }
+}
+
+static void
+run_kex(struct ssh *client, struct ssh *server)
+{
+       int r = 0;
+
+       while (!server->kex->done || !client->kex->done) {
+               if (do_debug)
+                       printf(" S:");
+               if ((r = do_send_and_receive(server, client)))
+                       break;
+               if (do_debug)
+                       printf(" C:");
+               if ((r = do_send_and_receive(client, server)))
+                       break;
+       }
+       if (do_debug)
+               printf("done: %s\n", ssh_err(r));
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_INT_EQ(server->kex->done, 1);
+       ASSERT_INT_EQ(client->kex->done, 1);
+}
+
+static void
+do_kex_with_key(char *kex, int keytype, int bits)
+{
+       struct ssh *client = NULL, *server = NULL, *server2 = NULL;
+       struct sshkey *private, *public;
+       struct sshbuf *state;
+       struct kex_params kex_params;
+       char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT };
+       char *keyname = NULL;
+
+       TEST_START("sshkey_generate");
+       ASSERT_INT_EQ(sshkey_generate(keytype, bits, &private), 0);
+       TEST_DONE();
+
+       TEST_START("sshkey_from_private");
+       ASSERT_INT_EQ(sshkey_from_private(private, &public), 0);
+       TEST_DONE();
+
+       TEST_START("ssh_init");
+       memcpy(kex_params.proposal, myproposal, sizeof(myproposal));
+       if (kex != NULL)
+               kex_params.proposal[PROPOSAL_KEX_ALGS] = kex;
+       keyname = strdup(sshkey_ssh_name(private));
+       ASSERT_PTR_NE(keyname, NULL);
+       kex_params.proposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = keyname;
+       ASSERT_INT_EQ(ssh_init(&client, 0, &kex_params), 0);
+       ASSERT_INT_EQ(ssh_init(&server, 1, &kex_params), 0);
+       ASSERT_PTR_NE(client, NULL);
+       ASSERT_PTR_NE(server, NULL);
+       TEST_DONE();
+
+       TEST_START("ssh_add_hostkey");
+       ASSERT_INT_EQ(ssh_add_hostkey(server, private), 0);
+       ASSERT_INT_EQ(ssh_add_hostkey(client, public), 0);
+       TEST_DONE();
+
+       TEST_START("kex");
+       run_kex(client, server);
+       TEST_DONE();
+
+       TEST_START("rekeying client");
+       ASSERT_INT_EQ(kex_send_kexinit(client), 0);
+       run_kex(client, server);
+       TEST_DONE();
+
+       TEST_START("rekeying server");
+       ASSERT_INT_EQ(kex_send_kexinit(server), 0);
+       run_kex(client, server);
+       TEST_DONE();
+
+       TEST_START("ssh_packet_get_state");
+       state = sshbuf_new();
+       ASSERT_PTR_NE(state, NULL);
+       ASSERT_INT_EQ(ssh_packet_get_state(server, state), 0);
+       ASSERT_INT_GE(sshbuf_len(state), 1);
+       TEST_DONE();
+
+       TEST_START("ssh_packet_set_state");
+       server2 = NULL;
+       ASSERT_INT_EQ(ssh_init(&server2, 1, NULL), 0);
+       ASSERT_PTR_NE(server2, NULL);
+       ASSERT_INT_EQ(ssh_add_hostkey(server2, private), 0);
+       kex_free(server2->kex); /* XXX or should ssh_packet_set_state()? */
+       ASSERT_INT_EQ(ssh_packet_set_state(server2, state), 0);
+       ASSERT_INT_EQ(sshbuf_len(state), 0);
+       sshbuf_free(state);
+       ASSERT_PTR_NE(server2->kex, NULL);
+       /* XXX we need to set the callbacks */
+       server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
+       server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
+       server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
+       server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
+#ifdef OPENSSL_HAS_ECC
+       server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
+#endif
+       server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server;
+       server2->kex->load_host_public_key = server->kex->load_host_public_key;
+       server2->kex->load_host_private_key = server->kex->load_host_private_key;
+       server2->kex->sign = server->kex->sign;
+       TEST_DONE();
+
+       TEST_START("rekeying server2");
+       ASSERT_INT_EQ(kex_send_kexinit(server2), 0);
+       run_kex(client, server2);
+       ASSERT_INT_EQ(kex_send_kexinit(client), 0);
+       run_kex(client, server2);
+       TEST_DONE();
+
+       TEST_START("cleanup");
+       sshkey_free(private);
+       sshkey_free(public);
+       ssh_free(client);
+       ssh_free(server);
+       ssh_free(server2);
+       free(keyname);
+       TEST_DONE();
+}
+
+static void
+do_kex(char *kex)
+{
+       do_kex_with_key(kex, KEY_RSA, 2048);
+       do_kex_with_key(kex, KEY_DSA, 1024);
+#ifdef OPENSSL_HAS_ECC
+       do_kex_with_key(kex, KEY_ECDSA, 256);
+#endif
+       do_kex_with_key(kex, KEY_ED25519, 256);
+}
+
+void
+kex_tests(void)
+{
+       do_kex("curve25519-sha256@libssh.org");
+#ifdef OPENSSL_HAS_ECC
+       do_kex("ecdh-sha2-nistp256");
+       do_kex("ecdh-sha2-nistp384");
+       do_kex("ecdh-sha2-nistp521");
+#endif
+       do_kex("diffie-hellman-group-exchange-sha256");
+       do_kex("diffie-hellman-group-exchange-sha1");
+       do_kex("diffie-hellman-group14-sha1");
+       do_kex("diffie-hellman-group1-sha1");
+}
diff --git a/regress/unittests/kex/tests.c b/regress/unittests/kex/tests.c
new file mode 100644 (file)
index 0000000..e7036ec
--- /dev/null
@@ -0,0 +1,14 @@
+/*     $OpenBSD: tests.c,v 1.1 2015/01/15 23:41:29 markus Exp $ */
+/*
+ * Placed in the public domain
+ */
+
+#include "../test_helper/test_helper.h"
+
+void kex_tests(void);
+
+void
+tests(void)
+{
+       kex_tests();
+}
diff --git a/regress/unittests/match/Makefile b/regress/unittests/match/Makefile
new file mode 100644 (file)
index 0000000..bd4aed8
--- /dev/null
@@ -0,0 +1,10 @@
+#      $OpenBSD: Makefile,v 1.3 2016/11/01 13:43:27 tb Exp $
+
+PROG=test_match
+SRCS=tests.c
+REGRESS_TARGETS=run-regress-${PROG}
+
+run-regress-${PROG}: ${PROG}
+       env ${TEST_ENV} ./${PROG}
+
+.include <bsd.regress.mk>
diff --git a/regress/unittests/match/tests.c b/regress/unittests/match/tests.c
new file mode 100644 (file)
index 0000000..e159336
--- /dev/null
@@ -0,0 +1,132 @@
+/*     $OpenBSD: tests.c,v 1.4 2017/02/03 23:01:42 djm Exp $ */
+/*
+ * Regress test for matching functions
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "match.h"
+
+void
+tests(void)
+{
+       TEST_START("match_pattern");
+       ASSERT_INT_EQ(match_pattern("", ""), 1);
+       ASSERT_INT_EQ(match_pattern("", "aaa"), 0);
+       ASSERT_INT_EQ(match_pattern("aaa", ""), 0);
+       ASSERT_INT_EQ(match_pattern("aaa", "aaaa"), 0);
+       ASSERT_INT_EQ(match_pattern("aaaa", "aaa"), 0);
+       TEST_DONE();
+
+       TEST_START("match_pattern wildcard");
+       ASSERT_INT_EQ(match_pattern("", "*"), 1);
+       ASSERT_INT_EQ(match_pattern("a", "?"), 1);
+       ASSERT_INT_EQ(match_pattern("aa", "a?"), 1);
+       ASSERT_INT_EQ(match_pattern("a", "*"), 1);
+       ASSERT_INT_EQ(match_pattern("aa", "a*"), 1);
+       ASSERT_INT_EQ(match_pattern("aa", "?*"), 1);
+       ASSERT_INT_EQ(match_pattern("aa", "**"), 1);
+       ASSERT_INT_EQ(match_pattern("aa", "?a"), 1);
+       ASSERT_INT_EQ(match_pattern("aa", "*a"), 1);
+       ASSERT_INT_EQ(match_pattern("ba", "a?"), 0);
+       ASSERT_INT_EQ(match_pattern("ba", "a*"), 0);
+       ASSERT_INT_EQ(match_pattern("ab", "?a"), 0);
+       ASSERT_INT_EQ(match_pattern("ab", "*a"), 0);
+       TEST_DONE();
+
+       TEST_START("match_pattern_list");
+       ASSERT_INT_EQ(match_pattern_list("", "", 0), 0); /* no patterns */
+       ASSERT_INT_EQ(match_pattern_list("", "*", 0), 1);
+       ASSERT_INT_EQ(match_pattern_list("", "!*", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("", "!a,*", 0), 1);
+       ASSERT_INT_EQ(match_pattern_list("", "*,!a", 0), 1);
+       ASSERT_INT_EQ(match_pattern_list("", "a,!*", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("", "!*,a", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("a", "", 0), 0);
+       ASSERT_INT_EQ(match_pattern_list("a", "*", 0), 1);
+       ASSERT_INT_EQ(match_pattern_list("a", "!*", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("a", "!a", 0), -1);
+       /* XXX negated ASSERT_INT_EQ(match_pattern_list("a", "!b", 0), 1); */
+       ASSERT_INT_EQ(match_pattern_list("a", "!a,*", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("b", "!a,*", 0), 1);
+       ASSERT_INT_EQ(match_pattern_list("a", "*,!a", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("b", "*,!a", 0), 1);
+       ASSERT_INT_EQ(match_pattern_list("a", "a,!*", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("b", "a,!*", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("a", "a,!a", 0), -1);
+       /* XXX negated ASSERT_INT_EQ(match_pattern_list("b", "a,!a", 0), 1); */
+       ASSERT_INT_EQ(match_pattern_list("a", "!*,a", 0), -1);
+       ASSERT_INT_EQ(match_pattern_list("b", "!*,a", 0), -1);
+       TEST_DONE();
+
+       TEST_START("match_pattern_list lowercase");
+       ASSERT_INT_EQ(match_pattern_list("abc", "ABC", 0), 0);
+       ASSERT_INT_EQ(match_pattern_list("ABC", "abc", 0), 0);
+       ASSERT_INT_EQ(match_pattern_list("abc", "ABC", 1), 1);
+       ASSERT_INT_EQ(match_pattern_list("ABC", "abc", 1), 0);
+       TEST_DONE();
+
+       TEST_START("addr_match_list");
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.1/44"), -2);
+       ASSERT_INT_EQ(addr_match_list(NULL, "127.0.0.1/44"), -2);
+       ASSERT_INT_EQ(addr_match_list("a", "*"), 0);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "*"), 1);
+       ASSERT_INT_EQ(addr_match_list(NULL, "*"), 0);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.1"), 1);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.2"), 0);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.1"), -1);
+       /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.2"), 1); */
+       ASSERT_INT_EQ(addr_match_list("127.0.0.255", "127.0.0.0/24"), 1);
+       ASSERT_INT_EQ(addr_match_list("127.0.1.1", "127.0.0.0/24"), 0);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.0/24"), 1);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.1.0/24"), 0);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.0/24"), -1);
+       /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.1.0/24"), 1); */
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,!127.0.0.1"), -1);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.1,10.0.0.1"), -1);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,127.0.0.2"), 0);
+       ASSERT_INT_EQ(addr_match_list("127.0.0.1", "127.0.0.2,10.0.0.1"), 0);
+       /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "10.0.0.1,!127.0.0.2"), 1); */
+       /* XXX negated ASSERT_INT_EQ(addr_match_list("127.0.0.1", "!127.0.0.2,10.0.0.1"), 1); */
+       TEST_DONE();
+
+#define CHECK_FILTER(string,filter,expected) \
+       do { \
+               char *result = match_filter_list((string), (filter)); \
+               ASSERT_STRING_EQ(result, expected); \
+               free(result); \
+       } while (0)
+
+       TEST_START("match_filter_list");
+       CHECK_FILTER("a,b,c", "", "a,b,c");
+       CHECK_FILTER("a,b,c", "a", "b,c");
+       CHECK_FILTER("a,b,c", "b", "a,c");
+       CHECK_FILTER("a,b,c", "c", "a,b");
+       CHECK_FILTER("a,b,c", "a,b", "c");
+       CHECK_FILTER("a,b,c", "a,c", "b");
+       CHECK_FILTER("a,b,c", "b,c", "a");
+       CHECK_FILTER("a,b,c", "a,b,c", "");
+       CHECK_FILTER("a,b,c", "b,c", "a");
+       CHECK_FILTER("", "a,b,c", "");
+       TEST_DONE();
+/*
+ * XXX TODO
+ * int      match_host_and_ip(const char *, const char *, const char *);
+ * int      match_user(const char *, const char *, const char *, const char *);
+ * char    *match_list(const char *, const char *, u_int *);
+ * int      addr_match_cidr_list(const char *, const char *);
+ */
+}
diff --git a/regress/unittests/sshbuf/Makefile b/regress/unittests/sshbuf/Makefile
new file mode 100644 (file)
index 0000000..69b2756
--- /dev/null
@@ -0,0 +1,14 @@
+#      $OpenBSD: Makefile,v 1.5 2016/11/01 13:43:27 tb Exp $
+
+PROG=test_sshbuf
+SRCS=tests.c
+SRCS+=test_sshbuf.c
+SRCS+=test_sshbuf_getput_basic.c
+SRCS+=test_sshbuf_getput_crypto.c
+SRCS+=test_sshbuf_misc.c
+SRCS+=test_sshbuf_fuzz.c
+SRCS+=test_sshbuf_getput_fuzz.c
+SRCS+=test_sshbuf_fixed.c
+
+.include <bsd.regress.mk>
+
diff --git a/regress/unittests/sshbuf/test_sshbuf.c b/regress/unittests/sshbuf/test_sshbuf.c
new file mode 100644 (file)
index 0000000..ee77d69
--- /dev/null
@@ -0,0 +1,240 @@
+/*     $OpenBSD: test_sshbuf.c,v 1.1 2014/04/30 05:32:00 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#define SSHBUF_INTERNAL 1      /* access internals for testing */
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "ssherr.h"
+#include "sshbuf.h"
+
+void sshbuf_tests(void);
+
+void
+sshbuf_tests(void)
+{
+       struct sshbuf *p1;
+       const u_char *cdp;
+       u_char *dp;
+       size_t sz;
+       int r;
+
+       TEST_START("allocate sshbuf");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       TEST_DONE();
+
+       TEST_START("max size on fresh buffer");
+       ASSERT_SIZE_T_GT(sshbuf_max_size(p1), 0);
+       TEST_DONE();
+
+       TEST_START("available on fresh buffer");
+       ASSERT_SIZE_T_GT(sshbuf_avail(p1), 0);
+       TEST_DONE();
+
+       TEST_START("len = 0 on empty buffer");
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       TEST_DONE();
+
+       TEST_START("set valid max size");
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 65536), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_max_size(p1), 65536);
+       TEST_DONE();
+
+       TEST_START("available on limited buffer");
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), 65536);
+       TEST_DONE();
+
+       TEST_START("free");
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("consume on empty buffer");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_consume(p1, 0), 0);
+       ASSERT_INT_EQ(sshbuf_consume(p1, 1), SSH_ERR_MESSAGE_INCOMPLETE);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("consume_end on empty buffer");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_consume_end(p1, 0), 0);
+       ASSERT_INT_EQ(sshbuf_consume_end(p1, 1), SSH_ERR_MESSAGE_INCOMPLETE);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("reserve space");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       r = sshbuf_reserve(p1, 1, &dp);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_PTR_NE(dp, NULL);
+       *dp = 0x11;
+       r = sshbuf_reserve(p1, 3, &dp);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_PTR_NE(dp, NULL);
+       *dp++ = 0x22;
+       *dp++ = 0x33;
+       *dp++ = 0x44;
+       TEST_DONE();
+
+       TEST_START("sshbuf_len on filled buffer");
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       TEST_DONE();
+
+       TEST_START("sshbuf_ptr on filled buffer");
+       cdp = sshbuf_ptr(p1);
+       ASSERT_PTR_NE(cdp, NULL);
+       ASSERT_U8_EQ(cdp[0], 0x11);
+       ASSERT_U8_EQ(cdp[1], 0x22);
+       ASSERT_U8_EQ(cdp[2], 0x33);
+       ASSERT_U8_EQ(cdp[3], 0x44);
+       TEST_DONE();
+
+       TEST_START("consume on filled buffer");
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       ASSERT_INT_EQ(sshbuf_consume(p1, 0), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       r = sshbuf_consume(p1, 64);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       ASSERT_INT_EQ(sshbuf_consume(p1, 1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 3);
+       cdp = sshbuf_ptr(p1);
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_U8_EQ(cdp[0], 0x22);
+       ASSERT_INT_EQ(sshbuf_consume(p1, 2), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       cdp = sshbuf_ptr(p1);
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_U8_EQ(cdp[0], 0x44);
+       r = sshbuf_consume(p1, 2);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       ASSERT_INT_EQ(sshbuf_consume(p1, 1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       r = sshbuf_consume(p1, 1);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("consume_end on filled buffer");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       r = sshbuf_reserve(p1, 4, &dp);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_PTR_NE(dp, NULL);
+       *dp++ = 0x11;
+       *dp++ = 0x22;
+       *dp++ = 0x33;
+       *dp++ = 0x44;
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       r = sshbuf_consume_end(p1, 5);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       ASSERT_INT_EQ(sshbuf_consume_end(p1, 3), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       cdp = sshbuf_ptr(p1);
+       ASSERT_PTR_NE(cdp, NULL);
+       ASSERT_U8_EQ(*cdp, 0x11);
+       r = sshbuf_consume_end(p1, 2);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_INT_EQ(sshbuf_consume_end(p1, 1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("fill limited buffer");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 1223), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_max_size(p1), 1223);
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), 1223);
+       r = sshbuf_reserve(p1, 1223, &dp);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_PTR_NE(dp, NULL);
+       memset(dp, 0xd7, 1223);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1223);
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), 0);
+       r = sshbuf_reserve(p1, 1, &dp);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_PTR_EQ(dp, NULL);
+       TEST_DONE();
+
+       TEST_START("consume and force compaction");
+       ASSERT_INT_EQ(sshbuf_consume(p1, 223), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1000);
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), 223);
+       r = sshbuf_reserve(p1, 224, &dp);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_PTR_EQ(dp, NULL);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1000);
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), 223);
+       r = sshbuf_reserve(p1, 223, &dp);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_PTR_NE(dp, NULL);
+       memset(dp, 0x7d, 223);
+       cdp = sshbuf_ptr(p1);
+       ASSERT_PTR_NE(cdp, NULL);
+       ASSERT_MEM_FILLED_EQ(cdp, 0xd7, 1000);
+       ASSERT_MEM_FILLED_EQ(cdp + 1000, 0x7d, 223);
+       TEST_DONE();
+
+       TEST_START("resize full buffer");
+       r = sshbuf_set_max_size(p1, 1000);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       sz = roundup(1223 + SSHBUF_SIZE_INC * 3, SSHBUF_SIZE_INC);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, sz), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_max_size(p1), sz);
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), sz - 1223);
+       ASSERT_INT_EQ(sshbuf_len(p1), 1223);
+       TEST_DONE();
+
+       /* NB. uses sshbuf internals */
+       TEST_START("alloc chunking");
+       r = sshbuf_reserve(p1, 1, &dp);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_PTR_NE(dp, NULL);
+       *dp = 0xff;
+       cdp = sshbuf_ptr(p1);
+       ASSERT_PTR_NE(cdp, NULL);
+       ASSERT_MEM_FILLED_EQ(cdp, 0xd7, 1000);
+       ASSERT_MEM_FILLED_EQ(cdp + 1000, 0x7d, 223);
+       ASSERT_MEM_FILLED_EQ(cdp + 1223, 0xff, 1);
+       ASSERT_SIZE_T_EQ(sshbuf_alloc(p1) % SSHBUF_SIZE_INC, 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("reset buffer");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 1223), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_max_size(p1), 1223);
+       r = sshbuf_reserve(p1, 1223, &dp);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_PTR_NE(dp, NULL);
+       memset(dp, 0xd7, 1223);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1223);
+       sshbuf_reset(p1);
+       ASSERT_SIZE_T_EQ(sshbuf_max_size(p1), 1223);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), 1223);
+       sshbuf_free(p1);
+       TEST_DONE();
+}
diff --git a/regress/unittests/sshbuf/test_sshbuf_fixed.c b/regress/unittests/sshbuf/test_sshbuf_fixed.c
new file mode 100644 (file)
index 0000000..df4925f
--- /dev/null
@@ -0,0 +1,126 @@
+/*     $OpenBSD: test_sshbuf_fixed.c,v 1.1 2014/04/30 05:32:00 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#define SSHBUF_INTERNAL 1  /* access internals for testing */
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "sshbuf.h"
+#include "ssherr.h"
+
+void sshbuf_fixed(void);
+
+const u_char test_buf[] = "\x01\x12\x34\x56\x78\x00\x00\x00\x05hello";
+
+void
+sshbuf_fixed(void)
+{
+       struct sshbuf *p1, *p2, *p3;
+       u_char c;
+       char *s;
+       u_int i;
+       size_t l;
+
+       TEST_START("sshbuf_from");
+       p1 = sshbuf_from(test_buf, sizeof(test_buf));
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_PTR_EQ(sshbuf_mutable_ptr(p1), NULL);
+       ASSERT_INT_EQ(sshbuf_check_reserve(p1, 1), SSH_ERR_BUFFER_READ_ONLY);
+       ASSERT_INT_EQ(sshbuf_reserve(p1, 1, NULL), SSH_ERR_BUFFER_READ_ONLY);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 200), SSH_ERR_BUFFER_READ_ONLY);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), SSH_ERR_BUFFER_READ_ONLY);
+       ASSERT_SIZE_T_EQ(sshbuf_avail(p1), 0);
+       ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_from data");
+       p1 = sshbuf_from(test_buf, sizeof(test_buf) - 1);
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf);
+       ASSERT_INT_EQ(sshbuf_get_u8(p1, &c), 0);
+       ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf + 1);
+       ASSERT_U8_EQ(c, 1);
+       ASSERT_INT_EQ(sshbuf_get_u32(p1, &i), 0);
+       ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf + 5);
+       ASSERT_U32_EQ(i, 0x12345678);
+       ASSERT_INT_EQ(sshbuf_get_cstring(p1, &s, &l), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       ASSERT_STRING_EQ(s, "hello");
+       ASSERT_SIZE_T_EQ(l, 5);
+       sshbuf_free(p1);
+       free(s);
+       TEST_DONE();
+
+       TEST_START("sshbuf_fromb ");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_U_INT_EQ(sshbuf_refcount(p1), 1);
+       ASSERT_PTR_EQ(sshbuf_parent(p1), NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, test_buf, sizeof(test_buf) - 1), 0);
+       p2 = sshbuf_fromb(p1);
+       ASSERT_PTR_NE(p2, NULL);
+       ASSERT_U_INT_EQ(sshbuf_refcount(p1), 2);
+       ASSERT_PTR_EQ(sshbuf_parent(p1), NULL);
+       ASSERT_PTR_EQ(sshbuf_parent(p2), p1);
+       ASSERT_PTR_EQ(sshbuf_ptr(p2), sshbuf_ptr(p1));
+       ASSERT_PTR_NE(sshbuf_ptr(p1), NULL);
+       ASSERT_PTR_NE(sshbuf_ptr(p2), NULL);
+       ASSERT_PTR_EQ(sshbuf_mutable_ptr(p1), NULL);
+       ASSERT_PTR_EQ(sshbuf_mutable_ptr(p2), NULL);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sshbuf_len(p2));
+       ASSERT_INT_EQ(sshbuf_get_u8(p2, &c), 0);
+       ASSERT_PTR_EQ(sshbuf_ptr(p2), sshbuf_ptr(p1) + 1);
+       ASSERT_U8_EQ(c, 1);
+       ASSERT_INT_EQ(sshbuf_get_u32(p2, &i), 0);
+       ASSERT_PTR_EQ(sshbuf_ptr(p2), sshbuf_ptr(p1) + 5);
+       ASSERT_U32_EQ(i, 0x12345678);
+       ASSERT_INT_EQ(sshbuf_get_cstring(p2, &s, &l), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p2), 0);
+       ASSERT_STRING_EQ(s, "hello");
+       ASSERT_SIZE_T_EQ(l, 5);
+       sshbuf_free(p1);
+       ASSERT_U_INT_EQ(sshbuf_refcount(p1), 1);
+       sshbuf_free(p2);
+       free(s);
+       TEST_DONE();
+
+       TEST_START("sshbuf_froms");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x01), 0);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0);
+       ASSERT_INT_EQ(sshbuf_put_cstring(p1, "hello"), 0);
+       p2 = sshbuf_new();
+       ASSERT_PTR_NE(p2, NULL);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(test_buf) - 1);
+       ASSERT_INT_EQ(sshbuf_put_stringb(p2, p1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p2), sizeof(test_buf) + 4 - 1);
+       ASSERT_INT_EQ(sshbuf_froms(p2, &p3), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p2), 0);
+       ASSERT_PTR_NE(p3, NULL);
+       ASSERT_PTR_NE(sshbuf_ptr(p3), NULL);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p3), sizeof(test_buf) - 1);
+       ASSERT_MEM_EQ(sshbuf_ptr(p3), test_buf, sizeof(test_buf) - 1);
+       sshbuf_free(p3);
+       ASSERT_INT_EQ(sshbuf_put_stringb(p2, p1), 0);
+       ASSERT_INT_EQ(sshbuf_consume_end(p2, 1), 0);
+       ASSERT_INT_EQ(sshbuf_froms(p2, &p3), SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_PTR_EQ(p3, NULL);
+       sshbuf_free(p2);
+       sshbuf_free(p1);
+}
diff --git a/regress/unittests/sshbuf/test_sshbuf_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_fuzz.c
new file mode 100644 (file)
index 0000000..c52376b
--- /dev/null
@@ -0,0 +1,127 @@
+/*     $OpenBSD: test_sshbuf_fuzz.c,v 1.1 2014/04/30 05:32:00 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "ssherr.h"
+#include "sshbuf.h"
+
+#define NUM_FUZZ_TESTS (1 << 18)
+
+void sshbuf_fuzz_tests(void);
+
+void
+sshbuf_fuzz_tests(void)
+{
+       struct sshbuf *p1;
+       u_char *dp;
+       size_t sz, sz2, i;
+       u_int32_t r;
+       int ret;
+
+       /* NB. uses sshbuf internals */
+       TEST_START("fuzz alloc/dealloc");
+       p1 = sshbuf_new();
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 16 * 1024), 0);
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_PTR_NE(sshbuf_ptr(p1), NULL);
+       ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1));
+       for (i = 0; i < NUM_FUZZ_TESTS; i++) {
+               r = arc4random_uniform(10);
+               if (r == 0) {
+                       /* 10% chance: small reserve */
+                       r = arc4random_uniform(10);
+ fuzz_reserve:
+                       sz = sshbuf_avail(p1);
+                       sz2 = sshbuf_len(p1);
+                       ret = sshbuf_reserve(p1, r, &dp);
+                       if (ret < 0) {
+                               ASSERT_PTR_EQ(dp, NULL);
+                               ASSERT_SIZE_T_LT(sz, r);
+                               ASSERT_SIZE_T_EQ(sshbuf_avail(p1), sz);
+                               ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2);
+                       } else {
+                               ASSERT_PTR_NE(dp, NULL);
+                               ASSERT_SIZE_T_GE(sz, r);
+                               ASSERT_SIZE_T_EQ(sshbuf_avail(p1), sz - r);
+                               ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2 + r);
+                               memset(dp, arc4random_uniform(255) + 1, r);
+                       }
+               } else if (r < 3) {
+                       /* 20% chance: big reserve */
+                       r = arc4random_uniform(8 * 1024);
+                       goto fuzz_reserve;
+               } else if (r == 3) {
+                       /* 10% chance: small consume */
+                       r = arc4random_uniform(10);
+ fuzz_consume:
+                       sz = sshbuf_avail(p1);
+                       sz2 = sshbuf_len(p1);
+                       /* 50% change consume from end, otherwise start */
+                       ret = ((arc4random() & 1) ?
+                           sshbuf_consume : sshbuf_consume_end)(p1, r);
+                       if (ret < 0) {
+                               ASSERT_SIZE_T_LT(sz2, r);
+                               ASSERT_SIZE_T_EQ(sshbuf_avail(p1), sz);
+                               ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2);
+                       } else {
+                               ASSERT_SIZE_T_GE(sz2, r);
+                               ASSERT_SIZE_T_EQ(sshbuf_avail(p1), sz + r);
+                               ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2 - r);
+                       }
+               } else if (r < 8) {
+                       /* 40% chance: big consume */
+                       r = arc4random_uniform(2 * 1024);
+                       goto fuzz_consume;
+               } else if (r == 8) {
+                       /* 10% chance: reset max size */
+                       r = arc4random_uniform(16 * 1024);
+                       sz = sshbuf_max_size(p1);
+                       if (sshbuf_set_max_size(p1, r) < 0)
+                               ASSERT_SIZE_T_EQ(sshbuf_max_size(p1), sz);
+                       else
+                               ASSERT_SIZE_T_EQ(sshbuf_max_size(p1), r);
+               } else {
+                       if (arc4random_uniform(8192) == 0) {
+                               /* tiny chance: new buffer */
+                               ASSERT_PTR_NE(sshbuf_ptr(p1), NULL);
+                               ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1));
+                               sshbuf_free(p1);
+                               p1 = sshbuf_new();
+                               ASSERT_PTR_NE(p1, NULL);
+                               ASSERT_INT_EQ(sshbuf_set_max_size(p1,
+                                   16 * 1024), 0);
+                       } else {
+                               /* Almost 10%: giant reserve */
+                               /* use arc4random_buf for r > 2^32 on 64 bit */
+                               arc4random_buf(&r, sizeof(r));
+                               while (r < SSHBUF_SIZE_MAX / 2) {
+                                       r <<= 1;
+                                       r |= arc4random() & 1;
+                               }
+                               goto fuzz_reserve;
+                       }
+               }
+               ASSERT_PTR_NE(sshbuf_ptr(p1), NULL);
+               ASSERT_SIZE_T_LE(sshbuf_max_size(p1), 16 * 1024);
+       }
+       ASSERT_PTR_NE(sshbuf_ptr(p1), NULL);
+       ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1));
+       sshbuf_free(p1);
+       TEST_DONE();
+}
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_basic.c b/regress/unittests/sshbuf/test_sshbuf_getput_basic.c
new file mode 100644 (file)
index 0000000..966e843
--- /dev/null
@@ -0,0 +1,484 @@
+/*     $OpenBSD: test_sshbuf_getput_basic.c,v 1.1 2014/04/30 05:32:00 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+#include "ssherr.h"
+#include "sshbuf.h"
+
+void sshbuf_getput_basic_tests(void);
+
+void
+sshbuf_getput_basic_tests(void)
+{
+       struct sshbuf *p1, *p2;
+       const u_char *cd;
+       u_char *d, d2[32], x[] = {
+               0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x00, 0x99
+       };
+       u_int64_t v64;
+       u_int32_t v32;
+       u_int16_t v16;
+       u_char v8;
+       size_t s;
+       char *s2;
+       int r;
+       u_char bn1[] = { 0x00, 0x00, 0x00 };
+       u_char bn2[] = { 0x00, 0x00, 0x01, 0x02 };
+       u_char bn3[] = { 0x00, 0x80, 0x09 };
+       u_char bn_exp1[] = { 0x00, 0x00, 0x00, 0x00 };
+       u_char bn_exp2[] = { 0x00, 0x00, 0x00, 0x02, 0x01, 0x02 };
+       u_char bn_exp3[] = { 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x09 };
+
+       TEST_START("PEEK_U64");
+       ASSERT_U64_EQ(PEEK_U64(x), 0x1122334455667788ULL);
+       TEST_DONE();
+
+       TEST_START("PEEK_U32");
+       ASSERT_U32_EQ(PEEK_U32(x), 0x11223344);
+       TEST_DONE();
+
+       TEST_START("PEEK_U16");
+       ASSERT_U16_EQ(PEEK_U16(x), 0x1122);
+       TEST_DONE();
+
+       TEST_START("POKE_U64");
+       bzero(d2, sizeof(d2));
+       POKE_U64(d2, 0x1122334455667788ULL);
+       ASSERT_MEM_EQ(d2, x, 8);
+       TEST_DONE();
+       
+       TEST_START("POKE_U32");
+       bzero(d2, sizeof(d2));
+       POKE_U32(d2, 0x11223344);
+       ASSERT_MEM_EQ(d2, x, 4);
+       TEST_DONE();
+       
+       TEST_START("POKE_U16");
+       bzero(d2, sizeof(d2));
+       POKE_U16(d2, 0x1122);
+       ASSERT_MEM_EQ(d2, x, 2);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, 5), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 5);
+       cd = sshbuf_ptr(p1);
+       ASSERT_PTR_NE(cd, NULL);
+       ASSERT_U8_EQ(cd[0], 0x11);
+       ASSERT_U8_EQ(cd[1], 0x22);
+       ASSERT_U8_EQ(cd[2], 0x33);
+       ASSERT_U8_EQ(cd[3], 0x44);
+       ASSERT_U8_EQ(cd[4], 0x55);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get");
+       ASSERT_INT_EQ(sshbuf_get(p1, d2, 4), 0);
+       ASSERT_MEM_EQ(d2, x, 4);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       ASSERT_U8_EQ(*(sshbuf_ptr(p1)), 0x55);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get truncated");
+       r = sshbuf_get(p1, d2, 4);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       ASSERT_U8_EQ(*(sshbuf_ptr(p1)), 0x55);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put truncated");
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 4), 0);
+       r = sshbuf_put(p1, x, 5);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u64");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, 10), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 10);
+       ASSERT_INT_EQ(sshbuf_get_u64(p1, &v64), 0);
+       ASSERT_U64_EQ(v64, 0x1122334455667788ULL);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u64 truncated");
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       r = sshbuf_get_u64(p1, &v64);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u32");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, 10), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 10);
+       ASSERT_INT_EQ(sshbuf_get_u32(p1, &v32), 0);
+       ASSERT_U32_EQ(v32, 0x11223344);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 6);
+       ASSERT_INT_EQ(sshbuf_get_u32(p1, &v32), 0);
+       ASSERT_U32_EQ(v32, 0x55667788);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u32 truncated");
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       r = sshbuf_get_u32(p1, &v32);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u16");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, 9), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 9);
+       ASSERT_INT_EQ(sshbuf_get_u16(p1, &v16), 0);
+       ASSERT_U16_EQ(v16, 0x1122);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 7);
+       ASSERT_INT_EQ(sshbuf_get_u16(p1, &v16), 0);
+       ASSERT_U16_EQ(v16, 0x3344);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 5);
+       ASSERT_INT_EQ(sshbuf_get_u16(p1, &v16), 0);
+       ASSERT_U16_EQ(v16, 0x5566);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 3);
+       ASSERT_INT_EQ(sshbuf_get_u16(p1, &v16), 0);
+       ASSERT_U16_EQ(v16, 0x7788);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u16 truncated");
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       r = sshbuf_get_u16(p1, &v16);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u8");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, 2), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       ASSERT_INT_EQ(sshbuf_get_u8(p1, &v8), 0);
+       ASSERT_U8_EQ(v8, 0x11);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       ASSERT_INT_EQ(sshbuf_get_u8(p1, &v8), 0);
+       ASSERT_U8_EQ(v8, 0x22);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_u8 truncated");
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       r = sshbuf_get_u8(p1, &v8);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_u64");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u64(p1, 0x1122334455667788ULL), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 8);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 8);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_u64 exact");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 8), 0);
+       ASSERT_INT_EQ(sshbuf_put_u64(p1, 0x1122334455667788ULL), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 8);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 8);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_u64 limited");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 7), 0);
+       r = sshbuf_put_u64(p1, 0x1122334455667788ULL);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+       
+       TEST_START("sshbuf_put_u32");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x11223344), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 4);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_u32 exact");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 4), 0);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x11223344), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 4);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_u32 limited");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 3), 0);
+       r = sshbuf_put_u32(p1, 0x11223344);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+       
+       TEST_START("sshbuf_put_u16");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, 0x1122), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_u16");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 2), 0);
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, 0x1122), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_u16 limited");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, 1), 0);
+       r = sshbuf_put_u16(p1, 0x1122);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_string");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, sizeof(x)), 0);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4 + 4);
+       ASSERT_INT_EQ(sshbuf_get_string(p1, &d, &s), 0);
+       ASSERT_SIZE_T_EQ(s, sizeof(x));
+       ASSERT_MEM_EQ(d, x, sizeof(x));
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       free(d);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_string exact");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(x) + 4), 0);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, sizeof(x)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       ASSERT_INT_EQ(sshbuf_get_string(p1, &d, &s), 0);
+       ASSERT_SIZE_T_EQ(s, sizeof(x));
+       ASSERT_MEM_EQ(d, x, sizeof(x));
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       free(d);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_string truncated");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, sizeof(x)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       ASSERT_INT_EQ(sshbuf_consume_end(p1, 1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 3);
+       r = sshbuf_get_string(p1, &d, &s);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 3);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_string giant");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0xffffffff), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, sizeof(x)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       r = sshbuf_get_string(p1, &d, &s);
+       ASSERT_INT_EQ(r, SSH_ERR_STRING_TOO_LARGE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_cstring giant");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0xffffffff), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, sizeof(x)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       r = sshbuf_get_cstring(p1, &s2, &s);
+       ASSERT_INT_EQ(r, SSH_ERR_STRING_TOO_LARGE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_cstring embedded \\0");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, sizeof(x)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       r = sshbuf_get_cstring(p1, &s2, NULL);
+       ASSERT_INT_EQ(r, SSH_ERR_INVALID_FORMAT);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_cstring trailing \\0");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x) - 1), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, x, sizeof(x) - 1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4 - 1);
+       ASSERT_INT_EQ(sshbuf_get_cstring(p1, &s2, &s), 0);
+       ASSERT_SIZE_T_EQ(s, sizeof(x) - 1);
+       ASSERT_MEM_EQ(s2, x, s);
+       free(s2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_string");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_string(p1, x, sizeof(x)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(x) + 4);
+       ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), sizeof(x));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1) + 4, x, sizeof(x));
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_string limited");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(x) + 4 - 1), 0);
+       r = sshbuf_put_string(p1, x, sizeof(x));
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_string giant");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       r = sshbuf_put_string(p1, (void *)0x01, 0xfffffffc);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_putf");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       r = sshbuf_putf(p1, "%s %d %x", "hello", 23, 0x5f);
+       ASSERT_INT_EQ(r, 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 11);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), "hello 23 5f", 11);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_putb");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       p2 = sshbuf_new();
+       ASSERT_PTR_NE(p2, NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, "blahblahblah", 12), 0);
+       ASSERT_INT_EQ(sshbuf_putb(p2, p1), 0);
+       sshbuf_free(p1);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p2), 12);
+       ASSERT_MEM_EQ(sshbuf_ptr(p2), "blahblahblah", 12);
+       sshbuf_free(p2);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2_bytes empty buf");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, NULL, 0), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(bn_exp1));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), bn_exp1, sizeof(bn_exp1));
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2_bytes all zeroes");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, bn1, sizeof(bn1)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(bn_exp1));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), bn_exp1, sizeof(bn_exp1));
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2_bytes simple");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, bn2+2, sizeof(bn2)-2), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(bn_exp2));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), bn_exp2, sizeof(bn_exp2));
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2_bytes leading zero");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, bn2, sizeof(bn2)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(bn_exp2));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), bn_exp2, sizeof(bn_exp2));
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2_bytes neg");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, bn3+1, sizeof(bn3)-1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(bn_exp3));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), bn_exp3, sizeof(bn_exp3));
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2_bytes neg and leading zero");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, bn3, sizeof(bn3)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(bn_exp3));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1), bn_exp3, sizeof(bn_exp3));
+       sshbuf_free(p1);
+       TEST_DONE();
+}
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
new file mode 100644 (file)
index 0000000..a68e132
--- /dev/null
@@ -0,0 +1,409 @@
+/*     $OpenBSD: test_sshbuf_getput_crypto.c,v 1.1 2014/04/30 05:32:00 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include <openssl/bn.h>
+#include <openssl/objects.h>
+#ifdef OPENSSL_HAS_NISTP256
+# include <openssl/ec.h>
+#endif
+
+#include "../test_helper/test_helper.h"
+#include "ssherr.h"
+#include "sshbuf.h"
+
+void sshbuf_getput_crypto_tests(void);
+
+void
+sshbuf_getput_crypto_tests(void)
+{
+       struct sshbuf *p1;
+       BIGNUM *bn, *bn2;
+       /* This one has num_bits != num_bytes * 8 to test bignum1 encoding */
+       const char *hexbn1 = "0102030405060708090a0b0c0d0e0f10";
+       /* This one has MSB set to test bignum2 encoding negative-avoidance */
+       const char *hexbn2 = "f0e0d0c0b0a0908070605040302010007fff11";
+       u_char expbn1[] = {
+               0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+               0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+       };
+       u_char expbn2[] = {
+               0xf0, 0xe0, 0xd0, 0xc0, 0xb0, 0xa0, 0x90, 0x80,
+               0x70, 0x60, 0x50, 0x40, 0x30, 0x20, 0x10, 0x00,
+               0x7f, 0xff, 0x11
+       };
+#if defined(OPENSSL_HAS_ECC) && defined(OPENSSL_HAS_NISTP256)
+       const u_char *d;
+       size_t s;
+       BIGNUM *bn_x, *bn_y;
+       int ec256_nid = NID_X9_62_prime256v1;
+       char *ec256_x = "0C828004839D0106AA59575216191357"
+                       "34B451459DADB586677EF9DF55784999";
+       char *ec256_y = "4D196B50F0B4E94B3C73E3A9D4CD9DF2"
+                       "C8F9A35E42BDD047550F69D80EC23CD4";
+       u_char expec256[] = {
+               0x04,
+               0x0c, 0x82, 0x80, 0x04, 0x83, 0x9d, 0x01, 0x06,
+               0xaa, 0x59, 0x57, 0x52, 0x16, 0x19, 0x13, 0x57,
+               0x34, 0xb4, 0x51, 0x45, 0x9d, 0xad, 0xb5, 0x86,
+               0x67, 0x7e, 0xf9, 0xdf, 0x55, 0x78, 0x49, 0x99,
+               0x4d, 0x19, 0x6b, 0x50, 0xf0, 0xb4, 0xe9, 0x4b,
+               0x3c, 0x73, 0xe3, 0xa9, 0xd4, 0xcd, 0x9d, 0xf2,
+               0xc8, 0xf9, 0xa3, 0x5e, 0x42, 0xbd, 0xd0, 0x47,
+               0x55, 0x0f, 0x69, 0xd8, 0x0e, 0xc2, 0x3c, 0xd4
+       };
+       EC_KEY *eck;
+       EC_POINT *ecp;
+#endif
+       int r;
+
+#define MKBN(b, bnn) \
+       do { \
+               bnn = NULL; \
+               ASSERT_INT_GT(BN_hex2bn(&bnn, b), 0); \
+       } while (0)
+
+       TEST_START("sshbuf_put_bignum1");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum1(p1, bn), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn1) + 2);
+       ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), (u_int16_t)BN_num_bits(bn));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1) + 2, expbn1, sizeof(expbn1));
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum1 limited");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(expbn1) + 1), 0);
+       r = sshbuf_put_bignum1(p1, bn);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum1 bn2");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum1(p1, bn), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn2) + 2);
+       ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), (u_int16_t)BN_num_bits(bn));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1) + 2, expbn2, sizeof(expbn2));
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum1 bn2 limited");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(expbn1) + 1), 0);
+       r = sshbuf_put_bignum1(p1, bn);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn1) + 4);
+       ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn));
+       ASSERT_MEM_EQ(sshbuf_ptr(p1) + 4, expbn1, sizeof(expbn1));
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2 limited");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(expbn1) + 3), 0);
+       r = sshbuf_put_bignum2(p1, bn);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2 bn2");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn2) + 4 + 1); /* MSB */
+       ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn) + 1);
+       ASSERT_U8_EQ(*(sshbuf_ptr(p1) + 4), 0x00);
+       ASSERT_MEM_EQ(sshbuf_ptr(p1) + 5, expbn2, sizeof(expbn2));
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_put_bignum2 bn2 limited");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(expbn2) + 3), 0);
+       r = sshbuf_put_bignum2(p1, bn);
+       ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0);
+       BN_free(bn);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum1");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn1, sizeof(expbn1)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + sizeof(expbn1));
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, 0xd00f), 0);
+       bn2 = BN_new();
+       ASSERT_INT_EQ(sshbuf_get_bignum1(p1, bn2), 0);
+       ASSERT_BIGNUM_EQ(bn, bn2);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum1 truncated");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn1, sizeof(expbn1) - 1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + sizeof(expbn1) - 1);
+       bn2 = BN_new();
+       r = sshbuf_get_bignum1(p1, bn2);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + sizeof(expbn1) - 1);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum1 giant");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, 0xffff), 0);
+       ASSERT_INT_EQ(sshbuf_reserve(p1, (0xffff + 7) / 8, NULL), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + ((0xffff + 7) / 8));
+       bn2 = BN_new();
+       r = sshbuf_get_bignum1(p1, bn2);
+       ASSERT_INT_EQ(r, SSH_ERR_BIGNUM_TOO_LARGE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + ((0xffff + 7) / 8));
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum1 bn2");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn2, sizeof(expbn2)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + sizeof(expbn2));
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, 0xd00f), 0);
+       bn2 = BN_new();
+       ASSERT_INT_EQ(sshbuf_get_bignum1(p1, bn2), 0);
+       ASSERT_BIGNUM_EQ(bn, bn2);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum1 bn2 truncated");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, BN_num_bits(bn)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn2, sizeof(expbn2) - 1), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + sizeof(expbn2) - 1);
+       bn2 = BN_new();
+       r = sshbuf_get_bignum1(p1, bn2);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2 + sizeof(expbn2) - 1);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum2");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn1, sizeof(expbn1)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4 + sizeof(expbn1));
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, 0xd00f), 0);
+       bn2 = BN_new();
+       ASSERT_INT_EQ(sshbuf_get_bignum2(p1, bn2), 0);
+       ASSERT_BIGNUM_EQ(bn, bn2);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum2 truncated");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn1, sizeof(expbn1) - 1), 0);
+       bn2 = BN_new();
+       r = sshbuf_get_bignum2(p1, bn2);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn1) + 3);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum2 giant");
+       MKBN(hexbn1, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 65536), 0);
+       ASSERT_INT_EQ(sshbuf_reserve(p1, 65536, NULL), 0);
+       bn2 = BN_new();
+       r = sshbuf_get_bignum2(p1, bn2);
+       ASSERT_INT_EQ(r, SSH_ERR_BIGNUM_TOO_LARGE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 65536 + 4);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum2 bn2");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn) + 1), 0); /* MSB */
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x00), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn2, sizeof(expbn2)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4 + 1 + sizeof(expbn2));
+       ASSERT_INT_EQ(sshbuf_put_u16(p1, 0xd00f), 0);
+       bn2 = BN_new();
+       ASSERT_INT_EQ(sshbuf_get_bignum2(p1, bn2), 0);
+       ASSERT_BIGNUM_EQ(bn, bn2);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum2 bn2 truncated");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn) + 1), 0);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x00), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn2, sizeof(expbn2) - 1), 0);
+       bn2 = BN_new();
+       r = sshbuf_get_bignum2(p1, bn2);
+       ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn2) + 1 + 4 - 1);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_bignum2 bn2 negative");
+       MKBN(hexbn2, bn);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0);
+       ASSERT_INT_EQ(sshbuf_put(p1, expbn2, sizeof(expbn2)), 0);
+       bn2 = BN_new();
+       r = sshbuf_get_bignum2(p1, bn2);
+       ASSERT_INT_EQ(r, SSH_ERR_BIGNUM_IS_NEGATIVE);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn2) + 4);
+       BN_free(bn);
+       BN_free(bn2);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+#if defined(OPENSSL_HAS_ECC) && defined(OPENSSL_HAS_NISTP256)
+       TEST_START("sshbuf_put_ec");
+       eck = EC_KEY_new_by_curve_name(ec256_nid);
+       ASSERT_PTR_NE(eck, NULL);
+       ecp = EC_POINT_new(EC_KEY_get0_group(eck));
+       ASSERT_PTR_NE(ecp, NULL);
+       MKBN(ec256_x, bn_x);
+       MKBN(ec256_y, bn_y);
+       ASSERT_INT_EQ(EC_POINT_set_affine_coordinates_GFp(
+           EC_KEY_get0_group(eck), ecp, bn_x, bn_y, NULL), 1);
+       ASSERT_INT_EQ(EC_KEY_set_public_key(eck, ecp), 1);
+       BN_free(bn_x);
+       BN_free(bn_y);
+       EC_POINT_free(ecp);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_eckey(p1, eck), 0);
+       ASSERT_INT_EQ(sshbuf_get_string_direct(p1, &d, &s), 0);
+       ASSERT_SIZE_T_EQ(s, sizeof(expec256));
+       ASSERT_MEM_EQ(d, expec256, sizeof(expec256));
+       sshbuf_free(p1);
+       EC_KEY_free(eck);
+       TEST_DONE();
+
+       TEST_START("sshbuf_get_ec");
+       eck = EC_KEY_new_by_curve_name(ec256_nid);
+       ASSERT_PTR_NE(eck, NULL);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_string(p1, expec256, sizeof(expec256)), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expec256) + 4);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x00), 0);
+       ASSERT_INT_EQ(sshbuf_get_eckey(p1, eck), 0);
+       bn_x = BN_new();
+       bn_y = BN_new();
+       ASSERT_PTR_NE(bn_x, NULL);
+       ASSERT_PTR_NE(bn_y, NULL);
+       ASSERT_INT_EQ(EC_POINT_get_affine_coordinates_GFp(
+           EC_KEY_get0_group(eck), EC_KEY_get0_public_key(eck),
+           bn_x, bn_y, NULL), 1);
+       MKBN(ec256_x, bn);
+       MKBN(ec256_y, bn2);
+       ASSERT_INT_EQ(BN_cmp(bn_x, bn), 0);
+       ASSERT_INT_EQ(BN_cmp(bn_y, bn2), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       sshbuf_free(p1);
+       EC_KEY_free(eck);
+       BN_free(bn_x);
+       BN_free(bn_y);
+       BN_free(bn);
+       BN_free(bn2);
+       TEST_DONE();
+#endif
+}
+
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
new file mode 100644 (file)
index 0000000..c6b5c29
--- /dev/null
@@ -0,0 +1,130 @@
+/*     $OpenBSD: test_sshbuf_getput_fuzz.c,v 1.2 2014/05/02 02:54:00 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include <openssl/bn.h>
+#include <openssl/objects.h>
+#ifdef OPENSSL_HAS_NISTP256
+# include <openssl/ec.h>
+#endif
+
+#include "../test_helper/test_helper.h"
+#include "ssherr.h"
+#include "sshbuf.h"
+
+void sshbuf_getput_fuzz_tests(void);
+
+static void
+attempt_parse_blob(u_char *blob, size_t len)
+{
+       struct sshbuf *p1;
+       BIGNUM *bn;
+#if defined(OPENSSL_HAS_ECC) && defined(OPENSSL_HAS_NISTP256)
+       EC_KEY *eck;
+#endif
+       u_char *s;
+       size_t l;
+       u_int8_t u8;
+       u_int16_t u16;
+       u_int32_t u32;
+       u_int64_t u64;
+
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put(p1, blob, len), 0);
+       sshbuf_get_u8(p1, &u8);
+       sshbuf_get_u16(p1, &u16);
+       sshbuf_get_u32(p1, &u32);
+       sshbuf_get_u64(p1, &u64);
+       if (sshbuf_get_string(p1, &s, &l) == 0) {
+               bzero(s, l);
+               free(s);
+       }
+       bn = BN_new();
+       sshbuf_get_bignum1(p1, bn);
+       BN_clear_free(bn);
+       bn = BN_new();
+       sshbuf_get_bignum2(p1, bn);
+       BN_clear_free(bn);
+#if defined(OPENSSL_HAS_ECC) && defined(OPENSSL_HAS_NISTP256)
+       eck = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
+       ASSERT_PTR_NE(eck, NULL);
+       sshbuf_get_eckey(p1, eck);
+       EC_KEY_free(eck);
+#endif
+       sshbuf_free(p1);
+}
+
+
+static void
+onerror(void *fuzz)
+{
+       fprintf(stderr, "Failed during fuzz:\n");
+       fuzz_dump((struct fuzz *)fuzz);
+}
+
+void
+sshbuf_getput_fuzz_tests(void)
+{
+       u_char blob[] = {
+               /* u8 */
+               0xd0,
+               /* u16 */
+               0xc0, 0xde,
+               /* u32 */
+               0xfa, 0xce, 0xde, 0xad,
+               /* u64 */
+               0xfe, 0xed, 0xac, 0x1d, 0x1f, 0x1c, 0xbe, 0xef,
+               /* string */
+               0x00, 0x00, 0x00, 0x09,
+               'O', ' ', 'G', 'o', 'r', 'g', 'o', 'n', '!',
+               /* bignum1 */
+               0x79,
+               0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+               0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+               /* bignum2 */
+               0x00, 0x00, 0x00, 0x14,
+               0x00,
+               0xf0, 0xe0, 0xd0, 0xc0, 0xb0, 0xa0, 0x90, 0x80,
+               0x70, 0x60, 0x50, 0x40, 0x30, 0x20, 0x10, 0x00,
+               0x7f, 0xff, 0x11,
+               /* EC point (NIST-256 curve) */
+               0x00, 0x00, 0x00, 0x41,
+               0x04,
+               0x0c, 0x82, 0x80, 0x04, 0x83, 0x9d, 0x01, 0x06,
+               0xaa, 0x59, 0x57, 0x52, 0x16, 0x19, 0x13, 0x57,
+               0x34, 0xb4, 0x51, 0x45, 0x9d, 0xad, 0xb5, 0x86,
+               0x67, 0x7e, 0xf9, 0xdf, 0x55, 0x78, 0x49, 0x99,
+               0x4d, 0x19, 0x6b, 0x50, 0xf0, 0xb4, 0xe9, 0x4b,
+               0x3c, 0x73, 0xe3, 0xa9, 0xd4, 0xcd, 0x9d, 0xf2,
+               0xc8, 0xf9, 0xa3, 0x5e, 0x42, 0xbd, 0xd0, 0x47,
+               0x55, 0x0f, 0x69, 0xd8, 0x0e, 0xc2, 0x3c, 0xd4,
+       };
+       struct fuzz *fuzz;
+
+       TEST_START("fuzz blob parsing");
+       fuzz = fuzz_begin(FUZZ_1_BIT_FLIP | FUZZ_2_BIT_FLIP |
+           FUZZ_1_BYTE_FLIP | FUZZ_2_BYTE_FLIP |
+           FUZZ_TRUNCATE_START | FUZZ_TRUNCATE_END, blob, sizeof(blob));
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz))
+               attempt_parse_blob(blob, sizeof(blob));
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+       TEST_ONERROR(NULL, NULL);
+}
+
diff --git a/regress/unittests/sshbuf/test_sshbuf_misc.c b/regress/unittests/sshbuf/test_sshbuf_misc.c
new file mode 100644 (file)
index 0000000..762a6c3
--- /dev/null
@@ -0,0 +1,167 @@
+/*     $OpenBSD: test_sshbuf_misc.c,v 1.2 2016/05/03 13:48:33 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "sshbuf.h"
+
+void sshbuf_misc_tests(void);
+
+void
+sshbuf_misc_tests(void)
+{
+       struct sshbuf *p1;
+       char tmp[512], *p;
+       FILE *out;
+       size_t sz;
+
+       TEST_START("sshbuf_dump");
+       out = tmpfile();
+       ASSERT_PTR_NE(out, NULL);
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0);
+       sshbuf_dump(p1, out);
+       fflush(out);
+       rewind(out);
+       sz = fread(tmp, 1, sizeof(tmp), out);
+       ASSERT_INT_EQ(ferror(out), 0);
+       ASSERT_INT_NE(feof(out), 0);
+       ASSERT_SIZE_T_GT(sz, 0);
+       tmp[sz] = '\0';
+       ASSERT_PTR_NE(strstr(tmp, "12 34 56 78"), NULL);
+       fclose(out);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_dtob16");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0);
+       p = sshbuf_dtob16(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_STRING_EQ(p, "12345678");
+       free(p);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_dtob64 len 1");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0);
+       p = sshbuf_dtob64(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_STRING_EQ(p, "EQ==");
+       free(p);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_dtob64 len 2");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0);
+       p = sshbuf_dtob64(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_STRING_EQ(p, "ESI=");
+       free(p);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_dtob64 len 3");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0);
+       ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x33), 0);
+       p = sshbuf_dtob64(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_STRING_EQ(p, "ESIz");
+       free(p);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_dtob64 len 8191");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_reserve(p1, 8192, NULL), 0);
+       bzero(sshbuf_mutable_ptr(p1), 8192);
+       p = sshbuf_dtob64(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_SIZE_T_EQ(strlen(p), ((8191 + 2) / 3) * 4);
+       free(p);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_b64tod len 1");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A=="), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1);
+       ASSERT_U8_EQ(*sshbuf_ptr(p1), 0xd0);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_b64tod len 2");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A8="), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2);
+       ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), 0xd00f);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_b64tod len 4");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A/QDw=="), 0);
+       ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4);
+       ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), 0xd00fd00f);
+       sshbuf_free(p1);
+       TEST_DONE();
+
+       TEST_START("sshbuf_dup_string");
+       p1 = sshbuf_new();
+       ASSERT_PTR_NE(p1, NULL);
+       /* Check empty buffer */
+       p = sshbuf_dup_string(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_SIZE_T_EQ(strlen(p), 0);
+       free(p);
+       /* Check buffer with string */
+       ASSERT_INT_EQ(sshbuf_put(p1, "quad1", strlen("quad1")), 0);
+       p = sshbuf_dup_string(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_SIZE_T_EQ(strlen(p), strlen("quad1"));
+       ASSERT_STRING_EQ(p, "quad1");
+       free(p);
+       /* Check buffer with terminating nul */
+       ASSERT_INT_EQ(sshbuf_put(p1, "\0", 1), 0);
+       p = sshbuf_dup_string(p1);
+       ASSERT_PTR_NE(p, NULL);
+       ASSERT_SIZE_T_EQ(strlen(p), strlen("quad1"));
+       ASSERT_STRING_EQ(p, "quad1");
+       free(p);
+       /* Check buffer with data after nul (expect failure) */
+       ASSERT_INT_EQ(sshbuf_put(p1, "quad2", strlen("quad2")), 0);
+       p = sshbuf_dup_string(p1);
+       ASSERT_PTR_EQ(p, NULL);
+       sshbuf_free(p1);
+       TEST_DONE();
+}
+
diff --git a/regress/unittests/sshbuf/tests.c b/regress/unittests/sshbuf/tests.c
new file mode 100644 (file)
index 0000000..1557e43
--- /dev/null
@@ -0,0 +1,28 @@
+/*     $OpenBSD: tests.c,v 1.1 2014/04/30 05:32:00 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#include "../test_helper/test_helper.h"
+
+void sshbuf_tests(void);
+void sshbuf_getput_basic_tests(void);
+void sshbuf_getput_crypto_tests(void);
+void sshbuf_misc_tests(void);
+void sshbuf_fuzz_tests(void);
+void sshbuf_getput_fuzz_tests(void);
+void sshbuf_fixed(void);
+
+void
+tests(void)
+{
+       sshbuf_tests();
+       sshbuf_getput_basic_tests();
+       sshbuf_getput_crypto_tests();
+       sshbuf_misc_tests();
+       sshbuf_fuzz_tests();
+       sshbuf_getput_fuzz_tests();
+       sshbuf_fixed();
+}
diff --git a/regress/unittests/sshkey/Makefile b/regress/unittests/sshkey/Makefile
new file mode 100644 (file)
index 0000000..cfbfcf8
--- /dev/null
@@ -0,0 +1,11 @@
+#      $OpenBSD: Makefile,v 1.4 2016/11/01 13:43:27 tb Exp $
+
+PROG=test_sshkey
+SRCS=tests.c test_sshkey.c test_file.c test_fuzz.c common.c
+REGRESS_TARGETS=run-regress-${PROG}
+
+run-regress-${PROG}: ${PROG}
+       env ${TEST_ENV} ./${PROG} -d ${.CURDIR}/testdata
+
+.include <bsd.regress.mk>
+
diff --git a/regress/unittests/sshkey/common.c b/regress/unittests/sshkey/common.c
new file mode 100644 (file)
index 0000000..b598f05
--- /dev/null
@@ -0,0 +1,84 @@
+/*     $OpenBSD: common.c,v 1.2 2015/01/08 13:10:58 djm Exp $ */
+/*
+ * Helpers for key API tests
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
+#include <openssl/objects.h>
+#ifdef OPENSSL_HAS_NISTP256
+# include <openssl/ec.h>
+#endif
+
+#include "../test_helper/test_helper.h"
+
+#include "ssherr.h"
+#include "authfile.h"
+#include "sshkey.h"
+#include "sshbuf.h"
+
+#include "common.h"
+
+struct sshbuf *
+load_file(const char *name)
+{
+       int fd;
+       struct sshbuf *ret;
+
+       ASSERT_PTR_NE(ret = sshbuf_new(), NULL);
+       ASSERT_INT_NE(fd = open(test_data_file(name), O_RDONLY), -1);
+       ASSERT_INT_EQ(sshkey_load_file(fd, ret), 0);
+       close(fd);
+       return ret;
+}
+
+struct sshbuf *
+load_text_file(const char *name)
+{
+       struct sshbuf *ret = load_file(name);
+       const u_char *p;
+
+       /* Trim whitespace at EOL */
+       for (p = sshbuf_ptr(ret); sshbuf_len(ret) > 0;) {
+               if (p[sshbuf_len(ret) - 1] == '\r' ||
+                   p[sshbuf_len(ret) - 1] == '\t' ||
+                   p[sshbuf_len(ret) - 1] == ' ' ||
+                   p[sshbuf_len(ret) - 1] == '\n')
+                       ASSERT_INT_EQ(sshbuf_consume_end(ret, 1), 0);
+               else
+                       break;
+       }
+       /* \0 terminate */
+       ASSERT_INT_EQ(sshbuf_put_u8(ret, 0), 0);
+       return ret;
+}
+
+BIGNUM *
+load_bignum(const char *name)
+{
+       BIGNUM *ret = NULL;
+       struct sshbuf *buf;
+
+       buf = load_text_file(name);
+       ASSERT_INT_NE(BN_hex2bn(&ret, (const char *)sshbuf_ptr(buf)), 0);
+       sshbuf_free(buf);
+       return ret;
+}
+
diff --git a/regress/unittests/sshkey/common.h b/regress/unittests/sshkey/common.h
new file mode 100644 (file)
index 0000000..bf7d19d
--- /dev/null
@@ -0,0 +1,16 @@
+/*     $OpenBSD: common.h,v 1.1 2014/06/24 01:14:18 djm Exp $ */
+/*
+ * Helpers for key API tests
+ *
+ * Placed in the public domain
+ */
+
+/* Load a binary file into a buffer */
+struct sshbuf *load_file(const char *name);
+
+/* Load a text file into a buffer */
+struct sshbuf *load_text_file(const char *name);
+
+/* Load a bignum from a file */
+BIGNUM *load_bignum(const char *name);
+
diff --git a/regress/unittests/sshkey/mktestdata.sh b/regress/unittests/sshkey/mktestdata.sh
new file mode 100755 (executable)
index 0000000..e111001
--- /dev/null
@@ -0,0 +1,192 @@
+#!/bin/sh
+# $OpenBSD: mktestdata.sh,v 1.5 2015/07/07 14:53:30 markus Exp $
+
+PW=mekmitasdigoat
+
+rsa1_params() {
+       _in="$1"
+       _outbase="$2"
+       set -e
+       ssh-keygen -f $_in -e -m pkcs8 | \
+           openssl rsa -noout -text -pubin | \
+           awk '/^Modulus:$/,/^Exponent:/' | \
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.n
+       # XXX need conversion support in ssh-keygen for the other params
+       for x in n ; do
+               echo "" >> ${_outbase}.$x
+               echo ============ ${_outbase}.$x
+               cat ${_outbase}.$x
+               echo ============
+       done
+}
+
+rsa_params() {
+       _in="$1"
+       _outbase="$2"
+       set -e
+       openssl rsa -noout -text -in $_in | \
+           awk '/^modulus:$/,/^publicExponent:/' | \
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.n
+       openssl rsa -noout -text -in $_in | \
+           awk '/^prime1:$/,/^prime2:/' | \
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.p
+       openssl rsa -noout -text -in $_in | \
+           awk '/^prime2:$/,/^exponent1:/' | \
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.q
+       for x in n p q ; do
+               echo "" >> ${_outbase}.$x
+               echo ============ ${_outbase}.$x
+               cat ${_outbase}.$x
+               echo ============
+       done
+}
+
+dsa_params() {
+       _in="$1"
+       _outbase="$2"
+       set -e
+       openssl dsa -noout -text -in $_in | \
+           awk '/^priv:$/,/^pub:/' | \
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.priv
+       openssl dsa -noout -text -in $_in | \
+           awk '/^pub:/,/^P:/' | #\
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.pub
+       openssl dsa -noout -text -in $_in | \
+           awk '/^G:/,0' | \
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.g
+       for x in priv pub g ; do
+               echo "" >> ${_outbase}.$x
+               echo ============ ${_outbase}.$x
+               cat ${_outbase}.$x
+               echo ============
+       done
+}
+
+ecdsa_params() {
+       _in="$1"
+       _outbase="$2"
+       set -e
+       openssl ec -noout -text -in $_in | \
+           awk '/^priv:$/,/^pub:/' | \
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.priv
+       openssl ec -noout -text -in $_in | \
+           awk '/^pub:/,/^ASN1 OID:/' | #\
+           grep -v '^[a-zA-Z]' | tr -d ' \n:' > ${_outbase}.pub
+       openssl ec -noout -text -in $_in | \
+           grep "ASN1 OID:" | tr -d '\n' | \
+           sed 's/.*: //;s/ *$//' > ${_outbase}.curve
+       for x in priv pub curve ; do
+               echo "" >> ${_outbase}.$x
+               echo ============ ${_outbase}.$x
+               cat ${_outbase}.$x
+               echo ============
+       done
+}
+
+set -ex
+
+cd testdata
+
+rm -f rsa1_1 rsa_1 dsa_1 ecdsa_1 ed25519_1
+rm -f rsa1_2 rsa_2 dsa_2 ecdsa_2 ed25519_2
+rm -f rsa_n dsa_n ecdsa_n # new-format keys
+rm -f rsa1_1_pw rsa_1_pw dsa_1_pw ecdsa_1_pw ed25519_1_pw
+rm -f rsa_n_pw dsa_n_pw ecdsa_n_pw
+rm -f pw *.pub *.bn.* *.param.* *.fp *.fp.bb
+
+ssh-keygen -t rsa1 -b 1024 -C "RSA1 test key #1" -N "" -f rsa1_1
+ssh-keygen -t rsa -b 1024 -C "RSA test key #1" -N "" -f rsa_1
+ssh-keygen -t dsa -b 1024 -C "DSA test key #1" -N "" -f dsa_1
+ssh-keygen -t ecdsa -b 256 -C "ECDSA test key #1" -N "" -f ecdsa_1
+ssh-keygen -t ed25519 -C "ED25519 test key #1" -N "" -f ed25519_1
+
+ssh-keygen -t rsa1 -b 2048 -C "RSA1 test key #2" -N "" -f rsa1_2
+ssh-keygen -t rsa -b 2048 -C "RSA test key #2" -N "" -f rsa_2
+ssh-keygen -t dsa -b 1024 -C "DSA test key #2" -N "" -f dsa_2
+ssh-keygen -t ecdsa -b 521 -C "ECDSA test key #2" -N "" -f ecdsa_2
+ssh-keygen -t ed25519 -C "ED25519 test key #1" -N "" -f ed25519_2
+
+cp rsa_1 rsa_n
+cp dsa_1 dsa_n
+cp ecdsa_1 ecdsa_n
+
+cp rsa1_1 rsa1_1_pw
+cp rsa_1 rsa_1_pw
+cp dsa_1 dsa_1_pw
+cp ecdsa_1 ecdsa_1_pw
+cp ed25519_1 ed25519_1_pw
+cp rsa_1 rsa_n_pw
+cp dsa_1 dsa_n_pw
+cp ecdsa_1 ecdsa_n_pw
+
+ssh-keygen -pf rsa1_1_pw -N "$PW"
+ssh-keygen -pf rsa_1_pw -N "$PW"
+ssh-keygen -pf dsa_1_pw -N "$PW"
+ssh-keygen -pf ecdsa_1_pw -N "$PW"
+ssh-keygen -pf ed25519_1_pw -N "$PW"
+ssh-keygen -opf rsa_n_pw -N "$PW"
+ssh-keygen -opf dsa_n_pw -N "$PW"
+ssh-keygen -opf ecdsa_n_pw -N "$PW"
+
+rsa1_params rsa1_1 rsa1_1.param
+rsa1_params rsa1_2 rsa1_2.param
+rsa_params rsa_1 rsa_1.param
+rsa_params rsa_2 rsa_2.param
+dsa_params dsa_1 dsa_1.param
+dsa_params dsa_1 dsa_1.param
+ecdsa_params ecdsa_1 ecdsa_1.param
+ecdsa_params ecdsa_2 ecdsa_2.param
+# XXX ed25519 params
+
+ssh-keygen -s rsa_2 -I hugo -n user1,user2 \
+    -Oforce-command=/bin/ls -Ono-port-forwarding -Osource-address=10.0.0.0/8 \
+    -V 19990101:20110101 -z 1 rsa_1.pub
+ssh-keygen -s rsa_2 -I hugo -n user1,user2 \
+    -Oforce-command=/bin/ls -Ono-port-forwarding -Osource-address=10.0.0.0/8 \
+    -V 19990101:20110101 -z 2 dsa_1.pub
+ssh-keygen -s rsa_2 -I hugo -n user1,user2 \
+    -Oforce-command=/bin/ls -Ono-port-forwarding -Osource-address=10.0.0.0/8 \
+    -V 19990101:20110101 -z 3 ecdsa_1.pub
+ssh-keygen -s rsa_2 -I hugo -n user1,user2 \
+    -Oforce-command=/bin/ls -Ono-port-forwarding -Osource-address=10.0.0.0/8 \
+    -V 19990101:20110101 -z 4 ed25519_1.pub
+
+ssh-keygen -s ed25519_1 -I julius -n host1,host2 -h \
+    -V 19990101:20110101 -z 5 rsa_1.pub
+ssh-keygen -s ed25519_1 -I julius -n host1,host2 -h \
+    -V 19990101:20110101 -z 6 dsa_1.pub
+ssh-keygen -s ecdsa_1 -I julius -n host1,host2 -h \
+    -V 19990101:20110101 -z 7 ecdsa_1.pub
+ssh-keygen -s ed25519_1 -I julius -n host1,host2 -h \
+    -V 19990101:20110101 -z 8 ed25519_1.pub
+
+ssh-keygen -lf rsa1_1 | awk '{print $2}' > rsa1_1.fp
+ssh-keygen -lf rsa_1 | awk '{print $2}' > rsa_1.fp
+ssh-keygen -lf dsa_1 | awk '{print $2}' > dsa_1.fp
+ssh-keygen -lf ecdsa_1 | awk '{print $2}' > ecdsa_1.fp
+ssh-keygen -lf ed25519_1 | awk '{print $2}' > ed25519_1.fp
+ssh-keygen -lf rsa1_2 | awk '{print $2}' > rsa1_2.fp
+ssh-keygen -lf rsa_2 | awk '{print $2}' > rsa_2.fp
+ssh-keygen -lf dsa_2 | awk '{print $2}' > dsa_2.fp
+ssh-keygen -lf ecdsa_2 | awk '{print $2}' > ecdsa_2.fp
+ssh-keygen -lf ed25519_2 | awk '{print $2}' > ed25519_2.fp
+
+ssh-keygen -lf dsa_1-cert.pub  | awk '{print $2}' > dsa_1-cert.fp
+ssh-keygen -lf ecdsa_1-cert.pub  | awk '{print $2}' > ecdsa_1-cert.fp
+ssh-keygen -lf ed25519_1-cert.pub  | awk '{print $2}' > ed25519_1-cert.fp
+ssh-keygen -lf rsa_1-cert.pub  | awk '{print $2}' > rsa_1-cert.fp
+
+ssh-keygen -Bf rsa1_1 | awk '{print $2}' > rsa1_1.fp.bb
+ssh-keygen -Bf rsa_1 | awk '{print $2}' > rsa_1.fp.bb
+ssh-keygen -Bf dsa_1 | awk '{print $2}' > dsa_1.fp.bb
+ssh-keygen -Bf ecdsa_1 | awk '{print $2}' > ecdsa_1.fp.bb
+ssh-keygen -Bf ed25519_1 | awk '{print $2}' > ed25519_1.fp.bb
+ssh-keygen -Bf rsa1_2 | awk '{print $2}' > rsa1_2.fp.bb
+ssh-keygen -Bf rsa_2 | awk '{print $2}' > rsa_2.fp.bb
+ssh-keygen -Bf dsa_2 | awk '{print $2}' > dsa_2.fp.bb
+ssh-keygen -Bf ecdsa_2 | awk '{print $2}' > ecdsa_2.fp.bb
+ssh-keygen -Bf ed25519_2 | awk '{print $2}' > ed25519_2.fp.bb
+
+# XXX Extend ssh-keygen to do detached signatures (better to test/fuzz against)
+
+echo "$PW" > pw
diff --git a/regress/unittests/sshkey/test_file.c b/regress/unittests/sshkey/test_file.c
new file mode 100644 (file)
index 0000000..906491f
--- /dev/null
@@ -0,0 +1,452 @@
+/*     $OpenBSD: test_file.c,v 1.5 2015/10/06 01:20:59 djm Exp $ */
+/*
+ * Regress test for sshkey.h key management API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
+#include <openssl/objects.h>
+#ifdef OPENSSL_HAS_NISTP256
+# include <openssl/ec.h>
+#endif
+
+#include "../test_helper/test_helper.h"
+
+#include "ssherr.h"
+#include "authfile.h"
+#include "sshkey.h"
+#include "sshbuf.h"
+#include "digest.h"
+
+#include "common.h"
+
+void sshkey_file_tests(void);
+
+void
+sshkey_file_tests(void)
+{
+       struct sshkey *k1, *k2;
+       struct sshbuf *buf, *pw;
+       BIGNUM *a, *b, *c;
+       char *cp;
+
+       TEST_START("load passphrase");
+       pw = load_text_file("pw");
+       TEST_DONE();
+
+#ifdef WITH_SSH1
+       TEST_START("parse RSA1 from private");
+       buf = load_file("rsa1_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k1, NULL);
+       a = load_bignum("rsa1_1.param.n");
+       ASSERT_BIGNUM_EQ(k1->rsa->n, a);
+       BN_free(a);
+       TEST_DONE();
+
+       TEST_START("parse RSA1 from private w/ passphrase");
+       buf = load_file("rsa1_1_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load RSA1 from public");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa1_1.pub"), &k2,
+           NULL), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("RSA1 key hex fingerprint");
+       buf = load_text_file("rsa1_1.fp");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       TEST_START("RSA1 key bubblebabble fingerprint");
+       buf = load_text_file("rsa1_1.fp.bb");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       sshkey_free(k1);
+#endif
+
+       TEST_START("parse RSA from private");
+       buf = load_file("rsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k1, NULL);
+       a = load_bignum("rsa_1.param.n");
+       b = load_bignum("rsa_1.param.p");
+       c = load_bignum("rsa_1.param.q");
+       ASSERT_BIGNUM_EQ(k1->rsa->n, a);
+       ASSERT_BIGNUM_EQ(k1->rsa->p, b);
+       ASSERT_BIGNUM_EQ(k1->rsa->q, c);
+       BN_free(a);
+       BN_free(b);
+       BN_free(c);
+       TEST_DONE();
+
+       TEST_START("parse RSA from private w/ passphrase");
+       buf = load_file("rsa_1_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("parse RSA from new-format");
+       buf = load_file("rsa_n");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("parse RSA from new-format w/ passphrase");
+       buf = load_file("rsa_n_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load RSA from public");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa_1.pub"), &k2,
+           NULL), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load RSA cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("rsa_1"), &k2), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(k2->type, KEY_RSA_CERT);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 0);
+       ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1);
+       TEST_DONE();
+
+       TEST_START("RSA key hex fingerprint");
+       buf = load_text_file("rsa_1.fp");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       TEST_START("RSA cert hex fingerprint");
+       buf = load_text_file("rsa_1-cert.fp");
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("RSA key bubblebabble fingerprint");
+       buf = load_text_file("rsa_1.fp.bb");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       sshkey_free(k1);
+
+       TEST_START("parse DSA from private");
+       buf = load_file("dsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k1, NULL);
+       a = load_bignum("dsa_1.param.g");
+       b = load_bignum("dsa_1.param.priv");
+       c = load_bignum("dsa_1.param.pub");
+       ASSERT_BIGNUM_EQ(k1->dsa->g, a);
+       ASSERT_BIGNUM_EQ(k1->dsa->priv_key, b);
+       ASSERT_BIGNUM_EQ(k1->dsa->pub_key, c);
+       BN_free(a);
+       BN_free(b);
+       BN_free(c);
+       TEST_DONE();
+
+       TEST_START("parse DSA from private w/ passphrase");
+       buf = load_file("dsa_1_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("parse DSA from new-format");
+       buf = load_file("dsa_n");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("parse DSA from new-format w/ passphrase");
+       buf = load_file("dsa_n_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load DSA from public");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("dsa_1.pub"), &k2,
+           NULL), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load DSA cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("dsa_1"), &k2), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(k2->type, KEY_DSA_CERT);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 0);
+       ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1);
+       TEST_DONE();
+
+       TEST_START("DSA key hex fingerprint");
+       buf = load_text_file("dsa_1.fp");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       TEST_START("DSA cert hex fingerprint");
+       buf = load_text_file("dsa_1-cert.fp");
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("DSA key bubblebabble fingerprint");
+       buf = load_text_file("dsa_1.fp.bb");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       sshkey_free(k1);
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("parse ECDSA from private");
+       buf = load_file("ecdsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k1, NULL);
+       buf = load_text_file("ecdsa_1.param.curve");
+       ASSERT_STRING_EQ((const char *)sshbuf_ptr(buf),
+           OBJ_nid2sn(k1->ecdsa_nid));
+       sshbuf_free(buf);
+       a = load_bignum("ecdsa_1.param.priv");
+       b = load_bignum("ecdsa_1.param.pub");
+       c = EC_POINT_point2bn(EC_KEY_get0_group(k1->ecdsa),
+           EC_KEY_get0_public_key(k1->ecdsa), POINT_CONVERSION_UNCOMPRESSED,
+           NULL, NULL);
+       ASSERT_PTR_NE(c, NULL);
+       ASSERT_BIGNUM_EQ(EC_KEY_get0_private_key(k1->ecdsa), a);
+       ASSERT_BIGNUM_EQ(b, c);
+       BN_free(a);
+       BN_free(b);
+       BN_free(c);
+       TEST_DONE();
+
+       TEST_START("parse ECDSA from private w/ passphrase");
+       buf = load_file("ecdsa_1_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("parse ECDSA from new-format");
+       buf = load_file("ecdsa_n");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("parse ECDSA from new-format w/ passphrase");
+       buf = load_file("ecdsa_n_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load ECDSA from public");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("ecdsa_1.pub"), &k2,
+           NULL), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load ECDSA cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("ecdsa_1"), &k2), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(k2->type, KEY_ECDSA_CERT);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 0);
+       ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1);
+       TEST_DONE();
+
+       TEST_START("ECDSA key hex fingerprint");
+       buf = load_text_file("ecdsa_1.fp");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       TEST_START("ECDSA cert hex fingerprint");
+       buf = load_text_file("ecdsa_1-cert.fp");
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("ECDSA key bubblebabble fingerprint");
+       buf = load_text_file("ecdsa_1.fp.bb");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       sshkey_free(k1);
+#endif /* OPENSSL_HAS_ECC */
+
+       TEST_START("parse Ed25519 from private");
+       buf = load_file("ed25519_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_INT_EQ(k1->type, KEY_ED25519);
+       /* XXX check key contents */
+       TEST_DONE();
+
+       TEST_START("parse Ed25519 from private w/ passphrase");
+       buf = load_file("ed25519_1_pw");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf,
+           (const char *)sshbuf_ptr(pw), &k2, NULL), 0);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load Ed25519 from public");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("ed25519_1.pub"), &k2,
+           NULL), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("load Ed25519 cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("ed25519_1"), &k2), 0);
+       ASSERT_PTR_NE(k2, NULL);
+       ASSERT_INT_EQ(k2->type, KEY_ED25519_CERT);
+       ASSERT_INT_EQ(sshkey_equal(k1, k2), 0);
+       ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1);
+       TEST_DONE();
+
+       TEST_START("Ed25519 key hex fingerprint");
+       buf = load_text_file("ed25519_1.fp");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       TEST_START("Ed25519 cert hex fingerprint");
+       buf = load_text_file("ed25519_1-cert.fp");
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("Ed25519 key bubblebabble fingerprint");
+       buf = load_text_file("ed25519_1.fp.bb");
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
+       ASSERT_PTR_NE(cp, NULL);
+       ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
+       sshbuf_free(buf);
+       free(cp);
+       TEST_DONE();
+
+       sshkey_free(k1);
+
+       sshbuf_free(pw);
+
+}
diff --git a/regress/unittests/sshkey/test_fuzz.c b/regress/unittests/sshkey/test_fuzz.c
new file mode 100644 (file)
index 0000000..1f414e0
--- /dev/null
@@ -0,0 +1,403 @@
+/*     $OpenBSD: test_fuzz.c,v 1.6 2015/12/07 02:20:46 djm Exp $ */
+/*
+ * Fuzz tests for key parsing
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
+#include <openssl/objects.h>
+#ifdef OPENSSL_HAS_NISTP256
+# include <openssl/ec.h>
+#endif
+
+#include "../test_helper/test_helper.h"
+
+#include "ssherr.h"
+#include "authfile.h"
+#include "sshkey.h"
+#include "sshbuf.h"
+
+#include "common.h"
+
+void sshkey_fuzz_tests(void);
+
+static void
+onerror(void *fuzz)
+{
+       fprintf(stderr, "Failed during fuzz:\n");
+       fuzz_dump((struct fuzz *)fuzz);
+}
+
+static void
+public_fuzz(struct sshkey *k)
+{
+       struct sshkey *k1;
+       struct sshbuf *buf;
+       struct fuzz *fuzz;
+
+       ASSERT_PTR_NE(buf = sshbuf_new(), NULL);
+       ASSERT_INT_EQ(sshkey_putb(k, buf), 0);
+       /* XXX need a way to run the tests in "slow, but complete" mode */
+       fuzz = fuzz_begin(FUZZ_1_BIT_FLIP | /* XXX too slow FUZZ_2_BIT_FLIP | */
+           FUZZ_1_BYTE_FLIP | /* XXX too slow FUZZ_2_BYTE_FLIP | */
+           FUZZ_TRUNCATE_START | FUZZ_TRUNCATE_END,
+           sshbuf_mutable_ptr(buf), sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(buf), sshbuf_len(buf),
+           &k1), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               if (sshkey_from_blob(fuzz_ptr(fuzz), fuzz_len(fuzz), &k1) == 0)
+                       sshkey_free(k1);
+       }
+       fuzz_cleanup(fuzz);
+}
+
+static void
+sig_fuzz(struct sshkey *k, const char *sig_alg)
+{
+       struct fuzz *fuzz;
+       u_char *sig, c[] = "some junk to be signed";
+       size_t l;
+
+       ASSERT_INT_EQ(sshkey_sign(k, &sig, &l, c, sizeof(c), sig_alg, 0), 0);
+       ASSERT_SIZE_T_GT(l, 0);
+       fuzz = fuzz_begin(FUZZ_1_BIT_FLIP | /* too slow FUZZ_2_BIT_FLIP | */
+           FUZZ_1_BYTE_FLIP | FUZZ_2_BYTE_FLIP |
+           FUZZ_TRUNCATE_START | FUZZ_TRUNCATE_END, sig, l);
+       ASSERT_INT_EQ(sshkey_verify(k, sig, l, c, sizeof(c), 0), 0);
+       free(sig);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               /* Ensure 1-bit difference at least */
+               if (fuzz_matches_original(fuzz))
+                       continue;
+               ASSERT_INT_NE(sshkey_verify(k, fuzz_ptr(fuzz), fuzz_len(fuzz),
+                   c, sizeof(c), 0), 0);
+       }
+       fuzz_cleanup(fuzz);
+}
+
+void
+sshkey_fuzz_tests(void)
+{
+       struct sshkey *k1;
+       struct sshbuf *buf, *fuzzed;
+       struct fuzz *fuzz;
+       int r;
+
+#ifdef WITH_SSH1
+       TEST_START("fuzz RSA1 private");
+       buf = load_file("rsa1_1");
+       fuzz = fuzz_begin(FUZZ_1_BIT_FLIP | FUZZ_1_BYTE_FLIP |
+           FUZZ_TRUNCATE_START | FUZZ_TRUNCATE_END,
+           sshbuf_mutable_ptr(buf), sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+
+       TEST_START("fuzz RSA1 public");
+       buf = load_file("rsa1_1_pw");
+       fuzz = fuzz_begin(FUZZ_1_BIT_FLIP | FUZZ_1_BYTE_FLIP |
+           FUZZ_TRUNCATE_START | FUZZ_TRUNCATE_END,
+           sshbuf_mutable_ptr(buf), sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_public_rsa1_fileblob(buf, &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_public_rsa1_fileblob(fuzzed, &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+#endif
+
+       TEST_START("fuzz RSA private");
+       buf = load_file("rsa_1");
+       fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
+           sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+
+       TEST_START("fuzz RSA new-format private");
+       buf = load_file("rsa_n");
+       fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
+           sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+
+       TEST_START("fuzz DSA private");
+       buf = load_file("dsa_1");
+       fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
+           sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+
+       TEST_START("fuzz DSA new-format private");
+       buf = load_file("dsa_n");
+       fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
+           sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("fuzz ECDSA private");
+       buf = load_file("ecdsa_1");
+       fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
+           sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+
+       TEST_START("fuzz ECDSA new-format private");
+       buf = load_file("ecdsa_n");
+       fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
+           sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+#endif
+
+       TEST_START("fuzz Ed25519 private");
+       buf = load_file("ed25519_1");
+       fuzz = fuzz_begin(FUZZ_BASE64, sshbuf_mutable_ptr(buf),
+           sshbuf_len(buf));
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshkey_free(k1);
+       sshbuf_free(buf);
+       ASSERT_PTR_NE(fuzzed = sshbuf_new(), NULL);
+       TEST_ONERROR(onerror, fuzz);
+       for(; !fuzz_done(fuzz); fuzz_next(fuzz)) {
+               r = sshbuf_put(fuzzed, fuzz_ptr(fuzz), fuzz_len(fuzz));
+               ASSERT_INT_EQ(r, 0);
+               if (sshkey_parse_private_fileblob(fuzzed, "", &k1, NULL) == 0)
+                       sshkey_free(k1);
+               sshbuf_reset(fuzzed);
+       }
+       sshbuf_free(fuzzed);
+       fuzz_cleanup(fuzz);
+       TEST_DONE();
+
+       TEST_START("fuzz RSA public");
+       buf = load_file("rsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz RSA cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("rsa_1"), &k1), 0);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz DSA public");
+       buf = load_file("dsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz DSA cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("dsa_1"), &k1), 0);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("fuzz ECDSA public");
+       buf = load_file("ecdsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz ECDSA cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("ecdsa_1"), &k1), 0);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+#endif
+
+       TEST_START("fuzz Ed25519 public");
+       buf = load_file("ed25519_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz Ed25519 cert");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("ed25519_1"), &k1), 0);
+       public_fuzz(k1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz RSA sig");
+       buf = load_file("rsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       sig_fuzz(k1, "ssh-rsa");
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz RSA SHA256 sig");
+       buf = load_file("rsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       sig_fuzz(k1, "rsa-sha2-256");
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz RSA SHA512 sig");
+       buf = load_file("rsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       sig_fuzz(k1, "rsa-sha2-512");
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("fuzz DSA sig");
+       buf = load_file("dsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       sig_fuzz(k1, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("fuzz ECDSA sig");
+       buf = load_file("ecdsa_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       sig_fuzz(k1, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+#endif
+
+       TEST_START("fuzz Ed25519 sig");
+       buf = load_file("ed25519_1");
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
+       sshbuf_free(buf);
+       sig_fuzz(k1, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+/* XXX fuzz decoded new-format blobs too */
+
+}
diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c
new file mode 100644 (file)
index 0000000..1476dc2
--- /dev/null
@@ -0,0 +1,541 @@
+/*     $OpenBSD: test_sshkey.c,v 1.10 2016/05/02 09:52:00 djm Exp $ */
+/*
+ * Regress test for sshkey.h key management API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#include <openssl/bn.h>
+#include <openssl/rsa.h>
+#include <openssl/dsa.h>
+#if defined(OPENSSL_HAS_ECC) && defined(OPENSSL_HAS_NISTP256)
+# include <openssl/ec.h>
+#endif
+
+#include "../test_helper/test_helper.h"
+
+#include "ssherr.h"
+#include "sshbuf.h"
+#define SSHBUF_INTERNAL 1      /* access internals for testing */
+#include "sshkey.h"
+
+#include "authfile.h"
+#include "common.h"
+#include "ssh2.h"
+
+void sshkey_tests(void);
+
+static void
+put_opt(struct sshbuf *b, const char *name, const char *value)
+{
+       struct sshbuf *sect;
+
+       sect = sshbuf_new();
+       ASSERT_PTR_NE(sect, NULL);
+       ASSERT_INT_EQ(sshbuf_put_cstring(b, name), 0);
+       if (value != NULL)
+               ASSERT_INT_EQ(sshbuf_put_cstring(sect, value), 0);
+       ASSERT_INT_EQ(sshbuf_put_stringb(b, sect), 0);
+       sshbuf_free(sect);
+}
+
+static void
+build_cert(struct sshbuf *b, const struct sshkey *k, const char *type,
+    const struct sshkey *sign_key, const struct sshkey *ca_key,
+    const char *sig_alg)
+{
+       struct sshbuf *ca_buf, *pk, *principals, *critopts, *exts;
+       u_char *sigblob;
+       size_t siglen;
+
+       ca_buf = sshbuf_new();
+       ASSERT_PTR_NE(ca_buf, NULL);
+       ASSERT_INT_EQ(sshkey_putb(ca_key, ca_buf), 0);
+
+       /*
+        * Get the public key serialisation by rendering the key and skipping
+        * the type string. This is a bit of a hack :/
+        */
+       pk = sshbuf_new();
+       ASSERT_PTR_NE(pk, NULL);
+       ASSERT_INT_EQ(sshkey_putb_plain(k, pk), 0);
+       ASSERT_INT_EQ(sshbuf_skip_string(pk), 0);
+
+       principals = sshbuf_new();
+       ASSERT_PTR_NE(principals, NULL);
+       ASSERT_INT_EQ(sshbuf_put_cstring(principals, "gsamsa"), 0);
+       ASSERT_INT_EQ(sshbuf_put_cstring(principals, "gregor"), 0);
+
+       critopts = sshbuf_new();
+       ASSERT_PTR_NE(critopts, NULL);
+       put_opt(critopts, "force-command", "/usr/local/bin/nethack");
+       put_opt(critopts, "source-address", "192.168.0.0/24,127.0.0.1,::1");
+
+       exts = sshbuf_new();
+       ASSERT_PTR_NE(exts, NULL);
+       put_opt(critopts, "permit-X11-forwarding", NULL);
+
+       ASSERT_INT_EQ(sshbuf_put_cstring(b, type), 0);
+       ASSERT_INT_EQ(sshbuf_put_cstring(b, "noncenoncenonce!"), 0); /* nonce */
+       ASSERT_INT_EQ(sshbuf_putb(b, pk), 0); /* public key serialisation */
+       ASSERT_INT_EQ(sshbuf_put_u64(b, 1234), 0); /* serial */
+       ASSERT_INT_EQ(sshbuf_put_u32(b, SSH2_CERT_TYPE_USER), 0); /* type */
+       ASSERT_INT_EQ(sshbuf_put_cstring(b, "gregor"), 0); /* key ID */
+       ASSERT_INT_EQ(sshbuf_put_stringb(b, principals), 0); /* principals */
+       ASSERT_INT_EQ(sshbuf_put_u64(b, 0), 0); /* start */
+       ASSERT_INT_EQ(sshbuf_put_u64(b, 0xffffffffffffffffULL), 0); /* end */
+       ASSERT_INT_EQ(sshbuf_put_stringb(b, critopts), 0); /* options */
+       ASSERT_INT_EQ(sshbuf_put_stringb(b, exts), 0); /* extensions */
+       ASSERT_INT_EQ(sshbuf_put_string(b, NULL, 0), 0); /* reserved */
+       ASSERT_INT_EQ(sshbuf_put_stringb(b, ca_buf), 0); /* signature key */
+       ASSERT_INT_EQ(sshkey_sign(sign_key, &sigblob, &siglen,
+           sshbuf_ptr(b), sshbuf_len(b), sig_alg, 0), 0);
+       ASSERT_INT_EQ(sshbuf_put_string(b, sigblob, siglen), 0); /* signature */
+
+       free(sigblob);
+       sshbuf_free(ca_buf);
+       sshbuf_free(exts);
+       sshbuf_free(critopts);
+       sshbuf_free(principals);
+       sshbuf_free(pk);
+}
+
+static void
+signature_test(struct sshkey *k, struct sshkey *bad, const char *sig_alg,
+    const u_char *d, size_t l)
+{
+       size_t len;
+       u_char *sig;
+
+       ASSERT_INT_EQ(sshkey_sign(k, &sig, &len, d, l, sig_alg, 0), 0);
+       ASSERT_SIZE_T_GT(len, 8);
+       ASSERT_PTR_NE(sig, NULL);
+       ASSERT_INT_EQ(sshkey_verify(k, sig, len, d, l, 0), 0);
+       ASSERT_INT_NE(sshkey_verify(bad, sig, len, d, l, 0), 0);
+       /* Fuzz test is more comprehensive, this is just a smoke test */
+       sig[len - 5] ^= 0x10;
+       ASSERT_INT_NE(sshkey_verify(k, sig, len, d, l, 0), 0);
+       free(sig);
+}
+
+static void
+banana(u_char *s, size_t l)
+{
+       size_t o;
+       const u_char the_banana[] = { 'b', 'a', 'n', 'a', 'n', 'a' };
+
+       for (o = 0; o < l; o += sizeof(the_banana)) {
+               if (l - o < sizeof(the_banana)) {
+                       memcpy(s + o, "nanananana", l - o);
+                       break;
+               }
+               memcpy(s + o, banana, sizeof(the_banana));
+       }
+}
+
+static void
+signature_tests(struct sshkey *k, struct sshkey *bad, const char *sig_alg)
+{
+       u_char i, buf[2049];
+       size_t lens[] = {
+               1, 2, 7, 8, 9, 15, 16, 17, 31, 32, 33, 127, 128, 129,
+               255, 256, 257, 1023, 1024, 1025, 2047, 2048, 2049
+       };
+
+       for (i = 0; i < (sizeof(lens)/sizeof(lens[0])); i++) {
+               test_subtest_info("%s key, banana length %zu",
+                   sshkey_type(k), lens[i]);
+               banana(buf, lens[i]);
+               signature_test(k, bad, sig_alg, buf, lens[i]);
+       }
+}
+
+static struct sshkey *
+get_private(const char *n)
+{
+       struct sshbuf *b;
+       struct sshkey *ret;
+
+       b = load_file(n);
+       ASSERT_INT_EQ(sshkey_parse_private_fileblob(b, "", &ret, NULL), 0);
+       sshbuf_free(b);
+       return ret;
+}
+
+void
+sshkey_tests(void)
+{
+       struct sshkey *k1, *k2, *k3, *k4, *kr, *kd, *kf;
+#ifdef OPENSSL_HAS_ECC
+       struct sshkey *ke;
+#endif
+       struct sshbuf *b;
+
+       TEST_START("new invalid");
+       k1 = sshkey_new(-42);
+       ASSERT_PTR_EQ(k1, NULL);
+       TEST_DONE();
+
+       TEST_START("new/free KEY_UNSPEC");
+       k1 = sshkey_new(KEY_UNSPEC);
+       ASSERT_PTR_NE(k1, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("new/free KEY_RSA1");
+       k1 = sshkey_new(KEY_RSA1);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(k1->rsa, NULL);
+       ASSERT_PTR_NE(k1->rsa->n, NULL);
+       ASSERT_PTR_NE(k1->rsa->e, NULL);
+       ASSERT_PTR_EQ(k1->rsa->p, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("new/free KEY_RSA");
+       k1 = sshkey_new(KEY_RSA);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(k1->rsa, NULL);
+       ASSERT_PTR_NE(k1->rsa->n, NULL);
+       ASSERT_PTR_NE(k1->rsa->e, NULL);
+       ASSERT_PTR_EQ(k1->rsa->p, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("new/free KEY_DSA");
+       k1 = sshkey_new(KEY_DSA);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(k1->dsa, NULL);
+       ASSERT_PTR_NE(k1->dsa->g, NULL);
+       ASSERT_PTR_EQ(k1->dsa->priv_key, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("new/free KEY_ECDSA");
+       k1 = sshkey_new(KEY_ECDSA);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_EQ(k1->ecdsa, NULL);  /* Can't allocate without NID */
+       sshkey_free(k1);
+       TEST_DONE();
+#endif
+
+       TEST_START("new/free KEY_ED25519");
+       k1 = sshkey_new(KEY_ED25519);
+       ASSERT_PTR_NE(k1, NULL);
+       /* These should be blank until key loaded or generated */
+       ASSERT_PTR_EQ(k1->ed25519_sk, NULL);
+       ASSERT_PTR_EQ(k1->ed25519_pk, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("new_private KEY_RSA");
+       k1 = sshkey_new_private(KEY_RSA);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(k1->rsa, NULL);
+       ASSERT_PTR_NE(k1->rsa->n, NULL);
+       ASSERT_PTR_NE(k1->rsa->e, NULL);
+       ASSERT_PTR_NE(k1->rsa->p, NULL);
+       ASSERT_INT_EQ(sshkey_add_private(k1), 0);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("new_private KEY_DSA");
+       k1 = sshkey_new_private(KEY_DSA);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(k1->dsa, NULL);
+       ASSERT_PTR_NE(k1->dsa->g, NULL);
+       ASSERT_PTR_NE(k1->dsa->priv_key, NULL);
+       ASSERT_INT_EQ(sshkey_add_private(k1), 0);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("generate KEY_RSA too small modulus");
+       ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 128, &k1),
+           SSH_ERR_INVALID_ARGUMENT);
+       ASSERT_PTR_EQ(k1, NULL);
+       TEST_DONE();
+
+       TEST_START("generate KEY_RSA too large modulus");
+       ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 1 << 20, &k1),
+           SSH_ERR_INVALID_ARGUMENT);
+       ASSERT_PTR_EQ(k1, NULL);
+       TEST_DONE();
+
+       TEST_START("generate KEY_DSA wrong bits");
+       ASSERT_INT_EQ(sshkey_generate(KEY_DSA, 2048, &k1),
+           SSH_ERR_INVALID_ARGUMENT);
+       ASSERT_PTR_EQ(k1, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("generate KEY_ECDSA wrong bits");
+       ASSERT_INT_EQ(sshkey_generate(KEY_ECDSA, 42, &k1),
+           SSH_ERR_INVALID_ARGUMENT);
+       ASSERT_PTR_EQ(k1, NULL);
+       sshkey_free(k1);
+       TEST_DONE();
+#endif
+
+       TEST_START("generate KEY_RSA");
+       ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 767, &kr),
+           SSH_ERR_INVALID_ARGUMENT);
+       ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 1024, &kr), 0);
+       ASSERT_PTR_NE(kr, NULL);
+       ASSERT_PTR_NE(kr->rsa, NULL);
+       ASSERT_PTR_NE(kr->rsa->n, NULL);
+       ASSERT_PTR_NE(kr->rsa->e, NULL);
+       ASSERT_PTR_NE(kr->rsa->p, NULL);
+       ASSERT_INT_EQ(BN_num_bits(kr->rsa->n), 1024);
+       TEST_DONE();
+
+       TEST_START("generate KEY_DSA");
+       ASSERT_INT_EQ(sshkey_generate(KEY_DSA, 1024, &kd), 0);
+       ASSERT_PTR_NE(kd, NULL);
+       ASSERT_PTR_NE(kd->dsa, NULL);
+       ASSERT_PTR_NE(kd->dsa->g, NULL);
+       ASSERT_PTR_NE(kd->dsa->priv_key, NULL);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("generate KEY_ECDSA");
+       ASSERT_INT_EQ(sshkey_generate(KEY_ECDSA, 256, &ke), 0);
+       ASSERT_PTR_NE(ke, NULL);
+       ASSERT_PTR_NE(ke->ecdsa, NULL);
+       ASSERT_PTR_NE(EC_KEY_get0_public_key(ke->ecdsa), NULL);
+       ASSERT_PTR_NE(EC_KEY_get0_private_key(ke->ecdsa), NULL);
+       TEST_DONE();
+#endif
+
+       TEST_START("generate KEY_ED25519");
+       ASSERT_INT_EQ(sshkey_generate(KEY_ED25519, 256, &kf), 0);
+       ASSERT_PTR_NE(kf, NULL);
+       ASSERT_INT_EQ(kf->type, KEY_ED25519);
+       ASSERT_PTR_NE(kf->ed25519_pk, NULL);
+       ASSERT_PTR_NE(kf->ed25519_sk, NULL);
+       TEST_DONE();
+
+       TEST_START("demote KEY_RSA");
+       ASSERT_INT_EQ(sshkey_demote(kr, &k1), 0);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(kr, k1);
+       ASSERT_INT_EQ(k1->type, KEY_RSA);
+       ASSERT_PTR_NE(k1->rsa, NULL);
+       ASSERT_PTR_NE(k1->rsa->n, NULL);
+       ASSERT_PTR_NE(k1->rsa->e, NULL);
+       ASSERT_PTR_EQ(k1->rsa->p, NULL);
+       TEST_DONE();
+
+       TEST_START("equal KEY_RSA/demoted KEY_RSA");
+       ASSERT_INT_EQ(sshkey_equal(kr, k1), 1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("demote KEY_DSA");
+       ASSERT_INT_EQ(sshkey_demote(kd, &k1), 0);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(kd, k1);
+       ASSERT_INT_EQ(k1->type, KEY_DSA);
+       ASSERT_PTR_NE(k1->dsa, NULL);
+       ASSERT_PTR_NE(k1->dsa->g, NULL);
+       ASSERT_PTR_EQ(k1->dsa->priv_key, NULL);
+       TEST_DONE();
+
+       TEST_START("equal KEY_DSA/demoted KEY_DSA");
+       ASSERT_INT_EQ(sshkey_equal(kd, k1), 1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("demote KEY_ECDSA");
+       ASSERT_INT_EQ(sshkey_demote(ke, &k1), 0);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(ke, k1);
+       ASSERT_INT_EQ(k1->type, KEY_ECDSA);
+       ASSERT_PTR_NE(k1->ecdsa, NULL);
+       ASSERT_INT_EQ(k1->ecdsa_nid, ke->ecdsa_nid);
+       ASSERT_PTR_NE(EC_KEY_get0_public_key(ke->ecdsa), NULL);
+       ASSERT_PTR_EQ(EC_KEY_get0_private_key(k1->ecdsa), NULL);
+       TEST_DONE();
+
+       TEST_START("equal KEY_ECDSA/demoted KEY_ECDSA");
+       ASSERT_INT_EQ(sshkey_equal(ke, k1), 1);
+       sshkey_free(k1);
+       TEST_DONE();
+#endif
+
+       TEST_START("demote KEY_ED25519");
+       ASSERT_INT_EQ(sshkey_demote(kf, &k1), 0);
+       ASSERT_PTR_NE(k1, NULL);
+       ASSERT_PTR_NE(kf, k1);
+       ASSERT_INT_EQ(k1->type, KEY_ED25519);
+       ASSERT_PTR_NE(k1->ed25519_pk, NULL);
+       ASSERT_PTR_EQ(k1->ed25519_sk, NULL);
+       TEST_DONE();
+
+       TEST_START("equal KEY_ED25519/demoted KEY_ED25519");
+       ASSERT_INT_EQ(sshkey_equal(kf, k1), 1);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       TEST_START("equal mismatched key types");
+       ASSERT_INT_EQ(sshkey_equal(kd, kr), 0);
+#ifdef OPENSSL_HAS_ECC
+       ASSERT_INT_EQ(sshkey_equal(kd, ke), 0);
+       ASSERT_INT_EQ(sshkey_equal(kr, ke), 0);
+       ASSERT_INT_EQ(sshkey_equal(ke, kf), 0);
+#endif
+       ASSERT_INT_EQ(sshkey_equal(kd, kf), 0);
+       TEST_DONE();
+
+       TEST_START("equal different keys");
+       ASSERT_INT_EQ(sshkey_generate(KEY_RSA, 1024, &k1), 0);
+       ASSERT_INT_EQ(sshkey_equal(kr, k1), 0);
+       sshkey_free(k1);
+       ASSERT_INT_EQ(sshkey_generate(KEY_DSA, 1024, &k1), 0);
+       ASSERT_INT_EQ(sshkey_equal(kd, k1), 0);
+       sshkey_free(k1);
+#ifdef OPENSSL_HAS_ECC
+       ASSERT_INT_EQ(sshkey_generate(KEY_ECDSA, 256, &k1), 0);
+       ASSERT_INT_EQ(sshkey_equal(ke, k1), 0);
+       sshkey_free(k1);
+#endif
+       ASSERT_INT_EQ(sshkey_generate(KEY_ED25519, 256, &k1), 0);
+       ASSERT_INT_EQ(sshkey_equal(kf, k1), 0);
+       sshkey_free(k1);
+       TEST_DONE();
+
+       sshkey_free(kr);
+       sshkey_free(kd);
+#ifdef OPENSSL_HAS_ECC
+       sshkey_free(ke);
+#endif
+       sshkey_free(kf);
+
+       TEST_START("certify key");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("ed25519_1.pub"),
+           &k1, NULL), 0);
+       k2 = get_private("ed25519_2");
+       ASSERT_INT_EQ(sshkey_to_certified(k1), 0);
+       ASSERT_PTR_NE(k1->cert, NULL);
+       k1->cert->type = SSH2_CERT_TYPE_USER;
+       k1->cert->serial = 1234;
+       k1->cert->key_id = strdup("estragon");
+       ASSERT_PTR_NE(k1->cert->key_id, NULL);
+       k1->cert->principals = calloc(4, sizeof(*k1->cert->principals));
+       ASSERT_PTR_NE(k1->cert->principals, NULL);
+       k1->cert->principals[0] = strdup("estragon");
+       k1->cert->principals[1] = strdup("vladimir");
+       k1->cert->principals[2] = strdup("pozzo");
+       k1->cert->principals[3] = strdup("lucky");
+       ASSERT_PTR_NE(k1->cert->principals[0], NULL);
+       ASSERT_PTR_NE(k1->cert->principals[1], NULL);
+       ASSERT_PTR_NE(k1->cert->principals[2], NULL);
+       ASSERT_PTR_NE(k1->cert->principals[3], NULL);
+       k1->cert->valid_after = 0;
+       k1->cert->valid_before = (u_int64_t)-1;
+       k1->cert->critical = sshbuf_new();
+       ASSERT_PTR_NE(k1->cert->critical, NULL);
+       k1->cert->extensions = sshbuf_new();
+       ASSERT_PTR_NE(k1->cert->extensions, NULL);
+       put_opt(k1->cert->critical, "force-command", "/usr/bin/true");
+       put_opt(k1->cert->critical, "source-address", "127.0.0.1");
+       put_opt(k1->cert->extensions, "permit-X11-forwarding", NULL);
+       put_opt(k1->cert->extensions, "permit-agent-forwarding", NULL);
+       ASSERT_INT_EQ(sshkey_from_private(k2, &k1->cert->signature_key), 0);
+       ASSERT_INT_EQ(sshkey_certify(k1, k2, NULL), 0);
+       b = sshbuf_new();
+       ASSERT_PTR_NE(b, NULL);
+       ASSERT_INT_EQ(sshkey_putb(k1, b), 0);
+       ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(b), sshbuf_len(b), &k3), 0);
+
+       sshkey_free(k1);
+       sshkey_free(k2);
+       sshkey_free(k3);
+       sshbuf_reset(b);
+       TEST_DONE();
+
+       TEST_START("sign and verify RSA");
+       k1 = get_private("rsa_1");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa_2.pub"), &k2,
+           NULL), 0);
+       signature_tests(k1, k2, "ssh-rsa");
+       sshkey_free(k1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("sign and verify RSA-SHA256");
+       k1 = get_private("rsa_1");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa_2.pub"), &k2,
+           NULL), 0);
+       signature_tests(k1, k2, "rsa-sha2-256");
+       sshkey_free(k1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("sign and verify RSA-SHA512");
+       k1 = get_private("rsa_1");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa_2.pub"), &k2,
+           NULL), 0);
+       signature_tests(k1, k2, "rsa-sha2-512");
+       sshkey_free(k1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("sign and verify DSA");
+       k1 = get_private("dsa_1");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("dsa_2.pub"), &k2,
+           NULL), 0);
+       signature_tests(k1, k2, NULL);
+       sshkey_free(k1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+#ifdef OPENSSL_HAS_ECC
+       TEST_START("sign and verify ECDSA");
+       k1 = get_private("ecdsa_1");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("ecdsa_2.pub"), &k2,
+           NULL), 0);
+       signature_tests(k1, k2, NULL);
+       sshkey_free(k1);
+       sshkey_free(k2);
+       TEST_DONE();
+#endif
+
+       TEST_START("sign and verify ED25519");
+       k1 = get_private("ed25519_1");
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("ed25519_2.pub"), &k2,
+           NULL), 0);
+       signature_tests(k1, k2, NULL);
+       sshkey_free(k1);
+       sshkey_free(k2);
+       TEST_DONE();
+
+       TEST_START("nested certificate");
+       ASSERT_INT_EQ(sshkey_load_cert(test_data_file("rsa_1"), &k1), 0);
+       ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa_1.pub"), &k2,
+           NULL), 0);
+       k3 = get_private("rsa_1");
+       build_cert(b, k2, "ssh-rsa-cert-v01@openssh.com", k3, k1, NULL);
+       ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(b), sshbuf_len(b), &k4),
+           SSH_ERR_KEY_CERT_INVALID_SIGN_KEY);
+       ASSERT_PTR_EQ(k4, NULL);
+       sshkey_free(k1);
+       sshkey_free(k2);
+       sshkey_free(k3);
+       sshbuf_free(b);
+       TEST_DONE();
+
+}
diff --git a/regress/unittests/sshkey/testdata/dsa_1 b/regress/unittests/sshkey/testdata/dsa_1
new file mode 100644 (file)
index 0000000..d3f2482
--- /dev/null
@@ -0,0 +1,12 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBvAIBAAKBgQD6kutNFRsHTwEAv6d39Lhsqy1apdHBZ9c2HfyRr7WmypyGIy2m
+Ka43vzXI8CNwmRSYs+A6d0vJC7Pl+f9QzJ/04NWOA+MiwfurwrR3CRe61QRYb8Py
+mcHOxueHs95IcjrbIPNn86cjnPP5qvv/guUzCjuww4zBdJOXpligrGt2XwIVAKMD
+/50qQy7j8JaMk+1+Xtg1pK01AoGBAO7l9QVVbSSoy5lq6cOtvpf8UlwOa6+zBwbl
+o4gmFd1RwX1yWkA8kQ7RrhCSg8Hc6mIGnKRgKRli/3LgbSfZ0obFJehkRtEWtN4P
+h8fVUeS74iQbIwFQeKlYHIlNTRoGtAbdi3nHdV+BBkEQc1V3rjqYqhjOoz/yNsgz
+LND26HrdAoGBAOdXpyfmobEBaOqZAuvgj1P0uhjG2P31Ufurv22FWPBU3A9qrkxb
+OXwE0LwvjCvrsQV/lrYhJz/tiys40VeahulWZE5SAHMXGIf95LiLSgaXMjko7joo
+t+LK84ltLymwZ4QMnYjnZSSclf1UuyQMcUtb34+I0u9Ycnyhp2mSFsQtAhRYIbQ5
+KfXsZuBPuWe5FJz3ldaEgw==
+-----END DSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/dsa_1-cert.fp b/regress/unittests/sshkey/testdata/dsa_1-cert.fp
new file mode 100644 (file)
index 0000000..75ff0e9
--- /dev/null
@@ -0,0 +1 @@
+SHA256:kOLgXSoAT8O5T6r36n5NJUYigbux1d7gdH/rmWiJm6s
diff --git a/regress/unittests/sshkey/testdata/dsa_1-cert.pub b/regress/unittests/sshkey/testdata/dsa_1-cert.pub
new file mode 100644 (file)
index 0000000..e768db1
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss-cert-v01@openssh.com AAAAHHNzaC1kc3MtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgdTlbNU9Hn9Qng3FHxwH971bxCIoq1ern/QWFFDWXgmYAAACBAPqS600VGwdPAQC/p3f0uGyrLVql0cFn1zYd/JGvtabKnIYjLaYprje/NcjwI3CZFJiz4Dp3S8kLs+X5/1DMn/Tg1Y4D4yLB+6vCtHcJF7rVBFhvw/KZwc7G54ez3khyOtsg82fzpyOc8/mq+/+C5TMKO7DDjMF0k5emWKCsa3ZfAAAAFQCjA/+dKkMu4/CWjJPtfl7YNaStNQAAAIEA7uX1BVVtJKjLmWrpw62+l/xSXA5rr7MHBuWjiCYV3VHBfXJaQDyRDtGuEJKDwdzqYgacpGApGWL/cuBtJ9nShsUl6GRG0Ra03g+Hx9VR5LviJBsjAVB4qVgciU1NGga0Bt2Lecd1X4EGQRBzVXeuOpiqGM6jP/I2yDMs0Pboet0AAACBAOdXpyfmobEBaOqZAuvgj1P0uhjG2P31Ufurv22FWPBU3A9qrkxbOXwE0LwvjCvrsQV/lrYhJz/tiys40VeahulWZE5SAHMXGIf95LiLSgaXMjko7joot+LK84ltLymwZ4QMnYjnZSSclf1UuyQMcUtb34+I0u9Ycnyhp2mSFsQtAAAAAAAAAAYAAAACAAAABmp1bGl1cwAAABIAAAAFaG9zdDEAAAAFaG9zdDIAAAAANowB8AAAAABNHmBwAAAAAAAAAAAAAAAAAAAAMwAAAAtzc2gtZWQyNTUxOQAAACBThupGO0X+FLQhbz8CoKPwc7V3JNsQuGtlsgN+F7SMGQAAAFMAAAALc3NoLWVkMjU1MTkAAABAh/z1LIdNL1b66tQ8t9DY9BTB3BQKpTKmc7ezyFKLwl96yaIniZwD9Ticdbe/8i/Li3uCFE3EAt8NAIv9zff8Bg== DSA test key #1
diff --git a/regress/unittests/sshkey/testdata/dsa_1.fp b/regress/unittests/sshkey/testdata/dsa_1.fp
new file mode 100644 (file)
index 0000000..75ff0e9
--- /dev/null
@@ -0,0 +1 @@
+SHA256:kOLgXSoAT8O5T6r36n5NJUYigbux1d7gdH/rmWiJm6s
diff --git a/regress/unittests/sshkey/testdata/dsa_1.fp.bb b/regress/unittests/sshkey/testdata/dsa_1.fp.bb
new file mode 100644 (file)
index 0000000..ba37776
--- /dev/null
@@ -0,0 +1 @@
+xetag-todiz-mifah-torec-mynyv-cyvit-gopon-pygag-rupic-cenav-bexax
diff --git a/regress/unittests/sshkey/testdata/dsa_1.param.g b/regress/unittests/sshkey/testdata/dsa_1.param.g
new file mode 100644 (file)
index 0000000..e51c3f9
--- /dev/null
@@ -0,0 +1 @@
+00eee5f505556d24a8cb996ae9c3adbe97fc525c0e6bafb30706e5a3882615dd51c17d725a403c910ed1ae109283c1dcea62069ca460291962ff72e06d27d9d286c525e86446d116b4de0f87c7d551e4bbe2241b23015078a9581c894d4d1a06b406dd8b79c7755f81064110735577ae3a98aa18cea33ff236c8332cd0f6e87add
diff --git a/regress/unittests/sshkey/testdata/dsa_1.param.priv b/regress/unittests/sshkey/testdata/dsa_1.param.priv
new file mode 100644 (file)
index 0000000..4f74331
--- /dev/null
@@ -0,0 +1 @@
+5821b43929f5ec66e04fb967b9149cf795d68483
diff --git a/regress/unittests/sshkey/testdata/dsa_1.param.pub b/regress/unittests/sshkey/testdata/dsa_1.param.pub
new file mode 100644 (file)
index 0000000..ba0313b
--- /dev/null
@@ -0,0 +1 @@
+00e757a727e6a1b10168ea9902ebe08f53f4ba18c6d8fdf551fbabbf6d8558f054dc0f6aae4c5b397c04d0bc2f8c2bebb1057f96b621273fed8b2b38d1579a86e956644e520073171887fde4b88b4a0697323928ee3a28b7e2caf3896d2f29b067840c9d88e765249c95fd54bb240c714b5bdf8f88d2ef58727ca1a7699216c42d
diff --git a/regress/unittests/sshkey/testdata/dsa_1.pub b/regress/unittests/sshkey/testdata/dsa_1.pub
new file mode 100644 (file)
index 0000000..41cae2f
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAPqS600VGwdPAQC/p3f0uGyrLVql0cFn1zYd/JGvtabKnIYjLaYprje/NcjwI3CZFJiz4Dp3S8kLs+X5/1DMn/Tg1Y4D4yLB+6vCtHcJF7rVBFhvw/KZwc7G54ez3khyOtsg82fzpyOc8/mq+/+C5TMKO7DDjMF0k5emWKCsa3ZfAAAAFQCjA/+dKkMu4/CWjJPtfl7YNaStNQAAAIEA7uX1BVVtJKjLmWrpw62+l/xSXA5rr7MHBuWjiCYV3VHBfXJaQDyRDtGuEJKDwdzqYgacpGApGWL/cuBtJ9nShsUl6GRG0Ra03g+Hx9VR5LviJBsjAVB4qVgciU1NGga0Bt2Lecd1X4EGQRBzVXeuOpiqGM6jP/I2yDMs0Pboet0AAACBAOdXpyfmobEBaOqZAuvgj1P0uhjG2P31Ufurv22FWPBU3A9qrkxbOXwE0LwvjCvrsQV/lrYhJz/tiys40VeahulWZE5SAHMXGIf95LiLSgaXMjko7joot+LK84ltLymwZ4QMnYjnZSSclf1UuyQMcUtb34+I0u9Ycnyhp2mSFsQt DSA test key #1
diff --git a/regress/unittests/sshkey/testdata/dsa_1_pw b/regress/unittests/sshkey/testdata/dsa_1_pw
new file mode 100644 (file)
index 0000000..24c7303
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN DSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: AES-128-CBC,BC8386C373B22EB7F00ADC821D5D8BE9
+
++HDV2DQ09sxrIAeXTz9r3YFuPRa2hk1+NGcr3ETkXbC6KiZ14wpTnGTloKwaQjIW
+eXTa9mpCOWAoohgvsVb+hOuOlP7AfeHu1IXV4EAS+GDpkiV5UxlCXXwqlD75Buu4
+wwDd/p4SWzILH3WGjDk5JIXoxWNY13LHwC7Q6gtGJx4AicUG7YBRTXMIBDa/Kh77
+6o2rFETKmp4VHBvHbakmiETfptdM8bbWxKWeY2vakThyESgeofsLoTOQCIwlEfJC
+s2D/KYL65C8VbHYgIoSLTQnooO45DDyxIuhCqP+H23mhv9vB1Od3nc2atgHj/XFs
+dcOPFkF/msDRYqxY3V0AS6+jpKwFodZ7g/hyGcyPxOkzlJVuKoKuH6P5PyQ69Gx0
+iqri0xEPyABr7kGlXNrjjctojX+B4WwSnjg/2euXXWFXCRalIdA7ErATTiQbGOx7
+Vd6Gn8PZbSy1MkqEDrZRip0pfAFJYI/8GXPC75BpnRsrVlfhtrngbW+kBP35LzaN
+l2K+RQ3gSB3iFoqNb1Kuu6T5MZlyVl5H2dVlJSeb1euQ2OycXdDoFTyJ4AiyWS7w
+Vlh8zeJnso5QRDjMwx99pZilbbuFGSLsahiGEveFc6o=
+-----END DSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/dsa_2 b/regress/unittests/sshkey/testdata/dsa_2
new file mode 100644 (file)
index 0000000..3cc9631
--- /dev/null
@@ -0,0 +1,12 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBvQIBAAKBgQCbyPXNdHeLsjpobPVCMkfagBkt15Zsltqf/PGNP1y1cuz7rsTX
+ZekQwUkSTNm5coqXe+ZOw2O4tjobJDd60I1/VPgaB0NYlQR9Hn87M284WD4f6VY+
+aunHmP134a8ybG5G4NqVNF3ihvxAR2pVITqb7kE46r2uYZNcNlHI8voRCwIVAMcP
+bwqFNsQbH5pJyZW30wj4KVZ3AoGBAIK98BVeKQVf8qDFqx9ovMuNgVSxpd+N0Yta
+5ZEy1OI2ziu5RhjueIM2K7Gq2Mnp38ob1AM53BUxqlcBJaHEDa6rj6yvuMgW9oCJ
+dImBM8sIFxfBbXNbpJiMaDwa6WyT84OkpDE6uuAepTMnWOUWkUVkAiyokHDUGXkG
+GyoQblbXAoGBAIsf7TaZ804sUWwRV0wI8DYx+hxD5QdrfYPYMtL2fHn3lICimGt0
+FTtUZ25jKg0E0DMBPdET6ZEHB3ZZkR8hFoUzZhdnyJMu3UjVtgaV88Ue3PrXxchk
+0W2jHPaAgQU3JIWzo8HFIFqvC/HEL+EyW3rBTY2uXM3XGI+YcWSA4ZrZAhUAsY2f
+bDFNzgZ4DaZ9wLRzTgOswPU=
+-----END DSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/dsa_2.fp b/regress/unittests/sshkey/testdata/dsa_2.fp
new file mode 100644 (file)
index 0000000..51fbeb4
--- /dev/null
@@ -0,0 +1 @@
+SHA256:ecwhWcXgpdBxZ2e+OjpRRY7dqXHHCD62BGtoVQQBwCk
diff --git a/regress/unittests/sshkey/testdata/dsa_2.fp.bb b/regress/unittests/sshkey/testdata/dsa_2.fp.bb
new file mode 100644 (file)
index 0000000..4d908ee
--- /dev/null
@@ -0,0 +1 @@
+xeser-megad-pocan-rozit-belup-tapoh-fapif-kyvit-vonav-cehab-naxax
diff --git a/regress/unittests/sshkey/testdata/dsa_2.pub b/regress/unittests/sshkey/testdata/dsa_2.pub
new file mode 100644 (file)
index 0000000..77bb555
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAJvI9c10d4uyOmhs9UIyR9qAGS3XlmyW2p/88Y0/XLVy7PuuxNdl6RDBSRJM2blyipd75k7DY7i2OhskN3rQjX9U+BoHQ1iVBH0efzszbzhYPh/pVj5q6ceY/XfhrzJsbkbg2pU0XeKG/EBHalUhOpvuQTjqva5hk1w2Ucjy+hELAAAAFQDHD28KhTbEGx+aScmVt9MI+ClWdwAAAIEAgr3wFV4pBV/yoMWrH2i8y42BVLGl343Ri1rlkTLU4jbOK7lGGO54gzYrsarYyenfyhvUAzncFTGqVwElocQNrquPrK+4yBb2gIl0iYEzywgXF8Ftc1ukmIxoPBrpbJPzg6SkMTq64B6lMydY5RaRRWQCLKiQcNQZeQYbKhBuVtcAAACBAIsf7TaZ804sUWwRV0wI8DYx+hxD5QdrfYPYMtL2fHn3lICimGt0FTtUZ25jKg0E0DMBPdET6ZEHB3ZZkR8hFoUzZhdnyJMu3UjVtgaV88Ue3PrXxchk0W2jHPaAgQU3JIWzo8HFIFqvC/HEL+EyW3rBTY2uXM3XGI+YcWSA4ZrZ DSA test key #2
diff --git a/regress/unittests/sshkey/testdata/dsa_n b/regress/unittests/sshkey/testdata/dsa_n
new file mode 100644 (file)
index 0000000..d3f2482
--- /dev/null
@@ -0,0 +1,12 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBvAIBAAKBgQD6kutNFRsHTwEAv6d39Lhsqy1apdHBZ9c2HfyRr7WmypyGIy2m
+Ka43vzXI8CNwmRSYs+A6d0vJC7Pl+f9QzJ/04NWOA+MiwfurwrR3CRe61QRYb8Py
+mcHOxueHs95IcjrbIPNn86cjnPP5qvv/guUzCjuww4zBdJOXpligrGt2XwIVAKMD
+/50qQy7j8JaMk+1+Xtg1pK01AoGBAO7l9QVVbSSoy5lq6cOtvpf8UlwOa6+zBwbl
+o4gmFd1RwX1yWkA8kQ7RrhCSg8Hc6mIGnKRgKRli/3LgbSfZ0obFJehkRtEWtN4P
+h8fVUeS74iQbIwFQeKlYHIlNTRoGtAbdi3nHdV+BBkEQc1V3rjqYqhjOoz/yNsgz
+LND26HrdAoGBAOdXpyfmobEBaOqZAuvgj1P0uhjG2P31Ufurv22FWPBU3A9qrkxb
+OXwE0LwvjCvrsQV/lrYhJz/tiys40VeahulWZE5SAHMXGIf95LiLSgaXMjko7joo
+t+LK84ltLymwZ4QMnYjnZSSclf1UuyQMcUtb34+I0u9Ycnyhp2mSFsQtAhRYIbQ5
+KfXsZuBPuWe5FJz3ldaEgw==
+-----END DSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/dsa_n_pw b/regress/unittests/sshkey/testdata/dsa_n_pw
new file mode 100644 (file)
index 0000000..24ac299
--- /dev/null
@@ -0,0 +1,21 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jYmMAAAAGYmNyeXB0AAAAGAAAABCVs+LsMJ
+wnB5zM9U9pTXrGAAAAEAAAAAEAAAGzAAAAB3NzaC1kc3MAAACBAPqS600VGwdPAQC/p3f0
+uGyrLVql0cFn1zYd/JGvtabKnIYjLaYprje/NcjwI3CZFJiz4Dp3S8kLs+X5/1DMn/Tg1Y
+4D4yLB+6vCtHcJF7rVBFhvw/KZwc7G54ez3khyOtsg82fzpyOc8/mq+/+C5TMKO7DDjMF0
+k5emWKCsa3ZfAAAAFQCjA/+dKkMu4/CWjJPtfl7YNaStNQAAAIEA7uX1BVVtJKjLmWrpw6
+2+l/xSXA5rr7MHBuWjiCYV3VHBfXJaQDyRDtGuEJKDwdzqYgacpGApGWL/cuBtJ9nShsUl
+6GRG0Ra03g+Hx9VR5LviJBsjAVB4qVgciU1NGga0Bt2Lecd1X4EGQRBzVXeuOpiqGM6jP/
+I2yDMs0Pboet0AAACBAOdXpyfmobEBaOqZAuvgj1P0uhjG2P31Ufurv22FWPBU3A9qrkxb
+OXwE0LwvjCvrsQV/lrYhJz/tiys40VeahulWZE5SAHMXGIf95LiLSgaXMjko7joot+LK84
+ltLymwZ4QMnYjnZSSclf1UuyQMcUtb34+I0u9Ycnyhp2mSFsQtAAAB4HiOcRW4w+sIqBL0
+TPVbf0glN1hUi0rcE63Pqxmvxb8LkldC4IxAUagPrjhNAEW2AY42+CvPrtGB1z7gDADAIW
+xZX6wKwIcXP0Qh+xHE12F4u6mwfasssnAp4t1Ki8uCjMjnimgb3KdWpp0kiUV0oR062TXV
+PAdfrWjaq4fw0KOqbHIAG/v36AqzuqjSTfDbqvLZM3y0gp2Q1RxaQVJA5ZIKKyqRyFX7sr
+BaEIyCgeE3hM0EB7BycY1oIcS/eNxrACBWVJCENl5N7LtEYXNX7TANFniztfXzwaqGTT6A
+fCfbW4gz1UKldLUBzbIrPwMWlirAstbHvOf/2Iay2pNAs/SHhI0aF2jsGfvv5/D6N+r9dG
+B2SgDKBg7pywMH1DTvg6YT3P4GjCx0GUHqRCFLvD1rDdk4KSjvaRMpVq1PJ0/Wv6UGtsMS
+TR0PaEHDRNZqAX4YxqujnWrGKuRJhuz0eUvp7fZvbWHtiAMKV7368kkeUmkOHanb+TS+zs
+KINX8ev8zJZ6WVr8Vl+IQavpv0i2bXwS6QqbEuifpv/+uBb7pqRiU4u8en0eMdX1bZoTPM
+R6xHCnGD/Jpb3zS91Ya57T6CiXZ12KCaL6nWGnCkZVpzkfJ2HjFklWSWBQ6uyaosDQ==
+-----END OPENSSH PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1 b/regress/unittests/sshkey/testdata/ecdsa_1
new file mode 100644 (file)
index 0000000..80382b6
--- /dev/null
@@ -0,0 +1,5 @@
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIPPNyUAnjvFr+eT/7t/IyjuQQd/aLFiTY92LB9gIjyrMoAoGCCqGSM49
+AwEHoUQDQgAEDFlblkOrW9ydKVhtM+9AY3c9saBE7SG3lFx38nBavkADDaI9jh3/
+kvG/Jt9vpm22qwoklTCGDfzCkXkIKaWlBw==
+-----END EC PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1-cert.fp b/regress/unittests/sshkey/testdata/ecdsa_1-cert.fp
new file mode 100644 (file)
index 0000000..e48304f
--- /dev/null
@@ -0,0 +1 @@
+SHA256:8ty77fOpABat1y88aNdclQTfU+lVvWe7jYZGw8VYtfg
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1-cert.pub b/regress/unittests/sshkey/testdata/ecdsa_1-cert.pub
new file mode 100644 (file)
index 0000000..55e2a25
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp256-cert-v01@openssh.com AAAAKGVjZHNhLXNoYTItbmlzdHAyNTYtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgOtFRnMigkGliaYfPmX5IidVWfV3tRH6lqRXv0l8bvKoAAAAIbmlzdHAyNTYAAABBBAxZW5ZDq1vcnSlYbTPvQGN3PbGgRO0ht5Rcd/JwWr5AAw2iPY4d/5Lxvybfb6ZttqsKJJUwhg38wpF5CCmlpQcAAAAAAAAABwAAAAIAAAAGanVsaXVzAAAAEgAAAAVob3N0MQAAAAVob3N0MgAAAAA2jAHwAAAAAE0eYHAAAAAAAAAAAAAAAAAAAABoAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAxZW5ZDq1vcnSlYbTPvQGN3PbGgRO0ht5Rcd/JwWr5AAw2iPY4d/5Lxvybfb6ZttqsKJJUwhg38wpF5CCmlpQcAAABkAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAABJAAAAIHbxGwTnue7KxhHXGFvRcxBnekhQ3Qx84vV/Vs4oVCrpAAAAIQC7vk2+d14aS7td7kVXLQn392oALjEBzMZoDvT1vT/zOA== ECDSA test key #1
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1.fp b/regress/unittests/sshkey/testdata/ecdsa_1.fp
new file mode 100644 (file)
index 0000000..e48304f
--- /dev/null
@@ -0,0 +1 @@
+SHA256:8ty77fOpABat1y88aNdclQTfU+lVvWe7jYZGw8VYtfg
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1.fp.bb b/regress/unittests/sshkey/testdata/ecdsa_1.fp.bb
new file mode 100644 (file)
index 0000000..fa23c33
--- /dev/null
@@ -0,0 +1 @@
+xibah-vocun-sogyn-byhen-rivem-hegyh-luneh-dozyr-vatyf-dufid-myxyx
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1.param.curve b/regress/unittests/sshkey/testdata/ecdsa_1.param.curve
new file mode 100644 (file)
index 0000000..fa04004
--- /dev/null
@@ -0,0 +1 @@
+prime256v1
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1.param.priv b/regress/unittests/sshkey/testdata/ecdsa_1.param.priv
new file mode 100644 (file)
index 0000000..dc908ad
--- /dev/null
@@ -0,0 +1 @@
+00f3cdc940278ef16bf9e4ffeedfc8ca3b9041dfda2c589363dd8b07d8088f2acc
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1.param.pub b/regress/unittests/sshkey/testdata/ecdsa_1.param.pub
new file mode 100644 (file)
index 0000000..71c9584
--- /dev/null
@@ -0,0 +1 @@
+040c595b9643ab5bdc9d29586d33ef4063773db1a044ed21b7945c77f2705abe40030da23d8e1dff92f1bf26df6fa66db6ab0a249530860dfcc291790829a5a507
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1.pub b/regress/unittests/sshkey/testdata/ecdsa_1.pub
new file mode 100644 (file)
index 0000000..84a71f9
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAxZW5ZDq1vcnSlYbTPvQGN3PbGgRO0ht5Rcd/JwWr5AAw2iPY4d/5Lxvybfb6ZttqsKJJUwhg38wpF5CCmlpQc= ECDSA test key #1
diff --git a/regress/unittests/sshkey/testdata/ecdsa_1_pw b/regress/unittests/sshkey/testdata/ecdsa_1_pw
new file mode 100644 (file)
index 0000000..5c83a65
--- /dev/null
@@ -0,0 +1,8 @@
+-----BEGIN EC PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: AES-128-CBC,7BA38DE00F67851E4207216809C3BB15
+
+8QkFoZHQkj9a2mt032sp+WKaJ1fwteqWDd4RpAW9OzDgqzMx1QO43qJgBDTfhzjt
+M2Q8YfiGjfBEYpg4kCbacfcV68DEV4z6Ll7rIzzzO7OfWUNL++brD64vKx4z6f46
++sn4nbZTXilpkzi/nmPDVzrNmTSywA8T7Yf0QcBUxks=
+-----END EC PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ecdsa_2 b/regress/unittests/sshkey/testdata/ecdsa_2
new file mode 100644 (file)
index 0000000..0f4e844
--- /dev/null
@@ -0,0 +1,7 @@
+-----BEGIN EC PRIVATE KEY-----
+MIHcAgEBBEIBqBtN7e6Essd3dlsgISViPCXXC0atlNkGtoMgSQdBTKVUfeJOi4lc
+RZaXJdXnqWUqI/KEsH8h8QN4YcB8ugmAcc+gBwYFK4EEACOhgYkDgYYABAHZ2VNy
+oDedBwqsdzY+kkNptc9DrtRCVmO6cULLj+691MhItqVqTMJbTFlI4MnAg9PoGTF/
+0KmLJfy8vSffXGKqqwGKcFNtd1XCo+7Qu9tXbxron9g6Dmu7y8jaLkixcwZwnwLs
+6GmA9qZGuiAfOGV0Gf9/u98sr+vikOa4Ow5JFDTw5g==
+-----END EC PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ecdsa_2.fp b/regress/unittests/sshkey/testdata/ecdsa_2.fp
new file mode 100644 (file)
index 0000000..581e48a
--- /dev/null
@@ -0,0 +1 @@
+SHA256:ed8YniRHA6qCrErCRnzrWxPHxYuA62a+CAFYUVxJgaI
diff --git a/regress/unittests/sshkey/testdata/ecdsa_2.fp.bb b/regress/unittests/sshkey/testdata/ecdsa_2.fp.bb
new file mode 100644 (file)
index 0000000..e1cc664
--- /dev/null
@@ -0,0 +1 @@
+xufag-danul-putub-mokin-pugaz-covid-dofag-nihuz-sysab-genar-zaxyx
diff --git a/regress/unittests/sshkey/testdata/ecdsa_2.param.curve b/regress/unittests/sshkey/testdata/ecdsa_2.param.curve
new file mode 100644 (file)
index 0000000..617ea2f
--- /dev/null
@@ -0,0 +1 @@
+secp521r1
diff --git a/regress/unittests/sshkey/testdata/ecdsa_2.param.priv b/regress/unittests/sshkey/testdata/ecdsa_2.param.priv
new file mode 100644 (file)
index 0000000..dd898d9
--- /dev/null
@@ -0,0 +1 @@
+01a81b4dedee84b2c777765b202125623c25d70b46ad94d906b683204907414ca5547de24e8b895c45969725d5e7a9652a23f284b07f21f1037861c07cba098071cf
diff --git a/regress/unittests/sshkey/testdata/ecdsa_2.param.pub b/regress/unittests/sshkey/testdata/ecdsa_2.param.pub
new file mode 100644 (file)
index 0000000..94301c9
--- /dev/null
@@ -0,0 +1 @@
+0401d9d95372a0379d070aac77363e924369b5cf43aed4425663ba7142cb8feebdd4c848b6a56a4cc25b4c5948e0c9c083d3e819317fd0a98b25fcbcbd27df5c62aaab018a70536d7755c2a3eed0bbdb576f1ae89fd83a0e6bbbcbc8da2e48b17306709f02ece86980f6a646ba201f38657419ff7fbbdf2cafebe290e6b83b0e491434f0e6
diff --git a/regress/unittests/sshkey/testdata/ecdsa_2.pub b/regress/unittests/sshkey/testdata/ecdsa_2.pub
new file mode 100644 (file)
index 0000000..be9d84b
--- /dev/null
@@ -0,0 +1 @@
+ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAHZ2VNyoDedBwqsdzY+kkNptc9DrtRCVmO6cULLj+691MhItqVqTMJbTFlI4MnAg9PoGTF/0KmLJfy8vSffXGKqqwGKcFNtd1XCo+7Qu9tXbxron9g6Dmu7y8jaLkixcwZwnwLs6GmA9qZGuiAfOGV0Gf9/u98sr+vikOa4Ow5JFDTw5g== ECDSA test key #2
diff --git a/regress/unittests/sshkey/testdata/ecdsa_n b/regress/unittests/sshkey/testdata/ecdsa_n
new file mode 100644 (file)
index 0000000..80382b6
--- /dev/null
@@ -0,0 +1,5 @@
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIPPNyUAnjvFr+eT/7t/IyjuQQd/aLFiTY92LB9gIjyrMoAoGCCqGSM49
+AwEHoUQDQgAEDFlblkOrW9ydKVhtM+9AY3c9saBE7SG3lFx38nBavkADDaI9jh3/
+kvG/Jt9vpm22qwoklTCGDfzCkXkIKaWlBw==
+-----END EC PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ecdsa_n_pw b/regress/unittests/sshkey/testdata/ecdsa_n_pw
new file mode 100644 (file)
index 0000000..36b7fa7
--- /dev/null
@@ -0,0 +1,9 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jYmMAAAAGYmNyeXB0AAAAGAAAABC4UwEov5
+z0RrCm7AMCxbuiAAAAEAAAAAEAAABoAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlz
+dHAyNTYAAABBBAxZW5ZDq1vcnSlYbTPvQGN3PbGgRO0ht5Rcd/JwWr5AAw2iPY4d/5Lxvy
+bfb6ZttqsKJJUwhg38wpF5CCmlpQcAAACgbCnAklQTHrf5qiHiMxKYwQJ7k/X9mp4fXD4v
+xUbgNZiXSxN26mn8mC2rH+WA6Lk3CexR/hrtLI2ndpBsYu1h6HhVkOwwm3Kd/PMKArCupW
+l6sYEabrT0EghXR/3aDEZvj79hgKSdu3RpayLvMdbCR8k1cg0/mDmR9hicWfeJ61n/IH05
+tUR268+0BVRW9kDhh/cuv8tVY4L09jCCQ6CpsA==
+-----END OPENSSH PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ed25519_1 b/regress/unittests/sshkey/testdata/ed25519_1
new file mode 100644 (file)
index 0000000..6b0ae01
--- /dev/null
@@ -0,0 +1,7 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+QyNTUxOQAAACBThupGO0X+FLQhbz8CoKPwc7V3JNsQuGtlsgN+F7SMGQAAAJjnj4Ao54+A
+KAAAAAtzc2gtZWQyNTUxOQAAACBThupGO0X+FLQhbz8CoKPwc7V3JNsQuGtlsgN+F7SMGQ
+AAAED3KgoDbjR54V7bdNpfKlQY5m20UK1QaHytkCR+6rZEDFOG6kY7Rf4UtCFvPwKgo/Bz
+tXck2xC4a2WyA34XtIwZAAAAE0VEMjU1MTkgdGVzdCBrZXkgIzEBAg==
+-----END OPENSSH PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ed25519_1-cert.fp b/regress/unittests/sshkey/testdata/ed25519_1-cert.fp
new file mode 100644 (file)
index 0000000..a9674e2
--- /dev/null
@@ -0,0 +1 @@
+SHA256:L3k/oJubblSY0lB9Ulsl7emDMnRPKm/8udf2ccwk560
diff --git a/regress/unittests/sshkey/testdata/ed25519_1-cert.pub b/regress/unittests/sshkey/testdata/ed25519_1-cert.pub
new file mode 100644 (file)
index 0000000..649b4e8
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519-cert-v01@openssh.com AAAAIHNzaC1lZDI1NTE5LWNlcnQtdjAxQG9wZW5zc2guY29tAAAAIIxzuxl4z3uwAIslne8Huft+1n1IhHAlNbWZkQyyECCGAAAAIFOG6kY7Rf4UtCFvPwKgo/BztXck2xC4a2WyA34XtIwZAAAAAAAAAAgAAAACAAAABmp1bGl1cwAAABIAAAAFaG9zdDEAAAAFaG9zdDIAAAAANowB8AAAAABNHmBwAAAAAAAAAAAAAAAAAAAAMwAAAAtzc2gtZWQyNTUxOQAAACBThupGO0X+FLQhbz8CoKPwc7V3JNsQuGtlsgN+F7SMGQAAAFMAAAALc3NoLWVkMjU1MTkAAABABGTn+Bmz86Ajk+iqKCSdP5NClsYzn4alJd0V5bizhP0Kumc/HbqQfSt684J1WdSzih+EjvnTgBhK9jTBKb90AQ== ED25519 test key #1
diff --git a/regress/unittests/sshkey/testdata/ed25519_1.fp b/regress/unittests/sshkey/testdata/ed25519_1.fp
new file mode 100644 (file)
index 0000000..a9674e2
--- /dev/null
@@ -0,0 +1 @@
+SHA256:L3k/oJubblSY0lB9Ulsl7emDMnRPKm/8udf2ccwk560
diff --git a/regress/unittests/sshkey/testdata/ed25519_1.fp.bb b/regress/unittests/sshkey/testdata/ed25519_1.fp.bb
new file mode 100644 (file)
index 0000000..309f2da
--- /dev/null
@@ -0,0 +1 @@
+xubop-rekyd-bakal-nubuf-pahaf-gicuh-logeb-gocif-petod-galip-fuxux
diff --git a/regress/unittests/sshkey/testdata/ed25519_1.pub b/regress/unittests/sshkey/testdata/ed25519_1.pub
new file mode 100644 (file)
index 0000000..e533059
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFOG6kY7Rf4UtCFvPwKgo/BztXck2xC4a2WyA34XtIwZ ED25519 test key #1
diff --git a/regress/unittests/sshkey/testdata/ed25519_1_pw b/regress/unittests/sshkey/testdata/ed25519_1_pw
new file mode 100644 (file)
index 0000000..c3b7ae7
--- /dev/null
@@ -0,0 +1,8 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jYmMAAAAGYmNyeXB0AAAAGAAAABCus+kaow
+AUjHphacvRp98dAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIFOG6kY7Rf4UtCFv
+PwKgo/BztXck2xC4a2WyA34XtIwZAAAAoJaqqgiYQuElraJAmYOm7Tb4nJ3eI4oj9mQ52M
+/Yd+ION2Ur1v8BDewpDX+LHEYgKHo3Mlmcn2UyF+QJ+7xUCW7QCtk/4szrJzw74DlEl6mH
+T8PT/f/av7PpECBD/YD3NoDlB9OWm/Q4sHcxfBEKfTGD7s2Onn71HgrdEOPqd4Sj/IQigR
+drfjtXEMlD32k9n3dd2eS9x7AHWYaGFEMkOcY=
+-----END OPENSSH PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ed25519_2 b/regress/unittests/sshkey/testdata/ed25519_2
new file mode 100644 (file)
index 0000000..e4aed63
--- /dev/null
@@ -0,0 +1,7 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+QyNTUxOQAAACDPVKyLnm3eZE0lm0IfM3Uy9AsdGSBtozcoCt21blYBCwAAAJix1mBGsdZg
+RgAAAAtzc2gtZWQyNTUxOQAAACDPVKyLnm3eZE0lm0IfM3Uy9AsdGSBtozcoCt21blYBCw
+AAAECZEQHXs18o3DKjhUYaTyt+bUbhqfMeqmsKjYyFvzGVgs9UrIuebd5kTSWbQh8zdTL0
+Cx0ZIG2jNygK3bVuVgELAAAAE0VEMjU1MTkgdGVzdCBrZXkgIzEBAg==
+-----END OPENSSH PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/ed25519_2.fp b/regress/unittests/sshkey/testdata/ed25519_2.fp
new file mode 100644 (file)
index 0000000..0496626
--- /dev/null
@@ -0,0 +1 @@
+SHA256:vMbaARqVciRgXyZPNHDo+P5p5WK5yWG1Oo6VC35Bomw
diff --git a/regress/unittests/sshkey/testdata/ed25519_2.fp.bb b/regress/unittests/sshkey/testdata/ed25519_2.fp.bb
new file mode 100644 (file)
index 0000000..abba789
--- /dev/null
@@ -0,0 +1 @@
+xuces-bapyb-vikob-zesyv-budod-nupip-kebon-tacyc-fofed-lezic-soxax
diff --git a/regress/unittests/sshkey/testdata/ed25519_2.pub b/regress/unittests/sshkey/testdata/ed25519_2.pub
new file mode 100644 (file)
index 0000000..af34236
--- /dev/null
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9UrIuebd5kTSWbQh8zdTL0Cx0ZIG2jNygK3bVuVgEL ED25519 test key #1
diff --git a/regress/unittests/sshkey/testdata/pw b/regress/unittests/sshkey/testdata/pw
new file mode 100644 (file)
index 0000000..8a1dff9
--- /dev/null
@@ -0,0 +1 @@
+mekmitasdigoat
diff --git a/regress/unittests/sshkey/testdata/rsa1_1 b/regress/unittests/sshkey/testdata/rsa1_1
new file mode 100644 (file)
index 0000000..161cc04
Binary files /dev/null and b/regress/unittests/sshkey/testdata/rsa1_1 differ
diff --git a/regress/unittests/sshkey/testdata/rsa1_1.fp b/regress/unittests/sshkey/testdata/rsa1_1.fp
new file mode 100644 (file)
index 0000000..21b3d1a
--- /dev/null
@@ -0,0 +1 @@
+SHA256:/kk7K9S9kwYFiFilnZYFwCsQJweI/SGQVR2nIa8VBhE
diff --git a/regress/unittests/sshkey/testdata/rsa1_1.fp.bb b/regress/unittests/sshkey/testdata/rsa1_1.fp.bb
new file mode 100644 (file)
index 0000000..62991b3
--- /dev/null
@@ -0,0 +1 @@
+xilil-nabyf-gynih-duheb-gokyp-bofet-nekac-bosod-lozin-kuvyh-poxix
diff --git a/regress/unittests/sshkey/testdata/rsa1_1.param.n b/regress/unittests/sshkey/testdata/rsa1_1.param.n
new file mode 100644 (file)
index 0000000..9a2549b
--- /dev/null
@@ -0,0 +1 @@
+00ce8ca77a556eba887f9a866c084a6402785354a81c10854d343181fa09351223a65f99915f8433d11a9c41677d307c03c3a39865b83e7172d2c1d878333c980438d6e4462106a0065cd75cfea7ca7f21538bf2f43f2af49cacee51b22e3bdcc5e87b59cc691f7c6942a77ef13bfdfb24300777b727348d0ba7900ba06b886729
diff --git a/regress/unittests/sshkey/testdata/rsa1_1.pub b/regress/unittests/sshkey/testdata/rsa1_1.pub
new file mode 100644 (file)
index 0000000..f665b0d
--- /dev/null
@@ -0,0 +1 @@
+1024 65537 145043942670517902781741650890610683756045780348507433188994725700923246927874581962206512480287863636935077725837494808988986557337885675565086448774391442851909709751605441036910145362277967349042489937363543710406342212883803780768870873303921572812138116796733586484633244057911618360651775855949808953129 RSA1 test key #1
diff --git a/regress/unittests/sshkey/testdata/rsa1_1_pw b/regress/unittests/sshkey/testdata/rsa1_1_pw
new file mode 100644 (file)
index 0000000..e73c679
Binary files /dev/null and b/regress/unittests/sshkey/testdata/rsa1_1_pw differ
diff --git a/regress/unittests/sshkey/testdata/rsa1_2 b/regress/unittests/sshkey/testdata/rsa1_2
new file mode 100644 (file)
index 0000000..1d672dd
Binary files /dev/null and b/regress/unittests/sshkey/testdata/rsa1_2 differ
diff --git a/regress/unittests/sshkey/testdata/rsa1_2.fp b/regress/unittests/sshkey/testdata/rsa1_2.fp
new file mode 100644 (file)
index 0000000..00516d5
--- /dev/null
@@ -0,0 +1 @@
+SHA256:JaOeRCnLl/TLe7vn1+aQ4ONyKZCUhK5x3k4VHilmbpE
diff --git a/regress/unittests/sshkey/testdata/rsa1_2.fp.bb b/regress/unittests/sshkey/testdata/rsa1_2.fp.bb
new file mode 100644 (file)
index 0000000..b4989a5
--- /dev/null
@@ -0,0 +1 @@
+xipag-zohut-zepuk-pisyv-kamog-pupus-netud-tudis-melup-cynov-gaxox
diff --git a/regress/unittests/sshkey/testdata/rsa1_2.param.n b/regress/unittests/sshkey/testdata/rsa1_2.param.n
new file mode 100644 (file)
index 0000000..25d438d
--- /dev/null
@@ -0,0 +1 @@
+00cab091b57a154740c1bb7020f46a21a19dc40f647db2aab1babd30cabe241f0437391e68376ba35e48c624b8eaf6b59424d4c1a848c9fd1ef5cdc7c1b7f5e5df23b7ad513b79021286d38c52fdfae35656659e8649b2bf8bedf7c99664e45534007bd1c5dc3de1dafdf2d34ad087155951aa0f3d500b36d0d804bbccdef15ab31ca3dd40bdf5196065a97f397ef576caffb606be8232f6e0614aea0e979b9584296673fabb1dbd9f3212495c428842a2ab1f1768dd424fb6fdceeeab9126cacdfc834f0a0d09ba73ad8360d183ba85bb1565555cc6a536eb8d06df1a1e841107c021ae28a2d8b3465f9d8b58ef4045aea1c4ad7f8bf639574d6b142af67b4eb3
diff --git a/regress/unittests/sshkey/testdata/rsa1_2.pub b/regress/unittests/sshkey/testdata/rsa1_2.pub
new file mode 100644 (file)
index 0000000..acab6dd
--- /dev/null
@@ -0,0 +1 @@
+2048 65537 25587207108642486834576012232250034427766229965612147538722032399009467293691448851087324679403117563681753304072089087252850866332601294130674473984011813227791089686736237645788471744456489819306046398653719249100878753563464696688916667605969658659855996383142110932332560049231682024775766802333675397528993897914717996946881193454997890776063024953924432026083898531677702536941151535135950834711001926404724453460085864892836473957600610133803037286539329764689125111700732309717375455919436557475211197800228646235077584780367991159670572954337165006813357814232200750568307753718414790655085790471723847208627 RSA1 test key #2
diff --git a/regress/unittests/sshkey/testdata/rsa_1 b/regress/unittests/sshkey/testdata/rsa_1
new file mode 100644 (file)
index 0000000..5de3f84
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDLV5lUTt7FrADseB/CGhEZzpoojjEW5y8+ePvLppmK3MmMI18u
+d6vxzpK3bwZLYkVSyfJYI0HmIuGhdu7yMrW6wb84gbq8C31Xoe9EORcIUuGSvDKd
+NSM1SjlhDquRblDFB8kToqXyx1lqrXecXylxIUOL0jE+u0rU1967pDJx+wIDAQAB
+AoGAXyj5mpjmbD+YlxGIWz/zrM4hGsWgd4VteKEJxT6MMI4uzCRpkMd0ck8oHiwZ
+GAI/SwUzIsgtONQuH3AXVsUgghW4Ynn+8ksEv0IZ918WDMDwqvqkyrVzsOsZzqYj
+Pf8DUDKCpwFjnlknJ04yvWBZvVhWtY4OiZ8GV0Ttsu3k+GECQQD1YHfvBb5FdJBv
+Uhde2Il+jaFia8mwVVNNaiD2ECxXx6CzGz54ZLEB9NPVfDUZK8lJ4UJDqelWNh3i
+PF3RefWDAkEA1CVBzAFL4mNwpleVPzrfy69xP3gWOa26MxM/GE6zx9jC7HgQ3KPa
+WKdG/FuHs085aTRDaDLmGcZ8IvMuu7NgKQJAcIOKmxR0Gd8IN7NZugjqixggb0Pj
+mLKXXwESGiJyYtHL0zTj4Uqyi6Ya2GJ66o7UXscmnmYz828fJtTtZBdbRwJBALfi
+C2QvA32Zv/0PEXibKXy996WSC4G3ShwXZKtHHKHvCxY5BDSbehk59VesZrVPyG2e
+NYdOBxD0cIlCzJE56/ECQAndVkxvO8hwyEFGGwF3faHIAe/OxVb+MjaU25//Pe1/
+h/e6tlCk4w9CODpyV685gV394eYwMcGDcIkipTNUDZs=
+-----END RSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/rsa_1-cert.fp b/regress/unittests/sshkey/testdata/rsa_1-cert.fp
new file mode 100644 (file)
index 0000000..79f380a
--- /dev/null
@@ -0,0 +1 @@
+SHA256:l6itGumSMcRBBAFteCgmjQBIXqLK/jFGUH3viHX1RmE
diff --git a/regress/unittests/sshkey/testdata/rsa_1-cert.pub b/regress/unittests/sshkey/testdata/rsa_1-cert.pub
new file mode 100644 (file)
index 0000000..3bacf3c
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAg98LhS2EHxLOWCLopZPwHdg/RJXusnkOqQXSc9R7aITkAAAADAQABAAAAgQDLV5lUTt7FrADseB/CGhEZzpoojjEW5y8+ePvLppmK3MmMI18ud6vxzpK3bwZLYkVSyfJYI0HmIuGhdu7yMrW6wb84gbq8C31Xoe9EORcIUuGSvDKdNSM1SjlhDquRblDFB8kToqXyx1lqrXecXylxIUOL0jE+u0rU1967pDJx+wAAAAAAAAAFAAAAAgAAAAZqdWxpdXMAAAASAAAABWhvc3QxAAAABWhvc3QyAAAAADaMAfAAAAAATR5gcAAAAAAAAAAAAAAAAAAAADMAAAALc3NoLWVkMjU1MTkAAAAgU4bqRjtF/hS0IW8/AqCj8HO1dyTbELhrZbIDfhe0jBkAAABTAAAAC3NzaC1lZDI1NTE5AAAAQI3QGlUCzC07KorupxpDkkGy6tniaZ8EvBflzvv+itXWNchGvfUeHmVT6aX0sRqehdz/lR+GmXRoZBhofwh0qAM= RSA test key #1
diff --git a/regress/unittests/sshkey/testdata/rsa_1.fp b/regress/unittests/sshkey/testdata/rsa_1.fp
new file mode 100644 (file)
index 0000000..79f380a
--- /dev/null
@@ -0,0 +1 @@
+SHA256:l6itGumSMcRBBAFteCgmjQBIXqLK/jFGUH3viHX1RmE
diff --git a/regress/unittests/sshkey/testdata/rsa_1.fp.bb b/regress/unittests/sshkey/testdata/rsa_1.fp.bb
new file mode 100644 (file)
index 0000000..45bacd5
--- /dev/null
@@ -0,0 +1 @@
+xosis-fodod-votot-dibum-ryvac-rediz-naruf-votun-kevis-halis-gexux
diff --git a/regress/unittests/sshkey/testdata/rsa_1.param.n b/regress/unittests/sshkey/testdata/rsa_1.param.n
new file mode 100644 (file)
index 0000000..4933712
--- /dev/null
@@ -0,0 +1 @@
+00cb5799544edec5ac00ec781fc21a1119ce9a288e3116e72f3e78fbcba6998adcc98c235f2e77abf1ce92b76f064b624552c9f2582341e622e1a176eef232b5bac1bf3881babc0b7d57a1ef4439170852e192bc329d3523354a39610eab916e50c507c913a2a5f2c7596aad779c5f297121438bd2313ebb4ad4d7debba43271fb
diff --git a/regress/unittests/sshkey/testdata/rsa_1.param.p b/regress/unittests/sshkey/testdata/rsa_1.param.p
new file mode 100644 (file)
index 0000000..4783d21
--- /dev/null
@@ -0,0 +1 @@
+00f56077ef05be4574906f52175ed8897e8da1626bc9b055534d6a20f6102c57c7a0b31b3e7864b101f4d3d57c35192bc949e14243a9e956361de23c5dd179f583
diff --git a/regress/unittests/sshkey/testdata/rsa_1.param.q b/regress/unittests/sshkey/testdata/rsa_1.param.q
new file mode 100644 (file)
index 0000000..00fc8a2
--- /dev/null
@@ -0,0 +1 @@
+00d42541cc014be26370a657953f3adfcbaf713f781639adba33133f184eb3c7d8c2ec7810dca3da58a746fc5b87b34f396934436832e619c67c22f32ebbb36029
diff --git a/regress/unittests/sshkey/testdata/rsa_1.pub b/regress/unittests/sshkey/testdata/rsa_1.pub
new file mode 100644 (file)
index 0000000..23ef872
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDLV5lUTt7FrADseB/CGhEZzpoojjEW5y8+ePvLppmK3MmMI18ud6vxzpK3bwZLYkVSyfJYI0HmIuGhdu7yMrW6wb84gbq8C31Xoe9EORcIUuGSvDKdNSM1SjlhDquRblDFB8kToqXyx1lqrXecXylxIUOL0jE+u0rU1967pDJx+w== RSA test key #1
diff --git a/regress/unittests/sshkey/testdata/rsa_1_pw b/regress/unittests/sshkey/testdata/rsa_1_pw
new file mode 100644 (file)
index 0000000..b4c0674
--- /dev/null
@@ -0,0 +1,18 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: AES-128-CBC,0C3F819F6EEA66A471BAEEDDA8171606
+
+AhQNxgw7Z2un3dpm6KPHF1u5qVvOczm0yiTyPK4U11B3TTRhXOHdzPLAcKMX71Xq
+fmLm2/JIZATUbLTaysLKIQlmAgtpmXoKLv9b90R3AXLophgToZzOLpvlQTCt+y9G
+0E3QQZG/LFy9BLNyw6uD5cy0RHT3FQb5VQDwfBvR/I+K3qWBFLlb7Rw9bCujYczu
+D3bimcDj/k6YkrWVsEa81Ch5RF2RClOYufti6bsvc4xIsB0Kd++vokER+kXFuQqf
+Tl0Jz+SG0kr9QtjVvkhBtSxzJ6/olAosoUySQ5hqsB8iECufBgp1KelXqsHFJQXy
+gCvVmGiivFUinX0rKOuWCHTplsSKQ9BnPSwDAAs8A7ZLcTXcLs/hMQ5r6fmOYfNN
+YthhjZyE2ciJO0lydGJUJMb5aJUak0rl+uINRlYCHTRLVwmCOmpfqz9SfcJb1ieU
+4Us8NR+pXJar4U0+C2wVlNJkAdpL6GvYxN6vp7vLa+BiFwIZOQozswacIZk/ScXm
+QL9rmWug51RCmDeenX46WTEZeB0o0+xi60sDEDhhe4+iNYcJu5L0BJ5lqRFe3I5n
+HRRv1mBEjbF2fDcg/ChYfOXsc4gDivH2nObabeASuMFZyadmXfA8tnXRZf+7Wuy/
+LZGYbM2xLeEyV3ss16WBHuIqexDt04OEZvs0jN90zj6Yv7qKCB975bdOcuKkN2Nn
+n9lA11R2pgsCs6COp9rYiWXkXZeDf3sW6kdcEV+/SzkVsv4JlHcsIzgk4WGVF/E/
+ZkU4J9AvSdJPzEQDM+yszp0eeUow4+SAgpuNTqZiUO/2UUVbsr3qvlYMoCixhFAN
+-----END RSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/rsa_2 b/regress/unittests/sshkey/testdata/rsa_2
new file mode 100644 (file)
index 0000000..2441d52
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA9NEUXp78SAkmL4+eAj4mBzPOjk+ccCPVzkTR+mZJdyTwkJAB
+HUN4cn4a2kTmh7Er+N8CXCsiqxIOV1GfH2fwaCiBlOEXeQJi/cMjxr9kVWO4FhC6
+l1UqbvPUdrUCUZjFTA9/Ah9MKgk7qGYq5SjE3p+sn4GLhRKbqmq9LjiHgMmkBuv/
+a1Slit+rXHzO2F8fH5hkjeHivyYVgw45aNvGCe2RRfbpoeW2mRtgIv7y9wSewt6a
+mhEDXSo/F6mkqA7xVinzro5NettEXLo91tA9Hb6f6x/Mc/GJDNXTKhpWCGeJ6xeW
+nAefDZORWAY7Y9YbuAxhEJVi9QL5NWoFOA0C6wIDAQABAoIBAQDtRGVVfwhKWHOl
+zK76xXjdqhwaWJXpKRHiI1jOMawpyKdNtAMgdW+apxUnTXePMurG/HuxEC09VvaH
+MhfhvD6G9BsCS1UQdnuyLRnTWVLIXyjeWcA9QtEpTy8vDSb+Je2xVaNmTybl5qTn
+BH22Mtj6Wg5XWJn7kplDhMdssGTDLsSCMw/rcxe9iT2qOKyltQal23RHzR7SijGp
+QTtBp2SDGhvMZcyGuyMqJ084W8sdJpbyVzdDim2iaZdHlk7uvW2n0HcJ56I6yhIq
+2U8wfgEEwydGVGHgmQNJ/n+SiT/hv6g5ebhDS46X9F9m5CHDwhdr0DrhPBVSsdhl
+1HeJ0+FhAoGBAPuC3uNHToiJis688juKlwc3SQ6ger5ffAg3yaNhEcpHkvOtdZlF
+/CfX94xazMov/YqFwkvpSSdKsX+PeXuaqnb1hPKNYX5t45U9RjB/ox7BIQj/2rPx
+Bfs99UFW9HKP4HsVmLu1xeJg1Pc9iylTK/xrnwfYiZ+H7IGVccizjnqHAoGBAPkv
+n1flAdxBzJH/O0rXoig2EtZsDRMPY51MGDdqVOW14ZOfTVlmu0OSnkSKQm2twfro
+TPDVb2TY3wTRutz8H9yOFW1c1Nz4YOyTb8FmJhE2FWAQ9t8QpwUlhn15if72dS/Y
+22+vP+AYu7wfqGL7QVVEXho5hGjXi053iEvfXBl9AoGAeZISpo1LGphRLgkKlVky
+E1zXxWgwrGB/FYHRx1UeQkZCc+K+Wy4G6kNr9r3VC04TIafx+Lt0jrd+AIibUfG6
+v/GBJ7TLEU+QmAycJskrUaxMiYsSbbPtDjoumDytv8pn2VbhEqqUUg44IqHu6DS5
+qDNlFWfHbgNHgIN6EmcoUXUCgYEAi2G57X4pRjx/4wIy9jAbggaNDuctgQXQoIGZ
+4hVWG49a+CnZKDKweKGgaZI0igjxQhmCQAwC3RP520Y9EbLtV38aOSv93QQJowrt
+Le6nSGVKG4whqrAz3EsbKUA8kiLldbgFNjl+ryjmidnjZEpKRxmQ0XZuu/4k6+Us
+ldQAPjkCgYBwjSm5eDUtK2eEPaBtbJykV05CTv5rn6CKC9L7ZBTkCcdU1hxeqe99
+wb22decnNawGRP1a5cGwqKJPOfkgybJVkdr6aqQW8ClzdFSaenjzs+nVW+T9JTXf
+9lFpIZg5kN/geld3B9B4C99riTM0jg9hbe2RQvpLRTrZbnWMA1XoRw==
+-----END RSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/rsa_2.fp b/regress/unittests/sshkey/testdata/rsa_2.fp
new file mode 100644 (file)
index 0000000..4659639
--- /dev/null
@@ -0,0 +1 @@
+SHA256:NoQh0XBUuYUSWqnzOzOBnfpgJTRWLMj7BlWAb8IbjeE
diff --git a/regress/unittests/sshkey/testdata/rsa_2.fp.bb b/regress/unittests/sshkey/testdata/rsa_2.fp.bb
new file mode 100644 (file)
index 0000000..e9d1e4a
--- /dev/null
@@ -0,0 +1 @@
+xogit-gupof-mydon-hocep-zuval-feson-rarif-cefar-tobar-ryvap-kuxex
diff --git a/regress/unittests/sshkey/testdata/rsa_2.param.n b/regress/unittests/sshkey/testdata/rsa_2.param.n
new file mode 100644 (file)
index 0000000..a669dbf
--- /dev/null
@@ -0,0 +1 @@
+00f4d1145e9efc4809262f8f9e023e260733ce8e4f9c7023d5ce44d1fa66497724f09090011d4378727e1ada44e687b12bf8df025c2b22ab120e57519f1f67f068288194e117790262fdc323c6bf645563b81610ba97552a6ef3d476b5025198c54c0f7f021f4c2a093ba8662ae528c4de9fac9f818b85129baa6abd2e388780c9a406ebff6b54a58adfab5c7cced85f1f1f98648de1e2bf2615830e3968dbc609ed9145f6e9a1e5b6991b6022fef2f7049ec2de9a9a11035d2a3f17a9a4a80ef15629f3ae8e4d7adb445cba3dd6d03d1dbe9feb1fcc73f1890cd5d32a1a56086789eb17969c079f0d939158063b63d61bb80c61109562f502f9356a05380d02eb
diff --git a/regress/unittests/sshkey/testdata/rsa_2.param.p b/regress/unittests/sshkey/testdata/rsa_2.param.p
new file mode 100644 (file)
index 0000000..be7c1c3
--- /dev/null
@@ -0,0 +1 @@
+00fb82dee3474e88898acebcf23b8a970737490ea07abe5f7c0837c9a36111ca4792f3ad759945fc27d7f78c5accca2ffd8a85c24be949274ab17f8f797b9aaa76f584f28d617e6de3953d46307fa31ec12108ffdab3f105fb3df54156f4728fe07b1598bbb5c5e260d4f73d8b29532bfc6b9f07d8899f87ec819571c8b38e7a87
diff --git a/regress/unittests/sshkey/testdata/rsa_2.param.q b/regress/unittests/sshkey/testdata/rsa_2.param.q
new file mode 100644 (file)
index 0000000..6f2c542
--- /dev/null
@@ -0,0 +1 @@
+00f92f9f57e501dc41cc91ff3b4ad7a2283612d66c0d130f639d4c18376a54e5b5e1939f4d5966bb43929e448a426dadc1fae84cf0d56f64d8df04d1badcfc1fdc8e156d5cd4dcf860ec936fc166261136156010f6df10a70525867d7989fef6752fd8db6faf3fe018bbbc1fa862fb4155445e1a398468d78b4e77884bdf5c197d
diff --git a/regress/unittests/sshkey/testdata/rsa_2.pub b/regress/unittests/sshkey/testdata/rsa_2.pub
new file mode 100644 (file)
index 0000000..3322fbc
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD00RRenvxICSYvj54CPiYHM86OT5xwI9XORNH6Zkl3JPCQkAEdQ3hyfhraROaHsSv43wJcKyKrEg5XUZ8fZ/BoKIGU4Rd5AmL9wyPGv2RVY7gWELqXVSpu89R2tQJRmMVMD38CH0wqCTuoZirlKMTen6yfgYuFEpuqar0uOIeAyaQG6/9rVKWK36tcfM7YXx8fmGSN4eK/JhWDDjlo28YJ7ZFF9umh5baZG2Ai/vL3BJ7C3pqaEQNdKj8XqaSoDvFWKfOujk1620Rcuj3W0D0dvp/rH8xz8YkM1dMqGlYIZ4nrF5acB58Nk5FYBjtj1hu4DGEQlWL1Avk1agU4DQLr RSA test key #2
diff --git a/regress/unittests/sshkey/testdata/rsa_n b/regress/unittests/sshkey/testdata/rsa_n
new file mode 100644 (file)
index 0000000..5de3f84
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDLV5lUTt7FrADseB/CGhEZzpoojjEW5y8+ePvLppmK3MmMI18u
+d6vxzpK3bwZLYkVSyfJYI0HmIuGhdu7yMrW6wb84gbq8C31Xoe9EORcIUuGSvDKd
+NSM1SjlhDquRblDFB8kToqXyx1lqrXecXylxIUOL0jE+u0rU1967pDJx+wIDAQAB
+AoGAXyj5mpjmbD+YlxGIWz/zrM4hGsWgd4VteKEJxT6MMI4uzCRpkMd0ck8oHiwZ
+GAI/SwUzIsgtONQuH3AXVsUgghW4Ynn+8ksEv0IZ918WDMDwqvqkyrVzsOsZzqYj
+Pf8DUDKCpwFjnlknJ04yvWBZvVhWtY4OiZ8GV0Ttsu3k+GECQQD1YHfvBb5FdJBv
+Uhde2Il+jaFia8mwVVNNaiD2ECxXx6CzGz54ZLEB9NPVfDUZK8lJ4UJDqelWNh3i
+PF3RefWDAkEA1CVBzAFL4mNwpleVPzrfy69xP3gWOa26MxM/GE6zx9jC7HgQ3KPa
+WKdG/FuHs085aTRDaDLmGcZ8IvMuu7NgKQJAcIOKmxR0Gd8IN7NZugjqixggb0Pj
+mLKXXwESGiJyYtHL0zTj4Uqyi6Ya2GJ66o7UXscmnmYz828fJtTtZBdbRwJBALfi
+C2QvA32Zv/0PEXibKXy996WSC4G3ShwXZKtHHKHvCxY5BDSbehk59VesZrVPyG2e
+NYdOBxD0cIlCzJE56/ECQAndVkxvO8hwyEFGGwF3faHIAe/OxVb+MjaU25//Pe1/
+h/e6tlCk4w9CODpyV685gV394eYwMcGDcIkipTNUDZs=
+-----END RSA PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/testdata/rsa_n_pw b/regress/unittests/sshkey/testdata/rsa_n_pw
new file mode 100644 (file)
index 0000000..dc18373
--- /dev/null
@@ -0,0 +1,17 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jYmMAAAAGYmNyeXB0AAAAGAAAABAFw/Wg/V
+I5SAXWj/HJr9qeAAAAEAAAAAEAAACXAAAAB3NzaC1yc2EAAAADAQABAAAAgQDLV5lUTt7F
+rADseB/CGhEZzpoojjEW5y8+ePvLppmK3MmMI18ud6vxzpK3bwZLYkVSyfJYI0HmIuGhdu
+7yMrW6wb84gbq8C31Xoe9EORcIUuGSvDKdNSM1SjlhDquRblDFB8kToqXyx1lqrXecXylx
+IUOL0jE+u0rU1967pDJx+wAAAgD1iSGiMlMJt2VH4kx5yr0wCJS+4UOmX0bxKO7UH5Jcul
+K5eaSe5ZoKE7hTYBaz0K5dRF/0fqLsvVZlE4quDjFLN6Hyavgn2W/QM7SUqBHgRMal9pgH
+LnxX6mFNWJ+4yb7f3bcbVIdgmMm3sT9Xjwaf5xgzNlR2mkUWtFwjyQh6FxUo5apNzqNBwO
+l2Q4xfmyZTp1s++pStQ/su6obXpxnE2Nx5G/D84ZL5iWl+njUy/MvJTazHRbiTSyihU+UA
+mUr5ZNuP3WUYY+h3KVlHpYHJYB7l3AMTKuPMFLhY9V7BJ+DuKPaqBgX4hvRzY0eVQiFr61
+ovjWjvfu1ulx550JqdYCgH2PpP0E89OQne35Cxs9QPThfe8DKojC9YquYh9zmVTvr7kNiE
+Soluk/7oKpQIDaC+/SRk7AJ2e3Cbt1lXyGNn37PuqaaC/apaF/DOD6Yig9aClS7jOUrT96
+56trFAYfHEIKbRCUSMCiM1+x6HOLYf5ROrGE9KxT3kUD9XMsMpTva+cPpHUpbGpXcYE10N
+MyYDz+V5M2/ZoIdEhscJNQ3UnhaZpeEaqcOyNyo90n3Dnaw/WpMDD/kNMGfm8daTaYInnQ
+QnwA2gwlYfpTAqxE71oXgOuGmtA0yqJB4778Xq26Pb+B7/mZZZe6n0FVmiNC+ZG37ZGOw/
+iGL9e2Sxzw==
+-----END OPENSSH PRIVATE KEY-----
diff --git a/regress/unittests/sshkey/tests.c b/regress/unittests/sshkey/tests.c
new file mode 100644 (file)
index 0000000..13f265c
--- /dev/null
@@ -0,0 +1,27 @@
+/*     $OpenBSD: tests.c,v 1.1 2014/06/24 01:14:18 djm Exp $ */
+/*
+ * Regress test for sshbuf.h buffer API
+ *
+ * Placed in the public domain
+ */
+
+#include "includes.h"
+
+#include <openssl/evp.h>
+
+#include "../test_helper/test_helper.h"
+
+void sshkey_tests(void);
+void sshkey_file_tests(void);
+void sshkey_fuzz_tests(void);
+
+void
+tests(void)
+{
+       OpenSSL_add_all_algorithms();
+       ERR_load_CRYPTO_strings();
+
+       sshkey_tests();
+       sshkey_file_tests();
+       sshkey_fuzz_tests();
+}
diff --git a/regress/unittests/test_helper/Makefile b/regress/unittests/test_helper/Makefile
new file mode 100644 (file)
index 0000000..78026e6
--- /dev/null
@@ -0,0 +1,15 @@
+#      $OpenBSD: Makefile,v 1.3 2016/07/04 18:01:44 guenther Exp $
+
+LIB=   test_helper
+SRCS=  test_helper.c fuzz.c
+
+NOPROFILE= yes
+NOPIC= yes
+
+# Hack to allow building with SUBDIR in ../../Makefile
+regress: all
+
+install:
+       @echo -n
+
+.include <bsd.lib.mk>
diff --git a/regress/unittests/test_helper/fuzz.c b/regress/unittests/test_helper/fuzz.c
new file mode 100644 (file)
index 0000000..99f1d03
--- /dev/null
@@ -0,0 +1,438 @@
+/*     $OpenBSD: fuzz.c,v 1.8 2015/03/03 20:42:49 djm Exp $    */
+/*
+ * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* Utility functions/framework for fuzz tests */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/uio.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include "test_helper.h"
+#include "atomicio.h"
+
+/* #define FUZZ_DEBUG */
+
+#ifdef FUZZ_DEBUG
+# define FUZZ_DBG(x) do { \
+               printf("%s:%d %s: ", __FILE__, __LINE__, __func__); \
+               printf x; \
+               printf("\n"); \
+               fflush(stdout); \
+       } while (0)
+#else
+# define FUZZ_DBG(x)
+#endif
+
+/* For brevity later */
+typedef unsigned long long fuzz_ullong;
+
+/* For base-64 fuzzing */
+static const char fuzz_b64chars[] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+struct fuzz {
+       /* Fuzz method currently in use */
+       int strategy;
+
+       /* Fuzz methods remaining */
+       int strategies;
+
+       /* Original seed data blob */
+       void *seed;
+       size_t slen;
+
+       /* Current working copy of seed with fuzz mutations applied */
+       u_char *fuzzed;
+
+       /* Used by fuzz methods */
+       size_t o1, o2;
+};
+
+static const char *
+fuzz_ntop(u_int n)
+{
+       switch (n) {
+       case 0:
+               return "NONE";
+       case FUZZ_1_BIT_FLIP:
+               return "FUZZ_1_BIT_FLIP";
+       case FUZZ_2_BIT_FLIP:
+               return "FUZZ_2_BIT_FLIP";
+       case FUZZ_1_BYTE_FLIP:
+               return "FUZZ_1_BYTE_FLIP";
+       case FUZZ_2_BYTE_FLIP:
+               return "FUZZ_2_BYTE_FLIP";
+       case FUZZ_TRUNCATE_START:
+               return "FUZZ_TRUNCATE_START";
+       case FUZZ_TRUNCATE_END:
+               return "FUZZ_TRUNCATE_END";
+       case FUZZ_BASE64:
+               return "FUZZ_BASE64";
+       default:
+               abort();
+       }
+}
+
+static int
+fuzz_fmt(struct fuzz *fuzz, char *s, size_t n)
+{
+       if (fuzz == NULL)
+               return -1;
+
+       switch (fuzz->strategy) {
+       case FUZZ_1_BIT_FLIP:
+               snprintf(s, n, "%s case %zu of %zu (bit: %zu)\n",
+                   fuzz_ntop(fuzz->strategy),
+                   fuzz->o1, fuzz->slen * 8, fuzz->o1);
+               return 0;
+       case FUZZ_2_BIT_FLIP:
+               snprintf(s, n, "%s case %llu of %llu (bits: %zu, %zu)\n",
+                   fuzz_ntop(fuzz->strategy),
+                   (((fuzz_ullong)fuzz->o2) * fuzz->slen * 8) + fuzz->o1,
+                   ((fuzz_ullong)fuzz->slen * 8) * fuzz->slen * 8,
+                   fuzz->o1, fuzz->o2);
+               return 0;
+       case FUZZ_1_BYTE_FLIP:
+               snprintf(s, n, "%s case %zu of %zu (byte: %zu)\n",
+                   fuzz_ntop(fuzz->strategy),
+                   fuzz->o1, fuzz->slen, fuzz->o1);
+               return 0;
+       case FUZZ_2_BYTE_FLIP:
+               snprintf(s, n, "%s case %llu of %llu (bytes: %zu, %zu)\n",
+                   fuzz_ntop(fuzz->strategy),
+                   (((fuzz_ullong)fuzz->o2) * fuzz->slen) + fuzz->o1,
+                   ((fuzz_ullong)fuzz->slen) * fuzz->slen,
+                   fuzz->o1, fuzz->o2);
+               return 0;
+       case FUZZ_TRUNCATE_START:
+               snprintf(s, n, "%s case %zu of %zu (offset: %zu)\n",
+                   fuzz_ntop(fuzz->strategy),
+                   fuzz->o1, fuzz->slen, fuzz->o1);
+               return 0;
+       case FUZZ_TRUNCATE_END:
+               snprintf(s, n, "%s case %zu of %zu (offset: %zu)\n",
+                   fuzz_ntop(fuzz->strategy),
+                   fuzz->o1, fuzz->slen, fuzz->o1);
+               return 0;
+       case FUZZ_BASE64:
+               assert(fuzz->o2 < sizeof(fuzz_b64chars) - 1);
+               snprintf(s, n, "%s case %llu of %llu (offset: %zu char: %c)\n",
+                   fuzz_ntop(fuzz->strategy),
+                   (fuzz->o1 * (fuzz_ullong)64) + fuzz->o2,
+                   fuzz->slen * (fuzz_ullong)64, fuzz->o1,
+                   fuzz_b64chars[fuzz->o2]);
+               return 0;
+       default:
+               return -1;
+               abort();
+       }
+}
+
+static void
+dump(u_char *p, size_t len)
+{
+       size_t i, j;
+
+       for (i = 0; i < len; i += 16) {
+               fprintf(stderr, "%.4zd: ", i);
+               for (j = i; j < i + 16; j++) {
+                       if (j < len)
+                               fprintf(stderr, "%02x ", p[j]);
+                       else
+                               fprintf(stderr, "   ");
+               }
+               fprintf(stderr, " ");
+               for (j = i; j < i + 16; j++) {
+                       if (j < len) {
+                               if  (isascii(p[j]) && isprint(p[j]))
+                                       fprintf(stderr, "%c", p[j]);
+                               else
+                                       fprintf(stderr, ".");
+                       }
+               }
+               fprintf(stderr, "\n");
+       }
+}
+
+void
+fuzz_dump(struct fuzz *fuzz)
+{
+       char buf[256];
+
+       if (fuzz_fmt(fuzz, buf, sizeof(buf)) != 0) {
+               fprintf(stderr, "%s: fuzz invalid\n", __func__);
+               abort();
+       }
+       fputs(buf, stderr);
+       fprintf(stderr, "fuzz original %p len = %zu\n", fuzz->seed, fuzz->slen);
+       dump(fuzz->seed, fuzz->slen);
+       fprintf(stderr, "fuzz context %p len = %zu\n", fuzz, fuzz_len(fuzz));
+       dump(fuzz_ptr(fuzz), fuzz_len(fuzz));
+}
+
+#ifdef SIGINFO
+static struct fuzz *last_fuzz;
+
+static void
+siginfo(int unused __attribute__((__unused__)))
+{
+       char buf[256];
+
+       test_info(buf, sizeof(buf));
+       atomicio(vwrite, STDERR_FILENO, buf, strlen(buf));
+       if (last_fuzz != NULL) {
+               fuzz_fmt(last_fuzz, buf, sizeof(buf));
+               atomicio(vwrite, STDERR_FILENO, buf, strlen(buf));
+       }
+}
+#endif
+
+struct fuzz *
+fuzz_begin(u_int strategies, const void *p, size_t l)
+{
+       struct fuzz *ret = calloc(sizeof(*ret), 1);
+
+       assert(p != NULL);
+       assert(ret != NULL);
+       ret->seed = malloc(l);
+       assert(ret->seed != NULL);
+       memcpy(ret->seed, p, l);
+       ret->slen = l;
+       ret->strategies = strategies;
+
+       assert(ret->slen < SIZE_MAX / 8);
+       assert(ret->strategies <= (FUZZ_MAX|(FUZZ_MAX-1)));
+
+       FUZZ_DBG(("begin, ret = %p", ret));
+
+       fuzz_next(ret);
+
+#ifdef SIGINFO
+       last_fuzz = ret;
+       signal(SIGINFO, siginfo);
+#endif
+
+       return ret;
+}
+
+void
+fuzz_cleanup(struct fuzz *fuzz)
+{
+       FUZZ_DBG(("cleanup, fuzz = %p", fuzz));
+#ifdef SIGINFO
+       last_fuzz = NULL;
+       signal(SIGINFO, SIG_DFL);
+#endif
+       assert(fuzz != NULL);
+       assert(fuzz->seed != NULL);
+       assert(fuzz->fuzzed != NULL);
+       free(fuzz->seed);
+       free(fuzz->fuzzed);
+       free(fuzz);
+}
+
+static int
+fuzz_strategy_done(struct fuzz *fuzz)
+{
+       FUZZ_DBG(("fuzz = %p, strategy = %s, o1 = %zu, o2 = %zu, slen = %zu",
+           fuzz, fuzz_ntop(fuzz->strategy), fuzz->o1, fuzz->o2, fuzz->slen));
+
+       switch (fuzz->strategy) {
+       case FUZZ_1_BIT_FLIP:
+               return fuzz->o1 >= fuzz->slen * 8;
+       case FUZZ_2_BIT_FLIP:
+               return fuzz->o2 >= fuzz->slen * 8;
+       case FUZZ_2_BYTE_FLIP:
+               return fuzz->o2 >= fuzz->slen;
+       case FUZZ_1_BYTE_FLIP:
+       case FUZZ_TRUNCATE_START:
+       case FUZZ_TRUNCATE_END:
+       case FUZZ_BASE64:
+               return fuzz->o1 >= fuzz->slen;
+       default:
+               abort();
+       }
+}
+
+void
+fuzz_next(struct fuzz *fuzz)
+{
+       u_int i;
+
+       FUZZ_DBG(("start, fuzz = %p, strategy = %s, strategies = 0x%lx, "
+           "o1 = %zu, o2 = %zu, slen = %zu", fuzz, fuzz_ntop(fuzz->strategy),
+           (u_long)fuzz->strategies, fuzz->o1, fuzz->o2, fuzz->slen));
+
+       if (fuzz->strategy == 0 || fuzz_strategy_done(fuzz)) {
+               /* If we are just starting out, we need to allocate too */
+               if (fuzz->fuzzed == NULL) {
+                       FUZZ_DBG(("alloc"));
+                       fuzz->fuzzed = calloc(fuzz->slen, 1);
+               }
+               /* Pick next strategy */
+               FUZZ_DBG(("advance"));
+               for (i = 1; i <= FUZZ_MAX; i <<= 1) {
+                       if ((fuzz->strategies & i) != 0) {
+                               fuzz->strategy = i;
+                               break;
+                       }
+               }
+               FUZZ_DBG(("selected = %u", fuzz->strategy));
+               if (fuzz->strategy == 0) {
+                       FUZZ_DBG(("done, no more strategies"));
+                       return;
+               }
+               fuzz->strategies &= ~(fuzz->strategy);
+               fuzz->o1 = fuzz->o2 = 0;
+       }
+
+       assert(fuzz->fuzzed != NULL);
+
+       switch (fuzz->strategy) {
+       case FUZZ_1_BIT_FLIP:
+               assert(fuzz->o1 / 8 < fuzz->slen);
+               memcpy(fuzz->fuzzed, fuzz->seed, fuzz->slen);
+               fuzz->fuzzed[fuzz->o1 / 8] ^= 1 << (fuzz->o1 % 8);
+               fuzz->o1++;
+               break;
+       case FUZZ_2_BIT_FLIP:
+               assert(fuzz->o1 / 8 < fuzz->slen);
+               assert(fuzz->o2 / 8 < fuzz->slen);
+               memcpy(fuzz->fuzzed, fuzz->seed, fuzz->slen);
+               fuzz->fuzzed[fuzz->o1 / 8] ^= 1 << (fuzz->o1 % 8);
+               fuzz->fuzzed[fuzz->o2 / 8] ^= 1 << (fuzz->o2 % 8);
+               fuzz->o1++;
+               if (fuzz->o1 >= fuzz->slen * 8) {
+                       fuzz->o1 = 0;
+                       fuzz->o2++;
+               }
+               break;
+       case FUZZ_1_BYTE_FLIP:
+               assert(fuzz->o1 < fuzz->slen);
+               memcpy(fuzz->fuzzed, fuzz->seed, fuzz->slen);
+               fuzz->fuzzed[fuzz->o1] ^= 0xff;
+               fuzz->o1++;
+               break;
+       case FUZZ_2_BYTE_FLIP:
+               assert(fuzz->o1 < fuzz->slen);
+               assert(fuzz->o2 < fuzz->slen);
+               memcpy(fuzz->fuzzed, fuzz->seed, fuzz->slen);
+               fuzz->fuzzed[fuzz->o1] ^= 0xff;
+               fuzz->fuzzed[fuzz->o2] ^= 0xff;
+               fuzz->o1++;
+               if (fuzz->o1 >= fuzz->slen) {
+                       fuzz->o1 = 0;
+                       fuzz->o2++;
+               }
+               break;
+       case FUZZ_TRUNCATE_START:
+       case FUZZ_TRUNCATE_END:
+               assert(fuzz->o1 < fuzz->slen);
+               memcpy(fuzz->fuzzed, fuzz->seed, fuzz->slen);
+               fuzz->o1++;
+               break;
+       case FUZZ_BASE64:
+               assert(fuzz->o1 < fuzz->slen);
+               assert(fuzz->o2 < sizeof(fuzz_b64chars) - 1);
+               memcpy(fuzz->fuzzed, fuzz->seed, fuzz->slen);
+               fuzz->fuzzed[fuzz->o1] = fuzz_b64chars[fuzz->o2];
+               fuzz->o2++;
+               if (fuzz->o2 >= sizeof(fuzz_b64chars) - 1) {
+                       fuzz->o2 = 0;
+                       fuzz->o1++;
+               }
+               break;
+       default:
+               abort();
+       }
+
+       FUZZ_DBG(("done, fuzz = %p, strategy = %s, strategies = 0x%lx, "
+           "o1 = %zu, o2 = %zu, slen = %zu", fuzz, fuzz_ntop(fuzz->strategy),
+           (u_long)fuzz->strategies, fuzz->o1, fuzz->o2, fuzz->slen));
+}
+
+int
+fuzz_matches_original(struct fuzz *fuzz)
+{
+       if (fuzz_len(fuzz) != fuzz->slen)
+               return 0;
+       return memcmp(fuzz_ptr(fuzz), fuzz->seed, fuzz->slen) == 0;
+}
+
+int
+fuzz_done(struct fuzz *fuzz)
+{
+       FUZZ_DBG(("fuzz = %p, strategies = 0x%lx", fuzz,
+           (u_long)fuzz->strategies));
+
+       return fuzz_strategy_done(fuzz) && fuzz->strategies == 0;
+}
+
+size_t
+fuzz_len(struct fuzz *fuzz)
+{
+       assert(fuzz->fuzzed != NULL);
+       switch (fuzz->strategy) {
+       case FUZZ_1_BIT_FLIP:
+       case FUZZ_2_BIT_FLIP:
+       case FUZZ_1_BYTE_FLIP:
+       case FUZZ_2_BYTE_FLIP:
+       case FUZZ_BASE64:
+               return fuzz->slen;
+       case FUZZ_TRUNCATE_START:
+       case FUZZ_TRUNCATE_END:
+               assert(fuzz->o1 <= fuzz->slen);
+               return fuzz->slen - fuzz->o1;
+       default:
+               abort();
+       }
+}
+
+u_char *
+fuzz_ptr(struct fuzz *fuzz)
+{
+       assert(fuzz->fuzzed != NULL);
+       switch (fuzz->strategy) {
+       case FUZZ_1_BIT_FLIP:
+       case FUZZ_2_BIT_FLIP:
+       case FUZZ_1_BYTE_FLIP:
+       case FUZZ_2_BYTE_FLIP:
+       case FUZZ_BASE64:
+               return fuzz->fuzzed;
+       case FUZZ_TRUNCATE_START:
+               assert(fuzz->o1 <= fuzz->slen);
+               return fuzz->fuzzed + fuzz->o1;
+       case FUZZ_TRUNCATE_END:
+               assert(fuzz->o1 <= fuzz->slen);
+               return fuzz->fuzzed;
+       default:
+               abort();
+       }
+}
+
diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c
new file mode 100644 (file)
index 0000000..f855137
--- /dev/null
@@ -0,0 +1,537 @@
+/*     $OpenBSD: test_helper.c,v 1.7 2017/03/14 01:10:07 dtucker Exp $ */
+/*
+ * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* Utility functions/framework for regress tests */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/uio.h>
+
+#include <fcntl.h>
+#include <stdio.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include <openssl/bn.h>
+
+#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)
+# include <vis.h>
+#endif
+
+#include "test_helper.h"
+#include "atomicio.h"
+
+#define TEST_CHECK_INT(r, pred) do {           \
+               switch (pred) {                 \
+               case TEST_EQ:                   \
+                       if (r == 0)             \
+                               return;         \
+                       break;                  \
+               case TEST_NE:                   \
+                       if (r != 0)             \
+                               return;         \
+                       break;                  \
+               case TEST_LT:                   \
+                       if (r < 0)              \
+                               return;         \
+                       break;                  \
+               case TEST_LE:                   \
+                       if (r <= 0)             \
+                               return;         \
+                       break;                  \
+               case TEST_GT:                   \
+                       if (r > 0)              \
+                               return;         \
+                       break;                  \
+               case TEST_GE:                   \
+                       if (r >= 0)             \
+                               return;         \
+                       break;                  \
+               default:                        \
+                       abort();                \
+               }                               \
+       } while (0)
+
+#define TEST_CHECK(x1, x2, pred) do {          \
+               switch (pred) {                 \
+               case TEST_EQ:                   \
+                       if (x1 == x2)           \
+                               return;         \
+                       break;                  \
+               case TEST_NE:                   \
+                       if (x1 != x2)           \
+                               return;         \
+                       break;                  \
+               case TEST_LT:                   \
+                       if (x1 < x2)            \
+                               return;         \
+                       break;                  \
+               case TEST_LE:                   \
+                       if (x1 <= x2)           \
+                               return;         \
+                       break;                  \
+               case TEST_GT:                   \
+                       if (x1 > x2)            \
+                               return;         \
+                       break;                  \
+               case TEST_GE:                   \
+                       if (x1 >= x2)           \
+                               return;         \
+                       break;                  \
+               default:                        \
+                       abort();                \
+               }                               \
+       } while (0)
+
+extern char *__progname;
+
+static int verbose_mode = 0;
+static int quiet_mode = 0;
+static char *active_test_name = NULL;
+static u_int test_number = 0;
+static test_onerror_func_t *test_onerror = NULL;
+static void *onerror_ctx = NULL;
+static const char *data_dir = NULL;
+static char subtest_info[512];
+
+int
+main(int argc, char **argv)
+{
+       int ch;
+
+       /* Handle systems without __progname */
+       if (__progname == NULL) {
+               __progname = strrchr(argv[0], '/');
+               if (__progname == NULL || __progname[1] == '\0')
+                       __progname = argv[0];   
+               else
+                       __progname++;
+               if ((__progname = strdup(__progname)) == NULL) {
+                       fprintf(stderr, "strdup failed\n");
+                       exit(1);
+               }
+       }
+
+       while ((ch = getopt(argc, argv, "vqd:")) != -1) {
+               switch (ch) {
+               case 'd':
+                       data_dir = optarg;
+                       break;
+               case 'q':
+                       verbose_mode = 0;
+                       quiet_mode = 1;
+                       break;
+               case 'v':
+                       verbose_mode = 1;
+                       quiet_mode = 0;
+                       break;
+               default:
+                       fprintf(stderr, "Unrecognised command line option\n");
+                       fprintf(stderr, "Usage: %s [-v]\n", __progname);
+                       exit(1);
+               }
+       }
+       setvbuf(stdout, NULL, _IONBF, 0);
+       if (!quiet_mode)
+               printf("%s: ", __progname);
+       if (verbose_mode)
+               printf("\n");
+
+       tests();
+
+       if (!quiet_mode)
+               printf(" %u tests ok\n", test_number);
+       return 0;
+}
+
+const char *
+test_data_file(const char *name)
+{
+       static char ret[PATH_MAX];
+
+       if (data_dir != NULL)
+               snprintf(ret, sizeof(ret), "%s/%s", data_dir, name);
+       else
+               strlcpy(ret, name, sizeof(ret));
+       if (access(ret, F_OK) != 0) {
+               fprintf(stderr, "Cannot access data file %s: %s\n",
+                   ret, strerror(errno));
+               exit(1);
+       }
+       return ret;
+}
+
+void
+test_info(char *s, size_t len)
+{
+       snprintf(s, len, "In test %u: \"%s\"%s%s\n", test_number,
+           active_test_name == NULL ? "<none>" : active_test_name,
+           *subtest_info != '\0' ? " - " : "", subtest_info);
+}
+
+#ifdef SIGINFO
+static void
+siginfo(int unused __attribute__((__unused__)))
+{
+       char buf[256];
+
+       test_info(buf, sizeof(buf));
+       atomicio(vwrite, STDERR_FILENO, buf, strlen(buf));
+}
+#endif
+
+void
+test_start(const char *n)
+{
+       assert(active_test_name == NULL);
+       assert((active_test_name = strdup(n)) != NULL);
+       *subtest_info = '\0';
+       if (verbose_mode)
+               printf("test %u - \"%s\": ", test_number, active_test_name);
+       test_number++;
+#ifdef SIGINFO
+       signal(SIGINFO, siginfo);
+#endif
+}
+
+void
+set_onerror_func(test_onerror_func_t *f, void *ctx)
+{
+       test_onerror = f;
+       onerror_ctx = ctx;
+}
+
+void
+test_done(void)
+{
+       *subtest_info = '\0';
+       assert(active_test_name != NULL);
+       free(active_test_name);
+       active_test_name = NULL;
+       if (verbose_mode)
+               printf("OK\n");
+       else if (!quiet_mode) {
+               printf(".");
+               fflush(stdout);
+       }
+}
+
+void
+test_subtest_info(const char *fmt, ...)
+{
+       va_list ap;
+
+       va_start(ap, fmt);
+       vsnprintf(subtest_info, sizeof(subtest_info), fmt, ap);
+       va_end(ap);
+}
+
+void
+ssl_err_check(const char *file, int line)
+{
+       long openssl_error = ERR_get_error();
+
+       if (openssl_error == 0)
+               return;
+
+       fprintf(stderr, "\n%s:%d: uncaught OpenSSL error: %s",
+           file, line, ERR_error_string(openssl_error, NULL));
+       abort();
+}
+
+static const char *
+pred_name(enum test_predicate p)
+{
+       switch (p) {
+       case TEST_EQ:
+               return "EQ";
+       case TEST_NE:
+               return "NE";
+       case TEST_LT:
+               return "LT";
+       case TEST_LE:
+               return "LE";
+       case TEST_GT:
+               return "GT";
+       case TEST_GE:
+               return "GE";
+       default:
+               return "UNKNOWN";
+       }
+}
+
+static void
+test_die(void)
+{
+       if (test_onerror != NULL)
+               test_onerror(onerror_ctx);
+       abort();
+}
+
+static void
+test_header(const char *file, int line, const char *a1, const char *a2,
+    const char *name, enum test_predicate pred)
+{
+       fprintf(stderr, "\n%s:%d test #%u \"%s\"%s%s\n", 
+           file, line, test_number, active_test_name,
+           *subtest_info != '\0' ? " - " : "", subtest_info);
+       fprintf(stderr, "ASSERT_%s_%s(%s%s%s) failed:\n",
+           name, pred_name(pred), a1,
+           a2 != NULL ? ", " : "", a2 != NULL ? a2 : "");
+}
+
+void
+assert_bignum(const char *file, int line, const char *a1, const char *a2,
+    const BIGNUM *aa1, const BIGNUM *aa2, enum test_predicate pred)
+{
+       int r = BN_cmp(aa1, aa2);
+
+       TEST_CHECK_INT(r, pred);
+       test_header(file, line, a1, a2, "BIGNUM", pred);
+       fprintf(stderr, "%12s = 0x%s\n", a1, BN_bn2hex(aa1));
+       fprintf(stderr, "%12s = 0x%s\n", a2, BN_bn2hex(aa2));
+       test_die();
+}
+
+void
+assert_string(const char *file, int line, const char *a1, const char *a2,
+    const char *aa1, const char *aa2, enum test_predicate pred)
+{
+       int r;
+
+       /* Verify pointers are not NULL */
+       assert_ptr(file, line, a1, "NULL", aa1, NULL, TEST_NE);
+       assert_ptr(file, line, a2, "NULL", aa2, NULL, TEST_NE);
+
+       r = strcmp(aa1, aa2);
+       TEST_CHECK_INT(r, pred);
+       test_header(file, line, a1, a2, "STRING", pred);
+       fprintf(stderr, "%12s = %s (len %zu)\n", a1, aa1, strlen(aa1));
+       fprintf(stderr, "%12s = %s (len %zu)\n", a2, aa2, strlen(aa2));
+       test_die();
+}
+
+static char *
+tohex(const void *_s, size_t l)
+{
+       u_int8_t *s = (u_int8_t *)_s;
+       size_t i, j;
+       const char *hex = "0123456789abcdef";
+       char *r = malloc((l * 2) + 1);
+
+       assert(r != NULL);
+       for (i = j = 0; i < l; i++) {
+               r[j++] = hex[(s[i] >> 4) & 0xf];
+               r[j++] = hex[s[i] & 0xf];
+       }
+       r[j] = '\0';
+       return r;
+}
+
+void
+assert_mem(const char *file, int line, const char *a1, const char *a2,
+    const void *aa1, const void *aa2, size_t l, enum test_predicate pred)
+{
+       int r;
+
+       if (l == 0)
+               return;
+       /* If length is >0, then verify pointers are not NULL */
+       assert_ptr(file, line, a1, "NULL", aa1, NULL, TEST_NE);
+       assert_ptr(file, line, a2, "NULL", aa2, NULL, TEST_NE);
+
+       r = memcmp(aa1, aa2, l);
+       TEST_CHECK_INT(r, pred);
+       test_header(file, line, a1, a2, "STRING", pred);
+       fprintf(stderr, "%12s = %s (len %zu)\n", a1, tohex(aa1, MIN(l, 256)), l);
+       fprintf(stderr, "%12s = %s (len %zu)\n", a2, tohex(aa2, MIN(l, 256)), l);
+       test_die();
+}
+
+static int
+memvalcmp(const u_int8_t *s, u_char v, size_t l, size_t *where)
+{
+       size_t i;
+
+       for (i = 0; i < l; i++) {
+               if (s[i] != v) {
+                       *where = i;
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+void
+assert_mem_filled(const char *file, int line, const char *a1,
+    const void *aa1, u_char v, size_t l, enum test_predicate pred)
+{
+       size_t where = -1;
+       int r;
+       char tmp[64];
+
+       if (l == 0)
+               return;
+       /* If length is >0, then verify the pointer is not NULL */
+       assert_ptr(file, line, a1, "NULL", aa1, NULL, TEST_NE);
+
+       r = memvalcmp(aa1, v, l, &where);
+       TEST_CHECK_INT(r, pred);
+       test_header(file, line, a1, NULL, "MEM_ZERO", pred);
+       fprintf(stderr, "%20s = %s%s (len %zu)\n", a1,
+           tohex(aa1, MIN(l, 20)), l > 20 ? "..." : "", l);
+       snprintf(tmp, sizeof(tmp), "(%s)[%zu]", a1, where);
+       fprintf(stderr, "%20s = 0x%02x (expected 0x%02x)\n", tmp,
+           ((u_char *)aa1)[where], v);
+       test_die();
+}
+
+void
+assert_int(const char *file, int line, const char *a1, const char *a2,
+    int aa1, int aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "INT", pred);
+       fprintf(stderr, "%12s = %d\n", a1, aa1);
+       fprintf(stderr, "%12s = %d\n", a2, aa2);
+       test_die();
+}
+
+void
+assert_size_t(const char *file, int line, const char *a1, const char *a2,
+    size_t aa1, size_t aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "SIZE_T", pred);
+       fprintf(stderr, "%12s = %zu\n", a1, aa1);
+       fprintf(stderr, "%12s = %zu\n", a2, aa2);
+       test_die();
+}
+
+void
+assert_u_int(const char *file, int line, const char *a1, const char *a2,
+    u_int aa1, u_int aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "U_INT", pred);
+       fprintf(stderr, "%12s = %u / 0x%x\n", a1, aa1, aa1);
+       fprintf(stderr, "%12s = %u / 0x%x\n", a2, aa2, aa2);
+       test_die();
+}
+
+void
+assert_long(const char *file, int line, const char *a1, const char *a2,
+    long aa1, long aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "LONG", pred);
+       fprintf(stderr, "%12s = %ld / 0x%lx\n", a1, aa1, aa1);
+       fprintf(stderr, "%12s = %ld / 0x%lx\n", a2, aa2, aa2);
+       test_die();
+}
+
+void
+assert_long_long(const char *file, int line, const char *a1, const char *a2,
+    long long aa1, long long aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "LONG LONG", pred);
+       fprintf(stderr, "%12s = %lld / 0x%llx\n", a1, aa1, aa1);
+       fprintf(stderr, "%12s = %lld / 0x%llx\n", a2, aa2, aa2);
+       test_die();
+}
+
+void
+assert_char(const char *file, int line, const char *a1, const char *a2,
+    char aa1, char aa2, enum test_predicate pred)
+{
+       char buf[8];
+
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "CHAR", pred);
+       fprintf(stderr, "%12s = '%s' / 0x02%x\n", a1,
+           vis(buf, aa1, VIS_SAFE|VIS_NL|VIS_TAB|VIS_OCTAL, 0), aa1);
+       fprintf(stderr, "%12s = '%s' / 0x02%x\n", a1,
+           vis(buf, aa2, VIS_SAFE|VIS_NL|VIS_TAB|VIS_OCTAL, 0), aa2);
+       test_die();
+}
+
+void
+assert_u8(const char *file, int line, const char *a1, const char *a2,
+    u_int8_t aa1, u_int8_t aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "U8", pred);
+       fprintf(stderr, "%12s = 0x%02x %u\n", a1, aa1, aa1);
+       fprintf(stderr, "%12s = 0x%02x %u\n", a2, aa2, aa2);
+       test_die();
+}
+
+void
+assert_u16(const char *file, int line, const char *a1, const char *a2,
+    u_int16_t aa1, u_int16_t aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "U16", pred);
+       fprintf(stderr, "%12s = 0x%04x %u\n", a1, aa1, aa1);
+       fprintf(stderr, "%12s = 0x%04x %u\n", a2, aa2, aa2);
+       test_die();
+}
+
+void
+assert_u32(const char *file, int line, const char *a1, const char *a2,
+    u_int32_t aa1, u_int32_t aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "U32", pred);
+       fprintf(stderr, "%12s = 0x%08x %u\n", a1, aa1, aa1);
+       fprintf(stderr, "%12s = 0x%08x %u\n", a2, aa2, aa2);
+       test_die();
+}
+
+void
+assert_u64(const char *file, int line, const char *a1, const char *a2,
+    u_int64_t aa1, u_int64_t aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "U64", pred);
+       fprintf(stderr, "%12s = 0x%016llx %llu\n", a1,
+           (unsigned long long)aa1, (unsigned long long)aa1);
+       fprintf(stderr, "%12s = 0x%016llx %llu\n", a2,
+           (unsigned long long)aa2, (unsigned long long)aa2);
+       test_die();
+}
+
+void
+assert_ptr(const char *file, int line, const char *a1, const char *a2,
+    const void *aa1, const void *aa2, enum test_predicate pred)
+{
+       TEST_CHECK(aa1, aa2, pred);
+       test_header(file, line, a1, a2, "PTR", pred);
+       fprintf(stderr, "%12s = %p\n", a1, aa1);
+       fprintf(stderr, "%12s = %p\n", a2, aa2);
+       test_die();
+}
+
diff --git a/regress/unittests/test_helper/test_helper.h b/regress/unittests/test_helper/test_helper.h
new file mode 100644 (file)
index 0000000..615b783
--- /dev/null
@@ -0,0 +1,318 @@
+/*     $OpenBSD: test_helper.h,v 1.7 2017/03/14 01:10:07 dtucker Exp $ */
+/*
+ * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* Utility functions/framework for regress tests */
+
+#ifndef _TEST_HELPER_H
+#define _TEST_HELPER_H
+
+#include "includes.h"
+
+#include <sys/types.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include <openssl/bn.h>
+#include <openssl/err.h>
+
+enum test_predicate {
+       TEST_EQ, TEST_NE, TEST_LT, TEST_LE, TEST_GT, TEST_GE
+};
+typedef void (test_onerror_func_t)(void *);
+
+/* Supplied by test suite */
+void tests(void);
+
+const char *test_data_file(const char *name);
+void test_start(const char *n);
+void test_info(char *s, size_t len);
+void set_onerror_func(test_onerror_func_t *f, void *ctx);
+void test_done(void);
+void test_subtest_info(const char *fmt, ...)
+    __attribute__((format(printf, 1, 2)));
+void ssl_err_check(const char *file, int line);
+void assert_bignum(const char *file, int line,
+    const char *a1, const char *a2,
+    const BIGNUM *aa1, const BIGNUM *aa2, enum test_predicate pred);
+void assert_string(const char *file, int line,
+    const char *a1, const char *a2,
+    const char *aa1, const char *aa2, enum test_predicate pred);
+void assert_mem(const char *file, int line,
+    const char *a1, const char *a2,
+    const void *aa1, const void *aa2, size_t l, enum test_predicate pred);
+void assert_mem_filled(const char *file, int line,
+    const char *a1,
+    const void *aa1, u_char v, size_t l, enum test_predicate pred);
+void assert_int(const char *file, int line,
+    const char *a1, const char *a2,
+    int aa1, int aa2, enum test_predicate pred);
+void assert_size_t(const char *file, int line,
+    const char *a1, const char *a2,
+    size_t aa1, size_t aa2, enum test_predicate pred);
+void assert_u_int(const char *file, int line,
+    const char *a1, const char *a2,
+    u_int aa1, u_int aa2, enum test_predicate pred);
+void assert_long(const char *file, int line,
+    const char *a1, const char *a2,
+    long aa1, long aa2, enum test_predicate pred);
+void assert_long_long(const char *file, int line,
+    const char *a1, const char *a2,
+    long long aa1, long long aa2, enum test_predicate pred);
+void assert_char(const char *file, int line,
+    const char *a1, const char *a2,
+    char aa1, char aa2, enum test_predicate pred);
+void assert_ptr(const char *file, int line,
+    const char *a1, const char *a2,
+    const void *aa1, const void *aa2, enum test_predicate pred);
+void assert_u8(const char *file, int line,
+    const char *a1, const char *a2,
+    u_int8_t aa1, u_int8_t aa2, enum test_predicate pred);
+void assert_u16(const char *file, int line,
+    const char *a1, const char *a2,
+    u_int16_t aa1, u_int16_t aa2, enum test_predicate pred);
+void assert_u32(const char *file, int line,
+    const char *a1, const char *a2,
+    u_int32_t aa1, u_int32_t aa2, enum test_predicate pred);
+void assert_u64(const char *file, int line,
+    const char *a1, const char *a2,
+    u_int64_t aa1, u_int64_t aa2, enum test_predicate pred);
+
+#define TEST_START(n)                  test_start(n)
+#define TEST_DONE()                    test_done()
+#define TEST_ONERROR(f, c)             set_onerror_func(f, c)
+#define SSL_ERR_CHECK()                ssl_err_check(__FILE__, __LINE__)
+
+#define ASSERT_BIGNUM_EQ(a1, a2) \
+       assert_bignum(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_STRING_EQ(a1, a2) \
+       assert_string(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_MEM_EQ(a1, a2, l) \
+       assert_mem(__FILE__, __LINE__, #a1, #a2, a1, a2, l, TEST_EQ)
+#define ASSERT_MEM_FILLED_EQ(a1, c, l) \
+       assert_mem_filled(__FILE__, __LINE__, #a1, a1, c, l, TEST_EQ)
+#define ASSERT_MEM_ZERO_EQ(a1, l) \
+       assert_mem_filled(__FILE__, __LINE__, #a1, a1, '\0', l, TEST_EQ)
+#define ASSERT_INT_EQ(a1, a2) \
+       assert_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_SIZE_T_EQ(a1, a2) \
+       assert_size_t(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_U_INT_EQ(a1, a2) \
+       assert_u_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_LONG_EQ(a1, a2) \
+       assert_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_LONG_LONG_EQ(a1, a2) \
+       assert_long_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_CHAR_EQ(a1, a2) \
+       assert_char(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_PTR_EQ(a1, a2) \
+       assert_ptr(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_U8_EQ(a1, a2) \
+       assert_u8(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_U16_EQ(a1, a2) \
+       assert_u16(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_U32_EQ(a1, a2) \
+       assert_u32(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+#define ASSERT_U64_EQ(a1, a2) \
+       assert_u64(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_EQ)
+
+#define ASSERT_BIGNUM_NE(a1, a2) \
+       assert_bignum(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_STRING_NE(a1, a2) \
+       assert_string(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_MEM_NE(a1, a2, l) \
+       assert_mem(__FILE__, __LINE__, #a1, #a2, a1, a2, l, TEST_NE)
+#define ASSERT_MEM_ZERO_NE(a1, l) \
+       assert_mem_filled(__FILE__, __LINE__, #a1, a1, '\0', l, TEST_NE)
+#define ASSERT_INT_NE(a1, a2) \
+       assert_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_SIZE_T_NE(a1, a2) \
+       assert_size_t(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_U_INT_NE(a1, a2) \
+       assert_u_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_LONG_NE(a1, a2) \
+       assert_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_LONG_LONG_NE(a1, a2) \
+       assert_long_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_CHAR_NE(a1, a2) \
+       assert_char(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_PTR_NE(a1, a2) \
+       assert_ptr(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_U8_NE(a1, a2) \
+       assert_u8(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_U16_NE(a1, a2) \
+       assert_u16(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_U32_NE(a1, a2) \
+       assert_u32(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+#define ASSERT_U64_NE(a1, a2) \
+       assert_u64(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_NE)
+
+#define ASSERT_BIGNUM_LT(a1, a2) \
+       assert_bignum(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_STRING_LT(a1, a2) \
+       assert_string(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_MEM_LT(a1, a2, l) \
+       assert_mem(__FILE__, __LINE__, #a1, #a2, a1, a2, l, TEST_LT)
+#define ASSERT_INT_LT(a1, a2) \
+       assert_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_SIZE_T_LT(a1, a2) \
+       assert_size_t(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_U_INT_LT(a1, a2) \
+       assert_u_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_LONG_LT(a1, a2) \
+       assert_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_LONG_LONG_LT(a1, a2) \
+       assert_long_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_CHAR_LT(a1, a2) \
+       assert_char(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_PTR_LT(a1, a2) \
+       assert_ptr(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_U8_LT(a1, a2) \
+       assert_u8(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_U16_LT(a1, a2) \
+       assert_u16(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_U32_LT(a1, a2) \
+       assert_u32(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+#define ASSERT_U64_LT(a1, a2) \
+       assert_u64(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LT)
+
+#define ASSERT_BIGNUM_LE(a1, a2) \
+       assert_bignum(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_STRING_LE(a1, a2) \
+       assert_string(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_MEM_LE(a1, a2, l) \
+       assert_mem(__FILE__, __LINE__, #a1, #a2, a1, a2, l, TEST_LE)
+#define ASSERT_INT_LE(a1, a2) \
+       assert_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_SIZE_T_LE(a1, a2) \
+       assert_size_t(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_U_INT_LE(a1, a2) \
+       assert_u_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_LONG_LE(a1, a2) \
+       assert_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_LONG_LONG_LE(a1, a2) \
+       assert_long_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_CHAR_LE(a1, a2) \
+       assert_char(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_PTR_LE(a1, a2) \
+       assert_ptr(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_U8_LE(a1, a2) \
+       assert_u8(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_U16_LE(a1, a2) \
+       assert_u16(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_U32_LE(a1, a2) \
+       assert_u32(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+#define ASSERT_U64_LE(a1, a2) \
+       assert_u64(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_LE)
+
+#define ASSERT_BIGNUM_GT(a1, a2) \
+       assert_bignum(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_STRING_GT(a1, a2) \
+       assert_string(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_MEM_GT(a1, a2, l) \
+       assert_mem(__FILE__, __LINE__, #a1, #a2, a1, a2, l, TEST_GT)
+#define ASSERT_INT_GT(a1, a2) \
+       assert_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_SIZE_T_GT(a1, a2) \
+       assert_size_t(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_U_INT_GT(a1, a2) \
+       assert_u_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_LONG_GT(a1, a2) \
+       assert_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_LONG_LONG_GT(a1, a2) \
+       assert_long_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_CHAR_GT(a1, a2) \
+       assert_char(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_PTR_GT(a1, a2) \
+       assert_ptr(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_U8_GT(a1, a2) \
+       assert_u8(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_U16_GT(a1, a2) \
+       assert_u16(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_U32_GT(a1, a2) \
+       assert_u32(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+#define ASSERT_U64_GT(a1, a2) \
+       assert_u64(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GT)
+
+#define ASSERT_BIGNUM_GE(a1, a2) \
+       assert_bignum(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_STRING_GE(a1, a2) \
+       assert_string(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_MEM_GE(a1, a2, l) \
+       assert_mem(__FILE__, __LINE__, #a1, #a2, a1, a2, l, TEST_GE)
+#define ASSERT_INT_GE(a1, a2) \
+       assert_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_SIZE_T_GE(a1, a2) \
+       assert_size_t(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_U_INT_GE(a1, a2) \
+       assert_u_int(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_LONG_GE(a1, a2) \
+       assert_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_LONG_LONG_GE(a1, a2) \
+       assert_long_long(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_CHAR_GE(a1, a2) \
+       assert_char(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_PTR_GE(a1, a2) \
+       assert_ptr(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_U8_GE(a1, a2) \
+       assert_u8(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_U16_GE(a1, a2) \
+       assert_u16(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_U32_GE(a1, a2) \
+       assert_u32(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+#define ASSERT_U64_GE(a1, a2) \
+       assert_u64(__FILE__, __LINE__, #a1, #a2, a1, a2, TEST_GE)
+
+/* Fuzzing support */
+
+struct fuzz;
+#define FUZZ_1_BIT_FLIP                0x00000001      /* Flip one bit at a time */
+#define FUZZ_2_BIT_FLIP                0x00000002      /* Flip two bits at a time */
+#define FUZZ_1_BYTE_FLIP       0x00000004      /* Flip one byte at a time */
+#define FUZZ_2_BYTE_FLIP       0x00000008      /* Flip two bytes at a time */
+#define FUZZ_TRUNCATE_START    0x00000010      /* Truncate from beginning */
+#define FUZZ_TRUNCATE_END      0x00000020      /* Truncate from end */
+#define FUZZ_BASE64            0x00000040      /* Try all base64 chars */
+#define FUZZ_MAX               FUZZ_BASE64
+
+/* Start fuzzing a blob of data with selected strategies (bitmask) */
+struct fuzz *fuzz_begin(u_int strategies, const void *p, size_t l);
+
+/* Free a fuzz context */
+void fuzz_cleanup(struct fuzz *fuzz);
+
+/* Prepare the next fuzz case in the series */
+void fuzz_next(struct fuzz *fuzz);
+
+/*
+ * Check whether this fuzz case is identical to the original
+ * This is slow, but useful if the caller needs to ensure that all tests
+ * generated change the input (e.g. when fuzzing signatures).
+ */
+int fuzz_matches_original(struct fuzz *fuzz);
+
+/* Determine whether the current fuzz sequence is exhausted (nonzero = yes) */
+int fuzz_done(struct fuzz *fuzz);
+
+/* Return the length and a pointer to the current fuzzed case */
+size_t fuzz_len(struct fuzz *fuzz);
+u_char *fuzz_ptr(struct fuzz *fuzz);
+
+/* Dump the current fuzz case to stderr */
+void fuzz_dump(struct fuzz *fuzz);
+
+#endif /* _TEST_HELPER_H */
diff --git a/regress/unittests/utf8/Makefile b/regress/unittests/utf8/Makefile
new file mode 100644 (file)
index 0000000..a975264
--- /dev/null
@@ -0,0 +1,10 @@
+#      $OpenBSD: Makefile,v 1.4 2016/11/01 13:43:27 tb Exp $
+
+PROG=test_utf8
+SRCS=tests.c
+REGRESS_TARGETS=run-regress-${PROG}
+
+run-regress-${PROG}: ${PROG}
+       env ${TEST_ENV} ./${PROG}
+
+.include <bsd.regress.mk>
diff --git a/regress/unittests/utf8/tests.c b/regress/unittests/utf8/tests.c
new file mode 100644 (file)
index 0000000..f0bbca5
--- /dev/null
@@ -0,0 +1,102 @@
+/*     $OpenBSD: tests.c,v 1.4 2017/02/19 00:11:29 djm Exp $ */
+/*
+ * Regress test for the utf8.h *mprintf() API
+ *
+ * Written by Ingo Schwarze <schwarze@openbsd.org> in 2016
+ * and placed in the public domain.
+ */
+
+#include "includes.h"
+
+#include <locale.h>
+#include <string.h>
+
+#include "../test_helper/test_helper.h"
+
+#include "utf8.h"
+
+static void
+badarg(void)
+{
+       char     buf[16];
+       int      len, width;
+
+       width = 1;
+       TEST_START("utf8_badarg");
+       len = snmprintf(buf, sizeof(buf), &width, "\377");
+       ASSERT_INT_EQ(len, -1);
+       ASSERT_STRING_EQ(buf, "");
+       ASSERT_INT_EQ(width, 0);
+       TEST_DONE();
+}
+
+static void
+one(int utf8, const char *name, const char *mbs, int width,
+    int wantwidth, int wantlen, const char *wants)
+{
+       char     buf[16];
+       int     *wp;
+       int      len;
+
+       if (wantlen == -2)
+               wantlen = strlen(wants);
+       (void)strlcpy(buf, utf8 ? "utf8_" : "c_", sizeof(buf));
+       (void)strlcat(buf, name, sizeof(buf));
+       TEST_START(buf);
+       wp = wantwidth == -2 ? NULL : &width;
+       len = snmprintf(buf, sizeof(buf), wp, "%s", mbs);
+       ASSERT_INT_EQ(len, wantlen);
+       ASSERT_STRING_EQ(buf, wants);
+       ASSERT_INT_EQ(width, wantwidth);
+       TEST_DONE();
+}
+
+void
+tests(void)
+{
+       char    *loc;
+
+       TEST_START("utf8_setlocale");
+       loc = setlocale(LC_CTYPE, "en_US.UTF-8");
+       ASSERT_PTR_NE(loc, NULL);
+       TEST_DONE();
+
+       badarg();
+       one(1, "empty", "", 2, 0, 0, "");
+       one(1, "ascii", "x", -2, -2, -2, "x");
+       one(1, "newline", "a\nb", -2, -2, -2, "a\nb");
+       one(1, "cr", "a\rb", -2, -2, -2, "a\rb");
+       one(1, "tab", "a\tb", -2, -2, -2, "a\tb");
+       one(1, "esc", "\033x", -2, -2, -2, "\\033x");
+       one(1, "inv_badbyte", "\377x", -2, -2, -2, "\\377x");
+       one(1, "inv_nocont", "\341x", -2, -2, -2, "\\341x");
+       one(1, "inv_nolead", "a\200b", -2, -2, -2, "a\\200b");
+       one(1, "sz_ascii", "1234567890123456", -2, -2, 16, "123456789012345");
+       one(1, "sz_esc", "123456789012\033", -2, -2, 16, "123456789012");
+       one(1, "width_ascii", "123", 2, 2, -1, "12");
+       one(1, "width_double", "a\343\201\201", 2, 1, -1, "a");
+       one(1, "double_fit", "a\343\201\201", 3, 3, 4, "a\343\201\201");
+       one(1, "double_spc", "a\343\201\201", 4, 3, 4, "a\343\201\201");
+
+       TEST_START("C_setlocale");
+       loc = setlocale(LC_CTYPE, "C");
+       ASSERT_PTR_NE(loc, NULL);
+       TEST_DONE();
+
+       badarg();
+       one(0, "empty", "", 2, 0, 0, "");
+       one(0, "ascii", "x", -2, -2, -2, "x");
+       one(0, "newline", "a\nb", -2, -2, -2, "a\nb");
+       one(0, "cr", "a\rb", -2, -2, -2, "a\rb");
+       one(0, "tab", "a\tb", -2, -2, -2, "a\tb");
+       one(0, "esc", "\033x", -2, -2, -2, "\\033x");
+       one(0, "inv_badbyte", "\377x", -2, -2, -2, "\\377x");
+       one(0, "inv_nocont", "\341x", -2, -2, -2, "\\341x");
+       one(0, "inv_nolead", "a\200b", -2, -2, -2, "a\\200b");
+       one(0, "sz_ascii", "1234567890123456", -2, -2, 16, "123456789012345");
+       one(0, "sz_esc", "123456789012\033", -2, -2, 16, "123456789012");
+       one(0, "width_ascii", "123", 2, 2, -1, "12");
+       one(0, "width_double", "a\343\201\201", 2, 1, -1, "a");
+       one(0, "double_fit", "a\343\201\201", 7, 5, -1, "a\\343");
+       one(0, "double_spc", "a\343\201\201", 13, 13, 13, "a\\343\\201\\201");
+}
diff --git a/regress/valgrind-unit.sh b/regress/valgrind-unit.sh
new file mode 100755 (executable)
index 0000000..433cb06
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+UNIT_BINARY="$1"
+shift
+UNIT_ARGS="$@"
+
+test "x$OBJ" = "x" && OBJ=$PWD
+
+# This mostly replicates the logic in test-exec.sh for running the
+# regress tests under valgrind.
+VG_TEST=`basename $UNIT_BINARY`
+VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p"
+VG_OPTS="--track-origins=yes --leak-check=full --log-file=${VG_LOG}"
+VG_OPTS="$VG_OPTS --trace-children=yes"
+VG_PATH="valgrind"
+if [ "x$VALGRIND_PATH" != "x" ]; then
+       VG_PATH="$VALGRIND_PATH"
+fi
+
+exec $VG_PATH $VG_OPTS $UNIT_BINARY $UNIT_ARGS
diff --git a/regress/yes-head.sh b/regress/yes-head.sh
new file mode 100644 (file)
index 0000000..1fc7542
--- /dev/null
@@ -0,0 +1,15 @@
+#      $OpenBSD: yes-head.sh,v 1.5 2015/03/03 22:35:19 markus Exp $
+#      Placed in the Public Domain.
+
+tid="yes pipe head"
+
+for p in ${SSH_PROTOCOLS}; do
+       lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
+       if [ $? -ne 0 ]; then
+               fail "yes|head test failed"
+               lines = 0;
+       fi
+       if [ $lines -ne 2000 ]; then
+               fail "yes|head returns $lines lines instead of 2000"
+       fi
+done
diff --git a/roaming.h b/roaming.h
deleted file mode 100644 (file)
index da069f8..0000000
--- a/roaming.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $OpenBSD: roaming.h,v 1.6 2011/12/07 05:44:38 djm Exp $ */
-/*
- * Copyright (c) 2004-2009 AppGate Network Security AB
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef ROAMING_H
-#define ROAMING_H
-
-#define DEFAULT_ROAMBUF        65536
-#define MAX_ROAMBUF    (2*1024*1024) /* XXX arbitrary */
-#define ROAMING_REQUEST        "roaming@appgate.com"
-
-extern int roaming_enabled;
-extern int resume_in_progress;
-
-void   request_roaming(void);
-int    get_snd_buf_size(void);
-int    get_recv_buf_size(void);
-void   add_recv_bytes(u_int64_t);
-int    wait_for_roaming_reconnect(void);
-void   roaming_reply(int, u_int32_t, void *);
-void   set_out_buffer_size(size_t);
-ssize_t        roaming_write(int, const void *, size_t, int *);
-ssize_t        roaming_read(int, void *, size_t, int *);
-size_t roaming_atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
-u_int64_t      get_recv_bytes(void);
-u_int64_t      get_sent_bytes(void);
-void   roam_set_bytes(u_int64_t, u_int64_t);
-void   resend_bytes(int, u_int64_t *);
-void   calculate_new_key(u_int64_t *, u_int64_t, u_int64_t);
-int    resume_kex(void);
-
-#endif /* ROAMING */
diff --git a/roaming_client.c b/roaming_client.c
deleted file mode 100644 (file)
index cb13285..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/* $OpenBSD: roaming_client.c,v 1.9 2015/01/27 12:54:06 okan Exp $ */
-/*
- * Copyright (c) 2004-2009 AppGate Network Security AB
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "includes.h"
-
-#include "openbsd-compat/sys-queue.h"
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <signal.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "xmalloc.h"
-#include "buffer.h"
-#include "channels.h"
-#include "cipher.h"
-#include "dispatch.h"
-#include "clientloop.h"
-#include "log.h"
-#include "match.h"
-#include "misc.h"
-#include "packet.h"
-#include "ssh.h"
-#include "key.h"
-#include "kex.h"
-#include "readconf.h"
-#include "roaming.h"
-#include "ssh2.h"
-#include "sshconnect.h"
-#include "digest.h"
-
-/* import */
-extern Options options;
-extern char *host;
-extern struct sockaddr_storage hostaddr;
-extern int session_resumed;
-
-static u_int32_t roaming_id;
-static u_int64_t cookie;
-static u_int64_t lastseenchall;
-static u_int64_t key1, key2, oldkey1, oldkey2;
-
-void
-roaming_reply(int type, u_int32_t seq, void *ctxt)
-{
-       if (type == SSH2_MSG_REQUEST_FAILURE) {
-               logit("Server denied roaming");
-               return;
-       }
-       verbose("Roaming enabled");
-       roaming_id = packet_get_int();
-       cookie = packet_get_int64();
-       key1 = oldkey1 = packet_get_int64();
-       key2 = oldkey2 = packet_get_int64();
-       set_out_buffer_size(packet_get_int() + get_snd_buf_size());
-       roaming_enabled = 1;
-}
-
-void
-request_roaming(void)
-{
-       packet_start(SSH2_MSG_GLOBAL_REQUEST);
-       packet_put_cstring(ROAMING_REQUEST);
-       packet_put_char(1);
-       packet_put_int(get_recv_buf_size());
-       packet_send();
-       client_register_global_confirm(roaming_reply, NULL);
-}
-
-static void
-roaming_auth_required(void)
-{
-       u_char digest[SSH_DIGEST_MAX_LENGTH];
-       Buffer b;
-       u_int64_t chall, oldchall;
-
-       chall = packet_get_int64();
-       oldchall = packet_get_int64();
-       if (oldchall != lastseenchall) {
-               key1 = oldkey1;
-               key2 = oldkey2;
-       }
-       lastseenchall = chall;
-
-       buffer_init(&b);
-       buffer_put_int64(&b, cookie);
-       buffer_put_int64(&b, chall);
-       if (ssh_digest_buffer(SSH_DIGEST_SHA1, &b, digest, sizeof(digest)) != 0)
-               fatal("%s: ssh_digest_buffer failed", __func__);
-       buffer_free(&b);
-
-       packet_start(SSH2_MSG_KEX_ROAMING_AUTH);
-       packet_put_int64(key1 ^ get_recv_bytes());
-       packet_put_raw(digest, ssh_digest_bytes(SSH_DIGEST_SHA1));
-       packet_send();
-
-       oldkey1 = key1;
-       oldkey2 = key2;
-       calculate_new_key(&key1, cookie, chall);
-       calculate_new_key(&key2, cookie, chall);
-
-       debug("Received %llu bytes", (unsigned long long)get_recv_bytes());
-       debug("Sent roaming_auth packet");
-}
-
-int
-resume_kex(void)
-{
-       /*
-        * This should not happen - if the client sends the kex method
-        * resume@appgate.com then the kex is done in roaming_resume().
-        */
-       return 1;
-}
-
-static int
-roaming_resume(void)
-{
-       u_int64_t recv_bytes;
-       char *str = NULL, *kexlist = NULL, *c;
-       int i, type;
-       int timeout_ms = options.connection_timeout * 1000;
-       u_int len;
-       u_int32_t rnd = 0;
-
-       resume_in_progress = 1;
-
-       /* Exchange banners */
-       ssh_exchange_identification(timeout_ms);
-       packet_set_nonblocking();
-
-       /* Send a kexinit message with resume@appgate.com as only kex algo */
-       packet_start(SSH2_MSG_KEXINIT);
-       for (i = 0; i < KEX_COOKIE_LEN; i++) {
-               if (i % 4 == 0)
-                       rnd = arc4random();
-               packet_put_char(rnd & 0xff);
-               rnd >>= 8;
-       }
-       packet_put_cstring(KEX_RESUME);
-       for (i = 1; i < PROPOSAL_MAX; i++) {
-               /* kex algorithm added so start with i=1 and not 0 */
-               packet_put_cstring(""); /* Not used when we resume */
-       }
-       packet_put_char(1); /* first kex_packet follows */
-       packet_put_int(0); /* reserved */
-       packet_send();
-
-       /* Assume that resume@appgate.com will be accepted */
-       packet_start(SSH2_MSG_KEX_ROAMING_RESUME);
-       packet_put_int(roaming_id);
-       packet_send();
-
-       /* Read the server's kexinit and check for resume@appgate.com */
-       if ((type = packet_read()) != SSH2_MSG_KEXINIT) {
-               debug("expected kexinit on resume, got %d", type);
-               goto fail;
-       }
-       for (i = 0; i < KEX_COOKIE_LEN; i++)
-               (void)packet_get_char();
-       kexlist = packet_get_string(&len);
-       if (!kexlist
-           || (str = match_list(KEX_RESUME, kexlist, NULL)) == NULL) {
-               debug("server doesn't allow resume");
-               goto fail;
-       }
-       free(str);
-       for (i = 1; i < PROPOSAL_MAX; i++) {
-               /* kex algorithm taken care of so start with i=1 and not 0 */
-               free(packet_get_string(&len));
-       }
-       i = packet_get_char(); /* first_kex_packet_follows */
-       if (i && (c = strchr(kexlist, ',')))
-               *c = 0;
-       if (i && strcmp(kexlist, KEX_RESUME)) {
-               debug("server's kex guess (%s) was wrong, skipping", kexlist);
-               (void)packet_read(); /* Wrong guess - discard packet */
-       }
-
-       /*
-        * Read the ROAMING_AUTH_REQUIRED challenge from the server and
-        * send ROAMING_AUTH
-        */
-       if ((type = packet_read()) != SSH2_MSG_KEX_ROAMING_AUTH_REQUIRED) {
-               debug("expected roaming_auth_required, got %d", type);
-               goto fail;
-       }
-       roaming_auth_required();
-
-       /* Read ROAMING_AUTH_OK from the server */
-       if ((type = packet_read()) != SSH2_MSG_KEX_ROAMING_AUTH_OK) {
-               debug("expected roaming_auth_ok, got %d", type);
-               goto fail;
-       }
-       recv_bytes = packet_get_int64() ^ oldkey2;
-       debug("Peer received %llu bytes", (unsigned long long)recv_bytes);
-       resend_bytes(packet_get_connection_out(), &recv_bytes);
-
-       resume_in_progress = 0;
-
-       session_resumed = 1; /* Tell clientloop */
-
-       return 0;
-
-fail:
-       free(kexlist);
-       if (packet_get_connection_in() == packet_get_connection_out())
-               close(packet_get_connection_in());
-       else {
-               close(packet_get_connection_in());
-               close(packet_get_connection_out());
-       }
-       return 1;
-}
-
-int
-wait_for_roaming_reconnect(void)
-{
-       static int reenter_guard = 0;
-       int timeout_ms = options.connection_timeout * 1000;
-       int c;
-
-       if (reenter_guard != 0)
-               fatal("Server refused resume, roaming timeout may be exceeded");
-       reenter_guard = 1;
-
-       fprintf(stderr, "[connection suspended, press return to resume]");
-       fflush(stderr);
-       packet_backup_state();
-       /* TODO Perhaps we should read from tty here */
-       while ((c = fgetc(stdin)) != EOF) {
-               if (c == 'Z' - 64) {
-                       kill(getpid(), SIGTSTP);
-                       continue;
-               }
-               if (c != '\n' && c != '\r')
-                       continue;
-
-               if (ssh_connect(host, NULL, &hostaddr, options.port,
-                   options.address_family, 1, &timeout_ms,
-                   options.tcp_keep_alive, options.use_privileged_port) == 0 &&
-                   roaming_resume() == 0) {
-                       packet_restore_state();
-                       reenter_guard = 0;
-                       fprintf(stderr, "[connection resumed]\n");
-                       fflush(stderr);
-                       return 0;
-               }
-
-               fprintf(stderr, "[reconnect failed, press return to retry]");
-               fflush(stderr);
-       }
-       fprintf(stderr, "[exiting]\n");
-       fflush(stderr);
-       exit(0);
-}
diff --git a/roaming_common.c b/roaming_common.c
deleted file mode 100644 (file)
index ea06460..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/* $OpenBSD: roaming_common.c,v 1.13 2015/01/27 12:54:06 okan Exp $ */
-/*
- * Copyright (c) 2004-2009 AppGate Network Security AB
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "includes.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-
-#include <errno.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "atomicio.h"
-#include "log.h"
-#include "packet.h"
-#include "xmalloc.h"
-#include "cipher.h"
-#include "buffer.h"
-#include "roaming.h"
-#include "digest.h"
-
-static size_t out_buf_size = 0;
-static char *out_buf = NULL;
-static size_t out_start;
-static size_t out_last;
-
-static u_int64_t write_bytes = 0;
-static u_int64_t read_bytes = 0;
-
-int roaming_enabled = 0;
-int resume_in_progress = 0;
-
-int
-get_snd_buf_size(void)
-{
-       int fd = packet_get_connection_out();
-       int optval;
-       socklen_t optvallen = sizeof(optval);
-
-       if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0)
-               optval = DEFAULT_ROAMBUF;
-       return optval;
-}
-
-int
-get_recv_buf_size(void)
-{
-       int fd = packet_get_connection_in();
-       int optval;
-       socklen_t optvallen = sizeof(optval);
-
-       if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0)
-               optval = DEFAULT_ROAMBUF;
-       return optval;
-}
-
-void
-set_out_buffer_size(size_t size)
-{
-       if (size == 0 || size > MAX_ROAMBUF)
-               fatal("%s: bad buffer size %lu", __func__, (u_long)size);
-       /*
-        * The buffer size can only be set once and the buffer will live
-        * as long as the session lives.
-        */
-       if (out_buf == NULL) {
-               out_buf_size = size;
-               out_buf = xmalloc(size);
-               out_start = 0;
-               out_last = 0;
-       }
-}
-
-u_int64_t
-get_recv_bytes(void)
-{
-       return read_bytes;
-}
-
-void
-add_recv_bytes(u_int64_t num)
-{
-       read_bytes += num;
-}
-
-u_int64_t
-get_sent_bytes(void)
-{
-       return write_bytes;
-}
-
-void
-roam_set_bytes(u_int64_t sent, u_int64_t recvd)
-{
-       read_bytes = recvd;
-       write_bytes = sent;
-}
-
-static void
-buf_append(const char *buf, size_t count)
-{
-       if (count > out_buf_size) {
-               buf += count - out_buf_size;
-               count = out_buf_size;
-       }
-       if (count < out_buf_size - out_last) {
-               memcpy(out_buf + out_last, buf, count);
-               if (out_start > out_last)
-                       out_start += count;
-               out_last += count;
-       } else {
-               /* data will wrap */
-               size_t chunk = out_buf_size - out_last;
-               memcpy(out_buf + out_last, buf, chunk);
-               memcpy(out_buf, buf + chunk, count - chunk);
-               out_last = count - chunk;
-               out_start = out_last + 1;
-       }
-}
-
-ssize_t
-roaming_write(int fd, const void *buf, size_t count, int *cont)
-{
-       ssize_t ret;
-
-       ret = write(fd, buf, count);
-       if (ret > 0 && !resume_in_progress) {
-               write_bytes += ret;
-               if (out_buf_size > 0)
-                       buf_append(buf, ret);
-       }
-       if (out_buf_size > 0 &&
-           (ret == 0 || (ret == -1 && errno == EPIPE))) {
-               if (wait_for_roaming_reconnect() != 0) {
-                       ret = 0;
-                       *cont = 1;
-               } else {
-                       ret = -1;
-                       errno = EAGAIN;
-               }
-       }
-       return ret;
-}
-
-ssize_t
-roaming_read(int fd, void *buf, size_t count, int *cont)
-{
-       ssize_t ret = read(fd, buf, count);
-       if (ret > 0) {
-               if (!resume_in_progress) {
-                       read_bytes += ret;
-               }
-       } else if (out_buf_size > 0 &&
-           (ret == 0 || (ret == -1 && (errno == ECONNRESET
-           || errno == ECONNABORTED || errno == ETIMEDOUT
-           || errno == EHOSTUNREACH)))) {
-               debug("roaming_read failed for %d  ret=%ld  errno=%d",
-                   fd, (long)ret, errno);
-               ret = 0;
-               if (wait_for_roaming_reconnect() == 0)
-                       *cont = 1;
-       }
-       return ret;
-}
-
-size_t
-roaming_atomicio(ssize_t(*f)(int, void*, size_t), int fd, void *buf,
-    size_t count)
-{
-       size_t ret = atomicio(f, fd, buf, count);
-
-       if (f == vwrite && ret > 0 && !resume_in_progress) {
-               write_bytes += ret;
-       } else if (f == read && ret > 0 && !resume_in_progress) {
-               read_bytes += ret;
-       }
-       return ret;
-}
-
-void
-resend_bytes(int fd, u_int64_t *offset)
-{
-       size_t available, needed;
-
-       if (out_start < out_last)
-               available = out_last - out_start;
-       else
-               available = out_buf_size;
-       needed = write_bytes - *offset;
-       debug3("resend_bytes: resend %lu bytes from %llu",
-           (unsigned long)needed, (unsigned long long)*offset);
-       if (needed > available)
-               fatal("Needed to resend more data than in the cache");
-       if (out_last < needed) {
-               int chunkend = needed - out_last;
-               atomicio(vwrite, fd, out_buf + out_buf_size - chunkend,
-                   chunkend);
-               atomicio(vwrite, fd, out_buf, out_last);
-       } else {
-               atomicio(vwrite, fd, out_buf + (out_last - needed), needed);
-       }
-}
-
-/*
- * Caclulate a new key after a reconnect
- */
-void
-calculate_new_key(u_int64_t *key, u_int64_t cookie, u_int64_t challenge)
-{
-       u_char hash[SSH_DIGEST_MAX_LENGTH];
-       Buffer b;
-
-       buffer_init(&b);
-       buffer_put_int64(&b, *key);
-       buffer_put_int64(&b, cookie);
-       buffer_put_int64(&b, challenge);
-
-       if (ssh_digest_buffer(SSH_DIGEST_SHA1, &b, hash, sizeof(hash)) != 0)
-               fatal("%s: digest_buffer failed", __func__);
-
-       buffer_clear(&b);
-       buffer_append(&b, hash, ssh_digest_bytes(SSH_DIGEST_SHA1));
-       *key = buffer_get_int64(&b);
-       buffer_free(&b);
-}
index 35f0c4d..a61de74 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "log.h"
 #include "sandbox.h"
+#include "monitor.h"
 #include "xmalloc.h"
 
 /* Darwin/OS X sandbox */
diff --git a/sandbox-pledge.c b/sandbox-pledge.c
new file mode 100644 (file)
index 0000000..d28fc27
--- /dev/null
@@ -0,0 +1,77 @@
+/* $OpenBSD: sandbox-pledge.c,v 1.1 2015/10/09 01:37:08 deraadt Exp $ */
+/*
+ * Copyright (c) 2015 Theo de Raadt <deraadt@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "includes.h"
+
+#ifdef SANDBOX_PLEDGE
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/syscall.h>
+#include <sys/socket.h>
+#include <sys/wait.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <pwd.h>
+
+#include "log.h"
+#include "ssh-sandbox.h"
+#include "xmalloc.h"
+
+struct ssh_sandbox {
+       pid_t child_pid;
+};
+
+struct ssh_sandbox *
+ssh_sandbox_init(struct monitor *m)
+{
+       struct ssh_sandbox *box;
+
+       debug3("%s: preparing pledge sandbox", __func__);
+       box = xcalloc(1, sizeof(*box));
+       box->child_pid = 0;
+
+       return box;
+}
+
+void
+ssh_sandbox_child(struct ssh_sandbox *box)
+{
+       if (pledge("stdio", NULL) == -1)
+               fatal("%s: pledge()", __func__);
+}
+
+void
+ssh_sandbox_parent_finish(struct ssh_sandbox *box)
+{
+       free(box);
+       debug3("%s: finished", __func__);
+}
+
+void
+ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid)
+{
+       box->child_pid = child_pid;
+       /* Nothing to do here */
+}
+
+#endif /* SANDBOX_PLEDGE */
index bba8077..0bff3df 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sandbox-rlimit.c,v 1.3 2011/06/23 09:34:13 djm Exp $ */
+/* $OpenBSD: sandbox-rlimit.c,v 1.4 2016/09/12 01:22:38 deraadt Exp $ */
 /*
  * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
  *
@@ -20,7 +20,6 @@
 #ifdef SANDBOX_RLIMIT
 
 #include <sys/types.h>
-#include <sys/param.h>
 #include <sys/time.h>
 #include <sys/resource.h>
 
index 2462bcc..3a1aedc 100644 (file)
 # define SECCOMP_FILTER_FAIL SECCOMP_RET_TRAP
 #endif /* SANDBOX_SECCOMP_FILTER_DEBUG */
 
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define ARG_LO_OFFSET  0
+# define ARG_HI_OFFSET  sizeof(uint32_t)
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define ARG_LO_OFFSET  sizeof(uint32_t)
+# define ARG_HI_OFFSET  0
+#else
+#error "Unknown endianness"
+#endif
+
 /* Simple helpers to avoid manual errors (but larger BPF programs). */
 #define SC_DENY(_nr, _errno) \
-       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_ ## _nr, 0, 1), \
+       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (_nr), 0, 1), \
        BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ERRNO|(_errno))
 #define SC_ALLOW(_nr) \
-       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_ ## _nr, 0, 1), \
+       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (_nr), 0, 1), \
        BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW)
 #define SC_ALLOW_ARG(_nr, _arg_nr, _arg_val) \
-       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_ ## _nr, 0, 4), \
-       /* load first syscall argument */ \
+       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (_nr), 0, 6), \
+       /* load and test first syscall argument, low word */ \
+       BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \
+           offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_LO_OFFSET), \
+       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, \
+           ((_arg_val) & 0xFFFFFFFF), 0, 3), \
+       /* load and test first syscall argument, high word */ \
        BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \
-           offsetof(struct seccomp_data, args[(_arg_nr)])), \
-       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (_arg_val), 0, 1), \
+           offsetof(struct seccomp_data, args[(_arg_nr)]) + ARG_HI_OFFSET), \
+       BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, \
+           (((uint32_t)((uint64_t)(_arg_val) >> 32)) & 0xFFFFFFFF), 0, 1), \
        BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), \
        /* reload syscall number; all rules expect it in accumulator */ \
        BPF_STMT(BPF_LD+BPF_W+BPF_ABS, \
@@ -103,100 +119,123 @@ static const struct sock_filter preauth_insns[] = {
                offsetof(struct seccomp_data, nr)),
 
        /* Syscalls to non-fatally deny */
+#ifdef __NR_lstat
+       SC_DENY(__NR_lstat, EACCES),
+#endif
+#ifdef __NR_lstat64
+       SC_DENY(__NR_lstat64, EACCES),
+#endif
 #ifdef __NR_fstat
-       SC_DENY(fstat, EACCES),
+       SC_DENY(__NR_fstat, EACCES),
 #endif
 #ifdef __NR_fstat64
-       SC_DENY(fstat64, EACCES),
+       SC_DENY(__NR_fstat64, EACCES),
 #endif
 #ifdef __NR_open
-       SC_DENY(open, EACCES),
+       SC_DENY(__NR_open, EACCES),
 #endif
 #ifdef __NR_openat
-       SC_DENY(openat, EACCES),
+       SC_DENY(__NR_openat, EACCES),
 #endif
 #ifdef __NR_newfstatat
-       SC_DENY(newfstatat, EACCES),
+       SC_DENY(__NR_newfstatat, EACCES),
 #endif
 #ifdef __NR_stat
-       SC_DENY(stat, EACCES),
+       SC_DENY(__NR_stat, EACCES),
 #endif
 #ifdef __NR_stat64
-       SC_DENY(stat64, EACCES),
+       SC_DENY(__NR_stat64, EACCES),
 #endif
 
        /* Syscalls to permit */
 #ifdef __NR_brk
-       SC_ALLOW(brk),
+       SC_ALLOW(__NR_brk),
 #endif
 #ifdef __NR_clock_gettime
-       SC_ALLOW(clock_gettime),
+       SC_ALLOW(__NR_clock_gettime),
 #endif
 #ifdef __NR_close
-       SC_ALLOW(close),
+       SC_ALLOW(__NR_close),
 #endif
 #ifdef __NR_exit
-       SC_ALLOW(exit),
+       SC_ALLOW(__NR_exit),
 #endif
 #ifdef __NR_exit_group
-       SC_ALLOW(exit_group),
+       SC_ALLOW(__NR_exit_group),
 #endif
 #ifdef __NR_getpgid
-       SC_ALLOW(getpgid),
+       SC_ALLOW(__NR_getpgid),
 #endif
 #ifdef __NR_getpid
-       SC_ALLOW(getpid),
+       SC_ALLOW(__NR_getpid),
+#endif
+#ifdef __NR_getrandom
+       SC_ALLOW(__NR_getrandom),
 #endif
 #ifdef __NR_gettimeofday
-       SC_ALLOW(gettimeofday),
+       SC_ALLOW(__NR_gettimeofday),
 #endif
 #ifdef __NR_madvise
-       SC_ALLOW(madvise),
+       SC_ALLOW(__NR_madvise),
 #endif
 #ifdef __NR_mmap
-       SC_ALLOW(mmap),
+       SC_ALLOW(__NR_mmap),
 #endif
 #ifdef __NR_mmap2
-       SC_ALLOW(mmap2),
+       SC_ALLOW(__NR_mmap2),
 #endif
 #ifdef __NR_mremap
-       SC_ALLOW(mremap),
+       SC_ALLOW(__NR_mremap),
 #endif
 #ifdef __NR_munmap
-       SC_ALLOW(munmap),
+       SC_ALLOW(__NR_munmap),
 #endif
 #ifdef __NR__newselect
-       SC_ALLOW(_newselect),
+       SC_ALLOW(__NR__newselect),
 #endif
 #ifdef __NR_poll
-       SC_ALLOW(poll),
+       SC_ALLOW(__NR_poll),
 #endif
 #ifdef __NR_pselect6
-       SC_ALLOW(pselect6),
+       SC_ALLOW(__NR_pselect6),
 #endif
 #ifdef __NR_read
-       SC_ALLOW(read),
+       SC_ALLOW(__NR_read),
 #endif
 #ifdef __NR_rt_sigprocmask
-       SC_ALLOW(rt_sigprocmask),
+       SC_ALLOW(__NR_rt_sigprocmask),
 #endif
 #ifdef __NR_select
-       SC_ALLOW(select),
+       SC_ALLOW(__NR_select),
 #endif
 #ifdef __NR_shutdown
-       SC_ALLOW(shutdown),
+       SC_ALLOW(__NR_shutdown),
 #endif
 #ifdef __NR_sigprocmask
-       SC_ALLOW(sigprocmask),
+       SC_ALLOW(__NR_sigprocmask),
 #endif
 #ifdef __NR_time
-       SC_ALLOW(time),
+       SC_ALLOW(__NR_time),
 #endif
 #ifdef __NR_write
-       SC_ALLOW(write),
+       SC_ALLOW(__NR_write),
 #endif
 #ifdef __NR_socketcall
-       SC_ALLOW_ARG(socketcall, 0, SYS_SHUTDOWN),
+       SC_ALLOW_ARG(__NR_socketcall, 0, SYS_SHUTDOWN),
+#endif
+#if defined(__NR_ioctl) && defined(__s390__)
+       /* Allow ioctls for ICA crypto card on s390 */
+       SC_ALLOW_ARG(__NR_ioctl, 1, Z90STAT_STATUS_MASK),
+       SC_ALLOW_ARG(__NR_ioctl, 1, ICARSAMODEXPO),
+       SC_ALLOW_ARG(__NR_ioctl, 1, ICARSACRT),
+#endif
+#if defined(__x86_64__) && defined(__ILP32__) && defined(__X32_SYSCALL_BIT)
+       /*
+        * On Linux x32, the clock_gettime VDSO falls back to the
+        * x86-64 syscall under some circumstances, e.g.
+        * https://bugs.debian.org/849923
+        */
+       SC_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT);
 #endif
 
        /* Default deny */
diff --git a/sandbox-solaris.c b/sandbox-solaris.c
new file mode 100644 (file)
index 0000000..343a010
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2015 Joyent, Inc
+ * Author: Alex Wilson <alex.wilson@joyent.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "includes.h"
+
+#ifdef SANDBOX_SOLARIS
+#ifndef USE_SOLARIS_PRIVS
+# error "--with-solaris-privs must be used with the Solaris sandbox"
+#endif
+
+#include <sys/types.h>
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#ifdef HAVE_PRIV_H
+# include <priv.h>
+#endif
+
+#include "log.h"
+#include "ssh-sandbox.h"
+#include "xmalloc.h"
+
+struct ssh_sandbox {
+       priv_set_t *pset;
+};
+
+struct ssh_sandbox *
+ssh_sandbox_init(struct monitor *monitor)
+{
+       struct ssh_sandbox *box = NULL;
+
+       box = xcalloc(1, sizeof(*box));
+
+       /* Start with "basic" and drop everything we don't need. */
+       box->pset = solaris_basic_privset();
+
+       if (box->pset == NULL) {
+               free(box);
+               return NULL;
+       }
+
+       /* Drop everything except the ability to use already-opened files */
+       if (priv_delset(box->pset, PRIV_FILE_LINK_ANY) != 0 ||
+#ifdef PRIV_NET_ACCESS
+           priv_delset(box->pset, PRIV_NET_ACCESS) != 0 ||
+#endif
+           priv_delset(box->pset, PRIV_PROC_EXEC) != 0 ||
+           priv_delset(box->pset, PRIV_PROC_FORK) != 0 ||
+           priv_delset(box->pset, PRIV_PROC_INFO) != 0 ||
+           priv_delset(box->pset, PRIV_PROC_SESSION) != 0) {
+               free(box);
+               return NULL;
+       }
+
+       /* These may not be available on older Solaris-es */
+# if defined(PRIV_FILE_READ) && defined(PRIV_FILE_WRITE)
+       if (priv_delset(box->pset, PRIV_FILE_READ) != 0 ||
+           priv_delset(box->pset, PRIV_FILE_WRITE) != 0) {
+               free(box);
+               return NULL;
+       }
+# endif
+
+       return box;
+}
+
+void
+ssh_sandbox_child(struct ssh_sandbox *box)
+{
+       if (setppriv(PRIV_SET, PRIV_PERMITTED, box->pset) != 0 ||
+           setppriv(PRIV_SET, PRIV_LIMIT, box->pset) != 0 ||
+           setppriv(PRIV_SET, PRIV_INHERITABLE, box->pset) != 0)
+               fatal("setppriv: %s", strerror(errno));
+}
+
+void
+ssh_sandbox_parent_finish(struct ssh_sandbox *box)
+{
+       priv_freeset(box->pset);
+       box->pset = NULL;
+       free(box);
+}
+
+void
+ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid)
+{
+       /* Nothing to do here */
+}
+
+#endif /* SANDBOX_SOLARIS */
index 3830ed1..b4d8d04 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sandbox-systrace.c,v 1.17 2015/07/27 16:29:23 guenther Exp $ */
+/* $OpenBSD: sandbox-systrace.c,v 1.18 2015/10/02 01:39:26 deraadt Exp $ */
 /*
  * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
  *
@@ -50,9 +50,17 @@ struct sandbox_policy {
 
 /* Permitted syscalls in preauth. Unlisted syscalls get SYSTR_POLICY_KILL */
 static const struct sandbox_policy preauth_policy[] = {
-       { SYS_clock_gettime, SYSTR_POLICY_PERMIT },
-       { SYS_close, SYSTR_POLICY_PERMIT },
        { SYS_exit, SYSTR_POLICY_PERMIT },
+#ifdef SYS_kbind
+       { SYS_kbind, SYSTR_POLICY_PERMIT },
+#endif
+
+       { SYS_getpid, SYSTR_POLICY_PERMIT },
+       { SYS_getpgid, SYSTR_POLICY_PERMIT },
+       { SYS_clock_gettime, SYSTR_POLICY_PERMIT },
+       { SYS_gettimeofday, SYSTR_POLICY_PERMIT },
+       { SYS_sigprocmask, SYSTR_POLICY_PERMIT },
+
 #ifdef SYS_getentropy
        /* OpenBSD 5.6 and newer use getentropy(2) to seed arc4random(3). */
        { SYS_getentropy, SYSTR_POLICY_PERMIT },
@@ -60,27 +68,25 @@ static const struct sandbox_policy preauth_policy[] = {
        /* Previous releases used sysctl(3)'s kern.arnd variable. */
        { SYS___sysctl, SYSTR_POLICY_PERMIT },
 #endif
-       { SYS_getpid, SYSTR_POLICY_PERMIT },
-       { SYS_getpgid, SYSTR_POLICY_PERMIT },
-       { SYS_gettimeofday, SYSTR_POLICY_PERMIT },
-#ifdef SYS_kbind
-       { SYS_kbind, SYSTR_POLICY_PERMIT },
+#ifdef SYS_sendsyslog
+       { SYS_sendsyslog, SYSTR_POLICY_PERMIT },
 #endif
+
        { SYS_madvise, SYSTR_POLICY_PERMIT },
        { SYS_mmap, SYSTR_POLICY_PERMIT },
        { SYS_mprotect, SYSTR_POLICY_PERMIT },
        { SYS_mquery, SYSTR_POLICY_PERMIT },
        { SYS_munmap, SYSTR_POLICY_PERMIT },
-       { SYS_open, SYSTR_POLICY_NEVER },
+
        { SYS_poll, SYSTR_POLICY_PERMIT },
-       { SYS_read, SYSTR_POLICY_PERMIT },
        { SYS_select, SYSTR_POLICY_PERMIT },
-#ifdef SYS_sendsyslog
-       { SYS_sendsyslog, SYSTR_POLICY_PERMIT },
-#endif
-       { SYS_shutdown, SYSTR_POLICY_PERMIT },
-       { SYS_sigprocmask, SYSTR_POLICY_PERMIT },
+       { SYS_read, SYSTR_POLICY_PERMIT },
        { SYS_write, SYSTR_POLICY_PERMIT },
+       { SYS_shutdown, SYSTR_POLICY_PERMIT },
+       { SYS_close, SYSTR_POLICY_PERMIT },
+
+       { SYS_open, SYSTR_POLICY_NEVER },
+
        { -1, -1 }
 };
 
diff --git a/scp.0 b/scp.0
index 8f41f61..46a0846 100644 (file)
--- a/scp.0
+++ b/scp.0
@@ -72,6 +72,7 @@ DESCRIPTION
                    CanonicalizeHostname
                    CanonicalizeMaxDots
                    CanonicalizePermittedCNAMEs
+                   CertificateFile
                    ChallengeResponseAuthentication
                    CheckHostIP
                    Cipher
@@ -93,8 +94,9 @@ DESCRIPTION
                    HostKeyAlgorithms
                    HostKeyAlias
                    HostName
-                   IdentityFile
                    IdentitiesOnly
+                   IdentityAgent
+                   IdentityFile
                    IPQoS
                    KbdInteractiveAuthentication
                    KbdInteractiveDevices
@@ -109,6 +111,7 @@ DESCRIPTION
                    PreferredAuthentications
                    Protocol
                    ProxyCommand
+                   ProxyJump
                    PubkeyAcceptedKeyTypes
                    PubkeyAuthentication
                    RekeyLimit
@@ -162,4 +165,4 @@ AUTHORS
      Timo Rinne <tri@iki.fi>
      Tatu Ylonen <ylo@cs.hut.fi>
 
-OpenBSD 5.8                      July 10, 2015                     OpenBSD 5.8
+OpenBSD 6.0                      July 16, 2016                     OpenBSD 6.0
diff --git a/scp.1 b/scp.1
index 279b0d7..4ae8777 100644 (file)
--- a/scp.1
+++ b/scp.1
@@ -8,9 +8,9 @@
 .\"
 .\" Created: Sun May  7 00:14:37 1995 ylo
 .\"
-.\" $OpenBSD: scp.1,v 1.67 2015/07/10 06:21:53 markus Exp $
+.\" $OpenBSD: scp.1,v 1.71 2016/07/16 06:57:55 jmc Exp $
 .\"
-.Dd $Mdocdate: July 10 2015 $
+.Dd $Mdocdate: July 16 2016 $
 .Dt SCP 1
 .Os
 .Sh NAME
@@ -133,6 +133,7 @@ For full details of the options listed below, and their possible values, see
 .It CanonicalizeHostname
 .It CanonicalizeMaxDots
 .It CanonicalizePermittedCNAMEs
+.It CertificateFile
 .It ChallengeResponseAuthentication
 .It CheckHostIP
 .It Cipher
@@ -154,8 +155,9 @@ For full details of the options listed below, and their possible values, see
 .It HostKeyAlgorithms
 .It HostKeyAlias
 .It HostName
-.It IdentityFile
 .It IdentitiesOnly
+.It IdentityAgent
+.It IdentityFile
 .It IPQoS
 .It KbdInteractiveAuthentication
 .It KbdInteractiveDevices
@@ -170,6 +172,7 @@ For full details of the options listed below, and their possible values, see
 .It PreferredAuthentications
 .It Protocol
 .It ProxyCommand
+.It ProxyJump
 .It PubkeyAcceptedKeyTypes
 .It PubkeyAuthentication
 .It RekeyLimit
diff --git a/scp.c b/scp.c
index 593fe89..b4db851 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.182 2015/04/24 01:36:00 deraadt Exp $ */
+/* $OpenBSD: scp.c,v 1.187 2016/09/12 01:22:38 deraadt Exp $ */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -74,7 +74,6 @@
 #include "includes.h"
 
 #include <sys/types.h>
-#include <sys/param.h>
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
@@ -96,6 +95,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
+#include <locale.h>
 #include <pwd.h>
 #include <signal.h>
 #include <stdarg.h>
 #include "log.h"
 #include "misc.h"
 #include "progressmeter.h"
+#include "utf8.h"
 
 extern char *__progname;
 
@@ -191,7 +192,7 @@ do_local_cmd(arglist *a)
        if (verbose_mode) {
                fprintf(stderr, "Executing:");
                for (i = 0; i < a->num; i++)
-                       fprintf(stderr, " %s", a->list[i]);
+                       fmprintf(stderr, " %s", a->list[i]);
                fprintf(stderr, "\n");
        }
        if ((pid = fork()) == -1)
@@ -232,7 +233,7 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout)
        int pin[2], pout[2], reserved[2];
 
        if (verbose_mode)
-               fprintf(stderr,
+               fmprintf(stderr,
                    "Executing: program %s host %s, user %s, command %s\n",
                    ssh_program, host,
                    remuser ? remuser : "(unspecified)", cmd);
@@ -307,7 +308,7 @@ do_cmd2(char *host, char *remuser, char *cmd, int fdin, int fdout)
        int status;
 
        if (verbose_mode)
-               fprintf(stderr,
+               fmprintf(stderr,
                    "Executing: 2nd program %s host %s, user %s, command %s\n",
                    ssh_program, host,
                    remuser ? remuser : "(unspecified)", cmd);
@@ -378,8 +379,10 @@ main(int argc, char **argv)
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
        sanitise_stdfd();
 
+       msetlocale();
+
        /* Copy argv, because we modify it */
-       newargv = xcalloc(MAX(argc + 1, 1), sizeof(*newargv));
+       newargv = xcalloc(MAXIMUM(argc + 1, 1), sizeof(*newargv));
        for (n = 0; n < argc; n++)
                newargv[n] = xstrdup(argv[n]);
        argv = newargv;
@@ -484,6 +487,16 @@ main(int argc, char **argv)
        if (!isatty(STDOUT_FILENO))
                showprogress = 0;
 
+       if (pflag) {
+               /* Cannot pledge: -p allows setuid/setgid files... */
+       } else {
+               if (pledge("stdio rpath wpath cpath fattr tty proc exec",
+                   NULL) == -1) {
+                       perror("pledge");
+                       exit(1);
+               }
+       }
+
        remin = STDIN_FILENO;
        remout = STDOUT_FILENO;
 
@@ -800,9 +813,8 @@ syserr:                     run_err("%s: %s", name, strerror(errno));
                snprintf(buf, sizeof buf, "C%04o %lld %s\n",
                    (u_int) (stb.st_mode & FILEMODEMASK),
                    (long long)stb.st_size, last);
-               if (verbose_mode) {
-                       fprintf(stderr, "Sending file modes: %s", buf);
-               }
+               if (verbose_mode)
+                       fmprintf(stderr, "Sending file modes: %s", buf);
                (void) atomicio(vwrite, remout, buf, strlen(buf));
                if (response() < 0)
                        goto next;
@@ -838,8 +850,6 @@ next:                       if (fd != -1) {
                                haderr = errno;
                }
                unset_nonblock(remout);
-               if (showprogress)
-                       stop_progress_meter();
 
                if (fd != -1) {
                        if (close(fd) < 0 && !haderr)
@@ -851,6 +861,8 @@ next:                       if (fd != -1) {
                else
                        run_err("%s: %s", name, strerror(haderr));
                (void) response();
+               if (showprogress)
+                       stop_progress_meter();
        }
 }
 
@@ -866,7 +878,7 @@ rsource(char *name, struct stat *statp)
                return;
        }
        last = strrchr(name, '/');
-       if (last == 0)
+       if (last == NULL)
                last = name;
        else
                last++;
@@ -879,7 +891,7 @@ rsource(char *name, struct stat *statp)
        (void) snprintf(path, sizeof path, "D%04o %d %.1024s\n",
            (u_int) (statp->st_mode & FILEMODEMASK), 0, last);
        if (verbose_mode)
-               fprintf(stderr, "Entering directory: %s", path);
+               fmprintf(stderr, "Entering directory: %s", path);
        (void) atomicio(vwrite, remout, path, strlen(path));
        if (response() < 0) {
                closedir(dirp);
@@ -919,7 +931,7 @@ sink(int argc, char **argv)
        off_t size, statbytes;
        unsigned long long ull;
        int setimes, targisdir, wrerrno = 0;
-       char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];
+       char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048];
        struct timeval tv[2];
 
 #define        atime   tv[0]
@@ -954,12 +966,15 @@ sink(int argc, char **argv)
                } while (cp < &buf[sizeof(buf) - 1] && ch != '\n');
                *cp = 0;
                if (verbose_mode)
-                       fprintf(stderr, "Sink: %s", buf);
+                       fmprintf(stderr, "Sink: %s", buf);
 
                if (buf[0] == '\01' || buf[0] == '\02') {
-                       if (iamremote == 0)
+                       if (iamremote == 0) {
+                               (void) snmprintf(visbuf, sizeof(visbuf),
+                                   NULL, "%s", buf + 1);
                                (void) atomicio(vwrite, STDERR_FILENO,
-                                   buf + 1, strlen(buf + 1));
+                                   visbuf, strlen(visbuf));
+                       }
                        if (buf[0] == '\02')
                                exit(1);
                        ++errs;
@@ -1135,8 +1150,6 @@ bad:                      run_err("%s: %s", np, strerror(errno));
                        }
                }
                unset_nonblock(remin);
-               if (showprogress)
-                       stop_progress_meter();
                if (count != 0 && wrerr == NO &&
                    atomicio(vwrite, ofd, bp->buf, count) != count) {
                        wrerr = YES;
@@ -1175,6 +1188,8 @@ bad:                      run_err("%s: %s", np, strerror(errno));
                        wrerrno = errno;
                }
                (void) response();
+               if (showprogress)
+                       stop_progress_meter();
                if (setimes && wrerr == NO) {
                        setimes = 0;
                        if (utimes(np, tv) < 0) {
@@ -1202,7 +1217,7 @@ screwup:
 int
 response(void)
 {
-       char ch, *cp, resp, rbuf[2048];
+       char ch, *cp, resp, rbuf[2048], visbuf[2048];
 
        if (atomicio(read, remin, &resp, sizeof(resp)) != sizeof(resp))
                lostconn(0);
@@ -1222,8 +1237,13 @@ response(void)
                        *cp++ = ch;
                } while (cp < &rbuf[sizeof(rbuf) - 1] && ch != '\n');
 
-               if (!iamremote)
-                       (void) atomicio(vwrite, STDERR_FILENO, rbuf, cp - rbuf);
+               if (!iamremote) {
+                       cp[-1] = '\0';
+                       (void) snmprintf(visbuf, sizeof(visbuf),
+                           NULL, "%s\n", rbuf);
+                       (void) atomicio(vwrite, STDERR_FILENO,
+                           visbuf, strlen(visbuf));
+               }
                ++errs;
                if (resp == 1)
                        return (-1);
@@ -1261,7 +1281,7 @@ run_err(const char *fmt,...)
 
        if (!iamremote) {
                va_start(ap, fmt);
-               vfprintf(stderr, fmt, ap);
+               vfmprintf(stderr, fmt, ap);
                va_end(ap);
                fprintf(stderr, "\n");
        }
@@ -1307,7 +1327,7 @@ okname(char *cp0)
        } while (*++cp);
        return (1);
 
-bad:   fprintf(stderr, "%s: invalid user name\n", cp0);
+bad:   fmprintf(stderr, "%s: invalid user name\n", cp0);
        return (0);
 }
 
@@ -1322,7 +1342,7 @@ allocbuf(BUF *bp, int fd, int blksize)
                run_err("fstat: %s", strerror(errno));
                return (0);
        }
-       size = roundup(stb.st_blksize, blksize);
+       size = ROUNDUP(stb.st_blksize, blksize);
        if (size == 0)
                size = blksize;
 #else /* HAVE_STRUCT_STAT_ST_BLKSIZE */
index 1e31be3..07edd69 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $OpenBSD: servconf.c,v 1.280 2015/08/06 14:53:21 deraadt Exp $ */
+/* $OpenBSD: servconf.c,v 1.306 2017/03/14 07:19:07 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -90,9 +90,7 @@ initialize_server_options(ServerOptions *options)
        options->num_host_cert_files = 0;
        options->host_key_agent = NULL;
        options->pid_file = NULL;
-       options->server_key_bits = -1;
        options->login_grace_time = -1;
-       options->key_regeneration_time = -1;
        options->permit_root_login = PERMIT_NOT_SET;
        options->ignore_rhosts = -1;
        options->ignore_user_known_hosts = -1;
@@ -108,12 +106,10 @@ initialize_server_options(ServerOptions *options)
        options->tcp_keep_alive = -1;
        options->log_facility = SYSLOG_FACILITY_NOT_SET;
        options->log_level = SYSLOG_LEVEL_NOT_SET;
-       options->rhosts_rsa_authentication = -1;
        options->hostbased_authentication = -1;
        options->hostbased_uses_name_from_packet_only = -1;
        options->hostbased_key_types = NULL;
        options->hostkeyalgorithms = NULL;
-       options->rsa_authentication = -1;
        options->pubkey_authentication = -1;
        options->pubkey_key_types = NULL;
        options->kerberos_authentication = -1;
@@ -128,7 +124,6 @@ initialize_server_options(ServerOptions *options)
        options->challenge_response_authentication = -1;
        options->permit_empty_passwd = -1;
        options->permit_user_env = -1;
-       options->use_login = -1;
        options->compression = -1;
        options->rekey_limit = -1;
        options->rekey_interval = -1;
@@ -142,7 +137,6 @@ initialize_server_options(ServerOptions *options)
        options->ciphers = NULL;
        options->macs = NULL;
        options->kex_algorithms = NULL;
-       options->protocol = SSH_PROTO_UNKNOWN;
        options->fwd_opts.gateway_ports = -1;
        options->fwd_opts.streamlocal_bind_mask = (mode_t)-1;
        options->fwd_opts.streamlocal_bind_unlink = -1;
@@ -173,6 +167,7 @@ initialize_server_options(ServerOptions *options)
        options->ip_qos_bulk = -1;
        options->version_addendum = NULL;
        options->fingerprint_hash = -1;
+       options->disable_forwarding = -1;
 }
 
 /* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */
@@ -182,6 +177,20 @@ option_clear_or_none(const char *o)
        return o == NULL || strcasecmp(o, "none") == 0;
 }
 
+static void
+assemble_algorithms(ServerOptions *o)
+{
+       if (kex_assemble_names(KEX_SERVER_ENCRYPT, &o->ciphers) != 0 ||
+           kex_assemble_names(KEX_SERVER_MAC, &o->macs) != 0 ||
+           kex_assemble_names(KEX_SERVER_KEX, &o->kex_algorithms) != 0 ||
+           kex_assemble_names(KEX_DEFAULT_PK_ALG,
+           &o->hostkeyalgorithms) != 0 ||
+           kex_assemble_names(KEX_DEFAULT_PK_ALG,
+           &o->hostbased_key_types) != 0 ||
+           kex_assemble_names(KEX_DEFAULT_PK_ALG, &o->pubkey_key_types) != 0)
+               fatal("kex_assemble_names failed");
+}
+
 void
 fill_default_server_options(ServerOptions *options)
 {
@@ -192,25 +201,18 @@ fill_default_server_options(ServerOptions *options)
                options->use_pam = 0;
 
        /* Standard Options */
-       if (options->protocol == SSH_PROTO_UNKNOWN)
-               options->protocol = SSH_PROTO_2;
        if (options->num_host_key_files == 0) {
                /* fill default hostkeys for protocols */
-               if (options->protocol & SSH_PROTO_1)
-                       options->host_key_files[options->num_host_key_files++] =
-                           _PATH_HOST_KEY_FILE;
-               if (options->protocol & SSH_PROTO_2) {
-                       options->host_key_files[options->num_host_key_files++] =
-                           _PATH_HOST_RSA_KEY_FILE;
-                       options->host_key_files[options->num_host_key_files++] =
-                           _PATH_HOST_DSA_KEY_FILE;
+               options->host_key_files[options->num_host_key_files++] =
+                   _PATH_HOST_RSA_KEY_FILE;
+               options->host_key_files[options->num_host_key_files++] =
+                   _PATH_HOST_DSA_KEY_FILE;
 #ifdef OPENSSL_HAS_ECC
-                       options->host_key_files[options->num_host_key_files++] =
-                           _PATH_HOST_ECDSA_KEY_FILE;
+               options->host_key_files[options->num_host_key_files++] =
+                   _PATH_HOST_ECDSA_KEY_FILE;
 #endif
-                       options->host_key_files[options->num_host_key_files++] =
-                           _PATH_HOST_ED25519_KEY_FILE;
-               }
+               options->host_key_files[options->num_host_key_files++] =
+                   _PATH_HOST_ED25519_KEY_FILE;
        }
        /* No certificates by default */
        if (options->num_ports == 0)
@@ -221,12 +223,8 @@ fill_default_server_options(ServerOptions *options)
                add_listen_addr(options, NULL, 0);
        if (options->pid_file == NULL)
                options->pid_file = xstrdup(_PATH_SSH_DAEMON_PID_FILE);
-       if (options->server_key_bits == -1)
-               options->server_key_bits = 1024;
        if (options->login_grace_time == -1)
                options->login_grace_time = 120;
-       if (options->key_regeneration_time == -1)
-               options->key_regeneration_time = 3600;
        if (options->permit_root_login == PERMIT_NOT_SET)
                options->permit_root_login = PERMIT_NO_PASSWD;
        if (options->ignore_rhosts == -1)
@@ -257,16 +255,10 @@ fill_default_server_options(ServerOptions *options)
                options->log_facility = SYSLOG_FACILITY_AUTH;
        if (options->log_level == SYSLOG_LEVEL_NOT_SET)
                options->log_level = SYSLOG_LEVEL_INFO;
-       if (options->rhosts_rsa_authentication == -1)
-               options->rhosts_rsa_authentication = 0;
        if (options->hostbased_authentication == -1)
                options->hostbased_authentication = 0;
        if (options->hostbased_uses_name_from_packet_only == -1)
                options->hostbased_uses_name_from_packet_only = 0;
-       if (options->hostkeyalgorithms == NULL)
-               options->hostkeyalgorithms = xstrdup(KEX_DEFAULT_PK_ALG);
-       if (options->rsa_authentication == -1)
-               options->rsa_authentication = 1;
        if (options->pubkey_authentication == -1)
                options->pubkey_authentication = 1;
        if (options->kerberos_authentication == -1)
@@ -282,7 +274,7 @@ fill_default_server_options(ServerOptions *options)
        if (options->gss_cleanup_creds == -1)
                options->gss_cleanup_creds = 1;
        if (options->gss_strict_acceptor == -1)
-               options->gss_strict_acceptor = 0;
+               options->gss_strict_acceptor = 1;
        if (options->password_authentication == -1)
                options->password_authentication = 1;
        if (options->kbd_interactive_authentication == -1)
@@ -293,8 +285,6 @@ fill_default_server_options(ServerOptions *options)
                options->permit_empty_passwd = 0;
        if (options->permit_user_env == -1)
                options->permit_user_env = 0;
-       if (options->use_login == -1)
-               options->use_login = 0;
        if (options->compression == -1)
                options->compression = COMP_DELAYED;
        if (options->rekey_limit == -1)
@@ -345,19 +335,14 @@ fill_default_server_options(ServerOptions *options)
                options->fwd_opts.streamlocal_bind_unlink = 0;
        if (options->fingerprint_hash == -1)
                options->fingerprint_hash = SSH_FP_HASH_DEFAULT;
+       if (options->disable_forwarding == -1)
+               options->disable_forwarding = 0;
 
-       if (kex_assemble_names(KEX_SERVER_ENCRYPT, &options->ciphers) != 0 ||
-           kex_assemble_names(KEX_SERVER_MAC, &options->macs) != 0 ||
-           kex_assemble_names(KEX_SERVER_KEX, &options->kex_algorithms) != 0 ||
-           kex_assemble_names(KEX_DEFAULT_PK_ALG,
-           &options->hostbased_key_types) != 0 ||
-           kex_assemble_names(KEX_DEFAULT_PK_ALG,
-           &options->pubkey_key_types) != 0)
-               fatal("%s: kex_assemble_names failed", __func__);
+       assemble_algorithms(options);
 
-       /* Turn privilege separation on by default */
+       /* Turn privilege separation and sandboxing on by default */
        if (use_privsep == -1)
-               use_privsep = PRIVSEP_NOSANDBOX;
+               use_privsep = PRIVSEP_ON;
 
 #define CLEAR_ON_NONE(v) \
        do { \
@@ -372,12 +357,22 @@ fill_default_server_options(ServerOptions *options)
        CLEAR_ON_NONE(options->trusted_user_ca_keys);
        CLEAR_ON_NONE(options->revoked_keys_file);
        CLEAR_ON_NONE(options->authorized_principals_file);
+       CLEAR_ON_NONE(options->adm_forced_command);
+       CLEAR_ON_NONE(options->chroot_directory);
        for (i = 0; i < options->num_host_key_files; i++)
                CLEAR_ON_NONE(options->host_key_files[i]);
        for (i = 0; i < options->num_host_cert_files; i++)
                CLEAR_ON_NONE(options->host_cert_files[i]);
 #undef CLEAR_ON_NONE
 
+       /* Similar handling for AuthenticationMethods=any */
+       if (options->num_auth_methods == 1 &&
+           strcmp(options->auth_methods[0], "any") == 0) {
+               free(options->auth_methods[0]);
+               options->auth_methods[0] = NULL;
+               options->num_auth_methods = 0;
+       }
+
 #ifndef HAVE_MMAP
        if (use_privsep && options->compression == 1) {
                error("This platform does not support both privilege "
@@ -395,8 +390,8 @@ typedef enum {
        /* Portable-specific options */
        sUsePAM,
        /* Standard Options */
-       sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime,
-       sKeyRegenerationTime, sPermitRootLogin, sLogFacility, sLogLevel,
+       sPort, sHostKeyFile, sLoginGraceTime,
+       sPermitRootLogin, sLogFacility, sLogLevel,
        sRhostsRSAAuthentication, sRSAAuthentication,
        sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup,
        sKerberosGetAFSToken,
@@ -406,9 +401,9 @@ typedef enum {
        sPrintMotd, sPrintLastLog, sIgnoreRhosts,
        sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
        sPermitTTY, sStrictModes, sEmptyPasswd, sTCPKeepAlive,
-       sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression,
+       sPermitUserEnvironment, sAllowTcpForwarding, sCompression,
        sRekeyLimit, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
-       sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
+       sIgnoreUserKnownHosts, sCiphers, sMacs, sPidFile,
        sGatewayPorts, sPubkeyAuthentication, sPubkeyAcceptedKeyTypes,
        sXAuthLocation, sSubsystem, sMaxStartups, sMaxAuthTries, sMaxSessions,
        sBanner, sUseDNS, sHostbasedAuthentication,
@@ -426,8 +421,8 @@ typedef enum {
        sAuthorizedKeysCommand, sAuthorizedKeysCommandUser,
        sAuthenticationMethods, sHostKeyAgent, sPermitUserRC,
        sStreamLocalBindMask, sStreamLocalBindUnlink,
-       sAllowStreamLocalForwarding, sFingerprintHash,
-       sDeprecated, sUnsupported
+       sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding,
+       sDeprecated, sIgnore, sUnsupported
 } ServerOpCodes;
 
 #define SSHCFG_GLOBAL  0x01    /* allowed in main section of sshd_config */
@@ -453,19 +448,19 @@ static struct {
        { "hostdsakey", sHostKeyFile, SSHCFG_GLOBAL },          /* alias */
        { "hostkeyagent", sHostKeyAgent, SSHCFG_GLOBAL },
        { "pidfile", sPidFile, SSHCFG_GLOBAL },
-       { "serverkeybits", sServerKeyBits, SSHCFG_GLOBAL },
+       { "serverkeybits", sDeprecated, SSHCFG_GLOBAL },
        { "logingracetime", sLoginGraceTime, SSHCFG_GLOBAL },
-       { "keyregenerationinterval", sKeyRegenerationTime, SSHCFG_GLOBAL },
+       { "keyregenerationinterval", sDeprecated, SSHCFG_GLOBAL },
        { "permitrootlogin", sPermitRootLogin, SSHCFG_ALL },
        { "syslogfacility", sLogFacility, SSHCFG_GLOBAL },
        { "loglevel", sLogLevel, SSHCFG_GLOBAL },
        { "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL },
-       { "rhostsrsaauthentication", sRhostsRSAAuthentication, SSHCFG_ALL },
+       { "rhostsrsaauthentication", sDeprecated, SSHCFG_ALL },
        { "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_ALL },
        { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly, SSHCFG_ALL },
        { "hostbasedacceptedkeytypes", sHostbasedAcceptedKeyTypes, SSHCFG_ALL },
        { "hostkeyalgorithms", sHostKeyAlgorithms, SSHCFG_GLOBAL },
-       { "rsaauthentication", sRSAAuthentication, SSHCFG_ALL },
+       { "rsaauthentication", sDeprecated, SSHCFG_ALL },
        { "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_ALL },
        { "pubkeyacceptedkeytypes", sPubkeyAcceptedKeyTypes, SSHCFG_ALL },
        { "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, /* alias */
@@ -503,7 +498,11 @@ static struct {
        { "listenaddress", sListenAddress, SSHCFG_GLOBAL },
        { "addressfamily", sAddressFamily, SSHCFG_GLOBAL },
        { "printmotd", sPrintMotd, SSHCFG_GLOBAL },
+#ifdef DISABLE_LASTLOG
+       { "printlastlog", sUnsupported, SSHCFG_GLOBAL },
+#else
        { "printlastlog", sPrintLastLog, SSHCFG_GLOBAL },
+#endif
        { "ignorerhosts", sIgnoreRhosts, SSHCFG_GLOBAL },
        { "ignoreuserknownhosts", sIgnoreUserKnownHosts, SSHCFG_GLOBAL },
        { "x11forwarding", sX11Forwarding, SSHCFG_ALL },
@@ -513,7 +512,7 @@ static struct {
        { "strictmodes", sStrictModes, SSHCFG_GLOBAL },
        { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL },
        { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL },
-       { "uselogin", sUseLogin, SSHCFG_GLOBAL },
+       { "uselogin", sDeprecated, SSHCFG_GLOBAL },
        { "compression", sCompression, SSHCFG_GLOBAL },
        { "rekeylimit", sRekeyLimit, SSHCFG_ALL },
        { "tcpkeepalive", sTCPKeepAlive, SSHCFG_GLOBAL },
@@ -526,7 +525,7 @@ static struct {
        { "denygroups", sDenyGroups, SSHCFG_ALL },
        { "ciphers", sCiphers, SSHCFG_GLOBAL },
        { "macs", sMacs, SSHCFG_GLOBAL },
-       { "protocol", sProtocol, SSHCFG_GLOBAL },
+       { "protocol", sIgnore, SSHCFG_GLOBAL },
        { "gatewayports", sGatewayPorts, SSHCFG_ALL },
        { "subsystem", sSubsystem, SSHCFG_GLOBAL },
        { "maxstartups", sMaxStartups, SSHCFG_GLOBAL },
@@ -536,11 +535,11 @@ static struct {
        { "usedns", sUseDNS, SSHCFG_GLOBAL },
        { "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL },
        { "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL },
-       { "clientaliveinterval", sClientAliveInterval, SSHCFG_GLOBAL },
-       { "clientalivecountmax", sClientAliveCountMax, SSHCFG_GLOBAL },
+       { "clientaliveinterval", sClientAliveInterval, SSHCFG_ALL },
+       { "clientalivecountmax", sClientAliveCountMax, SSHCFG_ALL },
        { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_ALL },
        { "authorizedkeysfile2", sDeprecated, SSHCFG_ALL },
-       { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL},
+       { "useprivilegeseparation", sDeprecated, SSHCFG_GLOBAL},
        { "acceptenv", sAcceptEnv, SSHCFG_ALL },
        { "permittunnel", sPermitTunnel, SSHCFG_ALL },
        { "permittty", sPermitTTY, SSHCFG_ALL },
@@ -565,6 +564,7 @@ static struct {
        { "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL },
        { "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL },
        { "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL },
+       { "disableforwarding", sDisableForwarding, SSHCFG_ALL },
        { NULL, sBadOption, 0 }
 };
 
@@ -699,14 +699,15 @@ process_queued_listen_addrs(ServerOptions *options)
 struct connection_info *
 get_connection_info(int populate, int use_dns)
 {
+       struct ssh *ssh = active_state; /* XXX */
        static struct connection_info ci;
 
        if (!populate)
                return &ci;
-       ci.host = get_canonical_hostname(use_dns);
-       ci.address = get_remote_ipaddr();
-       ci.laddress = get_local_ipaddr(packet_get_connection_in());
-       ci.lport = get_local_port();
+       ci.host = auth_get_canonical_hostname(ssh, use_dns);
+       ci.address = ssh_remote_ipaddr(ssh);
+       ci.laddress = ssh_local_ipaddr(ssh);
+       ci.lport = ssh_local_port(ssh);
        return &ci;
 }
 
@@ -726,7 +727,7 @@ get_connection_info(int populate, int use_dns)
  * options set are copied into the main server config.
  *
  * Potential additions/improvements:
- *  - Add Match support for pre-kex directives, eg Protocol, Ciphers.
+ *  - Add Match support for pre-kex directives, eg. Ciphers.
  *
  *  - Add a Tag directive (idea from David Leonard) ala pf, eg:
  *     Match Address 192.168.0.*
@@ -927,8 +928,8 @@ static const struct multistate multistate_permitrootlogin[] = {
        { NULL, -1 }
 };
 static const struct multistate multistate_compression[] = {
+       { "yes",                        COMP_DELAYED },
        { "delayed",                    COMP_DELAYED },
-       { "yes",                        COMP_ZLIB },
        { "no",                         COMP_NONE },
        { NULL, -1 }
 };
@@ -969,6 +970,15 @@ process_server_config_line(ServerOptions *options, char *line,
        long long val64;
        const struct multistate *multistate_ptr;
 
+       /* Strip trailing whitespace. Allow \f (form feed) at EOL only */
+       if ((len = strlen(line)) == 0)
+               return 0;
+       for (len--; len > 0; len--) {
+               if (strchr(WHITESPACE "\f", line[len]) == NULL)
+                       break;
+               line[len] = '\0';
+       }
+
        cp = line;
        if ((arg = strdelim(&cp)) == NULL)
                return 0;
@@ -1024,18 +1034,6 @@ process_server_config_line(ServerOptions *options, char *line,
                            filename, linenum);
                break;
 
-       case sServerKeyBits:
-               intptr = &options->server_key_bits;
- parse_int:
-               arg = strdelim(&cp);
-               if (!arg || *arg == '\0')
-                       fatal("%s line %d: missing integer value.",
-                           filename, linenum);
-               value = atoi(arg);
-               if (*activep && *intptr == -1)
-                       *intptr = value;
-               break;
-
        case sLoginGraceTime:
                intptr = &options->login_grace_time;
  parse_time:
@@ -1050,10 +1048,6 @@ process_server_config_line(ServerOptions *options, char *line,
                        *intptr = value;
                break;
 
-       case sKeyRegenerationTime:
-               intptr = &options->key_regeneration_time;
-               goto parse_time;
-
        case sListenAddress:
                arg = strdelim(&cp);
                if (arg == NULL || *arg == '\0')
@@ -1139,7 +1133,6 @@ process_server_config_line(ServerOptions *options, char *line,
                            MAX_HOSTCERTS);
                charptr = &options->host_cert_files[*intptr];
                goto parse_filename;
-               break;
 
        case sPidFile:
                charptr = &options->pid_file;
@@ -1173,10 +1166,6 @@ process_server_config_line(ServerOptions *options, char *line,
                intptr = &options->ignore_user_known_hosts;
                goto parse_flag;
 
-       case sRhostsRSAAuthentication:
-               intptr = &options->rhosts_rsa_authentication;
-               goto parse_flag;
-
        case sHostbasedAuthentication:
                intptr = &options->hostbased_authentication;
                goto parse_flag;
@@ -1192,7 +1181,8 @@ process_server_config_line(ServerOptions *options, char *line,
                if (!arg || *arg == '\0')
                        fatal("%s line %d: Missing argument.",
                            filename, linenum);
-               if (!sshkey_names_valid2(*arg == '+' ? arg + 1 : arg, 1))
+               if (*arg != '-' &&
+                   !sshkey_names_valid2(*arg == '+' ? arg + 1 : arg, 1))
                        fatal("%s line %d: Bad key types '%s'.",
                            filename, linenum, arg ? arg : "<NONE>");
                if (*activep && *charptr == NULL)
@@ -1203,10 +1193,6 @@ process_server_config_line(ServerOptions *options, char *line,
                charptr = &options->hostkeyalgorithms;
                goto parse_keytypes;
 
-       case sRSAAuthentication:
-               intptr = &options->rsa_authentication;
-               goto parse_flag;
-
        case sPubkeyAuthentication:
                intptr = &options->pubkey_authentication;
                goto parse_flag;
@@ -1269,7 +1255,15 @@ process_server_config_line(ServerOptions *options, char *line,
 
        case sX11DisplayOffset:
                intptr = &options->x11_display_offset;
-               goto parse_int;
+ parse_int:
+               arg = strdelim(&cp);
+               if (!arg || *arg == '\0')
+                       fatal("%s line %d: missing integer value.",
+                           filename, linenum);
+               value = atoi(arg);
+               if (*activep && *intptr == -1)
+                       *intptr = value;
+               break;
 
        case sX11UseLocalhost:
                intptr = &options->x11_use_localhost;
@@ -1303,10 +1297,6 @@ process_server_config_line(ServerOptions *options, char *line,
                intptr = &options->permit_user_env;
                goto parse_flag;
 
-       case sUseLogin:
-               intptr = &options->use_login;
-               goto parse_flag;
-
        case sCompression:
                intptr = &options->compression;
                multistate_ptr = multistate_compression;
@@ -1323,16 +1313,12 @@ process_server_config_line(ServerOptions *options, char *line,
                        if (scan_scaled(arg, &val64) == -1)
                                fatal("%.200s line %d: Bad number '%s': %s",
                                    filename, linenum, arg, strerror(errno));
-                       /* check for too-large or too-small limits */
-                       if (val64 > UINT_MAX)
-                               fatal("%.200s line %d: RekeyLimit too large",
-                                   filename, linenum);
                        if (val64 != 0 && val64 < 16)
                                fatal("%.200s line %d: RekeyLimit too small",
                                    filename, linenum);
                }
                if (*activep && options->rekey_limit == -1)
-                       options->rekey_limit = (u_int32_t)val64;
+                       options->rekey_limit = val64;
                if (cp != NULL) { /* optional rekey interval present */
                        if (strcmp(cp, "none") == 0) {
                                (void)strdelim(&cp);    /* discard */
@@ -1388,16 +1374,18 @@ process_server_config_line(ServerOptions *options, char *line,
                intptr = &options->allow_agent_forwarding;
                goto parse_flag;
 
-       case sUsePrivilegeSeparation:
-               intptr = &use_privsep;
-               multistate_ptr = multistate_privsep;
-               goto parse_multistate;
+       case sDisableForwarding:
+               intptr = &options->disable_forwarding;
+               goto parse_flag;
 
        case sAllowUsers:
                while ((arg = strdelim(&cp)) && *arg != '\0') {
                        if (options->num_allow_users >= MAX_ALLOW_USERS)
                                fatal("%s line %d: too many allow users.",
                                    filename, linenum);
+                       if (match_user(NULL, NULL, NULL, arg) == -1)
+                               fatal("%s line %d: invalid AllowUsers pattern: "
+                                   "\"%.100s\"", filename, linenum, arg);
                        if (!*activep)
                                continue;
                        options->allow_users[options->num_allow_users++] =
@@ -1410,6 +1398,9 @@ process_server_config_line(ServerOptions *options, char *line,
                        if (options->num_deny_users >= MAX_DENY_USERS)
                                fatal("%s line %d: too many deny users.",
                                    filename, linenum);
+                       if (match_user(NULL, NULL, NULL, arg) == -1)
+                               fatal("%s line %d: invalid DenyUsers pattern: "
+                                   "\"%.100s\"", filename, linenum, arg);
                        if (!*activep)
                                continue;
                        options->deny_users[options->num_deny_users++] =
@@ -1445,7 +1436,7 @@ process_server_config_line(ServerOptions *options, char *line,
                arg = strdelim(&cp);
                if (!arg || *arg == '\0')
                        fatal("%s line %d: Missing argument.", filename, linenum);
-               if (!ciphers_valid(*arg == '+' ? arg + 1 : arg))
+               if (*arg != '-' && !ciphers_valid(*arg == '+' ? arg + 1 : arg))
                        fatal("%s line %d: Bad SSH2 cipher spec '%s'.",
                            filename, linenum, arg ? arg : "<NONE>");
                if (options->ciphers == NULL)
@@ -1456,7 +1447,7 @@ process_server_config_line(ServerOptions *options, char *line,
                arg = strdelim(&cp);
                if (!arg || *arg == '\0')
                        fatal("%s line %d: Missing argument.", filename, linenum);
-               if (!mac_valid(*arg == '+' ? arg + 1 : arg))
+               if (*arg != '-' && !mac_valid(*arg == '+' ? arg + 1 : arg))
                        fatal("%s line %d: Bad SSH2 mac spec '%s'.",
                            filename, linenum, arg ? arg : "<NONE>");
                if (options->macs == NULL)
@@ -1468,26 +1459,14 @@ process_server_config_line(ServerOptions *options, char *line,
                if (!arg || *arg == '\0')
                        fatal("%s line %d: Missing argument.",
                            filename, linenum);
-               if (!kex_names_valid(*arg == '+' ? arg + 1 : arg))
+               if (*arg != '-' &&
+                   !kex_names_valid(*arg == '+' ? arg + 1 : arg))
                        fatal("%s line %d: Bad SSH2 KexAlgorithms '%s'.",
                            filename, linenum, arg ? arg : "<NONE>");
                if (options->kex_algorithms == NULL)
                        options->kex_algorithms = xstrdup(arg);
                break;
 
-       case sProtocol:
-               intptr = &options->protocol;
-               arg = strdelim(&cp);
-               if (!arg || *arg == '\0')
-                       fatal("%s line %d: Missing argument.", filename, linenum);
-               value = proto_spec(arg);
-               if (value == SSH_PROTO_UNKNOWN)
-                       fatal("%s line %d: Bad protocol spec '%s'.",
-                           filename, linenum, arg ? arg : "<NONE>");
-               if (*intptr == SSH_PROTO_UNKNOWN)
-                       *intptr = value;
-               break;
-
        case sSubsystem:
                if (options->num_subsystems >= MAX_SUBSYSTEMS) {
                        fatal("%s line %d: too many subsystems defined.",
@@ -1800,21 +1779,41 @@ process_server_config_line(ServerOptions *options, char *line,
 
        case sAuthenticationMethods:
                if (options->num_auth_methods == 0) {
+                       value = 0; /* seen "any" pseudo-method */
+                       value2 = 0; /* sucessfully parsed any method */
                        while ((arg = strdelim(&cp)) && *arg != '\0') {
                                if (options->num_auth_methods >=
                                    MAX_AUTH_METHODS)
                                        fatal("%s line %d: "
                                            "too many authentication methods.",
                                            filename, linenum);
-                               if (auth2_methods_valid(arg, 0) != 0)
+                               if (strcmp(arg, "any") == 0) {
+                                       if (options->num_auth_methods > 0) {
+                                               fatal("%s line %d: \"any\" "
+                                                   "must appear alone in "
+                                                   "AuthenticationMethods",
+                                                   filename, linenum);
+                                       }
+                                       value = 1;
+                               } else if (value) {
+                                       fatal("%s line %d: \"any\" must appear "
+                                           "alone in AuthenticationMethods",
+                                           filename, linenum);
+                               } else if (auth2_methods_valid(arg, 0) != 0) {
                                        fatal("%s line %d: invalid "
                                            "authentication method list.",
                                            filename, linenum);
+                               }
+                               value2 = 1;
                                if (!*activep)
                                        continue;
                                options->auth_methods[
                                    options->num_auth_methods++] = xstrdup(arg);
                        }
+                       if (value2 == 0) {
+                               fatal("%s line %d: no AuthenticationMethods "
+                                   "specified", filename, linenum);
+                       }
                }
                return 0;
 
@@ -1848,15 +1847,12 @@ process_server_config_line(ServerOptions *options, char *line,
                break;
 
        case sDeprecated:
-               logit("%s line %d: Deprecated option %s",
-                   filename, linenum, arg);
-               while (arg)
-                   arg = strdelim(&cp);
-               break;
-
+       case sIgnore:
        case sUnsupported:
-               logit("%s line %d: Unsupported option %s",
-                   filename, linenum, arg);
+               do_log2(opcode == sIgnore ?
+                   SYSLOG_LEVEL_DEBUG2 : SYSLOG_LEVEL_INFO,
+                   "%s line %d: %s option %s", filename, linenum,
+                   opcode == sUnsupported ? "Unsupported" : "Deprecated", arg);
                while (arg)
                    arg = strdelim(&cp);
                break;
@@ -1986,7 +1982,6 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
 
        M_CP_INTOPT(password_authentication);
        M_CP_INTOPT(gss_authentication);
-       M_CP_INTOPT(rsa_authentication);
        M_CP_INTOPT(pubkey_authentication);
        M_CP_INTOPT(kerberos_authentication);
        M_CP_INTOPT(hostbased_authentication);
@@ -1998,8 +1993,10 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
        M_CP_INTOPT(allow_tcp_forwarding);
        M_CP_INTOPT(allow_streamlocal_forwarding);
        M_CP_INTOPT(allow_agent_forwarding);
+       M_CP_INTOPT(disable_forwarding);
        M_CP_INTOPT(permit_tun);
        M_CP_INTOPT(fwd_opts.gateway_ports);
+       M_CP_INTOPT(fwd_opts.streamlocal_bind_unlink);
        M_CP_INTOPT(x11_display_offset);
        M_CP_INTOPT(x11_forwarding);
        M_CP_INTOPT(x11_use_localhost);
@@ -2007,11 +2004,23 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
        M_CP_INTOPT(permit_user_rc);
        M_CP_INTOPT(max_sessions);
        M_CP_INTOPT(max_authtries);
+       M_CP_INTOPT(client_alive_count_max);
+       M_CP_INTOPT(client_alive_interval);
        M_CP_INTOPT(ip_qos_interactive);
        M_CP_INTOPT(ip_qos_bulk);
        M_CP_INTOPT(rekey_limit);
        M_CP_INTOPT(rekey_interval);
 
+       /*
+        * The bind_mask is a mode_t that may be unsigned, so we can't use
+        * M_CP_INTOPT - it does a signed comparison that causes compiler
+        * warnings.
+        */
+       if (src->fwd_opts.streamlocal_bind_mask != (mode_t)-1) {
+               dst->fwd_opts.streamlocal_bind_mask =
+                   src->fwd_opts.streamlocal_bind_mask;
+       }
+
        /* M_CP_STROPT and M_CP_STRARRAYOPT should not appear before here */
 #define M_CP_STROPT(n) do {\
        if (src->n != NULL && dst->n != src->n) { \
@@ -2029,6 +2038,9 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
        /* See comment in servconf.h */
        COPY_MATCH_STRING_OPTS();
 
+       /* Arguments that accept '+...' need to be expanded */
+       assemble_algorithms(dst);
+
        /*
         * The only things that should be below this point are string options
         * which are only used after authentication.
@@ -2036,8 +2048,17 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
        if (preauth)
                return;
 
+       /* These options may be "none" to clear a global setting */
        M_CP_STROPT(adm_forced_command);
+       if (option_clear_or_none(dst->adm_forced_command)) {
+               free(dst->adm_forced_command);
+               dst->adm_forced_command = NULL;
+       }
        M_CP_STROPT(chroot_directory);
+       if (option_clear_or_none(dst->chroot_directory)) {
+               free(dst->chroot_directory);
+               dst->chroot_directory = NULL;
+       }
 }
 
 #undef M_CP_INTOPT
@@ -2053,7 +2074,8 @@ parse_server_config(ServerOptions *options, const char *filename, Buffer *conf,
 
        debug2("%s: config %s len %d", __func__, filename, buffer_len(conf));
 
-       obuf = cbuf = xstrdup(buffer_ptr(conf));
+       if ((obuf = cbuf = sshbuf_dup_string(conf)) == NULL)
+               fatal("%s: sshbuf_dup_string failed", __func__);
        active = connectinfo ? 0 : 1;
        linenum = 1;
        while ((cp = strsep(&cbuf, "\n")) != NULL) {
@@ -2094,25 +2116,12 @@ fmt_intarg(ServerOpCodes code, int val)
                return fmt_multistate_int(val, multistate_gatewayports);
        case sCompression:
                return fmt_multistate_int(val, multistate_compression);
-       case sUsePrivilegeSeparation:
-               return fmt_multistate_int(val, multistate_privsep);
        case sAllowTcpForwarding:
                return fmt_multistate_int(val, multistate_tcpfwd);
        case sAllowStreamLocalForwarding:
                return fmt_multistate_int(val, multistate_tcpfwd);
        case sFingerprintHash:
                return ssh_digest_alg_name(val);
-       case sProtocol:
-               switch (val) {
-               case SSH_PROTO_1:
-                       return "1";
-               case SSH_PROTO_2:
-                       return "2";
-               case (SSH_PROTO_1|SSH_PROTO_2):
-                       return "2,1";
-               default:
-                       return "UNKNOWN";
-               }
        default:
                switch (val) {
                case 0:
@@ -2157,8 +2166,6 @@ dump_cfg_fmtint(ServerOpCodes code, int val)
 static void
 dump_cfg_string(ServerOpCodes code, const char *val)
 {
-       if (val == NULL)
-               return;
        printf("%s %s\n", lookup_opcode_name(code),
            val == NULL ? "none" : val);
 }
@@ -2177,11 +2184,13 @@ dump_cfg_strarray_oneline(ServerOpCodes code, u_int count, char **vals)
 {
        u_int i;
 
-       if (count <= 0)
+       if (count <= 0 && code != sAuthenticationMethods)
                return;
        printf("%s", lookup_opcode_name(code));
        for (i = 0; i < count; i++)
                printf(" %s",  vals[i]);
+       if (code == sAuthenticationMethods && count == 0)
+               printf(" any");
        printf("\n");
 }
 
@@ -2197,7 +2206,6 @@ dump_config(ServerOptions *o)
        /* these are usually at the top of the config */
        for (i = 0; i < o->num_ports; i++)
                printf("port %d\n", o->ports[i]);
-       dump_cfg_fmtint(sProtocol, o->protocol);
        dump_cfg_fmtint(sAddressFamily, o->address_family);
 
        /*
@@ -2230,9 +2238,7 @@ dump_config(ServerOptions *o)
 #ifdef USE_PAM
        dump_cfg_fmtint(sUsePAM, o->use_pam);
 #endif
-       dump_cfg_int(sServerKeyBits, o->server_key_bits);
        dump_cfg_int(sLoginGraceTime, o->login_grace_time);
-       dump_cfg_int(sKeyRegenerationTime, o->key_regeneration_time);
        dump_cfg_int(sX11DisplayOffset, o->x11_display_offset);
        dump_cfg_int(sMaxAuthTries, o->max_authtries);
        dump_cfg_int(sMaxSessions, o->max_sessions);
@@ -2244,11 +2250,9 @@ dump_config(ServerOptions *o)
        dump_cfg_fmtint(sPermitRootLogin, o->permit_root_login);
        dump_cfg_fmtint(sIgnoreRhosts, o->ignore_rhosts);
        dump_cfg_fmtint(sIgnoreUserKnownHosts, o->ignore_user_known_hosts);
-       dump_cfg_fmtint(sRhostsRSAAuthentication, o->rhosts_rsa_authentication);
        dump_cfg_fmtint(sHostbasedAuthentication, o->hostbased_authentication);
        dump_cfg_fmtint(sHostbasedUsesNameFromPacketOnly,
            o->hostbased_uses_name_from_packet_only);
-       dump_cfg_fmtint(sRSAAuthentication, o->rsa_authentication);
        dump_cfg_fmtint(sPubkeyAuthentication, o->pubkey_authentication);
 #ifdef KRB5
        dump_cfg_fmtint(sKerberosAuthentication, o->kerberos_authentication);
@@ -2268,7 +2272,9 @@ dump_config(ServerOptions *o)
        dump_cfg_fmtint(sChallengeResponseAuthentication,
            o->challenge_response_authentication);
        dump_cfg_fmtint(sPrintMotd, o->print_motd);
+#ifndef DISABLE_LASTLOG
        dump_cfg_fmtint(sPrintLastLog, o->print_lastlog);
+#endif
        dump_cfg_fmtint(sX11Forwarding, o->x11_forwarding);
        dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost);
        dump_cfg_fmtint(sPermitTTY, o->permit_tty);
@@ -2277,14 +2283,14 @@ dump_config(ServerOptions *o)
        dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive);
        dump_cfg_fmtint(sEmptyPasswd, o->permit_empty_passwd);
        dump_cfg_fmtint(sPermitUserEnvironment, o->permit_user_env);
-       dump_cfg_fmtint(sUseLogin, o->use_login);
        dump_cfg_fmtint(sCompression, o->compression);
        dump_cfg_fmtint(sGatewayPorts, o->fwd_opts.gateway_ports);
        dump_cfg_fmtint(sUseDNS, o->use_dns);
        dump_cfg_fmtint(sAllowTcpForwarding, o->allow_tcp_forwarding);
        dump_cfg_fmtint(sAllowAgentForwarding, o->allow_agent_forwarding);
+       dump_cfg_fmtint(sDisableForwarding, o->disable_forwarding);
        dump_cfg_fmtint(sAllowStreamLocalForwarding, o->allow_streamlocal_forwarding);
-       dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep);
+       dump_cfg_fmtint(sStreamLocalBindUnlink, o->fwd_opts.streamlocal_bind_unlink);
        dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash);
 
        /* string arguments */
@@ -2352,7 +2358,7 @@ dump_config(ServerOptions *o)
        printf("ipqos %s ", iptos2str(o->ip_qos_interactive));
        printf("%s\n", iptos2str(o->ip_qos_bulk));
 
-       printf("rekeylimit %lld %d\n", (long long)o->rekey_limit,
+       printf("rekeylimit %llu %d\n", (unsigned long long)o->rekey_limit,
            o->rekey_interval);
 
        channel_print_adm_permitted_opens();
index f4137af..5853a97 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.h,v 1.120 2015/07/10 06:21:53 markus Exp $ */
+/* $OpenBSD: servconf.h,v 1.123 2016/11/30 03:00:05 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -69,10 +69,8 @@ typedef struct {
        int     num_host_cert_files;     /* Number of files for host certs. */
        char   *host_key_agent;          /* ssh-agent socket for host keys. */
        char   *pid_file;       /* Where to put our pid */
-       int     server_key_bits;/* Size of the server key. */
        int     login_grace_time;       /* Disconnect if no auth in this time
                                         * (sec). */
-       int     key_regeneration_time;  /* Server key lifetime (seconds). */
        int     permit_root_login;      /* PERMIT_*, see above */
        int     ignore_rhosts;  /* Ignore .rhosts and .shosts. */
        int     ignore_user_known_hosts;        /* Ignore ~/.ssh/known_hosts
@@ -93,17 +91,13 @@ typedef struct {
        char   *ciphers;        /* Supported SSH2 ciphers. */
        char   *macs;           /* Supported SSH2 macs. */
        char   *kex_algorithms; /* SSH2 kex methods in order of preference. */
-       int     protocol;       /* Supported protocol versions. */
        struct ForwardOptions fwd_opts; /* forwarding options */
        SyslogFacility log_facility;    /* Facility for system logging. */
        LogLevel log_level;     /* Level for system logging. */
-       int     rhosts_rsa_authentication;      /* If true, permit rhosts RSA
-                                                * authentication. */
        int     hostbased_authentication;       /* If true, permit ssh2 hostbased auth */
        int     hostbased_uses_name_from_packet_only; /* experimental */
        char   *hostbased_key_types;    /* Key types allowed for hostbased */
        char   *hostkeyalgorithms;      /* SSH2 server key types */
-       int     rsa_authentication;     /* If true, permit RSA authentication. */
        int     pubkey_authentication;  /* If true, permit ssh2 pubkey authentication. */
        char   *pubkey_key_types;       /* Key types allowed for public key */
        int     kerberos_authentication;        /* If true, permit Kerberos
@@ -127,11 +121,11 @@ typedef struct {
        int     permit_empty_passwd;    /* If false, do not permit empty
                                         * passwords. */
        int     permit_user_env;        /* If true, read ~/.ssh/environment */
-       int     use_login;      /* If true, login(1) is used */
        int     compression;    /* If true, compression is allowed */
        int     allow_tcp_forwarding; /* One of FORWARD_* */
        int     allow_streamlocal_forwarding; /* One of FORWARD_* */
        int     allow_agent_forwarding;
+       int     disable_forwarding;
        u_int num_allow_users;
        char   *allow_users[MAX_ALLOW_USERS];
        u_int num_deny_users;
index 306ac36..2976f55 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.178 2015/02/20 22:17:21 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.191 2017/02/01 02:59:09 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,7 +37,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN MAX */
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
@@ -67,7 +66,6 @@
 #include "sshpty.h"
 #include "channels.h"
 #include "compat.h"
-#include "ssh1.h"
 #include "ssh2.h"
 #include "key.h"
 #include "cipher.h"
@@ -78,7 +76,6 @@
 #include "dispatch.h"
 #include "auth-options.h"
 #include "serverloop.h"
-#include "roaming.h"
 #include "ssherr.h"
 
 extern ServerOptions options;
@@ -87,25 +84,6 @@ extern ServerOptions options;
 extern Authctxt *the_authctxt;
 extern int use_privsep;
 
-static Buffer stdin_buffer;    /* Buffer for stdin data. */
-static Buffer stdout_buffer;   /* Buffer for stdout data. */
-static Buffer stderr_buffer;   /* Buffer for stderr data. */
-static int fdin;               /* Descriptor for stdin (for writing) */
-static int fdout;              /* Descriptor for stdout (for reading);
-                                  May be same number as fdin. */
-static int fderr;              /* Descriptor for stderr.  May be -1. */
-static long stdin_bytes = 0;   /* Number of bytes written to stdin. */
-static long stdout_bytes = 0;  /* Number of stdout bytes sent to client. */
-static long stderr_bytes = 0;  /* Number of stderr bytes sent to client. */
-static long fdout_bytes = 0;   /* Number of stdout bytes read from program. */
-static int stdin_eof = 0;      /* EOF message received from client. */
-static int fdout_eof = 0;      /* EOF encountered reading from fdout. */
-static int fderr_eof = 0;      /* EOF encountered readung from fderr. */
-static int fdin_is_tty = 0;    /* fdin points to a tty. */
-static int connection_in;      /* Connection to client (input). */
-static int connection_out;     /* Connection to client (output). */
-static int connection_closed = 0;      /* Connection to client closed. */
-static u_int buffer_high;      /* "Soft" max buffer size. */
 static int no_more_sessions = 0; /* Disallow further sessions. */
 
 /*
@@ -186,64 +164,6 @@ sigterm_handler(int sig)
        received_sigterm = sig;
 }
 
-/*
- * Make packets from buffered stderr data, and buffer it for sending
- * to the client.
- */
-static void
-make_packets_from_stderr_data(void)
-{
-       u_int len;
-
-       /* Send buffered stderr data to the client. */
-       while (buffer_len(&stderr_buffer) > 0 &&
-           packet_not_very_much_data_to_write()) {
-               len = buffer_len(&stderr_buffer);
-               if (packet_is_interactive()) {
-                       if (len > 512)
-                               len = 512;
-               } else {
-                       /* Keep the packets at reasonable size. */
-                       if (len > packet_get_maxsize())
-                               len = packet_get_maxsize();
-               }
-               packet_start(SSH_SMSG_STDERR_DATA);
-               packet_put_string(buffer_ptr(&stderr_buffer), len);
-               packet_send();
-               buffer_consume(&stderr_buffer, len);
-               stderr_bytes += len;
-       }
-}
-
-/*
- * Make packets from buffered stdout data, and buffer it for sending to the
- * client.
- */
-static void
-make_packets_from_stdout_data(void)
-{
-       u_int len;
-
-       /* Send buffered stdout data to the client. */
-       while (buffer_len(&stdout_buffer) > 0 &&
-           packet_not_very_much_data_to_write()) {
-               len = buffer_len(&stdout_buffer);
-               if (packet_is_interactive()) {
-                       if (len > 512)
-                               len = 512;
-               } else {
-                       /* Keep the packets at reasonable size. */
-                       if (len > packet_get_maxsize())
-                               len = packet_get_maxsize();
-               }
-               packet_start(SSH_SMSG_STDOUT_DATA);
-               packet_put_string(buffer_ptr(&stdout_buffer), len);
-               packet_send();
-               buffer_consume(&stdout_buffer, len);
-               stdout_bytes += len;
-       }
-}
-
 static void
 client_alive_check(void)
 {
@@ -276,22 +196,22 @@ client_alive_check(void)
  * for the duration of the wait (0 = infinite).
  */
 static void
-wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
-    u_int *nallocp, u_int64_t max_time_milliseconds)
+wait_until_can_do_something(int connection_in, int connection_out,
+    fd_set **readsetp, fd_set **writesetp, int *maxfdp,
+    u_int *nallocp, u_int64_t max_time_ms)
 {
        struct timeval tv, *tvp;
        int ret;
        time_t minwait_secs = 0;
        int client_alive_scheduled = 0;
-       int program_alive_scheduled = 0;
 
        /* Allocate and update select() masks for channel descriptors. */
        channel_prepare_select(readsetp, writesetp, maxfdp, nallocp,
            &minwait_secs, 0);
 
+       /* XXX need proper deadline system for rekey/client alive */
        if (minwait_secs != 0)
-               max_time_milliseconds = MIN(max_time_milliseconds,
-                   (u_int)minwait_secs * 1000);
+               max_time_ms = MINIMUM(max_time_ms, (u_int)minwait_secs * 1000);
 
        /*
         * if using client_alive, set the max timeout accordingly,
@@ -301,45 +221,20 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
         * this could be randomized somewhat to make traffic
         * analysis more difficult, but we're not doing it yet.
         */
-       if (compat20 &&
-           max_time_milliseconds == 0 && options.client_alive_interval) {
+       if (options.client_alive_interval) {
+               uint64_t keepalive_ms =
+                   (uint64_t)options.client_alive_interval * 1000;
+
                client_alive_scheduled = 1;
-               max_time_milliseconds =
-                   (u_int64_t)options.client_alive_interval * 1000;
+               if (max_time_ms == 0 || max_time_ms > keepalive_ms)
+                       max_time_ms = keepalive_ms;
        }
 
-       if (compat20) {
 #if 0
-               /* wrong: bad condition XXX */
-               if (channel_not_very_much_buffered_data())
+       /* wrong: bad condition XXX */
+       if (channel_not_very_much_buffered_data())
 #endif
-               FD_SET(connection_in, *readsetp);
-       } else {
-               /*
-                * Read packets from the client unless we have too much
-                * buffered stdin or channel data.
-                */
-               if (buffer_len(&stdin_buffer) < buffer_high &&
-                   channel_not_very_much_buffered_data())
-                       FD_SET(connection_in, *readsetp);
-               /*
-                * If there is not too much data already buffered going to
-                * the client, try to get some more data from the program.
-                */
-               if (packet_not_very_much_data_to_write()) {
-                       program_alive_scheduled = child_terminated;
-                       if (!fdout_eof)
-                               FD_SET(fdout, *readsetp);
-                       if (!fderr_eof)
-                               FD_SET(fderr, *readsetp);
-               }
-               /*
-                * If we have buffered data, try to write some of that data
-                * to the program.
-                */
-               if (fdin != -1 && buffer_len(&stdin_buffer) > 0)
-                       FD_SET(fdin, *writesetp);
-       }
+       FD_SET(connection_in, *readsetp);
        notify_prepare(*readsetp);
 
        /*
@@ -354,14 +249,14 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
         * from it, then read as much as is available and exit.
         */
        if (child_terminated && packet_not_very_much_data_to_write())
-               if (max_time_milliseconds == 0 || client_alive_scheduled)
-                       max_time_milliseconds = 100;
+               if (max_time_ms == 0 || client_alive_scheduled)
+                       max_time_ms = 100;
 
-       if (max_time_milliseconds == 0)
+       if (max_time_ms == 0)
                tvp = NULL;
        else {
-               tv.tv_sec = max_time_milliseconds / 1000;
-               tv.tv_usec = 1000 * (max_time_milliseconds % 1000);
+               tv.tv_sec = max_time_ms / 1000;
+               tv.tv_usec = 1000 * (max_time_ms % 1000);
                tvp = &tv;
        }
 
@@ -373,16 +268,8 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
                memset(*writesetp, 0, *nallocp);
                if (errno != EINTR)
                        error("select: %.100s", strerror(errno));
-       } else {
-               if (ret == 0 && client_alive_scheduled)
-                       client_alive_check();
-               if (!compat20 && program_alive_scheduled && fdin_is_tty) {
-                       if (!fdout_eof)
-                               FD_SET(fdout, *readsetp);
-                       if (!fderr_eof)
-                               FD_SET(fderr, *readsetp);
-               }
-       }
+       } else if (ret == 0 && client_alive_scheduled)
+               client_alive_check();
 
        notify_done(*readsetp);
 }
@@ -391,31 +278,27 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
  * Processes input from the client and the program.  Input data is stored
  * in buffers and processed later.
  */
-static void
-process_input(fd_set *readset)
+static int
+process_input(fd_set *readset, int connection_in)
 {
+       struct ssh *ssh = active_state; /* XXX */
        int len;
        char buf[16384];
 
        /* Read and buffer any input data from the client. */
        if (FD_ISSET(connection_in, readset)) {
-               int cont = 0;
-               len = roaming_read(connection_in, buf, sizeof(buf), &cont);
+               len = read(connection_in, buf, sizeof(buf));
                if (len == 0) {
-                       if (cont)
-                               return;
-                       verbose("Connection closed by %.100s",
-                           get_remote_ipaddr());
-                       connection_closed = 1;
-                       if (compat20)
-                               return;
-                       cleanup_exit(255);
+                       verbose("Connection closed by %.100s port %d",
+                           ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
+                       return -1;
                } else if (len < 0) {
                        if (errno != EINTR && errno != EAGAIN &&
                            errno != EWOULDBLOCK) {
                                verbose("Read error from remote host "
-                                   "%.100s: %.100s",
-                                   get_remote_ipaddr(), strerror(errno));
+                                   "%.100s port %d: %.100s",
+                                   ssh_remote_ipaddr(ssh),
+                                   ssh_remote_port(ssh), strerror(errno));
                                cleanup_exit(255);
                        }
                } else {
@@ -423,381 +306,26 @@ process_input(fd_set *readset)
                        packet_process_incoming(buf, len);
                }
        }
-       if (compat20)
-               return;
-
-       /* Read and buffer any available stdout data from the program. */
-       if (!fdout_eof && FD_ISSET(fdout, readset)) {
-               errno = 0;
-               len = read(fdout, buf, sizeof(buf));
-               if (len < 0 && (errno == EINTR || ((errno == EAGAIN ||
-                   errno == EWOULDBLOCK) && !child_terminated))) {
-                       /* do nothing */
-#ifndef PTY_ZEROREAD
-               } else if (len <= 0) {
-#else
-               } else if ((!isatty(fdout) && len <= 0) ||
-                   (isatty(fdout) && (len < 0 || (len == 0 && errno != 0)))) {
-#endif
-                       fdout_eof = 1;
-               } else {
-                       buffer_append(&stdout_buffer, buf, len);
-                       fdout_bytes += len;
-               }
-       }
-       /* Read and buffer any available stderr data from the program. */
-       if (!fderr_eof && FD_ISSET(fderr, readset)) {
-               errno = 0;
-               len = read(fderr, buf, sizeof(buf));
-               if (len < 0 && (errno == EINTR || ((errno == EAGAIN ||
-                   errno == EWOULDBLOCK) && !child_terminated))) {
-                       /* do nothing */
-#ifndef PTY_ZEROREAD
-               } else if (len <= 0) {
-#else
-               } else if ((!isatty(fderr) && len <= 0) ||
-                   (isatty(fderr) && (len < 0 || (len == 0 && errno != 0)))) {
-#endif
-                       fderr_eof = 1;
-               } else {
-                       buffer_append(&stderr_buffer, buf, len);
-               }
-       }
+       return 0;
 }
 
 /*
  * Sends data from internal buffers to client program stdin.
  */
 static void
-process_output(fd_set *writeset)
+process_output(fd_set *writeset, int connection_out)
 {
-       struct termios tio;
-       u_char *data;
-       u_int dlen;
-       int len;
-
-       /* Write buffered data to program stdin. */
-       if (!compat20 && fdin != -1 && FD_ISSET(fdin, writeset)) {
-               data = buffer_ptr(&stdin_buffer);
-               dlen = buffer_len(&stdin_buffer);
-               len = write(fdin, data, dlen);
-               if (len < 0 &&
-                   (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)) {
-                       /* do nothing */
-               } else if (len <= 0) {
-                       if (fdin != fdout)
-                               close(fdin);
-                       else
-                               shutdown(fdin, SHUT_WR); /* We will no longer send. */
-                       fdin = -1;
-               } else {
-                       /* Successful write. */
-                       if (fdin_is_tty && dlen >= 1 && data[0] != '\r' &&
-                           tcgetattr(fdin, &tio) == 0 &&
-                           !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {
-                               /*
-                                * Simulate echo to reduce the impact of
-                                * traffic analysis
-                                */
-                               packet_send_ignore(len);
-                               packet_send();
-                       }
-                       /* Consume the data from the buffer. */
-                       buffer_consume(&stdin_buffer, len);
-                       /* Update the count of bytes written to the program. */
-                       stdin_bytes += len;
-               }
-       }
        /* Send any buffered packet data to the client. */
        if (FD_ISSET(connection_out, writeset))
                packet_write_poll();
 }
 
-/*
- * Wait until all buffered output has been sent to the client.
- * This is used when the program terminates.
- */
-static void
-drain_output(void)
-{
-       /* Send any buffered stdout data to the client. */
-       if (buffer_len(&stdout_buffer) > 0) {
-               packet_start(SSH_SMSG_STDOUT_DATA);
-               packet_put_string(buffer_ptr(&stdout_buffer),
-                                 buffer_len(&stdout_buffer));
-               packet_send();
-               /* Update the count of sent bytes. */
-               stdout_bytes += buffer_len(&stdout_buffer);
-       }
-       /* Send any buffered stderr data to the client. */
-       if (buffer_len(&stderr_buffer) > 0) {
-               packet_start(SSH_SMSG_STDERR_DATA);
-               packet_put_string(buffer_ptr(&stderr_buffer),
-                                 buffer_len(&stderr_buffer));
-               packet_send();
-               /* Update the count of sent bytes. */
-               stderr_bytes += buffer_len(&stderr_buffer);
-       }
-       /* Wait until all buffered data has been written to the client. */
-       packet_write_wait();
-}
-
 static void
 process_buffered_input_packets(void)
 {
        dispatch_run(DISPATCH_NONBLOCK, NULL, active_state);
 }
 
-/*
- * Performs the interactive session.  This handles data transmission between
- * the client and the program.  Note that the notion of stdin, stdout, and
- * stderr in this function is sort of reversed: this function writes to
- * stdin (of the child program), and reads from stdout and stderr (of the
- * child program).
- */
-void
-server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
-{
-       fd_set *readset = NULL, *writeset = NULL;
-       int max_fd = 0;
-       u_int nalloc = 0;
-       int wait_status;        /* Status returned by wait(). */
-       pid_t wait_pid;         /* pid returned by wait(). */
-       int waiting_termination = 0;    /* Have displayed waiting close message. */
-       u_int64_t max_time_milliseconds;
-       u_int previous_stdout_buffer_bytes;
-       u_int stdout_buffer_bytes;
-       int type;
-
-       debug("Entering interactive session.");
-
-       /* Initialize the SIGCHLD kludge. */
-       child_terminated = 0;
-       mysignal(SIGCHLD, sigchld_handler);
-
-       if (!use_privsep) {
-               signal(SIGTERM, sigterm_handler);
-               signal(SIGINT, sigterm_handler);
-               signal(SIGQUIT, sigterm_handler);
-       }
-
-       /* Initialize our global variables. */
-       fdin = fdin_arg;
-       fdout = fdout_arg;
-       fderr = fderr_arg;
-
-       /* nonblocking IO */
-       set_nonblock(fdin);
-       set_nonblock(fdout);
-       /* we don't have stderr for interactive terminal sessions, see below */
-       if (fderr != -1)
-               set_nonblock(fderr);
-
-       if (!(datafellows & SSH_BUG_IGNOREMSG) && isatty(fdin))
-               fdin_is_tty = 1;
-
-       connection_in = packet_get_connection_in();
-       connection_out = packet_get_connection_out();
-
-       notify_setup();
-
-       previous_stdout_buffer_bytes = 0;
-
-       /* Set approximate I/O buffer size. */
-       if (packet_is_interactive())
-               buffer_high = 4096;
-       else
-               buffer_high = 64 * 1024;
-
-#if 0
-       /* Initialize max_fd to the maximum of the known file descriptors. */
-       max_fd = MAX(connection_in, connection_out);
-       max_fd = MAX(max_fd, fdin);
-       max_fd = MAX(max_fd, fdout);
-       if (fderr != -1)
-               max_fd = MAX(max_fd, fderr);
-#endif
-
-       /* Initialize Initialize buffers. */
-       buffer_init(&stdin_buffer);
-       buffer_init(&stdout_buffer);
-       buffer_init(&stderr_buffer);
-
-       /*
-        * If we have no separate fderr (which is the case when we have a pty
-        * - there we cannot make difference between data sent to stdout and
-        * stderr), indicate that we have seen an EOF from stderr.  This way
-        * we don't need to check the descriptor everywhere.
-        */
-       if (fderr == -1)
-               fderr_eof = 1;
-
-       server_init_dispatch();
-
-       /* Main loop of the server for the interactive session mode. */
-       for (;;) {
-
-               /* Process buffered packets from the client. */
-               process_buffered_input_packets();
-
-               /*
-                * If we have received eof, and there is no more pending
-                * input data, cause a real eof by closing fdin.
-                */
-               if (stdin_eof && fdin != -1 && buffer_len(&stdin_buffer) == 0) {
-                       if (fdin != fdout)
-                               close(fdin);
-                       else
-                               shutdown(fdin, SHUT_WR); /* We will no longer send. */
-                       fdin = -1;
-               }
-               /* Make packets from buffered stderr data to send to the client. */
-               make_packets_from_stderr_data();
-
-               /*
-                * Make packets from buffered stdout data to send to the
-                * client. If there is very little to send, this arranges to
-                * not send them now, but to wait a short while to see if we
-                * are getting more data. This is necessary, as some systems
-                * wake up readers from a pty after each separate character.
-                */
-               max_time_milliseconds = 0;
-               stdout_buffer_bytes = buffer_len(&stdout_buffer);
-               if (stdout_buffer_bytes != 0 && stdout_buffer_bytes < 256 &&
-                   stdout_buffer_bytes != previous_stdout_buffer_bytes) {
-                       /* try again after a while */
-                       max_time_milliseconds = 10;
-               } else {
-                       /* Send it now. */
-                       make_packets_from_stdout_data();
-               }
-               previous_stdout_buffer_bytes = buffer_len(&stdout_buffer);
-
-               /* Send channel data to the client. */
-               if (packet_not_very_much_data_to_write())
-                       channel_output_poll();
-
-               /*
-                * Bail out of the loop if the program has closed its output
-                * descriptors, and we have no more data to send to the
-                * client, and there is no pending buffered data.
-                */
-               if (fdout_eof && fderr_eof && !packet_have_data_to_write() &&
-                   buffer_len(&stdout_buffer) == 0 && buffer_len(&stderr_buffer) == 0) {
-                       if (!channel_still_open())
-                               break;
-                       if (!waiting_termination) {
-                               const char *s = "Waiting for forwarded connections to terminate...\r\n";
-                               char *cp;
-                               waiting_termination = 1;
-                               buffer_append(&stderr_buffer, s, strlen(s));
-
-                               /* Display list of open channels. */
-                               cp = channel_open_message();
-                               buffer_append(&stderr_buffer, cp, strlen(cp));
-                               free(cp);
-                       }
-               }
-               max_fd = MAX(connection_in, connection_out);
-               max_fd = MAX(max_fd, fdin);
-               max_fd = MAX(max_fd, fdout);
-               max_fd = MAX(max_fd, fderr);
-               max_fd = MAX(max_fd, notify_pipe[0]);
-
-               /* Sleep in select() until we can do something. */
-               wait_until_can_do_something(&readset, &writeset, &max_fd,
-                   &nalloc, max_time_milliseconds);
-
-               if (received_sigterm) {
-                       logit("Exiting on signal %d", (int)received_sigterm);
-                       /* Clean up sessions, utmp, etc. */
-                       cleanup_exit(255);
-               }
-
-               /* Process any channel events. */
-               channel_after_select(readset, writeset);
-
-               /* Process input from the client and from program stdout/stderr. */
-               process_input(readset);
-
-               /* Process output to the client and to program stdin. */
-               process_output(writeset);
-       }
-       free(readset);
-       free(writeset);
-
-       /* Cleanup and termination code. */
-
-       /* Wait until all output has been sent to the client. */
-       drain_output();
-
-       debug("End of interactive session; stdin %ld, stdout (read %ld, sent %ld), stderr %ld bytes.",
-           stdin_bytes, fdout_bytes, stdout_bytes, stderr_bytes);
-
-       /* Free and clear the buffers. */
-       buffer_free(&stdin_buffer);
-       buffer_free(&stdout_buffer);
-       buffer_free(&stderr_buffer);
-
-       /* Close the file descriptors. */
-       if (fdout != -1)
-               close(fdout);
-       fdout = -1;
-       fdout_eof = 1;
-       if (fderr != -1)
-               close(fderr);
-       fderr = -1;
-       fderr_eof = 1;
-       if (fdin != -1)
-               close(fdin);
-       fdin = -1;
-
-       channel_free_all();
-
-       /* We no longer want our SIGCHLD handler to be called. */
-       mysignal(SIGCHLD, SIG_DFL);
-
-       while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0)
-               if (errno != EINTR)
-                       packet_disconnect("wait: %.100s", strerror(errno));
-       if (wait_pid != pid)
-               error("Strange, wait returned pid %ld, expected %ld",
-                   (long)wait_pid, (long)pid);
-
-       /* Check if it exited normally. */
-       if (WIFEXITED(wait_status)) {
-               /* Yes, normal exit.  Get exit status and send it to the client. */
-               debug("Command exited with status %d.", WEXITSTATUS(wait_status));
-               packet_start(SSH_SMSG_EXITSTATUS);
-               packet_put_int(WEXITSTATUS(wait_status));
-               packet_send();
-               packet_write_wait();
-
-               /*
-                * Wait for exit confirmation.  Note that there might be
-                * other packets coming before it; however, the program has
-                * already died so we just ignore them.  The client is
-                * supposed to respond with the confirmation when it receives
-                * the exit status.
-                */
-               do {
-                       type = packet_read();
-               }
-               while (type != SSH_CMSG_EXIT_CONFIRMATION);
-
-               debug("Received exit confirmation.");
-               return;
-       }
-       /* Check if the program terminated due to a signal. */
-       if (WIFSIGNALED(wait_status))
-               packet_disconnect("Command terminated on signal %d.",
-                                 WTERMSIG(wait_status));
-
-       /* Some weird exit cause.  Just exit. */
-       packet_disconnect("wait returned status %04x.", wait_status);
-       /* NOTREACHED */
-}
-
 static void
 collect_children(void)
 {
@@ -824,8 +352,8 @@ void
 server_loop2(Authctxt *authctxt)
 {
        fd_set *readset = NULL, *writeset = NULL;
-       int rekeying = 0, max_fd;
-       u_int nalloc = 0;
+       int max_fd;
+       u_int nalloc = 0, connection_in, connection_out;
        u_int64_t rekey_timeout_ms = 0;
 
        debug("Entering interactive session for SSH2.");
@@ -843,25 +371,25 @@ server_loop2(Authctxt *authctxt)
 
        notify_setup();
 
-       max_fd = MAX(connection_in, connection_out);
-       max_fd = MAX(max_fd, notify_pipe[0]);
+       max_fd = MAXIMUM(connection_in, connection_out);
+       max_fd = MAXIMUM(max_fd, notify_pipe[0]);
 
        server_init_dispatch();
 
        for (;;) {
                process_buffered_input_packets();
 
-               rekeying = (active_state->kex != NULL && !active_state->kex->done);
-
-               if (!rekeying && packet_not_very_much_data_to_write())
+               if (!ssh_packet_is_rekeying(active_state) &&
+                   packet_not_very_much_data_to_write())
                        channel_output_poll();
-               if (options.rekey_interval > 0 && compat20 && !rekeying)
+               if (options.rekey_interval > 0 &&
+                   !ssh_packet_is_rekeying(active_state))
                        rekey_timeout_ms = packet_get_rekey_timeout() * 1000;
                else
                        rekey_timeout_ms = 0;
 
-               wait_until_can_do_something(&readset, &writeset, &max_fd,
-                   &nalloc, rekey_timeout_ms);
+               wait_until_can_do_something(connection_in, connection_out,
+                   &readset, &writeset, &max_fd, &nalloc, rekey_timeout_ms);
 
                if (received_sigterm) {
                        logit("Exiting on signal %d", (int)received_sigterm);
@@ -870,18 +398,11 @@ server_loop2(Authctxt *authctxt)
                }
 
                collect_children();
-               if (!rekeying) {
+               if (!ssh_packet_is_rekeying(active_state))
                        channel_after_select(readset, writeset);
-                       if (packet_need_rekeying()) {
-                               debug("need rekeying");
-                               active_state->kex->done = 0;
-                               kex_send_kexinit(active_state);
-                       }
-               }
-               process_input(readset);
-               if (connection_closed)
+               if (process_input(readset, connection_in) < 0)
                        break;
-               process_output(writeset);
+               process_output(writeset, connection_out);
        }
        collect_children();
 
@@ -908,55 +429,8 @@ server_input_keep_alive(int type, u_int32_t seq, void *ctxt)
        return 0;
 }
 
-static int
-server_input_stdin_data(int type, u_int32_t seq, void *ctxt)
-{
-       char *data;
-       u_int data_len;
-
-       /* Stdin data from the client.  Append it to the buffer. */
-       /* Ignore any data if the client has closed stdin. */
-       if (fdin == -1)
-               return 0;
-       data = packet_get_string(&data_len);
-       packet_check_eom();
-       buffer_append(&stdin_buffer, data, data_len);
-       explicit_bzero(data, data_len);
-       free(data);
-       return 0;
-}
-
-static int
-server_input_eof(int type, u_int32_t seq, void *ctxt)
-{
-       /*
-        * Eof from the client.  The stdin descriptor to the
-        * program will be closed when all buffered data has
-        * drained.
-        */
-       debug("EOF received for stdin.");
-       packet_check_eom();
-       stdin_eof = 1;
-       return 0;
-}
-
-static int
-server_input_window_size(int type, u_int32_t seq, void *ctxt)
-{
-       u_int row = packet_get_int();
-       u_int col = packet_get_int();
-       u_int xpixel = packet_get_int();
-       u_int ypixel = packet_get_int();
-
-       debug("Window change received.");
-       packet_check_eom();
-       if (fdin != -1)
-               pty_change_window_size(fdin, row, col, xpixel, ypixel);
-       return 0;
-}
-
 static Channel *
-server_request_direct_tcpip(void)
+server_request_direct_tcpip(int *reason, const char **errmsg)
 {
        Channel *c = NULL;
        char *target, *originator;
@@ -973,13 +447,15 @@ server_request_direct_tcpip(void)
 
        /* XXX fine grained permissions */
        if ((options.allow_tcp_forwarding & FORWARD_LOCAL) != 0 &&
-           !no_port_forwarding_flag) {
+           !no_port_forwarding_flag && !options.disable_forwarding) {
                c = channel_connect_to_port(target, target_port,
-                   "direct-tcpip", "direct-tcpip");
+                   "direct-tcpip", "direct-tcpip", reason, errmsg);
        } else {
                logit("refused local port forward: "
                    "originator %s port %d, target %s port %d",
                    originator, originator_port, target, target_port);
+               if (reason != NULL)
+                       *reason = SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED;
        }
 
        free(originator);
@@ -994,6 +470,10 @@ server_request_direct_streamlocal(void)
        Channel *c = NULL;
        char *target, *originator;
        u_short originator_port;
+       struct passwd *pw = the_authctxt->pw;
+
+       if (pw == NULL || !the_authctxt->valid)
+               fatal("server_input_global_request: no/invalid user");
 
        target = packet_get_string(NULL);
        originator = packet_get_string(NULL);
@@ -1005,7 +485,8 @@ server_request_direct_streamlocal(void)
 
        /* XXX fine grained permissions */
        if ((options.allow_streamlocal_forwarding & FORWARD_LOCAL) != 0 &&
-           !no_port_forwarding_flag) {
+           !no_port_forwarding_flag && !options.disable_forwarding &&
+           (pw->pw_uid == 0 || use_privsep)) {
                c = channel_connect_to_path(target,
                    "direct-streamlocal@openssh.com", "direct-streamlocal");
        } else {
@@ -1102,7 +583,8 @@ server_input_channel_open(int type, u_int32_t seq, void *ctxt)
 {
        Channel *c = NULL;
        char *ctype;
-       int rchan;
+       const char *errmsg = NULL;
+       int rchan, reason = SSH2_OPEN_CONNECT_FAILED;
        u_int rmaxpack, rwindow, len;
 
        ctype = packet_get_string(&len);
@@ -1116,7 +598,7 @@ server_input_channel_open(int type, u_int32_t seq, void *ctxt)
        if (strcmp(ctype, "session") == 0) {
                c = server_request_session();
        } else if (strcmp(ctype, "direct-tcpip") == 0) {
-               c = server_request_direct_tcpip();
+               c = server_request_direct_tcpip(&reason, &errmsg);
        } else if (strcmp(ctype, "direct-streamlocal@openssh.com") == 0) {
                c = server_request_direct_streamlocal();
        } else if (strcmp(ctype, "tun@openssh.com") == 0) {
@@ -1139,9 +621,9 @@ server_input_channel_open(int type, u_int32_t seq, void *ctxt)
                debug("server_input_channel_open: failure %s", ctype);
                packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE);
                packet_put_int(rchan);
-               packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED);
+               packet_put_int(reason);
                if (!(datafellows & SSH_BUG_OPENFAILURE)) {
-                       packet_put_cstring("open failed");
+                       packet_put_cstring(errmsg ? errmsg : "open failed");
                        packet_put_cstring("");
                }
                packet_send();
@@ -1201,7 +683,7 @@ server_input_hostkeys_prove(struct sshbuf **respp)
                    ssh->kex->session_id, ssh->kex->session_id_len)) != 0 ||
                    (r = sshkey_puts(key, sigbuf)) != 0 ||
                    (r = ssh->kex->sign(key_prv, key_pub, &sig, &slen,
-                   sshbuf_ptr(sigbuf), sshbuf_len(sigbuf), 0)) != 0 ||
+                   sshbuf_ptr(sigbuf), sshbuf_len(sigbuf), NULL, 0)) != 0 ||
                    (r = sshbuf_put_string(resp, sig, slen)) != 0) {
                        error("%s: couldn't prepare signature: %s",
                            __func__, ssh_err(r));
@@ -1227,6 +709,10 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
        int want_reply;
        int r, success = 0, allocated_listen_port = 0;
        struct sshbuf *resp = NULL;
+       struct passwd *pw = the_authctxt->pw;
+
+       if (pw == NULL || !the_authctxt->valid)
+               fatal("server_input_global_request: no/invalid user");
 
        rtype = packet_get_string(NULL);
        want_reply = packet_get_char();
@@ -1234,12 +720,8 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
 
        /* -R style forwarding */
        if (strcmp(rtype, "tcpip-forward") == 0) {
-               struct passwd *pw;
                struct Forward fwd;
 
-               pw = the_authctxt->pw;
-               if (pw == NULL || !the_authctxt->valid)
-                       fatal("server_input_global_request: no/invalid user");
                memset(&fwd, 0, sizeof(fwd));
                fwd.listen_host = packet_get_string(NULL);
                fwd.listen_port = (u_short)packet_get_int();
@@ -1248,13 +730,10 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
 
                /* check permissions */
                if ((options.allow_tcp_forwarding & FORWARD_REMOTE) == 0 ||
-                   no_port_forwarding_flag ||
-                   (!want_reply && fwd.listen_port == 0)
-#ifndef NO_IPPORT_RESERVED_CONCEPT
-                   || (fwd.listen_port != 0 && fwd.listen_port < IPPORT_RESERVED &&
-                   pw->pw_uid != 0)
-#endif
-                   ) {
+                   no_port_forwarding_flag || options.disable_forwarding ||
+                   (!want_reply && fwd.listen_port == 0) ||
+                   (fwd.listen_port != 0 &&
+                    !bind_permitted(fwd.listen_port, pw->pw_uid))) {
                        success = 0;
                        packet_send_debug("Server has disabled port forwarding.");
                } else {
@@ -1265,7 +744,8 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
                free(fwd.listen_host);
                if ((resp = sshbuf_new()) == NULL)
                        fatal("%s: sshbuf_new", __func__);
-               if ((r = sshbuf_put_u32(resp, allocated_listen_port)) != 0)
+               if (allocated_listen_port != 0 &&
+                   (r = sshbuf_put_u32(resp, allocated_listen_port)) != 0)
                        fatal("%s: sshbuf_put_u32: %s", __func__, ssh_err(r));
        } else if (strcmp(rtype, "cancel-tcpip-forward") == 0) {
                struct Forward fwd;
@@ -1288,9 +768,11 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
 
                /* check permissions */
                if ((options.allow_streamlocal_forwarding & FORWARD_REMOTE) == 0
-                   || no_port_forwarding_flag) {
+                   || no_port_forwarding_flag || options.disable_forwarding ||
+                   (pw->pw_uid != 0 && !use_privsep)) {
                        success = 0;
-                       packet_send_debug("Server has disabled port forwarding.");
+                       packet_send_debug("Server has disabled "
+                           "streamlocal forwarding.");
                } else {
                        /* Start listening on the socket */
                        success = channel_setup_remote_fwd_listener(
@@ -1361,9 +843,9 @@ server_input_channel_req(int type, u_int32_t seq, void *ctxt)
 }
 
 static void
-server_init_dispatch_20(void)
+server_init_dispatch(void)
 {
-       debug("server_init_dispatch_20");
+       debug("server_init_dispatch");
        dispatch_init(&dispatch_protocol_error);
        dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose);
        dispatch_set(SSH2_MSG_CHANNEL_DATA, &channel_input_data);
@@ -1383,36 +865,3 @@ server_init_dispatch_20(void)
        /* rekeying */
        dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
 }
-static void
-server_init_dispatch_13(void)
-{
-       debug("server_init_dispatch_13");
-       dispatch_init(NULL);
-       dispatch_set(SSH_CMSG_EOF, &server_input_eof);
-       dispatch_set(SSH_CMSG_STDIN_DATA, &server_input_stdin_data);
-       dispatch_set(SSH_CMSG_WINDOW_SIZE, &server_input_window_size);
-       dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_close);
-       dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, &channel_input_close_confirmation);
-       dispatch_set(SSH_MSG_CHANNEL_DATA, &channel_input_data);
-       dispatch_set(SSH_MSG_CHANNEL_OPEN_CONFIRMATION, &channel_input_open_confirmation);
-       dispatch_set(SSH_MSG_CHANNEL_OPEN_FAILURE, &channel_input_open_failure);
-       dispatch_set(SSH_MSG_PORT_OPEN, &channel_input_port_open);
-}
-static void
-server_init_dispatch_15(void)
-{
-       server_init_dispatch_13();
-       debug("server_init_dispatch_15");
-       dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_ieof);
-       dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, &channel_input_oclose);
-}
-static void
-server_init_dispatch(void)
-{
-       if (compat20)
-               server_init_dispatch_20();
-       else if (compat13)
-               server_init_dispatch_13();
-       else
-               server_init_dispatch_15();
-}
index 7311558..d5fbda1 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */
+/* $OpenBSD: serverloop.h,v 1.7 2016/08/13 17:47:41 markus Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -21,7 +21,6 @@
 #ifndef SERVERLOOP_H
 #define SERVERLOOP_H
 
-void    server_loop(pid_t, int, int, int);
 void    server_loop2(Authctxt *);
 
 #endif
index 08a16b0..b5dd4aa 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.278 2015/04/24 01:36:00 deraadt Exp $ */
+/* $OpenBSD: session.c,v 1.286 2016/11/30 03:00:05 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -46,6 +46,7 @@
 
 #include <arpa/inet.h>
 
+#include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
@@ -65,7 +66,6 @@
 #include "openbsd-compat/sys-queue.h"
 #include "xmalloc.h"
 #include "ssh.h"
-#include "ssh1.h"
 #include "ssh2.h"
 #include "sshpty.h"
 #include "packet.h"
@@ -127,7 +127,6 @@ void        do_child(Session *, const char *);
 void   do_motd(void);
 int    check_quietlogin(Session *, const char *);
 
-static void do_authenticated1(Authctxt *);
 static void do_authenticated2(Authctxt *);
 
 static int session_pty_req(Session *);
@@ -160,6 +159,7 @@ login_cap_t *lc;
 #endif
 
 static int is_child = 0;
+static int in_chroot = 0;
 
 /* Name and directory of socket for authentication agent forwarding. */
 static char *auth_sock_name = NULL;
@@ -257,7 +257,7 @@ do_authenticated(Authctxt *authctxt)
 
        /* setup the channel layer */
        /* XXX - streamlocal? */
-       if (no_port_forwarding_flag ||
+       if (no_port_forwarding_flag || options.disable_forwarding ||
            (options.allow_tcp_forwarding & FORWARD_LOCAL) == 0)
                channel_disable_adm_local_opens();
        else
@@ -265,164 +265,23 @@ do_authenticated(Authctxt *authctxt)
 
        auth_debug_send();
 
-       if (compat20)
-               do_authenticated2(authctxt);
-       else
-               do_authenticated1(authctxt);
-
+       do_authenticated2(authctxt);
        do_cleanup(authctxt);
 }
 
-/*
- * Prepares for an interactive session.  This is called after the user has
- * been successfully authenticated.  During this message exchange, pseudo
- * terminals are allocated, X11, TCP/IP, and authentication agent forwardings
- * are requested, etc.
- */
-static void
-do_authenticated1(Authctxt *authctxt)
+/* Check untrusted xauth strings for metacharacters */
+static int
+xauth_valid_string(const char *s)
 {
-       Session *s;
-       char *command;
-       int success, type, screen_flag;
-       int enable_compression_after_reply = 0;
-       u_int proto_len, data_len, dlen, compression_level = 0;
-
-       s = session_new();
-       if (s == NULL) {
-               error("no more sessions");
-               return;
-       }
-       s->authctxt = authctxt;
-       s->pw = authctxt->pw;
-
-       /*
-        * We stay in this loop until the client requests to execute a shell
-        * or a command.
-        */
-       for (;;) {
-               success = 0;
-
-               /* Get a packet from the client. */
-               type = packet_read();
-
-               /* Process the packet. */
-               switch (type) {
-               case SSH_CMSG_REQUEST_COMPRESSION:
-                       compression_level = packet_get_int();
-                       packet_check_eom();
-                       if (compression_level < 1 || compression_level > 9) {
-                               packet_send_debug("Received invalid compression level %d.",
-                                   compression_level);
-                               break;
-                       }
-                       if (options.compression == COMP_NONE) {
-                               debug2("compression disabled");
-                               break;
-                       }
-                       /* Enable compression after we have responded with SUCCESS. */
-                       enable_compression_after_reply = 1;
-                       success = 1;
-                       break;
-
-               case SSH_CMSG_REQUEST_PTY:
-                       success = session_pty_req(s);
-                       break;
-
-               case SSH_CMSG_X11_REQUEST_FORWARDING:
-                       s->auth_proto = packet_get_string(&proto_len);
-                       s->auth_data = packet_get_string(&data_len);
-
-                       screen_flag = packet_get_protocol_flags() &
-                           SSH_PROTOFLAG_SCREEN_NUMBER;
-                       debug2("SSH_PROTOFLAG_SCREEN_NUMBER: %d", screen_flag);
-
-                       if (packet_remaining() == 4) {
-                               if (!screen_flag)
-                                       debug2("Buggy client: "
-                                           "X11 screen flag missing");
-                               s->screen = packet_get_int();
-                       } else {
-                               s->screen = 0;
-                       }
-                       packet_check_eom();
-                       success = session_setup_x11fwd(s);
-                       if (!success) {
-                               free(s->auth_proto);
-                               free(s->auth_data);
-                               s->auth_proto = NULL;
-                               s->auth_data = NULL;
-                       }
-                       break;
-
-               case SSH_CMSG_AGENT_REQUEST_FORWARDING:
-                       if (!options.allow_agent_forwarding ||
-                           no_agent_forwarding_flag || compat13) {
-                               debug("Authentication agent forwarding not permitted for this authentication.");
-                               break;
-                       }
-                       debug("Received authentication agent forwarding request.");
-                       success = auth_input_request_forwarding(s->pw);
-                       break;
+       size_t i;
 
-               case SSH_CMSG_PORT_FORWARD_REQUEST:
-                       if (no_port_forwarding_flag) {
-                               debug("Port forwarding not permitted for this authentication.");
-                               break;
-                       }
-                       if (!(options.allow_tcp_forwarding & FORWARD_REMOTE)) {
-                               debug("Port forwarding not permitted.");
-                               break;
-                       }
-                       debug("Received TCP/IP port forwarding request.");
-                       if (channel_input_port_forward_request(s->pw->pw_uid == 0,
-                           &options.fwd_opts) < 0) {
-                               debug("Port forwarding failed.");
-                               break;
-                       }
-                       success = 1;
-                       break;
-
-               case SSH_CMSG_MAX_PACKET_SIZE:
-                       if (packet_set_maxsize(packet_get_int()) > 0)
-                               success = 1;
-                       break;
-
-               case SSH_CMSG_EXEC_SHELL:
-               case SSH_CMSG_EXEC_CMD:
-                       if (type == SSH_CMSG_EXEC_CMD) {
-                               command = packet_get_string(&dlen);
-                               debug("Exec command '%.500s'", command);
-                               if (do_exec(s, command) != 0)
-                                       packet_disconnect(
-                                           "command execution failed");
-                               free(command);
-                       } else {
-                               if (do_exec(s, NULL) != 0)
-                                       packet_disconnect(
-                                           "shell execution failed");
-                       }
-                       packet_check_eom();
-                       session_close(s);
-                       return;
-
-               default:
-                       /*
-                        * Any unknown messages in this phase are ignored,
-                        * and a failure message is returned.
-                        */
-                       logit("Unknown packet type received after authentication: %d", type);
-               }
-               packet_start(success ? SSH_SMSG_SUCCESS : SSH_SMSG_FAILURE);
-               packet_send();
-               packet_write_wait();
-
-               /* Enable compression now that we have replied if appropriate. */
-               if (enable_compression_after_reply) {
-                       enable_compression_after_reply = 0;
-                       packet_start_compression(compression_level);
-               }
+       for (i = 0; s[i] != '\0'; i++) {
+               if (!isalnum((u_char)s[i]) &&
+                   s[i] != '.' && s[i] != ':' && s[i] != '/' &&
+                   s[i] != '-' && s[i] != '_')
+               return 0;
        }
+       return 1;
 }
 
 #define USE_PIPES 1
@@ -592,14 +451,8 @@ do_exec_no_pty(Session *s, const char *command)
        close(pout[1]);
        close(perr[1]);
 
-       if (compat20) {
-               session_set_fds(s, pin[1], pout[0], perr[0],
-                   s->is_subsystem, 0);
-       } else {
-               /* Enter the interactive session. */
-               server_loop(pid, pin[1], pout[0], perr[0]);
-               /* server_loop has closed pin[1], pout[0], and perr[0]. */
-       }
+       session_set_fds(s, pin[1], pout[0], perr[0],
+           s->is_subsystem, 0);
 #else
        /* We are the parent.  Close the child sides of the socket pairs. */
        close(inout[0]);
@@ -609,13 +462,8 @@ do_exec_no_pty(Session *s, const char *command)
         * Enter the interactive session.  Note: server_loop must be able to
         * handle the case that fdin and fdout are the same.
         */
-       if (compat20) {
-               session_set_fds(s, inout[1], inout[1], err[1],
-                   s->is_subsystem, 0);
-       } else {
-               server_loop(pid, inout[1], inout[1], err[1]);
-               /* server_loop has closed inout[1] and err[1]. */
-       }
+       session_set_fds(s, inout[1], inout[1], err[1],
+           s->is_subsystem, 0);
 #endif
        return 0;
 }
@@ -695,17 +543,11 @@ do_exec_pty(Session *s, const char *command)
                close(ttyfd);
 
                /* record login, etc. similar to login(1) */
-#ifndef HAVE_OSF_SIA
-               if (!(options.use_login && command == NULL)) {
 #ifdef _UNICOS
-                       cray_init_job(s->pw); /* set up cray jid and tmpdir */
+               cray_init_job(s->pw); /* set up cray jid and tmpdir */
 #endif /* _UNICOS */
-                       do_login(s, command);
-               }
-# ifdef LOGIN_NEEDS_UTMPX
-               else
-                       do_pre_login(s);
-# endif
+#ifndef HAVE_OSF_SIA
+               do_login(s, command);
 #endif
                /*
                 * Do common processing for the child, such as execing
@@ -733,12 +575,7 @@ do_exec_pty(Session *s, const char *command)
        s->ptymaster = ptymaster;
        packet_set_interactive(1, 
            options.ip_qos_interactive, options.ip_qos_bulk);
-       if (compat20) {
-               session_set_fds(s, ptyfd, fdout, -1, 1, 1);
-       } else {
-               server_loop(pid, ptyfd, fdout, -1);
-               /* server_loop _has_ closed ptyfd and fdout. */
-       }
+       session_set_fds(s, ptyfd, fdout, -1, 1, 1);
        return 0;
 }
 
@@ -746,6 +583,7 @@ do_exec_pty(Session *s, const char *command)
 static void
 do_pre_login(Session *s)
 {
+       struct ssh *ssh = active_state; /* XXX */
        socklen_t fromlen;
        struct sockaddr_storage from;
        pid_t pid = getpid();
@@ -765,7 +603,7 @@ do_pre_login(Session *s)
        }
 
        record_utmp_only(pid, s->tty, s->pw->pw_name,
-           get_remote_name_or_ip(utmp_len, options.use_dns),
+           session_get_remote_name_or_ip(ssh, utmp_len, options.use_dns),
            (struct sockaddr *)&from, fromlen);
 }
 #endif
@@ -777,9 +615,10 @@ do_pre_login(Session *s)
 int
 do_exec(Session *s, const char *command)
 {
+       struct ssh *ssh = active_state; /* XXX */
        int ret;
-       const char *forced = NULL;
-       char session_type[1024], *tty = NULL;
+       const char *forced = NULL, *tty = NULL;
+       char session_type[1024];
 
        if (options.adm_forced_command) {
                original_command = command;
@@ -814,13 +653,14 @@ do_exec(Session *s, const char *command)
                        tty += 5;
        }
 
-       verbose("Starting session: %s%s%s for %s from %.200s port %d",
+       verbose("Starting session: %s%s%s for %s from %.200s port %d id %d",
            session_type,
            tty == NULL ? "" : " on ",
            tty == NULL ? "" : tty,
            s->pw->pw_name,
-           get_remote_ipaddr(),
-           get_remote_port());
+           ssh_remote_ipaddr(ssh),
+           ssh_remote_port(ssh),
+           s->self);
 
 #ifdef SSH_AUDIT_EVENTS
        if (command != NULL)
@@ -854,6 +694,7 @@ do_exec(Session *s, const char *command)
 void
 do_login(Session *s, const char *command)
 {
+       struct ssh *ssh = active_state; /* XXX */
        socklen_t fromlen;
        struct sockaddr_storage from;
        struct passwd * pw = s->pw;
@@ -876,7 +717,7 @@ do_login(Session *s, const char *command)
        /* Record that there was a login on that tty from the remote host. */
        if (!use_privsep)
                record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
-                   get_remote_name_or_ip(utmp_len,
+                   session_get_remote_name_or_ip(ssh, utmp_len,
                    options.use_dns),
                    (struct sockaddr *)&from, fromlen);
 
@@ -1137,6 +978,7 @@ copy_environment(char **source, char ***env, u_int *envsize)
 static char **
 do_setup_env(Session *s, const char *shell)
 {
+       struct ssh *ssh = active_state; /* XXX */
        char buf[256];
        u_int i, envsize;
        char **env, *laddr;
@@ -1171,81 +1013,77 @@ do_setup_env(Session *s, const char *shell)
        ssh_gssapi_do_child(&env, &envsize);
 #endif
 
-       if (!options.use_login) {
-               /* Set basic environment. */
-               for (i = 0; i < s->num_env; i++)
-                       child_set_env(&env, &envsize, s->env[i].name,
-                           s->env[i].val);
+       /* Set basic environment. */
+       for (i = 0; i < s->num_env; i++)
+               child_set_env(&env, &envsize, s->env[i].name, s->env[i].val);
 
-               child_set_env(&env, &envsize, "USER", pw->pw_name);
-               child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
+       child_set_env(&env, &envsize, "USER", pw->pw_name);
+       child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
 #ifdef _AIX
-               child_set_env(&env, &envsize, "LOGIN", pw->pw_name);
+       child_set_env(&env, &envsize, "LOGIN", pw->pw_name);
 #endif
-               child_set_env(&env, &envsize, "HOME", pw->pw_dir);
+       child_set_env(&env, &envsize, "HOME", pw->pw_dir);
 #ifdef HAVE_LOGIN_CAP
-               if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH) < 0)
-                       child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
-               else
-                       child_set_env(&env, &envsize, "PATH", getenv("PATH"));
+       if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH) < 0)
+               child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
+       else
+               child_set_env(&env, &envsize, "PATH", getenv("PATH"));
 #else /* HAVE_LOGIN_CAP */
 # ifndef HAVE_CYGWIN
-               /*
-                * There's no standard path on Windows. The path contains
-                * important components pointing to the system directories,
-                * needed for loading shared libraries. So the path better
-                * remains intact here.
-                */
+       /*
+        * There's no standard path on Windows. The path contains
+        * important components pointing to the system directories,
+        * needed for loading shared libraries. So the path better
+        * remains intact here.
+        */
 #  ifdef HAVE_ETC_DEFAULT_LOGIN
-               read_etc_default_login(&env, &envsize, pw->pw_uid);
-               path = child_get_env(env, "PATH");
+       read_etc_default_login(&env, &envsize, pw->pw_uid);
+       path = child_get_env(env, "PATH");
 #  endif /* HAVE_ETC_DEFAULT_LOGIN */
-               if (path == NULL || *path == '\0') {
-                       child_set_env(&env, &envsize, "PATH",
-                           s->pw->pw_uid == 0 ?
-                               SUPERUSER_PATH : _PATH_STDPATH);
-               }
+       if (path == NULL || *path == '\0') {
+               child_set_env(&env, &envsize, "PATH",
+                   s->pw->pw_uid == 0 ?  SUPERUSER_PATH : _PATH_STDPATH);
+       }
 # endif /* HAVE_CYGWIN */
 #endif /* HAVE_LOGIN_CAP */
 
 #ifndef ANDROID
-               snprintf(buf, sizeof buf, "%.200s/%.50s",
-                        _PATH_MAILDIR, pw->pw_name);
-               child_set_env(&env, &envsize, "MAIL", buf);
+       snprintf(buf, sizeof buf, "%.200s/%.50s", _PATH_MAILDIR, pw->pw_name);
+       child_set_env(&env, &envsize, "MAIL", buf);
+
+       /* Normal systems set SHELL by default. */
+       child_set_env(&env, &envsize, "SHELL", shell);
 #endif
 
-               /* Normal systems set SHELL by default. */
-               child_set_env(&env, &envsize, "SHELL", shell);
-       }
        if (getenv("TZ"))
                child_set_env(&env, &envsize, "TZ", getenv("TZ"));
 
        /* Set custom environment options from RSA authentication. */
-       if (!options.use_login) {
-               while (custom_environment) {
-                       struct envstring *ce = custom_environment;
-                       char *str = ce->s;
-
-                       for (i = 0; str[i] != '=' && str[i]; i++)
-                               ;
-                       if (str[i] == '=') {
-                               str[i] = 0;
-                               child_set_env(&env, &envsize, str, str + i + 1);
-                       }
-                       custom_environment = ce->next;
-                       free(ce->s);
-                       free(ce);
+       while (custom_environment) {
+               struct envstring *ce = custom_environment;
+               char *str = ce->s;
+
+               for (i = 0; str[i] != '=' && str[i]; i++)
+                       ;
+               if (str[i] == '=') {
+                       str[i] = 0;
+                       child_set_env(&env, &envsize, str, str + i + 1);
                }
+               custom_environment = ce->next;
+               free(ce->s);
+               free(ce);
        }
 
        /* SSH_CLIENT deprecated */
        snprintf(buf, sizeof buf, "%.50s %d %d",
-           get_remote_ipaddr(), get_remote_port(), get_local_port());
+           ssh_remote_ipaddr(ssh), ssh_remote_port(ssh),
+           ssh_local_port(ssh));
        child_set_env(&env, &envsize, "SSH_CLIENT", buf);
 
        laddr = get_local_ipaddr(packet_get_connection_in());
        snprintf(buf, sizeof buf, "%.50s %d %.50s %d",
-           get_remote_ipaddr(), get_remote_port(), laddr, get_local_port());
+           ssh_remote_ipaddr(ssh), ssh_remote_port(ssh),
+           laddr, ssh_local_port(ssh));
        free(laddr);
        child_set_env(&env, &envsize, "SSH_CONNECTION", buf);
 
@@ -1313,7 +1151,7 @@ do_setup_env(Session *s, const char *shell)
                    auth_sock_name);
 
        /* read $HOME/.ssh/environment. */
-       if (options.permit_user_env && !options.use_login) {
+       if (options.permit_user_env) {
                snprintf(buf, sizeof buf, "%.200s/.ssh/environment",
                    strcmp(pw->pw_dir, "/") ? pw->pw_dir : "");
                read_environment_file(&env, &envsize, buf);
@@ -1492,9 +1330,6 @@ void
 do_setusercontext(struct passwd *pw)
 {
        char *chroot_path, *tmp;
-#ifdef USE_LIBIAF
-       int doing_chroot = 0;
-#endif
 
        platform_setusercontext(pw);
 
@@ -1524,7 +1359,7 @@ do_setusercontext(struct passwd *pw)
 
                platform_setusercontext_post_groups(pw);
 
-               if (options.chroot_directory != NULL &&
+               if (!in_chroot && options.chroot_directory != NULL &&
                    strcasecmp(options.chroot_directory, "none") != 0) {
                         tmp = tilde_expand_filename(options.chroot_directory,
                            pw->pw_uid);
@@ -1536,9 +1371,7 @@ do_setusercontext(struct passwd *pw)
                        /* Make sure we don't attempt to chroot again */
                        free(options.chroot_directory);
                        options.chroot_directory = NULL;
-#ifdef USE_LIBIAF
-                       doing_chroot = 1;
-#endif
+                       in_chroot = 1;
                }
 
 #ifdef HAVE_LOGIN_CAP
@@ -1553,16 +1386,16 @@ do_setusercontext(struct passwd *pw)
                (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUMASK);
 #else
 # ifdef USE_LIBIAF
-/* In a chroot environment, the set_id() will always fail; typically 
- * because of the lack of necessary authentication services and runtime
- * such as ./usr/lib/libiaf.so, ./usr/lib/libpam.so.1, and ./etc/passwd
- * We skip it in the internal sftp chroot case.
- * We'll lose auditing and ACLs but permanently_set_uid will
- * take care of the rest.
- */
-       if ((doing_chroot == 0) && set_id(pw->pw_name) != 0) {
-               fatal("set_id(%s) Failed", pw->pw_name);
-       }
+               /*
+                * In a chroot environment, the set_id() will always fail;
+                * typically because of the lack of necessary authentication
+                * services and runtime such as ./usr/lib/libiaf.so,
+                * ./usr/lib/libpam.so.1, and ./etc/passwd We skip it in the
+                * internal sftp chroot case.  We'll lose auditing and ACLs but
+                * permanently_set_uid will take care of the rest.
+                */
+               if (!in_chroot && set_id(pw->pw_name) != 0)
+                       fatal("set_id(%s) Failed", pw->pw_name);
 # endif /* USE_LIBIAF */
                /* Permanently switch to the desired uid. */
                permanently_set_uid(pw);
@@ -1602,27 +1435,6 @@ do_pwchange(Session *s)
 }
 
 static void
-launch_login(struct passwd *pw, const char *hostname)
-{
-       /* Launch login(1). */
-
-       execl(LOGIN_PROGRAM, "login", "-h", hostname,
-#ifdef xxxLOGIN_NEEDS_TERM
-                   (s->term ? s->term : "unknown"),
-#endif /* LOGIN_NEEDS_TERM */
-#ifdef LOGIN_NO_ENDOPT
-           "-p", "-f", pw->pw_name, (char *)NULL);
-#else
-           "-p", "-f", "--", pw->pw_name, (char *)NULL);
-#endif
-
-       /* Login couldn't be executed, die. */
-
-       perror("login");
-       exit(1);
-}
-
-static void
 child_close_fds(void)
 {
        extern int auth_sock;
@@ -1674,7 +1486,7 @@ do_child(Session *s, const char *command)
        extern char **environ;
        char **env;
        char *argv[ARGV_MAX];
-       const char *shell, *shell0, *hostname = NULL;
+       const char *shell, *shell0;
        struct passwd *pw = s->pw;
        int r = 0;
 
@@ -1689,10 +1501,6 @@ do_child(Session *s, const char *command)
                exit(1);
        }
 
-       /* login(1) is only called if we execute the login shell */
-       if (options.use_login && command != NULL)
-               options.use_login = 0;
-
 #ifdef _UNICOS
        cray_setup(pw->pw_uid, pw->pw_name, command);
 #endif /* _UNICOS */
@@ -1701,28 +1509,26 @@ do_child(Session *s, const char *command)
         * Login(1) does this as well, and it needs uid 0 for the "-h"
         * switch, so we let login(1) to this for us.
         */
-       if (!options.use_login) {
 #ifdef HAVE_OSF_SIA
-               session_setup_sia(pw, s->ttyfd == -1 ? NULL : s->tty);
-               if (!check_quietlogin(s, command))
-                       do_motd();
+       session_setup_sia(pw, s->ttyfd == -1 ? NULL : s->tty);
+       if (!check_quietlogin(s, command))
+               do_motd();
 #else /* HAVE_OSF_SIA */
-               /* When PAM is enabled we rely on it to do the nologin check */
-               if (!options.use_pam)
-                       do_nologin(pw);
-               do_setusercontext(pw);
-               /*
-                * PAM session modules in do_setusercontext may have
-                * generated messages, so if this in an interactive
-                * login then display them too.
-                */
-               if (!check_quietlogin(s, command))
-                       display_loginmsg();
+       /* When PAM is enabled we rely on it to do the nologin check */
+       if (!options.use_pam)
+               do_nologin(pw);
+       do_setusercontext(pw);
+       /*
+        * PAM session modules in do_setusercontext may have
+        * generated messages, so if this in an interactive
+        * login then display them too.
+        */
+       if (!check_quietlogin(s, command))
+               display_loginmsg();
 #endif /* HAVE_OSF_SIA */
-       }
 
 #ifdef USE_PAM
-       if (options.use_pam && !options.use_login && !is_pam_session_open()) {
+       if (options.use_pam && !is_pam_session_open()) {
                debug3("PAM session not opened, exiting");
                display_loginmsg();
                exit(254);
@@ -1745,16 +1551,12 @@ do_child(Session *s, const char *command)
        shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell);
 #endif
 
-       /* we have to stash the hostname before we close our socket. */
-       if (options.use_login)
-               hostname = get_remote_name_or_ip(utmp_len,
-                   options.use_dns);
        /*
         * Close the connection descriptors; note that this is the child, and
         * the server will still have the socket open, and it is important
         * that we do not shutdown it.  Note that the descriptors cannot be
         * closed before building the environment, as we call
-        * get_remote_ipaddr there.
+        * ssh_remote_ipaddr there.
         */
        child_close_fds();
 
@@ -1796,19 +1598,18 @@ do_child(Session *s, const char *command)
 #ifdef HAVE_LOGIN_CAP
                r = login_getcapbool(lc, "requirehome", 0);
 #endif
-               if (r || options.chroot_directory == NULL ||
-                   strcasecmp(options.chroot_directory, "none") == 0)
+               if (r || !in_chroot) {
                        fprintf(stderr, "Could not chdir to home "
                            "directory %s: %s\n", pw->pw_dir,
                            strerror(errno));
+               }
                if (r)
                        exit(1);
        }
 
        closefrom(STDERR_FILENO + 1);
 
-       if (!options.use_login)
-               do_rc_files(s, shell);
+       do_rc_files(s, shell);
 
        /* restore SIGPIPE for child */
        signal(SIGPIPE, SIG_DFL);
@@ -1838,11 +1639,6 @@ do_child(Session *s, const char *command)
 
        fflush(NULL);
 
-       if (options.use_login) {
-               launch_login(pw, hostname);
-               /* NEVERREACHED */
-       }
-
        /* Get the last component of the shell name. */
        if ((shell0 = strrchr(shell, '/')) != NULL)
                shell0++;
@@ -2086,14 +1882,8 @@ session_pty_req(Session *s)
        }
 
        s->term = packet_get_string(&len);
-
-       if (compat20) {
-               s->col = packet_get_int();
-               s->row = packet_get_int();
-       } else {
-               s->row = packet_get_int();
-               s->col = packet_get_int();
-       }
+       s->col = packet_get_int();
+       s->row = packet_get_int();
        s->xpixel = packet_get_int();
        s->ypixel = packet_get_int();
 
@@ -2115,9 +1905,7 @@ session_pty_req(Session *s)
        }
        debug("session_pty_req: session %d alloc %s", s->self, s->tty);
 
-       /* for SSH1 the tty modes length is not given */
-       if (!compat20)
-               n_bytes = packet_remaining();
+       n_bytes = packet_remaining();
        tty_parse_modes(s->ttyfd, &n_bytes);
 
        if (!use_privsep)
@@ -2187,7 +1975,13 @@ session_x11_req(Session *s)
        s->screen = packet_get_int();
        packet_check_eom();
 
-       success = session_setup_x11fwd(s);
+       if (xauth_valid_string(s->auth_proto) &&
+           xauth_valid_string(s->auth_data))
+               success = session_setup_x11fwd(s);
+       else {
+               success = 0;
+               error("Invalid X11 forwarding data");
+       }
        if (!success) {
                free(s->auth_proto);
                free(s->auth_data);
@@ -2327,8 +2121,6 @@ void
 session_set_fds(Session *s, int fdin, int fdout, int fderr, int ignore_fderr,
     int is_tty)
 {
-       if (!compat20)
-               fatal("session_set_fds: called for proto != 2.0");
        /*
         * now that have a child and a pipe to the child,
         * we can activate our channel and register the fd's
@@ -2507,9 +2299,15 @@ session_exit_message(Session *s, int status)
 void
 session_close(Session *s)
 {
+       struct ssh *ssh = active_state; /* XXX */
        u_int i;
 
-       debug("session_close: session %d pid %ld", s->self, (long)s->pid);
+       verbose("Close session: user %s from %.200s port %d id %d",
+           s->pw->pw_name,
+           ssh_remote_ipaddr(ssh),
+           ssh_remote_port(ssh),
+           s->self);
+
        if (s->ttyfd != -1)
                session_pty_cleanup(s);
        free(s->term);
@@ -2660,11 +2458,6 @@ session_setup_x11fwd(Session *s)
                packet_send_debug("No xauth program; cannot forward with spoofing.");
                return 0;
        }
-       if (options.use_login) {
-               packet_send_debug("X11 forwarding disabled; "
-                   "not compatible with UseLogin=yes.");
-               return 0;
-       }
        if (s->display != NULL) {
                debug("X11 display already set.");
                return 0;
@@ -2762,7 +2555,7 @@ do_cleanup(Authctxt *authctxt)
 #endif
 
 #ifdef GSSAPI
-       if (compat20 && options.gss_cleanup_creds)
+       if (options.gss_cleanup_creds)
                ssh_gssapi_cleanup_creds();
 #endif
 
@@ -2776,3 +2569,17 @@ do_cleanup(Authctxt *authctxt)
        if (!use_privsep || mm_is_monitor())
                session_destroy_all(session_pty_cleanup2);
 }
+
+/* Return a name for the remote host that fits inside utmp_size */
+
+const char *
+session_get_remote_name_or_ip(struct ssh *ssh, u_int utmp_size, int use_dns)
+{
+       const char *remote = "";
+
+       if (utmp_size > 0)
+               remote = auth_get_canonical_hostname(ssh, use_dns);
+       if (utmp_size == 0 || strlen(remote) > utmp_size)
+               remote = ssh_remote_ipaddr(ssh);
+       return remote;
+}
index 6a2f35e..98e1daf 100644 (file)
--- a/session.h
+++ b/session.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.h,v 1.31 2013/10/14 21:20:52 djm Exp $ */
+/* $OpenBSD: session.h,v 1.33 2016/08/13 17:47:41 markus Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
@@ -51,7 +51,6 @@ struct Session {
        char    *auth_data;
        int     single_connection;
 
-       /* proto 2 */
        int     chanid;
        int     *x11_chanids;
        int     is_subsystem;
@@ -81,4 +80,6 @@ void   do_setusercontext(struct passwd *);
 void    child_set_env(char ***envp, u_int *envsizep, const char *name,
                       const char *value);
 
+const char     *session_get_remote_name_or_ip(struct ssh *, u_int, int);
+
 #endif
index 5dbeb47..a6e8322 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.120 2015/05/28 04:50:53 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.126 2017/01/03 05:46:51 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
  *
@@ -22,7 +22,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN MAX */
 #include <sys/types.h>
 #ifdef HAVE_SYS_STATVFS_H
 #include <sys/statvfs.h>
@@ -53,6 +52,7 @@
 #include "atomicio.h"
 #include "progressmeter.h"
 #include "misc.h"
+#include "utf8.h"
 
 #include "sftp.h"
 #include "sftp-common.h"
@@ -67,6 +67,13 @@ extern int showprogress;
 /* Maximum depth to descend in directory trees */
 #define MAX_DIR_DEPTH 64
 
+/* Directory separator characters */
+#ifdef HAVE_CYGWIN
+# define SFTP_DIRECTORY_CHARS      "/\\"
+#else /* HAVE_CYGWIN */
+# define SFTP_DIRECTORY_CHARS      "/"
+#endif /* HAVE_CYGWIN */
+
 struct sftp_conn {
        int fd_in;
        int fd_out;
@@ -461,7 +468,7 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests,
 
        /* Some filexfer v.0 servers don't support large packets */
        if (ret->version == 0)
-               ret->transfer_buflen = MIN(ret->transfer_buflen, 20480);
+               ret->transfer_buflen = MINIMUM(ret->transfer_buflen, 20480);
 
        ret->limit_kbps = limit_kbps;
        if (ret->limit_kbps > 0) {
@@ -515,8 +522,7 @@ do_lsreaddir(struct sftp_conn *conn, const char *path, int print_flag,
        struct sshbuf *msg;
        u_int count, id, i, expected_id, ents = 0;
        size_t handle_len;
-       u_char type;
-       char *handle;
+       u_char type, *handle;
        int status = SSH2_FX_FAILURE;
        int r;
 
@@ -588,6 +594,8 @@ do_lsreaddir(struct sftp_conn *conn, const char *path, int print_flag,
 
                if ((r = sshbuf_get_u32(msg, &count)) != 0)
                        fatal("%s: buffer error: %s", __func__, ssh_err(r));
+               if (count > SSHBUF_SIZE_MAX)
+                       fatal("%s: nonsensical number of entries", __func__);
                if (count == 0)
                        break;
                debug3("Received %d SSH2_FXP_NAME responses", count);
@@ -611,14 +619,14 @@ do_lsreaddir(struct sftp_conn *conn, const char *path, int print_flag,
                        }
 
                        if (print_flag)
-                               printf("%s\n", longname);
+                               mprintf("%s\n", longname);
 
                        /*
                         * Directory entries should never contain '/'
                         * These can be used to attack recursive ops
                         * (e.g. send '../../../../etc/passwd')
                         */
-                       if (strchr(filename, '/') != NULL) {
+                       if (strpbrk(filename, SFTP_DIRECTORY_CHARS) != NULL) {
                                error("Server sent suspect path \"%s\" "
                                    "during readdir of \"%s\"", filename, path);
                        } else if (dir) {
@@ -1351,7 +1359,7 @@ do_download(struct sftp_conn *conn, const char *remote_path,
                                    req->offset, req->len, handle, handle_len);
                                /* Reduce the request size */
                                if (len < buflen)
-                                       buflen = MAX(MIN_READ_SIZE, len);
+                                       buflen = MAXIMUM(MIN_READ_SIZE, len);
                        }
                        if (max_req > 0) { /* max_req = 0 iff EOF received */
                                if (size > 0 && offset > size) {
@@ -1461,7 +1469,7 @@ download_dir_internal(struct sftp_conn *conn, const char *src, const char *dst,
                return -1;
        }
        if (print_flag)
-               printf("Retrieving %s\n", src);
+               mprintf("Retrieving %s\n", src);
 
        if (dirattrib->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)
                mode = dirattrib->perm & 01777;
@@ -1601,7 +1609,7 @@ do_upload(struct sftp_conn *conn, const char *local_path,
        if (resume) {
                /* Get remote file size if it exists */
                if ((c = do_stat(conn, remote_path, 0)) == NULL) {
-                       close(local_fd);                
+                       close(local_fd);
                        return -1;
                }
 
@@ -1760,7 +1768,7 @@ do_upload(struct sftp_conn *conn, const char *local_path,
        if (fsync_flag)
                (void)do_fsync(conn, handle, handle_len);
 
-       if (do_close(conn, handle, handle_len) != SSH2_FX_OK)
+       if (do_close(conn, handle, handle_len) != 0)
                status = SSH2_FX_FAILURE;
 
        free(handle);
@@ -1773,12 +1781,11 @@ upload_dir_internal(struct sftp_conn *conn, const char *src, const char *dst,
     int depth, int preserve_flag, int print_flag, int resume, int fsync_flag)
 {
        int ret = 0;
-       u_int status;
        DIR *dirp;
        struct dirent *dp;
        char *filename, *new_src, *new_dst;
        struct stat sb;
-       Attrib a;
+       Attrib a, *dirattrib;
 
        if (depth >= MAX_DIR_DEPTH) {
                error("Maximum directory depth exceeded: %d levels", depth);
@@ -1795,7 +1802,7 @@ upload_dir_internal(struct sftp_conn *conn, const char *src, const char *dst,
                return -1;
        }
        if (print_flag)
-               printf("Entering %s\n", src);
+               mprintf("Entering %s\n", src);
 
        attrib_clear(&a);
        stat_to_attrib(&sb, &a);
@@ -1805,17 +1812,18 @@ upload_dir_internal(struct sftp_conn *conn, const char *src, const char *dst,
        if (!preserve_flag)
                a.flags &= ~SSH2_FILEXFER_ATTR_ACMODTIME;
 
-       status = do_mkdir(conn, dst, &a, 0);
        /*
-        * we lack a portable status for errno EEXIST,
-        * so if we get a SSH2_FX_FAILURE back we must check
-        * if it was created successfully.
+        * sftp lacks a portable status value to match errno EEXIST,
+        * so if we get a failure back then we must check whether
+        * the path already existed and is a directory.
         */
-       if (status != SSH2_FX_OK) {
-               if (status != SSH2_FX_FAILURE)
+       if (do_mkdir(conn, dst, &a, 0) != 0) {
+               if ((dirattrib = do_stat(conn, dst, 0)) == NULL)
                        return -1;
-               if (do_stat(conn, dst, 0) == NULL)
+               if (!S_ISDIR(dirattrib->perm)) {
+                       error("\"%s\" exists but is not a directory", dst);
                        return -1;
+               }
        }
 
        if ((dirp = opendir(src)) == NULL) {
index f814b07..14a3b81 100644 (file)
 #ifndef _SFTP_CLIENT_H
 #define _SFTP_CLIENT_H
 
+#ifdef USE_SYSTEM_GLOB
+# include <glob.h>
+#else
+# include "openbsd-compat/glob.h"
+#endif
+
 typedef struct SFTP_DIRENT SFTP_DIRENT;
 
 struct SFTP_DIRENT {
index 9dc1f98..3a70c52 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-common.c,v 1.28 2015/01/20 23:14:00 deraadt Exp $ */
+/* $OpenBSD: sftp-common.c,v 1.29 2016/09/12 01:22:38 deraadt Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2001 Damien Miller.  All rights reserved.
@@ -26,7 +26,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MAX */
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -45,6 +44,7 @@
 #include "ssherr.h"
 #include "sshbuf.h"
 #include "log.h"
+#include "misc.h"
 
 #include "sftp.h"
 #include "sftp-common.h"
@@ -243,8 +243,8 @@ ls_file(const char *name, const struct stat *st, int remote, int si_units)
        }
        if (sz == 0)
                tbuf[0] = '\0';
-       ulen = MAX(strlen(user), 8);
-       glen = MAX(strlen(group), 8);
+       ulen = MAXIMUM(strlen(user), 8);
+       glen = MAXIMUM(strlen(group), 8);
        if (si_units) {
                fmt_scaled((long long)st->st_size, sbuf);
                snprintf(buf, sizeof buf, "%s %3u %-*s %-*s %8s %s %s", mode,
index 7e644ab..c6ccd62 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server-main.c,v 1.4 2009/02/21 19:32:04 tobias Exp $ */
+/* $OpenBSD: sftp-server-main.c,v 1.5 2016/02/15 09:47:49 dtucker Exp $ */
 /*
  * Copyright (c) 2008 Markus Friedl.  All rights reserved.
  *
@@ -26,6 +26,7 @@
 #include "log.h"
 #include "sftp.h"
 #include "misc.h"
+#include "xmalloc.h"
 
 void
 cleanup_exit(int i)
@@ -38,6 +39,7 @@ main(int argc, char **argv)
 {
        struct passwd *user_pw;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
        sanitise_stdfd();
 
index b971cef..20d477d 100644 (file)
@@ -93,4 +93,4 @@ HISTORY
 AUTHORS
      Markus Friedl <markus@openbsd.org>
 
-OpenBSD 5.8                    December 11, 2014                   OpenBSD 5.8
+OpenBSD 6.0                    December 11, 2014                   OpenBSD 6.0
index eac11d7..3619cdf 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.107 2015/08/20 22:32:42 deraadt Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.110 2016/09/12 01:22:38 deraadt Exp $ */
 /*
  * Copyright (c) 2000-2004 Markus Friedl.  All rights reserved.
  *
@@ -17,7 +17,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN */
 #include <sys/types.h>
 #include <sys/stat.h>
 #ifdef HAVE_SYS_TIME_H
@@ -29,9 +28,6 @@
 #ifdef HAVE_SYS_STATVFS_H
 #include <sys/statvfs.h>
 #endif
-#ifdef HAVE_SYS_PRCTL_H
-#include <sys/prctl.h>
-#endif
 
 #include <dirent.h>
 #include <errno.h>
@@ -508,7 +504,7 @@ status_to_message(u_int32_t status)
                "Operation unsupported",        /* SSH_FX_OP_UNSUPPORTED */
                "Unknown error"                 /* Others */
        };
-       return (status_messages[MIN(status,SSH2_FX_MAX)]);
+       return (status_messages[MINIMUM(status,SSH2_FX_MAX)]);
 }
 
 static void
@@ -1513,6 +1509,7 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
        extern char *optarg;
        extern char *__progname;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        __progname = ssh_get_progname(argv[0]);
        log_init(__progname, log_level, log_facility, log_stderr);
 
@@ -1587,16 +1584,16 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
 
        log_init(__progname, log_level, log_facility, log_stderr);
 
-#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
        /*
-        * On Linux, we should try to avoid making /proc/self/{mem,maps}
+        * On platforms where we can, avoid making /proc/self/{mem,maps}
         * available to the user so that sftp access doesn't automatically
         * imply arbitrary code execution access that will break
         * restricted configurations.
         */
-       if (prctl(PR_SET_DUMPABLE, 0) != 0)
-               fatal("unable to make the process undumpable");
-#endif /* defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) */
+       platform_disable_tracing(1);    /* strict */
+
+       /* Drop any fine-grained privileges we don't need */
+       platform_pledge_sftp_server();
 
        if ((cp = getenv("SSH_CONNECTION")) != NULL) {
                client_addr = xstrdup(cp);
@@ -1631,9 +1628,8 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
        if ((oqueue = sshbuf_new()) == NULL)
                fatal("%s: sshbuf_new failed", __func__);
 
-       set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
-       rset = xmalloc(set_size);
-       wset = xmalloc(set_size);
+       rset = xcalloc(howmany(max + 1, NFDBITS), sizeof(fd_mask));
+       wset = xcalloc(howmany(max + 1, NFDBITS), sizeof(fd_mask));
 
        if (homedir != NULL) {
                if (chdir(homedir) != 0) {
@@ -1642,6 +1638,7 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
                }
        }
 
+       set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
        for (;;) {
                memset(rset, 0, set_size);
                memset(wset, 0, set_size);
diff --git a/sftp.0 b/sftp.0
index 550f276..2e0c274 100644 (file)
--- a/sftp.0
+++ b/sftp.0
@@ -108,6 +108,7 @@ DESCRIPTION
                    CanonicalizeHostname
                    CanonicalizeMaxDots
                    CanonicalizePermittedCNAMEs
+                   CertificateFile
                    ChallengeResponseAuthentication
                    CheckHostIP
                    Cipher
@@ -129,8 +130,9 @@ DESCRIPTION
                    HostKeyAlgorithms
                    HostKeyAlias
                    HostName
-                   IdentityFile
                    IdentitiesOnly
+                   IdentityAgent
+                   IdentityFile
                    IPQoS
                    KbdInteractiveAuthentication
                    KbdInteractiveDevices
@@ -145,6 +147,7 @@ DESCRIPTION
                    PreferredAuthentications
                    Protocol
                    ProxyCommand
+                   ProxyJump
                    PubkeyAuthentication
                    RekeyLimit
                    RhostsRSAAuthentication
@@ -380,4 +383,4 @@ SEE ALSO
      T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
      filexfer-00.txt, January 2001, work in progress material.
 
-OpenBSD 5.8                    January 30, 2015                    OpenBSD 5.8
+OpenBSD 6.0                      July 16, 2016                     OpenBSD 6.0
diff --git a/sftp.1 b/sftp.1
index 214f011..fbdd00a 100644 (file)
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sftp.1,v 1.101 2015/01/30 11:43:14 djm Exp $
+.\" $OpenBSD: sftp.1,v 1.105 2016/07/16 06:57:55 jmc Exp $
 .\"
 .\" Copyright (c) 2001 Damien Miller.  All rights reserved.
 .\"
@@ -22,7 +22,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd $Mdocdate: January 30 2015 $
+.Dd $Mdocdate: July 16 2016 $
 .Dt SFTP 1
 .Os
 .Sh NAME
@@ -198,6 +198,7 @@ For full details of the options listed below, and their possible values, see
 .It CanonicalizeHostname
 .It CanonicalizeMaxDots
 .It CanonicalizePermittedCNAMEs
+.It CertificateFile
 .It ChallengeResponseAuthentication
 .It CheckHostIP
 .It Cipher
@@ -219,8 +220,9 @@ For full details of the options listed below, and their possible values, see
 .It HostKeyAlgorithms
 .It HostKeyAlias
 .It HostName
-.It IdentityFile
 .It IdentitiesOnly
+.It IdentityAgent
+.It IdentityFile
 .It IPQoS
 .It KbdInteractiveAuthentication
 .It KbdInteractiveDevices
@@ -235,6 +237,7 @@ For full details of the options listed below, and their possible values, see
 .It PreferredAuthentications
 .It Protocol
 .It ProxyCommand
+.It ProxyJump
 .It PubkeyAuthentication
 .It RekeyLimit
 .It RhostsRSAAuthentication
diff --git a/sftp.c b/sftp.c
index 788601a..76add39 100644 (file)
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.171 2015/08/20 22:32:42 deraadt Exp $ */
+/* $OpenBSD: sftp.c,v 1.178 2017/02/15 01:46:47 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
  *
@@ -17,7 +17,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN MAX */
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #ifdef HAVE_SYS_STAT_H
@@ -49,6 +48,7 @@ typedef void EditLine;
 #endif
 #include <limits.h>
 #include <signal.h>
+#include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -63,6 +63,7 @@ typedef void EditLine;
 #include "log.h"
 #include "pathnames.h"
 #include "misc.h"
+#include "utf8.h"
 
 #include "sftp.h"
 #include "ssherr.h"
@@ -231,6 +232,18 @@ killchild(int signo)
 
 /* ARGSUSED */
 static void
+suspchild(int signo)
+{
+       if (sshpid > 1) {
+               kill(sshpid, signo);
+               while (waitpid(sshpid, NULL, WUNTRACED) == -1 && errno == EINTR)
+                       continue;
+       }
+       kill(getpid(), SIGSTOP);
+}
+
+/* ARGSUSED */
+static void
 cmd_interrupt(int signo)
 {
        const char msg[] = "\rInterrupt  \n";
@@ -335,7 +348,7 @@ local_do_ls(const char *args)
 
 /* Strip one path (usually the pwd) from the start of another */
 static char *
-path_strip(char *path, char *strip)
+path_strip(const char *path, const char *strip)
 {
        size_t len;
 
@@ -353,7 +366,7 @@ path_strip(char *path, char *strip)
 }
 
 static char *
-make_absolute(char *p, char *pwd)
+make_absolute(char *p, const char *pwd)
 {
        char *abs_str;
 
@@ -551,7 +564,7 @@ parse_no_flags(const char *cmd, char **argv, int argc)
 }
 
 static int
-is_dir(char *path)
+is_dir(const char *path)
 {
        struct stat sb;
 
@@ -563,7 +576,7 @@ is_dir(char *path)
 }
 
 static int
-remote_is_dir(struct sftp_conn *conn, char *path)
+remote_is_dir(struct sftp_conn *conn, const char *path)
 {
        Attrib *a;
 
@@ -577,7 +590,7 @@ remote_is_dir(struct sftp_conn *conn, char *path)
 
 /* Check whether path returned from glob(..., GLOB_MARK, ...) is a directory */
 static int
-pathname_is_dir(char *pathname)
+pathname_is_dir(const char *pathname)
 {
        size_t l = strlen(pathname);
 
@@ -585,8 +598,8 @@ pathname_is_dir(char *pathname)
 }
 
 static int
-process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd,
-    int pflag, int rflag, int resume, int fflag)
+process_get(struct sftp_conn *conn, const char *src, const char *dst,
+    const char *pwd, int pflag, int rflag, int resume, int fflag)
 {
        char *abs_src = NULL;
        char *abs_dst = NULL;
@@ -644,9 +657,11 @@ process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd,
 
                resume |= global_aflag;
                if (!quiet && resume)
-                       printf("Resuming %s to %s\n", g.gl_pathv[i], abs_dst);
+                       mprintf("Resuming %s to %s\n",
+                           g.gl_pathv[i], abs_dst);
                else if (!quiet && !resume)
-                       printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
+                       mprintf("Fetching %s to %s\n",
+                           g.gl_pathv[i], abs_dst);
                if (pathname_is_dir(g.gl_pathv[i]) && (rflag || global_rflag)) {
                        if (download_dir(conn, g.gl_pathv[i], abs_dst, NULL,
                            pflag || global_pflag, 1, resume,
@@ -669,8 +684,8 @@ out:
 }
 
 static int
-process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd,
-    int pflag, int rflag, int resume, int fflag)
+process_put(struct sftp_conn *conn, const char *src, const char *dst,
+    const char *pwd, int pflag, int rflag, int resume, int fflag)
 {
        char *tmp_dst = NULL;
        char *abs_dst = NULL;
@@ -735,10 +750,11 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd,
 
                 resume |= global_aflag;
                if (!quiet && resume)
-                       printf("Resuming upload of %s to %s\n", g.gl_pathv[i], 
-                               abs_dst);
+                       mprintf("Resuming upload of %s to %s\n",
+                           g.gl_pathv[i], abs_dst);
                else if (!quiet && !resume)
-                       printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst);
+                       mprintf("Uploading %s to %s\n",
+                           g.gl_pathv[i], abs_dst);
                if (pathname_is_dir(g.gl_pathv[i]) && (rflag || global_rflag)) {
                        if (upload_dir(conn, g.gl_pathv[i], abs_dst,
                            pflag || global_pflag, 1, resume,
@@ -779,7 +795,8 @@ sdirent_comp(const void *aa, const void *bb)
 
 /* sftp ls.1 replacement for directories */
 static int
-do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
+do_ls_dir(struct sftp_conn *conn, const char *path,
+    const char *strip_path, int lflag)
 {
        int n;
        u_int c = 1, colspace = 0, columns = 1;
@@ -796,7 +813,7 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
                /* Count entries for sort and find longest filename */
                for (n = 0; d[n] != NULL; n++) {
                        if (d[n]->filename[0] != '.' || (lflag & LS_SHOW_ALL))
-                               m = MAX(m, strlen(d[n]->filename));
+                               m = MAXIMUM(m, strlen(d[n]->filename));
                }
 
                /* Add any subpath that also needs to be counted */
@@ -808,9 +825,9 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
                        width = ws.ws_col;
 
                columns = width / (m + 2);
-               columns = MAX(columns, 1);
+               columns = MAXIMUM(columns, 1);
                colspace = width / columns;
-               colspace = MIN(colspace, width);
+               colspace = MINIMUM(colspace, width);
        }
 
        if (lflag & SORT_FLAGS) {
@@ -839,12 +856,12 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
                                attrib_to_stat(&d[n]->a, &sb);
                                lname = ls_file(fname, &sb, 1,
                                    (lflag & LS_SI_UNITS));
-                               printf("%s\n", lname);
+                               mprintf("%s\n", lname);
                                free(lname);
                        } else
-                               printf("%s\n", d[n]->longname);
+                               mprintf("%s\n", d[n]->longname);
                } else {
-                       printf("%-*s", colspace, fname);
+                       mprintf("%-*s", colspace, fname);
                        if (c >= columns) {
                                printf("\n");
                                c = 1;
@@ -864,8 +881,8 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
 
 /* sftp ls.1 replacement which handles path globs */
 static int
-do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
-    int lflag)
+do_globbed_ls(struct sftp_conn *conn, const char *path,
+    const char *strip_path, int lflag)
 {
        char *fname, *lname;
        glob_t g;
@@ -909,10 +926,10 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
        if (!(lflag & LS_SHORT_VIEW)) {
                /* Count entries for sort and find longest filename */
                for (i = 0; g.gl_pathv[i]; i++)
-                       m = MAX(m, strlen(g.gl_pathv[i]));
+                       m = MAXIMUM(m, strlen(g.gl_pathv[i]));
 
                columns = width / (m + 2);
-               columns = MAX(columns, 1);
+               columns = MAXIMUM(columns, 1);
                colspace = width / columns;
        }
 
@@ -925,10 +942,10 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
                        }
                        lname = ls_file(fname, g.gl_statv[i], 1,
                            (lflag & LS_SI_UNITS));
-                       printf("%s\n", lname);
+                       mprintf("%s\n", lname);
                        free(lname);
                } else {
-                       printf("%-*s", colspace, fname);
+                       mprintf("%-*s", colspace, fname);
                        if (c >= columns) {
                                printf("\n");
                                c = 1;
@@ -949,26 +966,37 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
 }
 
 static int
-do_df(struct sftp_conn *conn, char *path, int hflag, int iflag)
+do_df(struct sftp_conn *conn, const char *path, int hflag, int iflag)
 {
        struct sftp_statvfs st;
-       char s_used[FMT_SCALED_STRSIZE];
-       char s_avail[FMT_SCALED_STRSIZE];
-       char s_root[FMT_SCALED_STRSIZE];
-       char s_total[FMT_SCALED_STRSIZE];
-       unsigned long long ffree;
+       char s_used[FMT_SCALED_STRSIZE], s_avail[FMT_SCALED_STRSIZE];
+       char s_root[FMT_SCALED_STRSIZE], s_total[FMT_SCALED_STRSIZE];
+       char s_icapacity[16], s_dcapacity[16];
 
        if (do_statvfs(conn, path, &st, 1) == -1)
                return -1;
+       if (st.f_files == 0)
+               strlcpy(s_icapacity, "ERR", sizeof(s_icapacity));
+       else {
+               snprintf(s_icapacity, sizeof(s_icapacity), "%3llu%%",
+                   (unsigned long long)(100 * (st.f_files - st.f_ffree) /
+                   st.f_files));
+       }
+       if (st.f_blocks == 0)
+               strlcpy(s_dcapacity, "ERR", sizeof(s_dcapacity));
+       else {
+               snprintf(s_dcapacity, sizeof(s_dcapacity), "%3llu%%",
+                   (unsigned long long)(100 * (st.f_blocks - st.f_bfree) /
+                   st.f_blocks));
+       }
        if (iflag) {
-               ffree = st.f_files ? (100 * (st.f_files - st.f_ffree) / st.f_files) : 0;
                printf("     Inodes        Used       Avail      "
                    "(root)    %%Capacity\n");
-               printf("%11llu %11llu %11llu %11llu         %3llu%%\n",
+               printf("%11llu %11llu %11llu %11llu         %s\n",
                    (unsigned long long)st.f_files,
                    (unsigned long long)(st.f_files - st.f_ffree),
                    (unsigned long long)st.f_favail,
-                   (unsigned long long)st.f_ffree, ffree);
+                   (unsigned long long)st.f_ffree, s_icapacity);
        } else if (hflag) {
                strlcpy(s_used, "error", sizeof(s_used));
                strlcpy(s_avail, "error", sizeof(s_avail));
@@ -979,21 +1007,18 @@ do_df(struct sftp_conn *conn, char *path, int hflag, int iflag)
                fmt_scaled(st.f_bfree * st.f_frsize, s_root);
                fmt_scaled(st.f_blocks * st.f_frsize, s_total);
                printf("    Size     Used    Avail   (root)    %%Capacity\n");
-               printf("%7sB %7sB %7sB %7sB         %3llu%%\n",
-                   s_total, s_used, s_avail, s_root,
-                   (unsigned long long)(100 * (st.f_blocks - st.f_bfree) /
-                   st.f_blocks));
+               printf("%7sB %7sB %7sB %7sB         %s\n",
+                   s_total, s_used, s_avail, s_root, s_dcapacity);
        } else {
                printf("        Size         Used        Avail       "
                    "(root)    %%Capacity\n");
-               printf("%12llu %12llu %12llu %12llu         %3llu%%\n",
+               printf("%12llu %12llu %12llu %12llu         %s\n",
                    (unsigned long long)(st.f_frsize * st.f_blocks / 1024),
                    (unsigned long long)(st.f_frsize *
                    (st.f_blocks - st.f_bfree) / 1024),
                    (unsigned long long)(st.f_frsize * st.f_bavail / 1024),
                    (unsigned long long)(st.f_frsize * st.f_bfree / 1024),
-                   (unsigned long long)(100 * (st.f_blocks - st.f_bfree) /
-                   st.f_blocks));
+                   s_dcapacity);
        }
        return 0;
 }
@@ -1205,7 +1230,7 @@ makeargv(const char *arg, int *argcp, int sloppy, char *lastquote,
 
 static int
 parse_args(const char **cpp, int *ignore_errors, int *aflag,
-         int *fflag, int *hflag, int *iflag, int *lflag, int *pflag, 
+         int *fflag, int *hflag, int *iflag, int *lflag, int *pflag,
          int *rflag, int *sflag,
     unsigned long *n_arg, char **path1, char **path2)
 {
@@ -1397,7 +1422,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
     int err_abort)
 {
        char *path1, *path2, *tmp;
-       int ignore_errors = 0, aflag = 0, fflag = 0, hflag = 0, 
+       int ignore_errors = 0, aflag = 0, fflag = 0, hflag = 0,
        iflag = 0;
        int lflag = 0, pflag = 0, rflag = 0, sflag = 0;
        int cmdnum, i;
@@ -1456,7 +1481,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
                remote_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
                for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
                        if (!quiet)
-                               printf("Removing %s\n", g.gl_pathv[i]);
+                               mprintf("Removing %s\n", g.gl_pathv[i]);
                        err = do_rm(conn, g.gl_pathv[i]);
                        if (err != 0 && err_abort)
                                break;
@@ -1556,7 +1581,8 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
                remote_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
                for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
                        if (!quiet)
-                               printf("Changing mode on %s\n", g.gl_pathv[i]);
+                               mprintf("Changing mode on %s\n",
+                                   g.gl_pathv[i]);
                        err = do_setstat(conn, g.gl_pathv[i], &a);
                        if (err != 0 && err_abort)
                                break;
@@ -1586,12 +1612,12 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
                        aa->flags &= SSH2_FILEXFER_ATTR_UIDGID;
                        if (cmdnum == I_CHOWN) {
                                if (!quiet)
-                                       printf("Changing owner on %s\n",
+                                       mprintf("Changing owner on %s\n",
                                            g.gl_pathv[i]);
                                aa->uid = n_arg;
                        } else {
                                if (!quiet)
-                                       printf("Changing group on %s\n",
+                                       mprintf("Changing group on %s\n",
                                            g.gl_pathv[i]);
                                aa->gid = n_arg;
                        }
@@ -1601,7 +1627,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
                }
                break;
        case I_PWD:
-               printf("Remote working directory: %s\n", *pwd);
+               mprintf("Remote working directory: %s\n", *pwd);
                break;
        case I_LPWD:
                if (!getcwd(path_buf, sizeof(path_buf))) {
@@ -1609,7 +1635,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
                        err = -1;
                        break;
                }
-               printf("Local working directory: %s\n", path_buf);
+               mprintf("Local working directory: %s\n", path_buf);
                break;
        case I_QUIT:
                /* Processed below */
@@ -1662,23 +1688,23 @@ complete_display(char **list, u_int len)
 
        /* Count entries for sort and find longest */
        for (y = 0; list[y]; y++)
-               m = MAX(m, strlen(list[y]));
+               m = MAXIMUM(m, strlen(list[y]));
 
        if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)
                width = ws.ws_col;
 
        m = m > len ? m - len : 0;
        columns = width / (m + 2);
-       columns = MAX(columns, 1);
+       columns = MAXIMUM(columns, 1);
        colspace = width / columns;
-       colspace = MIN(colspace, width);
+       colspace = MINIMUM(colspace, width);
 
        printf("\n");
        m = 1;
        for (y = 0; list[y]; y++) {
                llen = strlen(list[y]);
                tmp = llen > len ? list[y] + len : "";
-               printf("%-*s", colspace, tmp);
+               mprintf("%-*s", colspace, tmp);
                if (m >= columns) {
                        printf("\n");
                        m = 1;
@@ -2062,7 +2088,7 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
 
                if (remote_is_dir(conn, dir) && file2 == NULL) {
                        if (!quiet)
-                               printf("Changing to: %s\n", dir);
+                               mprintf("Changing to: %s\n", dir);
                        snprintf(cmd, sizeof cmd, "cd \"%s\"", dir);
                        if (parse_dispatch_command(conn, cmd,
                            &remote_path, 1) != 0) {
@@ -2106,7 +2132,7 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
                                break;
                        }
                        if (!interactive) { /* Echo command */
-                               printf("sftp> %s", cmd);
+                               mprintf("sftp> %s", cmd);
                                if (strlen(cmd) > 0 &&
                                    cmd[strlen(cmd) - 1] != '\n')
                                        printf("\n");
@@ -2207,6 +2233,9 @@ connect_to_server(char *path, char **args, int *in, int *out)
        signal(SIGTERM, killchild);
        signal(SIGINT, killchild);
        signal(SIGHUP, killchild);
+       signal(SIGTSTP, suspchild);
+       signal(SIGTTIN, suspchild);
+       signal(SIGTTOU, suspchild);
        close(c_in);
        close(c_out);
 }
@@ -2248,9 +2277,10 @@ main(int argc, char **argv)
        size_t num_requests = DEFAULT_NUM_REQUESTS;
        long long limit_kbps = 0;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
        sanitise_stdfd();
-       setlocale(LC_CTYPE, "");
+       msetlocale();
 
        __progname = ssh_get_progname(argv[0]);
        memset(&args, '\0', sizeof(args));
index 29db710..706bfe6 100644 (file)
--- a/ssh-add.0
+++ b/ssh-add.0
@@ -126,4 +126,4 @@ AUTHORS
      created OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-OpenBSD 5.8                     March 30, 2015                     OpenBSD 5.8
+OpenBSD 6.0                     March 30, 2015                     OpenBSD 6.0
index d6271d7..fb9a53e 100644 (file)
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.123 2015/07/03 03:43:18 djm Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.128 2016/02/15 09:47:49 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -93,7 +93,7 @@ static int lifetime = 0;
 /* User has to confirm key use */
 static int confirm = 0;
 
-/* we keep a cache of one passphrases */
+/* we keep a cache of one passphrase */
 static char *pass = NULL;
 static void
 clear_pass(void)
@@ -150,10 +150,8 @@ delete_file(int agent_fd, const char *filename, int key_only)
                    certpath, ssh_err(r));
 
  out:
-       if (cert != NULL)
-               sshkey_free(cert);
-       if (public != NULL)
-               sshkey_free(public);
+       sshkey_free(cert);
+       sshkey_free(public);
        free(certpath);
        free(comment);
 
@@ -218,35 +216,32 @@ add_file(int agent_fd, const char *filename, int key_only)
        close(fd);
 
        /* At first, try empty passphrase */
-       if ((r = sshkey_parse_private_fileblob(keyblob, "", filename,
-           &private, &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
+       if ((r = sshkey_parse_private_fileblob(keyblob, "", &private,
+           &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
                fprintf(stderr, "Error loading key \"%s\": %s\n",
                    filename, ssh_err(r));
                goto fail_load;
        }
        /* try last */
        if (private == NULL && pass != NULL) {
-               if ((r = sshkey_parse_private_fileblob(keyblob, pass, filename,
-                   &private, &comment)) != 0 &&
-                   r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
+               if ((r = sshkey_parse_private_fileblob(keyblob, pass, &private,
+                   &comment)) != 0 && r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
                        fprintf(stderr, "Error loading key \"%s\": %s\n",
                            filename, ssh_err(r));
                        goto fail_load;
                }
        }
-       if (comment == NULL)
-               comment = xstrdup(filename);
        if (private == NULL) {
                /* clear passphrase since it did not work */
                clear_pass();
-               snprintf(msg, sizeof msg, "Enter passphrase for %.200s%s: ",
-                   comment, confirm ? " (will confirm each use)" : "");
+               snprintf(msg, sizeof msg, "Enter passphrase for %s%s: ",
+                   filename, confirm ? " (will confirm each use)" : "");
                for (;;) {
                        pass = read_passphrase(msg, RP_ALLOW_STDIN);
                        if (strcmp(pass, "") == 0)
                                goto fail_load;
                        if ((r = sshkey_parse_private_fileblob(keyblob, pass,
-                           filename, &private, NULL)) == 0)
+                           &private, &comment)) == 0)
                                break;
                        else if (r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
                                fprintf(stderr,
@@ -254,16 +249,17 @@ add_file(int agent_fd, const char *filename, int key_only)
                                    filename, ssh_err(r));
  fail_load:
                                clear_pass();
-                               free(comment);
                                sshbuf_free(keyblob);
                                return -1;
                        }
                        clear_pass();
                        snprintf(msg, sizeof msg,
-                           "Bad passphrase, try again for %.200s%s: ", comment,
+                           "Bad passphrase, try again for %s%s: ", filename,
                            confirm ? " (will confirm each use)" : "");
                }
        }
+       if (comment == NULL || *comment == '\0')
+               comment = xstrdup(filename);
        sshbuf_free(keyblob);
 
        if ((r = ssh_add_identity_constrained(agent_fd, private, comment,
@@ -386,7 +382,7 @@ list_identities(int agent_fd, int do_fp)
                        if (do_fp) {
                                fp = sshkey_fingerprint(idlist->keys[i],
                                    fingerprint_hash, SSH_FP_DEFAULT);
-                               printf("%d %s %s (%s)\n",
+                               printf("%u %s %s (%s)\n",
                                    sshkey_size(idlist->keys[i]),
                                    fp == NULL ? "(null)" : fp,
                                    idlist->comments[i],
@@ -485,6 +481,7 @@ main(int argc, char **argv)
        int r, i, ch, deleting = 0, ret = 0, key_only = 0;
        int xflag = 0, lflag = 0, Dflag = 0;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
        sanitise_stdfd();
 
index 65bf6e7..bb3c8d6 100644 (file)
@@ -5,7 +5,7 @@ NAME
 
 SYNOPSIS
      ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]
-               [-t life] [command [arg ...]]
+               [-P pkcs11_whitelist] [-t life] [command [arg ...]]
      ssh-agent [-c | -s] -k
 
 DESCRIPTION
@@ -18,10 +18,10 @@ DESCRIPTION
      using ssh(1).
 
      The agent initially does not have any private keys.  Keys are added using
-     ssh-add(1).  Multiple identities may be stored in ssh-agent concurrently
-     and ssh(1) will automatically use them if present.  ssh-add(1) is also
-     used to remove keys from ssh-agent and to query the keys that are held in
-     one.
+     ssh(1) (see AddKeysToAgent in ssh_config(5) for details) or ssh-add(1).
+     Multiple identities may be stored in ssh-agent concurrently and ssh(1)
+     will automatically use them if present.  ssh-add(1) is also used to
+     remove keys from ssh-agent and to query the keys that are held in one.
 
      The options are as follows:
 
@@ -46,6 +46,14 @@ DESCRIPTION
      -k      Kill the current agent (given by the SSH_AGENT_PID environment
              variable).
 
+     -P pkcs11_whitelist
+             Specify a pattern-list of acceptable paths for PKCS#11 shared
+             libraries that may be added using the -s option to ssh-add(1).
+             The default is to allow loading PKCS#11 libraries from
+             M-bM-^@M-^\/usr/lib/*,/usr/local/lib/*M-bM-^@M-^].  PKCS#11 libraries that do not
+             match the whitelist will be refused.  See PATTERNS in
+             ssh_config(5) for a description of pattern-list syntax.
+
      -s      Generate Bourne shell commands on stdout.  This is the default if
              SHELL does not look like it's a csh style of shell.
 
@@ -56,8 +64,8 @@ DESCRIPTION
              for an identity with ssh-add(1) overrides this value.  Without
              this option the default maximum lifetime is forever.
 
-     If a commandline is given, this is executed as a subprocess of the agent.
-     When the command dies, so does the agent.
+     If a command line is given, this is executed as a subprocess of the
+     agent.  When the command dies, so does the agent.
 
      The idea is that the agent is run in the user's local PC, laptop, or
      terminal.  Authentication data need not be stored on any other machine,
@@ -109,4 +117,4 @@ AUTHORS
      created OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-OpenBSD 5.8                     April 24, 2015                     OpenBSD 5.8
+OpenBSD 6.0                    November 30, 2016                   OpenBSD 6.0
index d0aa712..83b2b41 100644 (file)
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ssh-agent.1,v 1.59 2015/04/24 06:26:49 jmc Exp $
+.\" $OpenBSD: ssh-agent.1,v 1.64 2016/11/30 06:54:26 jmc Exp $
 .\"
 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -34,7 +34,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd $Mdocdate: April 24 2015 $
+.Dd $Mdocdate: November 30 2016 $
 .Dt SSH-AGENT 1
 .Os
 .Sh NAME
 .Sh SYNOPSIS
 .Nm ssh-agent
 .Op Fl c | s
-.Op Fl Dd
+.Op Fl \&Dd
 .Op Fl a Ar bind_address
 .Op Fl E Ar fingerprint_hash
+.Op Fl P Ar pkcs11_whitelist
 .Op Fl t Ar life
 .Op Ar command Op Ar arg ...
 .Nm ssh-agent
@@ -66,6 +67,13 @@ machines using
 .Pp
 The agent initially does not have any private keys.
 Keys are added using
+.Xr ssh 1
+(see
+.Cm AddKeysToAgent
+in
+.Xr ssh_config 5
+for details)
+or
 .Xr ssh-add 1 .
 Multiple identities may be stored in
 .Nm
@@ -114,6 +122,18 @@ The default is
 Kill the current agent (given by the
 .Ev SSH_AGENT_PID
 environment variable).
+.It Fl P Ar pkcs11_whitelist
+Specify a pattern-list of acceptable paths for PKCS#11 shared libraries
+that may be added using the
+.Fl s
+option to
+.Xr ssh-add 1 .
+The default is to allow loading PKCS#11 libraries from
+.Dq /usr/lib/*,/usr/local/lib/* .
+PKCS#11 libraries that do not match the whitelist will be refused.
+See PATTERNS in
+.Xr ssh_config 5
+for a description of pattern-list syntax.
 .It Fl s
 Generate Bourne shell commands on
 .Dv stdout .
@@ -130,7 +150,7 @@ overrides this value.
 Without this option the default maximum lifetime is forever.
 .El
 .Pp
-If a commandline is given, this is executed as a subprocess of the agent.
+If a command line is given, this is executed as a subprocess of the agent.
 When the command dies, so does the agent.
 .Pp
 The idea is that the agent is run in the user's local PC, laptop, or
@@ -188,7 +208,7 @@ The agent exits automatically when the command given on the command
 line terminates.
 .Sh FILES
 .Bl -tag -width Ds
-.It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt
+.It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>
 .Ux Ns -domain
 sockets used to contain the connection to the authentication agent.
 These sockets should only be readable by the owner.
@@ -200,11 +220,12 @@ The sockets should get automatically removed when the agent exits.
 .Xr ssh-keygen 1 ,
 .Xr sshd 8
 .Sh AUTHORS
-OpenSSH is a derivative of the original and free
-ssh 1.2.12 release by Tatu Ylonen.
-Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
-Theo de Raadt and Dug Song
-removed many bugs, re-added newer features and
-created OpenSSH.
-Markus Friedl contributed the support for SSH
-protocol versions 1.5 and 2.0.
+.An -nosplit
+OpenSSH is a derivative of the original and free ssh 1.2.12 release by
+.An Tatu Ylonen .
+.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , Theo de Raadt
+and
+.An Dug Song
+removed many bugs, re-added newer features and created OpenSSH.
+.An Markus Friedl
+contributed the support for SSH protocol versions 1.5 and 2.0.
index a335ea3..b987562 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.204 2015/07/08 20:24:02 markus Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.218 2017/03/15 03:52:30 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -36,7 +36,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN MAX */
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/resource.h>
 #include "misc.h"
 #include "digest.h"
 #include "ssherr.h"
+#include "match.h"
 
 #ifdef ENABLE_PKCS11
 #include "ssh-pkcs11.h"
 #endif
 
-#if defined(HAVE_SYS_PRCTL_H)
-#include <sys/prctl.h> /* For prctl() and PR_SET_DUMPABLE */
+#ifndef DEFAULT_PKCS11_WHITELIST
+# define DEFAULT_PKCS11_WHITELIST "/usr/lib*/*,/usr/local/lib*/*"
 #endif
 
 typedef enum {
@@ -139,13 +139,16 @@ pid_t cleanup_pid = 0;
 char socket_name[PATH_MAX];
 char socket_dir[PATH_MAX];
 
+/* PKCS#11 path whitelist */
+static char *pkcs11_whitelist;
+
 /* locking */
 #define LOCK_SIZE      32
 #define LOCK_SALT_SIZE 16
 #define LOCK_ROUNDS    1
 int locked = 0;
-char lock_passwd[LOCK_SIZE];
-char lock_salt[LOCK_SALT_SIZE];
+u_char lock_pwhash[LOCK_SIZE];
+u_char lock_salt[LOCK_SALT_SIZE];
 
 extern char *__progname;
 
@@ -368,6 +371,18 @@ process_authentication_challenge1(SocketEntry *e)
 }
 #endif
 
+static char *
+agent_decode_alg(struct sshkey *key, u_int flags)
+{
+       if (key->type == KEY_RSA) {
+               if (flags & SSH_AGENT_RSA_SHA2_256)
+                       return "rsa-sha2-256";
+               else if (flags & SSH_AGENT_RSA_SHA2_512)
+                       return "rsa-sha2-512";
+       }
+       return NULL;
+}
+
 /* ssh2 only */
 static void
 process_sign_request2(SocketEntry *e)
@@ -389,7 +404,7 @@ process_sign_request2(SocketEntry *e)
        if (flags & SSH_AGENT_OLD_SIGNATURE)
                compat = SSH_BUG_SIGBLOB;
        if ((r = sshkey_from_blob(blob, blen, &key)) != 0) {
-               error("%s: cannot parse key blob: %s", __func__, ssh_err(ok));
+               error("%s: cannot parse key blob: %s", __func__, ssh_err(r));
                goto send;
        }
        if ((id = lookup_identity(key, 2)) == NULL) {
@@ -401,8 +416,8 @@ process_sign_request2(SocketEntry *e)
                goto send;
        }
        if ((r = sshkey_sign(id->key, &signature, &slen,
-           data, dlen, compat)) != 0) {
-               error("%s: sshkey_sign: %s", __func__, ssh_err(ok));
+           data, dlen, agent_decode_alg(key, flags), compat)) != 0) {
+               error("%s: sshkey_sign: %s", __func__, ssh_err(r));
                goto send;
        }
        /* Success */
@@ -531,7 +546,7 @@ reaper(void)
                                tab->nentries--;
                        } else
                                deadline = (deadline == 0) ? id->death :
-                                   MIN(deadline, id->death);
+                                   MINIMUM(deadline, id->death);
                }
        }
        if (deadline == 0 || deadline <= now)
@@ -665,7 +680,8 @@ static void
 process_lock_agent(SocketEntry *e, int lock)
 {
        int r, success = 0, delay;
-       char *passwd, passwdhash[LOCK_SIZE];
+       char *passwd;
+       u_char passwdhash[LOCK_SIZE];
        static u_int fail_count = 0;
        size_t pwlen;
 
@@ -677,11 +693,11 @@ process_lock_agent(SocketEntry *e, int lock)
                if (bcrypt_pbkdf(passwd, pwlen, lock_salt, sizeof(lock_salt),
                    passwdhash, sizeof(passwdhash), LOCK_ROUNDS) < 0)
                        fatal("bcrypt_pbkdf");
-               if (timingsafe_bcmp(passwdhash, lock_passwd, LOCK_SIZE) == 0) {
+               if (timingsafe_bcmp(passwdhash, lock_pwhash, LOCK_SIZE) == 0) {
                        debug("agent unlocked");
                        locked = 0;
                        fail_count = 0;
-                       explicit_bzero(lock_passwd, sizeof(lock_passwd));
+                       explicit_bzero(lock_pwhash, sizeof(lock_pwhash));
                        success = 1;
                } else {
                        /* delay in 0.1s increments up to 10s */
@@ -698,7 +714,7 @@ process_lock_agent(SocketEntry *e, int lock)
                locked = 1;
                arc4random_buf(lock_salt, sizeof(lock_salt));
                if (bcrypt_pbkdf(passwd, pwlen, lock_salt, sizeof(lock_salt),
-                   lock_passwd, sizeof(lock_passwd), LOCK_ROUNDS) < 0)
+                   lock_pwhash, sizeof(lock_pwhash), LOCK_ROUNDS) < 0)
                        fatal("bcrypt_pbkdf");
                success = 1;
        }
@@ -729,7 +745,7 @@ no_identities(SocketEntry *e, u_int type)
 static void
 process_add_smartcard_key(SocketEntry *e)
 {
-       char *provider = NULL, *pin;
+       char *provider = NULL, *pin, canonical_provider[PATH_MAX];
        int r, i, version, count = 0, success = 0, confirm = 0;
        u_int seconds;
        time_t death = 0;
@@ -761,10 +777,21 @@ process_add_smartcard_key(SocketEntry *e)
                        goto send;
                }
        }
+       if (realpath(provider, canonical_provider) == NULL) {
+               verbose("failed PKCS#11 add of \"%.100s\": realpath: %s",
+                   provider, strerror(errno));
+               goto send;
+       }
+       if (match_pattern_list(canonical_provider, pkcs11_whitelist, 0) != 1) {
+               verbose("refusing PKCS#11 add of \"%.100s\": "
+                   "provider not whitelisted", canonical_provider);
+               goto send;
+       }
+       debug("%s: add %.100s", __func__, canonical_provider);
        if (lifetime && !death)
                death = monotime() + lifetime;
 
-       count = pkcs11_add_provider(provider, pin, &keys);
+       count = pkcs11_add_provider(canonical_provider, pin, &keys);
        for (i = 0; i < count; i++) {
                k = keys[i];
                version = k->type == KEY_RSA1 ? 1 : 2;
@@ -772,8 +799,8 @@ process_add_smartcard_key(SocketEntry *e)
                if (lookup_identity(k, version) == NULL) {
                        id = xcalloc(1, sizeof(Identity));
                        id->key = k;
-                       id->provider = xstrdup(provider);
-                       id->comment = xstrdup(provider); /* XXX */
+                       id->provider = xstrdup(canonical_provider);
+                       id->comment = xstrdup(canonical_provider); /* XXX */
                        id->death = death;
                        id->confirm = confirm;
                        TAILQ_INSERT_TAIL(&tab->idlist, id, next);
@@ -794,7 +821,7 @@ send:
 static void
 process_remove_smartcard_key(SocketEntry *e)
 {
-       char *provider = NULL, *pin = NULL;
+       char *provider = NULL, *pin = NULL, canonical_provider[PATH_MAX];
        int r, version, success = 0;
        Identity *id, *nxt;
        Idtab *tab;
@@ -804,6 +831,13 @@ process_remove_smartcard_key(SocketEntry *e)
                fatal("%s: buffer error: %s", __func__, ssh_err(r));
        free(pin);
 
+       if (realpath(provider, canonical_provider) == NULL) {
+               verbose("failed PKCS#11 add of \"%.100s\": realpath: %s",
+                   provider, strerror(errno));
+               goto send;
+       }
+
+       debug("%s: remove %.100s", __func__, canonical_provider);
        for (version = 1; version < 3; version++) {
                tab = idtab_lookup(version);
                for (id = TAILQ_FIRST(&tab->idlist); id; id = nxt) {
@@ -811,18 +845,19 @@ process_remove_smartcard_key(SocketEntry *e)
                        /* Skip file--based keys */
                        if (id->provider == NULL)
                                continue;
-                       if (!strcmp(provider, id->provider)) {
+                       if (!strcmp(canonical_provider, id->provider)) {
                                TAILQ_REMOVE(&tab->idlist, id, next);
                                free_identity(id);
                                tab->nentries--;
                        }
                }
        }
-       if (pkcs11_del_provider(provider) == 0)
+       if (pkcs11_del_provider(canonical_provider) == 0)
                success = 1;
        else
                error("process_remove_smartcard_key:"
                    " pkcs11_del_provider failed");
+send:
        free(provider);
        send_status(e, success);
 }
@@ -982,7 +1017,7 @@ prepare_select(fd_set **fdrp, fd_set **fdwp, int *fdl, u_int *nallocp,
                switch (sockets[i].type) {
                case AUTH_SOCKET:
                case AUTH_CONNECTION:
-                       n = MAX(n, sockets[i].fd);
+                       n = MAXIMUM(n, sockets[i].fd);
                        break;
                case AUTH_UNUSED:
                        break;
@@ -1021,7 +1056,7 @@ prepare_select(fd_set **fdrp, fd_set **fdwp, int *fdl, u_int *nallocp,
        deadline = reaper();
        if (parent_alive_interval != 0)
                deadline = (deadline == 0) ? parent_alive_interval :
-                   MIN(deadline, parent_alive_interval);
+                   MINIMUM(deadline, parent_alive_interval);
        if (deadline == 0) {
                *tvpp = NULL;
        } else {
@@ -1164,7 +1199,7 @@ usage(void)
 {
        fprintf(stderr,
            "usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]\n"
-           "                 [-t life] [command [arg ...]]\n"
+           "                 [-P pkcs11_whitelist] [-t life] [command [arg ...]]\n"
            "       ssh-agent [-c | -s] -k\n");
        exit(1);
 }
@@ -1188,6 +1223,7 @@ main(int ac, char **av)
        size_t len;
        mode_t prev_mask;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
        sanitise_stdfd();
 
@@ -1195,10 +1231,7 @@ main(int ac, char **av)
        setegid(getgid());
        setgid(getgid());
 
-#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
-       /* Disable ptrace on Linux without sgid bit */
-       prctl(PR_SET_DUMPABLE, 0);
-#endif
+       platform_disable_tracing(0);    /* strict=no */
 
 #ifdef WITH_OPENSSL
        OpenSSL_add_all_algorithms();
@@ -1207,7 +1240,7 @@ main(int ac, char **av)
        __progname = ssh_get_progname(av[0]);
        seed_rng();
 
-       while ((ch = getopt(ac, av, "cDdksE:a:t:")) != -1) {
+       while ((ch = getopt(ac, av, "cDdksE:a:P:t:")) != -1) {
                switch (ch) {
                case 'E':
                        fingerprint_hash = ssh_digest_alg_by_name(optarg);
@@ -1222,6 +1255,11 @@ main(int ac, char **av)
                case 'k':
                        k_flag++;
                        break;
+               case 'P':
+                       if (pkcs11_whitelist != NULL)
+                               fatal("-P option already specified");
+                       pkcs11_whitelist = xstrdup(optarg);
+                       break;
                case 's':
                        if (c_flag)
                                usage();
@@ -1256,6 +1294,9 @@ main(int ac, char **av)
        if (ac > 0 && (c_flag || k_flag || s_flag || d_flag || D_flag))
                usage();
 
+       if (pkcs11_whitelist == NULL)
+               pkcs11_whitelist = xstrdup(DEFAULT_PKCS11_WHITELIST);
+
        if (ac == 0 && !c_flag && !s_flag) {
                shell = getenv("SHELL");
                if (shell != NULL && (len = strlen(shell)) > 2 &&
@@ -1330,6 +1371,7 @@ main(int ac, char **av)
                printf(format, SSH_AUTHSOCKET_ENV_NAME, socket_name,
                    SSH_AUTHSOCKET_ENV_NAME);
                printf("echo Agent pid %ld;\n", (long)parent_pid);
+               fflush(stdout);
                goto skip;
        }
        pid = fork();
@@ -1402,6 +1444,10 @@ skip:
        signal(SIGTERM, cleanup_handler);
        nalloc = 0;
 
+       if (pledge("stdio rpath cpath unix id proc exec", NULL) == -1)
+               fatal("%s: pledge: %s", __progname, strerror(errno));
+       platform_pledge_agent();
+
        while (1) {
                prepare_select(&readsetp, &writesetp, &max_fd, &nalloc, &tvp);
                result = select(max_fd + 1, readsetp, writesetp, NULL, tvp);
index 8ed19d8..7af59fa 100644 (file)
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-dss.c,v 1.32 2014/06/24 01:13:21 djm Exp $ */
+/* $OpenBSD: ssh-dss.c,v 1.35 2016/04/21 06:08:02 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -122,8 +122,7 @@ ssh_dss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
        explicit_bzero(digest, sizeof(digest));
        if (sig != NULL)
                DSA_SIG_free(sig);
-       if (b != NULL)
-               sshbuf_free(b);
+       sshbuf_free(b);
        return ret;
 }
 
@@ -140,7 +139,8 @@ ssh_dss_verify(const struct sshkey *key,
        char *ktype = NULL;
 
        if (key == NULL || key->dsa == NULL ||
-           sshkey_type_plain(key->type) != KEY_DSA)
+           sshkey_type_plain(key->type) != KEY_DSA ||
+           signature == NULL || signaturelen == 0)
                return SSH_ERR_INVALID_ARGUMENT;
        if (dlen == 0)
                return SSH_ERR_INTERNAL_ERROR;
@@ -209,10 +209,8 @@ ssh_dss_verify(const struct sshkey *key,
        explicit_bzero(digest, sizeof(digest));
        if (sig != NULL)
                DSA_SIG_free(sig);
-       if (b != NULL)
-               sshbuf_free(b);
-       if (ktype != NULL)
-               free(ktype);
+       sshbuf_free(b);
+       free(ktype);
        if (sigblob != NULL) {
                explicit_bzero(sigblob, len);
                free(sigblob);
index 2c76f8b..d7bf3c6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-ecdsa.c,v 1.11 2014/06/24 01:13:21 djm Exp $ */
+/* $OpenBSD: ssh-ecdsa.c,v 1.13 2016/04/21 06:08:02 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2010 Damien Miller.  All rights reserved.
@@ -99,10 +99,8 @@ ssh_ecdsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
        ret = 0;
  out:
        explicit_bzero(digest, sizeof(digest));
-       if (b != NULL)
-               sshbuf_free(b);
-       if (bb != NULL)
-               sshbuf_free(bb);
+       sshbuf_free(b);
+       sshbuf_free(bb);
        if (sig != NULL)
                ECDSA_SIG_free(sig);
        return ret;
@@ -123,7 +121,8 @@ ssh_ecdsa_verify(const struct sshkey *key,
        char *ktype = NULL;
 
        if (key == NULL || key->ecdsa == NULL ||
-           sshkey_type_plain(key->type) != KEY_ECDSA)
+           sshkey_type_plain(key->type) != KEY_ECDSA ||
+           signature == NULL || signaturelen == 0)
                return SSH_ERR_INVALID_ARGUMENT;
 
        if ((hash_alg = sshkey_ec_nid_to_hash_alg(key->ecdsa_nid)) == -1 ||
@@ -179,10 +178,8 @@ ssh_ecdsa_verify(const struct sshkey *key,
 
  out:
        explicit_bzero(digest, sizeof(digest));
-       if (sigbuf != NULL)
-               sshbuf_free(sigbuf);
-       if (b != NULL)
-               sshbuf_free(b);
+       sshbuf_free(sigbuf);
+       sshbuf_free(b);
        if (sig != NULL)
                ECDSA_SIG_free(sig);
        free(ktype);
index b159ff5..5163e02 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-ed25519.c,v 1.6 2015/01/15 21:38:50 markus Exp $ */
+/* $OpenBSD: ssh-ed25519.c,v 1.7 2016/04/21 06:08:02 djm Exp $ */
 /*
  * Copyright (c) 2013 Markus Friedl <markus@openbsd.org>
  *
@@ -107,7 +107,8 @@ ssh_ed25519_verify(const struct sshkey *key,
        if (key == NULL ||
            sshkey_type_plain(key->type) != KEY_ED25519 ||
            key->ed25519_pk == NULL ||
-           datalen >= INT_MAX - crypto_sign_ed25519_BYTES)
+           datalen >= INT_MAX - crypto_sign_ed25519_BYTES ||
+           signature == NULL || signaturelen == 0)
                return SSH_ERR_INVALID_ARGUMENT;
 
        if ((b = sshbuf_from(signature, signaturelen)) == NULL)
index 07a45b3..569297d 100644 (file)
@@ -31,8 +31,11 @@ SYNOPSIS
 
 DESCRIPTION
      ssh-keygen generates, manages and converts authentication keys for
-     ssh(1).  ssh-keygen can create RSA keys for use by SSH protocol version 1
-     and DSA, ECDSA, Ed25519 or RSA keys for use by SSH protocol version 2.
+     ssh(1).  ssh-keygen can create keys for use by SSH protocol versions 1
+     and 2.  Protocol 1 should not be used and is only offered to support
+     legacy devices.  It suffers from a number of cryptographic weaknesses and
+     doesn't support many of the advanced features available for protocol 2.
+
      The type of key to be generated is specified with the -t option.  If
      invoked without any arguments, ssh-keygen will generate an RSA key for
      use in SSH protocol 2 connections.
@@ -68,11 +71,11 @@ DESCRIPTION
      or forgotten, a new key must be generated and the corresponding public
      key copied to other machines.
 
-     For RSA1 keys, there is also a comment field in the key file that is only
-     for convenience to the user to help identify the key.  The comment can
-     tell what the key is for, or whatever is useful.  The comment is
-     initialized to M-bM-^@M-^\user@hostM-bM-^@M-^] when the key is created, but can be changed
-     using the -c option.
+     For RSA1 keys and keys stored in the newer OpenSSH format, there is also
+     a comment field in the key file that is only for convenience to the user
+     to help identify the key.  The comment can tell what the key is for, or
+     whatever is useful.  The comment is initialized to M-bM-^@M-^\user@hostM-bM-^@M-^] when the
+     key is created, but can be changed using the -c option.
 
      After a key is generated, instructions below detail where the keys should
      be placed to be activated.
@@ -114,9 +117,10 @@ DESCRIPTION
              Provides a new comment.
 
      -c      Requests changing the comment in the private and public key
-             files.  This operation is only supported for RSA1 keys.  The
-             program will prompt for the file containing the private keys, for
-             the passphrase if the key has one, and for the new comment.
+             files.  This operation is only supported for RSA1 keys and keys
+             stored in the newer OpenSSH format.  The program will prompt for
+             the file containing the private keys, for the passphrase if the
+             key has one, and for the new comment.
 
      -D pkcs11
              Download the RSA public keys provided by the PKCS#11 shared
@@ -194,12 +198,12 @@ DESCRIPTION
              file or using the format described in the KEY REVOCATION LISTS
              section.
 
-     -L      Prints the contents of a certificate.
+     -L      Prints the contents of one or more certificates.
 
      -l      Show fingerprint of specified public key file.  Private RSA1 keys
              are also supported.  For RSA and DSA keys ssh-keygen tries to
              find the matching public key file and prints its fingerprint.  If
-             combined with -v, an ASCII art representation of the key is
+             combined with -v, a visual ASCII art representation of the key is
              supplied with the fingerprint.
 
      -M memory
@@ -275,11 +279,11 @@ DESCRIPTION
 
              At present, no options are valid for host keys.
 
-     -o      Causes ssh-keygen to save SSH protocol 2 private keys using the
-             new OpenSSH format rather than the more compatible PEM format.
-             The new format has increased resistance to brute-force password
-             cracking but is not supported by versions of OpenSSH prior to
-             6.5.  Ed25519 keys always use the new private key format.
+     -o      Causes ssh-keygen to save private keys using the new OpenSSH
+             format rather than the more compatible PEM format.  The new
+             format has increased resistance to brute-force password cracking
+             but is not supported by versions of OpenSSH prior to 6.5.
+             Ed25519 keys always use the new private key format.
 
      -P passphrase
              Provides the (old) passphrase.
@@ -502,7 +506,7 @@ KEY REVOCATION LISTS
 
      It is also possible, given a KRL, to test whether it revokes a particular
      key (or keys).  The -Q flag will query an existing KRL, testing each key
-     specified on the commandline.  If any key listed on the command line has
+     specified on the command line.  If any key listed on the command line has
      been revoked (or an error encountered) then ssh-keygen will exit with a
      non-zero exit status.  A zero exit status will only be returned if no key
      was revoked.
@@ -563,4 +567,4 @@ AUTHORS
      created OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-OpenBSD 5.8                     August 20, 2015                    OpenBSD 5.8
+OpenBSD 6.0                      June 16, 2016                     OpenBSD 6.0
index ed17a08..ce2213c 100644 (file)
@@ -1,4 +1,4 @@
-.\"    $OpenBSD: ssh-keygen.1,v 1.127 2015/08/20 19:20:06 naddy Exp $
+.\"    $OpenBSD: ssh-keygen.1,v 1.133 2016/06/16 06:10:45 jmc Exp $
 .\"
 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,7 +35,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd $Mdocdate: August 20 2015 $
+.Dd $Mdocdate: June 16 2016 $
 .Dt SSH-KEYGEN 1
 .Os
 .Sh NAME
 generates, manages and converts authentication keys for
 .Xr ssh 1 .
 .Nm
-can create RSA keys for use by SSH protocol version 1 and
-DSA, ECDSA, Ed25519 or RSA keys for use by SSH protocol version 2.
+can create keys for use by SSH protocol versions 1 and 2.
+Protocol 1 should not be used
+and is only offered to support legacy devices.
+It suffers from a number of cryptographic weaknesses
+and doesn't support many of the advanced features available for protocol 2.
+.Pp
 The type of key to be generated is specified with the
 .Fl t
 option.
@@ -203,7 +207,7 @@ There is no way to recover a lost passphrase.
 If the passphrase is lost or forgotten, a new key must be generated
 and the corresponding public key copied to other machines.
 .Pp
-For RSA1 keys,
+For RSA1 keys and keys stored in the newer OpenSSH format,
 there is also a comment field in the key file that is only for
 convenience to the user to help identify the key.
 The comment can tell what the key is for, or whatever is useful.
@@ -260,7 +264,8 @@ flag will be ignored.
 Provides a new comment.
 .It Fl c
 Requests changing the comment in the private and public key files.
-This operation is only supported for RSA1 keys.
+This operation is only supported for RSA1 keys and keys stored in the
+newer OpenSSH format.
 The program will prompt for the file containing the private keys, for
 the passphrase if the key has one, and for the new comment.
 .It Fl D Ar pkcs11
@@ -376,7 +381,7 @@ using the format described in the
 .Sx KEY REVOCATION LISTS
 section.
 .It Fl L
-Prints the contents of a certificate.
+Prints the contents of one or more certificates.
 .It Fl l
 Show fingerprint of specified public key file.
 Private RSA1 keys are also supported.
@@ -385,7 +390,8 @@ For RSA and DSA keys
 tries to find the matching public key file and prints its fingerprint.
 If combined with
 .Fl v ,
-an ASCII art representation of the key is supplied with the fingerprint.
+a visual ASCII art representation of the key is supplied with the
+fingerprint.
 .It Fl M Ar memory
 Specify the amount of memory to use (in megabytes) when generating
 candidate moduli for DH-GEX.
@@ -474,7 +480,7 @@ At present, no options are valid for host keys.
 .It Fl o
 Causes
 .Nm
-to save SSH protocol 2 private keys using the new OpenSSH format rather than
+to save private keys using the new OpenSSH format rather than
 the more compatible PEM format.
 The new format has increased resistance to brute-force password cracking
 but is not supported by versions of OpenSSH prior to 6.5.
@@ -781,7 +787,7 @@ It is also possible, given a KRL, to test whether it revokes a particular key
 (or keys).
 The
 .Fl Q
-flag will query an existing KRL, testing each key specified on the commandline.
+flag will query an existing KRL, testing each key specified on the command line.
 If any key listed on the command line has been revoked (or an error encountered)
 then
 .Nm
index 4e0a855..f17af03 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.277 2015/08/19 23:17:51 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.299 2017/03/10 04:26:06 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,6 +37,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
+#include <locale.h>
 
 #include "xmalloc.h"
 #include "sshkey.h"
@@ -57,6 +58,7 @@
 #include "atomicio.h"
 #include "krl.h"
 #include "digest.h"
+#include "utf8.h"
 
 #ifdef WITH_OPENSSL
 # define DEFAULT_KEY_TYPE_NAME "rsa"
@@ -523,7 +525,7 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
        sshbuf_free(b);
 
        /* try the key */
-       if (sshkey_sign(key, &sig, &slen, data, sizeof(data), 0) != 0 ||
+       if (sshkey_sign(key, &sig, &slen, data, sizeof(data), NULL, 0) != 0 ||
            sshkey_verify(key, sig, slen, data, sizeof(data), 0) != 0) {
                sshkey_free(key);
                free(sig);
@@ -808,116 +810,162 @@ do_download(struct passwd *pw)
 #endif /* ENABLE_PKCS11 */
 }
 
+static struct sshkey *
+try_read_key(char **cpp)
+{
+       struct sshkey *ret;
+       int r;
+
+       if ((ret = sshkey_new(KEY_RSA1)) == NULL)
+               fatal("sshkey_new failed");
+       /* Try RSA1 */
+       if ((r = sshkey_read(ret, cpp)) == 0)
+               return ret;
+       /* Try modern */
+       sshkey_free(ret);
+       if ((ret = sshkey_new(KEY_UNSPEC)) == NULL)
+               fatal("sshkey_new failed");
+       if ((r = sshkey_read(ret, cpp)) == 0)
+               return ret;
+       /* Not a key */
+       sshkey_free(ret);
+       return NULL;
+}
+
 static void
-do_fingerprint(struct passwd *pw)
+fingerprint_one_key(const struct sshkey *public, const char *comment)
 {
-       FILE *f;
-       struct sshkey *public;
-       char *comment = NULL, *cp, *ep, line[16*1024], *fp, *ra;
-       int r, i, skip = 0, num = 0, invalid = 1;
+       char *fp = NULL, *ra = NULL;
        enum sshkey_fp_rep rep;
        int fptype;
-       struct stat st;
 
        fptype = print_bubblebabble ? SSH_DIGEST_SHA1 : fingerprint_hash;
        rep =    print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_DEFAULT;
-       if (!have_identity)
-               ask_filename(pw, "Enter file in which the key is");
+       fp = sshkey_fingerprint(public, fptype, rep);
+       ra = sshkey_fingerprint(public, fingerprint_hash, SSH_FP_RANDOMART);
+       if (fp == NULL || ra == NULL)
+               fatal("%s: sshkey_fingerprint failed", __func__);
+       mprintf("%u %s %s (%s)\n", sshkey_size(public), fp,
+           comment ? comment : "no comment", sshkey_type(public));
+       if (log_level >= SYSLOG_LEVEL_VERBOSE)
+               printf("%s\n", ra);
+       free(ra);
+       free(fp);
+}
+
+static void
+fingerprint_private(const char *path)
+{
+       struct stat st;
+       char *comment = NULL;
+       struct sshkey *public = NULL;
+       int r;
+
        if (stat(identity_file, &st) < 0)
-               fatal("%s: %s", identity_file, strerror(errno));
-       if ((r = sshkey_load_public(identity_file, &public, &comment)) != 0)
-               debug2("Error loading public key \"%s\": %s",
-                   identity_file, ssh_err(r));
-       else {
-               fp = sshkey_fingerprint(public, fptype, rep);
-               ra = sshkey_fingerprint(public, fingerprint_hash,
-                   SSH_FP_RANDOMART);
-               if (fp == NULL || ra == NULL)
-                       fatal("%s: sshkey_fingerprint fail", __func__);
-               printf("%u %s %s (%s)\n", sshkey_size(public), fp, comment,
-                   sshkey_type(public));
-               if (log_level >= SYSLOG_LEVEL_VERBOSE)
-                       printf("%s\n", ra);
-               sshkey_free(public);
-               free(comment);
-               free(ra);
-               free(fp);
-               exit(0);
-       }
-       if (comment) {
-               free(comment);
-               comment = NULL;
+               fatal("%s: %s", path, strerror(errno));
+       if ((r = sshkey_load_public(path, &public, &comment)) != 0) {
+               debug("load public \"%s\": %s", path, ssh_err(r));
+               if ((r = sshkey_load_private(path, NULL,
+                   &public, &comment)) != 0) {
+                       debug("load private \"%s\": %s", path, ssh_err(r));
+                       fatal("%s is not a key file.", path);
+               }
        }
 
-       if ((f = fopen(identity_file, "r")) == NULL)
-               fatal("%s: %s: %s", __progname, identity_file, strerror(errno));
+       fingerprint_one_key(public, comment);
+       sshkey_free(public);
+       free(comment);
+}
+
+static void
+do_fingerprint(struct passwd *pw)
+{
+       FILE *f;
+       struct sshkey *public = NULL;
+       char *comment = NULL, *cp, *ep, line[SSH_MAX_PUBKEY_BYTES];
+       int i, invalid = 1;
+       const char *path;
+       u_long lnum = 0;
 
-       while (fgets(line, sizeof(line), f)) {
-               if ((cp = strchr(line, '\n')) == NULL) {
-                       error("line %d too long: %.40s...",
-                           num + 1, line);
-                       skip = 1;
+       if (!have_identity)
+               ask_filename(pw, "Enter file in which the key is");
+       path = identity_file;
+
+       if (strcmp(identity_file, "-") == 0) {
+               f = stdin;
+               path = "(stdin)";
+       } else if ((f = fopen(path, "r")) == NULL)
+               fatal("%s: %s: %s", __progname, path, strerror(errno));
+
+       while (read_keyfile_line(f, path, line, sizeof(line), &lnum) == 0) {
+               cp = line;
+               cp[strcspn(cp, "\n")] = '\0';
+               /* Trim leading space and comments */
+               cp = line + strspn(line, " \t");
+               if (*cp == '#' || *cp == '\0')
                        continue;
+
+               /*
+                * Input may be plain keys, private keys, authorized_keys
+                * or known_hosts.
+                */
+
+               /*
+                * Try private keys first. Assume a key is private if
+                * "SSH PRIVATE KEY" appears on the first line and we're
+                * not reading from stdin (XXX support private keys on stdin).
+                */
+               if (lnum == 1 && strcmp(identity_file, "-") != 0 &&
+                   strstr(cp, "PRIVATE KEY") != NULL) {
+                       fclose(f);
+                       fingerprint_private(path);
+                       exit(0);
+               }
+
+               /*
+                * If it's not a private key, then this must be prepared to
+                * accept a public key prefixed with a hostname or options.
+                * Try a bare key first, otherwise skip the leading stuff.
+                */
+               if ((public = try_read_key(&cp)) == NULL) {
+                       i = strtol(cp, &ep, 10);
+                       if (i == 0 || ep == NULL ||
+                           (*ep != ' ' && *ep != '\t')) {
+                               int quoted = 0;
+
+                               comment = cp;
+                               for (; *cp && (quoted || (*cp != ' ' &&
+                                   *cp != '\t')); cp++) {
+                                       if (*cp == '\\' && cp[1] == '"')
+                                               cp++;   /* Skip both */
+                                       else if (*cp == '"')
+                                               quoted = !quoted;
+                               }
+                               if (!*cp)
+                                       continue;
+                               *cp++ = '\0';
+                       }
                }
-               num++;
-               if (skip) {
-                       skip = 0;
+               /* Retry after parsing leading hostname/key options */
+               if (public == NULL && (public = try_read_key(&cp)) == NULL) {
+                       debug("%s:%lu: not a public key", path, lnum);
                        continue;
                }
-               *cp = '\0';
 
-               /* Skip leading whitespace, empty and comment lines. */
-               for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
+               /* Find trailing comment, if any */
+               for (; *cp == ' ' || *cp == '\t'; cp++)
                        ;
-               if (!*cp || *cp == '\n' || *cp == '#')
-                       continue;
-               i = strtol(cp, &ep, 10);
-               if (i == 0 || ep == NULL || (*ep != ' ' && *ep != '\t')) {
-                       int quoted = 0;
+               if (*cp != '\0' && *cp != '#')
                        comment = cp;
-                       for (; *cp && (quoted || (*cp != ' ' &&
-                           *cp != '\t')); cp++) {
-                               if (*cp == '\\' && cp[1] == '"')
-                                       cp++;   /* Skip both */
-                               else if (*cp == '"')
-                                       quoted = !quoted;
-                       }
-                       if (!*cp)
-                               continue;
-                       *cp++ = '\0';
-               }
-               ep = cp;
-               if ((public = sshkey_new(KEY_RSA1)) == NULL)
-                       fatal("sshkey_new failed");
-               if ((r = sshkey_read(public, &cp)) != 0) {
-                       cp = ep;
-                       sshkey_free(public);
-                       if ((public = sshkey_new(KEY_UNSPEC)) == NULL)
-                               fatal("sshkey_new failed");
-                       if ((r = sshkey_read(public, &cp)) != 0) {
-                               sshkey_free(public);
-                               continue;
-                       }
-               }
-               comment = *cp ? cp : comment;
-               fp = sshkey_fingerprint(public, fptype, rep);
-               ra = sshkey_fingerprint(public, fingerprint_hash,
-                   SSH_FP_RANDOMART);
-               if (fp == NULL || ra == NULL)
-                       fatal("%s: sshkey_fingerprint fail", __func__);
-               printf("%u %s %s (%s)\n", sshkey_size(public), fp,
-                   comment ? comment : "no comment", sshkey_type(public));
-               if (log_level >= SYSLOG_LEVEL_VERBOSE)
-                       printf("%s\n", ra);
-               free(ra);
-               free(fp);
+
+               fingerprint_one_key(public, comment);
                sshkey_free(public);
-               invalid = 0;
+               invalid = 0; /* One good key in the file is sufficient */
        }
        fclose(f);
 
        if (invalid)
-               fatal("%s is not a public key file.", identity_file);
+               fatal("%s is not a public key file.", path);
        exit(0);
 }
 
@@ -1036,6 +1084,7 @@ known_hosts_hash(struct hostkey_foreach_line *l, void *_ctx)
        struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx;
        char *hashed, *cp, *hosts, *ohosts;
        int has_wild = l->hosts && strcspn(l->hosts, "*?!") != strlen(l->hosts);
+       int was_hashed = l->hosts && l->hosts[0] == HASH_DELIM;
 
        switch (l->status) {
        case HKF_STATUS_OK:
@@ -1044,11 +1093,10 @@ known_hosts_hash(struct hostkey_foreach_line *l, void *_ctx)
                 * Don't hash hosts already already hashed, with wildcard
                 * characters or a CA/revocation marker.
                 */
-               if ((l->match & HKF_MATCH_HOST_HASHED) != 0 ||
-                   has_wild || l->marker != MRK_NONE) {
+               if (was_hashed || has_wild || l->marker != MRK_NONE) {
                        fprintf(ctx->out, "%s\n", l->line);
                        if (has_wild && !find_host) {
-                               logit("%s:%ld: ignoring host name "
+                               logit("%s:%lu: ignoring host name "
                                    "with wildcard: %.64s", l->path,
                                    l->linenum, l->hosts);
                        }
@@ -1060,6 +1108,7 @@ known_hosts_hash(struct hostkey_foreach_line *l, void *_ctx)
                 */
                ohosts = hosts = xstrdup(l->hosts);
                while ((cp = strsep(&hosts, ",")) != NULL && *cp != '\0') {
+                       lowercase(cp);
                        if ((hashed = host_hash(cp, NULL, 0)) == NULL)
                                fatal("hash_host failed");
                        fprintf(ctx->out, "%s %s\n", hashed, l->rawkey);
@@ -1070,7 +1119,7 @@ known_hosts_hash(struct hostkey_foreach_line *l, void *_ctx)
        case HKF_STATUS_INVALID:
                /* Retain invalid lines, but mark file as invalid. */
                ctx->invalid = 1;
-               logit("%s:%ld: invalid line", l->path, l->linenum);
+               logit("%s:%lu: invalid line", l->path, l->linenum);
                /* FALLTHROUGH */
        default:
                fprintf(ctx->out, "%s\n", l->line);
@@ -1104,14 +1153,14 @@ known_hosts_find_delete(struct hostkey_foreach_line *l, void *_ctx)
                                 */
                                ctx->found_key = 1;
                                if (!quiet)
-                                       printf("# Host %s found: line %ld\n",
+                                       printf("# Host %s found: line %lu\n",
                                            ctx->host, l->linenum);
                        }
                        return 0;
                } else if (find_host) {
                        ctx->found_key = 1;
                        if (!quiet) {
-                               printf("# Host %s found: line %ld %s\n",
+                               printf("# Host %s found: line %lu %s\n",
                                    ctx->host,
                                    l->linenum, l->marker == MRK_CA ? "CA" :
                                    (l->marker == MRK_REVOKE ? "REVOKED" : ""));
@@ -1120,7 +1169,7 @@ known_hosts_find_delete(struct hostkey_foreach_line *l, void *_ctx)
                                known_hosts_hash(l, ctx);
                        else if (print_fingerprint) {
                                fp = sshkey_fingerprint(l->key, fptype, rep);
-                               printf("%s %s %s %s\n", ctx->host,
+                               mprintf("%s %s %s %s\n", ctx->host,
                                    sshkey_type(l->key), fp, l->comment);
                                free(fp);
                        } else
@@ -1131,7 +1180,7 @@ known_hosts_find_delete(struct hostkey_foreach_line *l, void *_ctx)
                /* Retain non-matching hosts when deleting */
                if (l->status == HKF_STATUS_INVALID) {
                        ctx->invalid = 1;
-                       logit("%s:%ld: invalid line", l->path, l->linenum);
+                       logit("%s:%lu: invalid line", l->path, l->linenum);
                }
                fprintf(ctx->out, "%s\n", l->line);
        }
@@ -1185,8 +1234,11 @@ do_known_hosts(struct passwd *pw, const char *name)
        foreach_options |= print_fingerprint ? HKF_WANT_PARSE_KEY : 0;
        if ((r = hostkeys_foreach(identity_file,
            hash_hosts ? known_hosts_hash : known_hosts_find_delete, &ctx,
-           name, NULL, foreach_options)) != 0)
+           name, NULL, foreach_options)) != 0) {
+               if (inplace)
+                       unlink(tmp);
                fatal("%s: hostkeys_foreach failed: %s", __func__, ssh_err(r));
+       }
 
        if (inplace)
                fclose(ctx.out);
@@ -1268,7 +1320,7 @@ do_change_passphrase(struct passwd *pw)
                fatal("Failed to load key %s: %s", identity_file, ssh_err(r));
        }
        if (comment)
-               printf("Key has comment '%s'\n", comment);
+               mprintf("Key has comment '%s'\n", comment);
 
        /* Ask the new passphrase (twice). */
        if (identity_new_passphrase) {
@@ -1383,14 +1435,19 @@ do_change_comment(struct passwd *pw)
                            identity_file, ssh_err(r));
                }
        }
-       /* XXX what about new-format keys? */
-       if (private->type != KEY_RSA1) {
-               error("Comments are only supported for RSA1 keys.");
+
+       if (private->type != KEY_RSA1 && private->type != KEY_ED25519 &&
+           !use_new_format) {
+               error("Comments are only supported for RSA1 or keys stored in "
+                   "the new format (-o).");
                explicit_bzero(passphrase, strlen(passphrase));
                sshkey_free(private);
                exit(1);
        }
-       printf("Key now has comment '%s'\n", comment);
+       if (comment)
+               printf("Key now has comment '%s'\n", comment);
+       else
+               printf("Key now has no comment\n");
 
        if (identity_comment) {
                strlcpy(new_comment, identity_comment, sizeof(new_comment));
@@ -1441,44 +1498,6 @@ do_change_comment(struct passwd *pw)
        exit(0);
 }
 
-static const char *
-fmt_validity(u_int64_t valid_from, u_int64_t valid_to)
-{
-       char from[32], to[32];
-       static char ret[64];
-       time_t tt;
-       struct tm *tm;
-
-       *from = *to = '\0';
-       if (valid_from == 0 && valid_to == 0xffffffffffffffffULL)
-               return "forever";
-
-       if (valid_from != 0) {
-               /* XXX revisit INT_MAX in 2038 :) */
-               tt = valid_from > INT_MAX ? INT_MAX : valid_from;
-               tm = localtime(&tt);
-               strftime(from, sizeof(from), "%Y-%m-%dT%H:%M:%S", tm);
-       }
-       if (valid_to != 0xffffffffffffffffULL) {
-               /* XXX revisit INT_MAX in 2038 :) */
-               tt = valid_to > INT_MAX ? INT_MAX : valid_to;
-               tm = localtime(&tt);
-               strftime(to, sizeof(to), "%Y-%m-%dT%H:%M:%S", tm);
-       }
-
-       if (valid_from == 0) {
-               snprintf(ret, sizeof(ret), "before %s", to);
-               return ret;
-       }
-       if (valid_to == 0xffffffffffffffffULL) {
-               snprintf(ret, sizeof(ret), "after %s", from);
-               return ret;
-       }
-
-       snprintf(ret, sizeof(ret), "from %s to %s", from, to);
-       return ret;
-}
-
 static void
 add_flag_option(struct sshbuf *c, const char *name)
 {
@@ -1572,7 +1591,7 @@ do_ca_sign(struct passwd *pw, int argc, char **argv)
        int r, i, fd;
        u_int n;
        struct sshkey *ca, *public;
-       char *otmp, *tmp, *cp, *out, *comment, **plist = NULL;
+       char valid[64], *otmp, *tmp, *cp, *out, *comment, **plist = NULL;
        FILE *f;
 
 #ifdef ENABLE_PKCS11
@@ -1586,6 +1605,12 @@ do_ca_sign(struct passwd *pw, int argc, char **argv)
                ca = load_identity(tmp);
        free(tmp);
 
+       if (key_type_name != NULL &&
+           sshkey_type_from_name(key_type_name) != ca->type)  {
+               fatal("CA key type %s doesn't match specified %s",
+                   sshkey_ssh_name(ca), key_type_name);
+       }
+
        for (i = 0; i < argc; i++) {
                /* Split list of principals */
                n = 0;
@@ -1627,8 +1652,8 @@ do_ca_sign(struct passwd *pw, int argc, char **argv)
                    &public->cert->signature_key)) != 0)
                        fatal("key_from_private (ca key): %s", ssh_err(r));
 
-               if (sshkey_certify(public, ca) != 0)
-                       fatal("Couldn't not certify key %s", tmp);
+               if ((r = sshkey_certify(public, ca, key_type_name)) != 0)
+                       fatal("Couldn't certify key %s: %s", tmp, ssh_err(r));
 
                if ((cp = strrchr(tmp, '.')) != NULL && strcmp(cp, ".pub") == 0)
                        *cp = '\0';
@@ -1647,13 +1672,15 @@ do_ca_sign(struct passwd *pw, int argc, char **argv)
                fclose(f);
 
                if (!quiet) {
+                       sshkey_format_cert_validity(public->cert,
+                           valid, sizeof(valid));
                        logit("Signed %s key %s: id \"%s\" serial %llu%s%s "
-                           "valid %s", sshkey_cert_type(public), 
+                           "valid %s", sshkey_cert_type(public),
                            out, public->cert->key_id,
                            (unsigned long long)public->cert->serial,
                            cert_principals != NULL ? " for " : "",
                            cert_principals != NULL ? cert_principals : "",
-                           fmt_validity(cert_valid_from, cert_valid_to));
+                           valid);
                }
 
                sshkey_free(public);
@@ -1687,7 +1714,7 @@ parse_absolute_time(const char *s)
        char buf[32], *fmt;
 
        /*
-        * POSIX strptime says "The application shall ensure that there 
+        * POSIX strptime says "The application shall ensure that there
         * is white-space or other non-alphanumeric characters between
         * any two conversion specifications" so arrange things this way.
         */
@@ -1851,31 +1878,18 @@ show_options(struct sshbuf *optbuf, int in_critical)
 }
 
 static void
-do_show_cert(struct passwd *pw)
+print_cert(struct sshkey *key)
 {
-       struct sshkey *key;
-       struct stat st;
-       char *key_fp, *ca_fp;
+       char valid[64], *key_fp, *ca_fp;
        u_int i;
-       int r;
-
-       if (!have_identity)
-               ask_filename(pw, "Enter file in which the key is");
-       if (stat(identity_file, &st) < 0)
-               fatal("%s: %s: %s", __progname, identity_file, strerror(errno));
-       if ((r = sshkey_load_public(identity_file, &key, NULL)) != 0)
-               fatal("Cannot load public key \"%s\": %s",
-                   identity_file, ssh_err(r));
-       if (!sshkey_is_cert(key))
-               fatal("%s is not a certificate", identity_file);
 
        key_fp = sshkey_fingerprint(key, fingerprint_hash, SSH_FP_DEFAULT);
        ca_fp = sshkey_fingerprint(key->cert->signature_key,
            fingerprint_hash, SSH_FP_DEFAULT);
        if (key_fp == NULL || ca_fp == NULL)
                fatal("%s: sshkey_fingerprint fail", __func__);
+       sshkey_format_cert_validity(key->cert, valid, sizeof(valid));
 
-       printf("%s:\n", identity_file);
        printf("        Type: %s %s certificate\n", sshkey_ssh_name(key),
            sshkey_cert_type(key));
        printf("        Public key: %s %s\n", sshkey_type(key), key_fp);
@@ -1883,8 +1897,7 @@ do_show_cert(struct passwd *pw)
            sshkey_type(key->cert->signature_key), ca_fp);
        printf("        Key ID: \"%s\"\n", key->cert->key_id);
        printf("        Serial: %llu\n", (unsigned long long)key->cert->serial);
-       printf("        Valid: %s\n",
-           fmt_validity(key->cert->valid_after, key->cert->valid_before));
+       printf("        Valid: %s\n", valid);
        printf("        Principals: ");
        if (key->cert->nprincipals == 0)
                printf("(none)\n");
@@ -1908,7 +1921,60 @@ do_show_cert(struct passwd *pw)
                printf("\n");
                show_options(key->cert->extensions, 0);
        }
-       exit(0);
+}
+
+static void
+do_show_cert(struct passwd *pw)
+{
+       struct sshkey *key = NULL;
+       struct stat st;
+       int r, is_stdin = 0, ok = 0;
+       FILE *f;
+       char *cp, line[SSH_MAX_PUBKEY_BYTES];
+       const char *path;
+       u_long lnum = 0;
+
+       if (!have_identity)
+               ask_filename(pw, "Enter file in which the key is");
+       if (strcmp(identity_file, "-") != 0 && stat(identity_file, &st) < 0)
+               fatal("%s: %s: %s", __progname, identity_file, strerror(errno));
+
+       path = identity_file;
+       if (strcmp(path, "-") == 0) {
+               f = stdin;
+               path = "(stdin)";
+               is_stdin = 1;
+       } else if ((f = fopen(identity_file, "r")) == NULL)
+               fatal("fopen %s: %s", identity_file, strerror(errno));
+
+       while (read_keyfile_line(f, path, line, sizeof(line), &lnum) == 0) {
+               sshkey_free(key);
+               key = NULL;
+               /* Trim leading space and comments */
+               cp = line + strspn(line, " \t");
+               if (*cp == '#' || *cp == '\0')
+                       continue;
+               if ((key = sshkey_new(KEY_UNSPEC)) == NULL)
+                       fatal("key_new");
+               if ((r = sshkey_read(key, &cp)) != 0) {
+                       error("%s:%lu: invalid key: %s", path,
+                           lnum, ssh_err(r));
+                       continue;
+               }
+               if (!sshkey_is_cert(key)) {
+                       error("%s:%lu is not a certificate", path, lnum);
+                       continue;
+               }
+               ok = 1;
+               if (!is_stdin && lnum == 1)
+                       printf("%s:\n", path);
+               else
+                       printf("%s:%lu:\n", path, lnum);
+               print_cert(key);
+       }
+       sshkey_free(key);
+       fclose(f);
+       exit(ok ? 0 : 1);
 }
 
 static void
@@ -2112,8 +2178,7 @@ do_gen_krl(struct passwd *pw, int updating, int argc, char **argv)
        close(fd);
        sshbuf_free(kbuf);
        ssh_krl_free(krl);
-       if (ca != NULL)
-               sshkey_free(ca);
+       sshkey_free(ca);
 }
 
 static void
@@ -2144,11 +2209,17 @@ do_check_krl(struct passwd *pw, int argc, char **argv)
        exit(ret);
 }
 
+#ifdef WITH_SSH1
+# define RSA1_USAGE " | rsa1"
+#else
+# define RSA1_USAGE ""
+#endif
+
 static void
 usage(void)
 {
        fprintf(stderr,
-           "usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]\n"
+           "usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa%s]\n"
            "                  [-N new_passphrase] [-C comment] [-f output_keyfile]\n"
            "       ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]\n"
            "       ssh-keygen -i [-m key_format] [-f input_keyfile]\n"
@@ -2156,7 +2227,7 @@ usage(void)
            "       ssh-keygen -y [-f input_keyfile]\n"
            "       ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]\n"
            "       ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]\n"
-           "       ssh-keygen -B [-f input_keyfile]\n");
+           "       ssh-keygen -B [-f input_keyfile]\n", RSA1_USAGE);
 #ifdef ENABLE_PKCS11
        fprintf(stderr,
            "       ssh-keygen -D pkcs11\n");
@@ -2208,6 +2279,7 @@ main(int argc, char **argv)
        extern int optind;
        extern char *optarg;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
        sanitise_stdfd();
 
@@ -2220,6 +2292,8 @@ main(int argc, char **argv)
 
        seed_rng();
 
+       msetlocale();
+
        /* we need this for the home * directory.  */
        pw = getpwuid(getuid());
        if (!pw)
@@ -2388,40 +2462,47 @@ main(int argc, char **argv)
                        break;
 #ifdef WITH_OPENSSL
                /* Moduli generation/screening */
-               case 'W':
-                       generator_wanted = (u_int32_t)strtonum(optarg, 1,
-                           UINT_MAX, &errstr);
-                       if (errstr)
-                               fatal("Desired generator has bad value: %s (%s)",
-                                       optarg, errstr);
-                       break;
-               case 'M':
-                       memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr);
-                       if (errstr)
-                               fatal("Memory limit is %s: %s", errstr, optarg);
-                       break;
                case 'G':
                        do_gen_candidates = 1;
                        if (strlcpy(out_file, optarg, sizeof(out_file)) >=
                            sizeof(out_file))
                                fatal("Output filename too long");
                        break;
-               case 'T':
-                       do_screen_candidates = 1;
-                       if (strlcpy(out_file, optarg, sizeof(out_file)) >=
-                           sizeof(out_file))
-                               fatal("Output filename too long");
+               case 'J':
+                       lines_to_process = strtoul(optarg, NULL, 10);
+                       break;
+               case 'j':
+                       start_lineno = strtoul(optarg, NULL, 10);
                        break;
                case 'K':
                        if (strlen(optarg) >= PATH_MAX)
                                fatal("Checkpoint filename too long");
                        checkpoint = xstrdup(optarg);
                        break;
+               case 'M':
+                       memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX,
+                           &errstr);
+                       if (errstr)
+                               fatal("Memory limit is %s: %s", errstr, optarg);
+                       break;
                case 'S':
                        /* XXX - also compare length against bits */
                        if (BN_hex2bn(&start, optarg) == 0)
                                fatal("Invalid start point.");
                        break;
+               case 'T':
+                       do_screen_candidates = 1;
+                       if (strlcpy(out_file, optarg, sizeof(out_file)) >=
+                           sizeof(out_file))
+                               fatal("Output filename too long");
+                       break;
+               case 'W':
+                       generator_wanted = (u_int32_t)strtonum(optarg, 1,
+                           UINT_MAX, &errstr);
+                       if (errstr != NULL)
+                               fatal("Desired generator invalid: %s (%s)",
+                                   optarg, errstr);
+                       break;
 #endif /* WITH_OPENSSL */
                case '?':
                default:
index 500c1dd..e9d9f0d 100644 (file)
@@ -4,7 +4,7 @@ NAME
      ssh-keyscan M-bM-^@M-^S gather ssh public keys
 
 SYNOPSIS
-     ssh-keyscan [-46Hv] [-f file] [-p port] [-T timeout] [-t type]
+     ssh-keyscan [-46cHv] [-f file] [-p port] [-T timeout] [-t type]
                  [host | addrlist namelist] ...
 
 DESCRIPTION
@@ -26,6 +26,8 @@ DESCRIPTION
 
      -6      Forces ssh-keyscan to use IPv6 addresses only.
 
+     -c      Request certificates from target hosts instead of plain keys.
+
      -f file
              Read hosts or M-bM-^@M-^\addrlist namelistM-bM-^@M-^] pairs from file, one per line.
              If - is supplied instead of a filename, ssh-keyscan will read
@@ -106,4 +108,4 @@ BUGS
      This is because it opens a connection to the ssh port, reads the public
      key, and drops the connection as soon as it gets the key.
 
-OpenBSD 5.8                     August 30, 2014                    OpenBSD 5.8
+OpenBSD 6.0                    November 8, 2015                    OpenBSD 6.0
index 6bbc480..d29d9d9 100644 (file)
@@ -1,4 +1,4 @@
-.\"    $OpenBSD: ssh-keyscan.1,v 1.36 2014/08/30 15:33:50 sobrado Exp $
+.\"    $OpenBSD: ssh-keyscan.1,v 1.38 2015/11/08 23:24:03 jmc Exp $
 .\"
 .\" Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
 .\"
@@ -6,7 +6,7 @@
 .\" permitted provided that due credit is given to the author and the
 .\" OpenBSD project by leaving this copyright notice intact.
 .\"
-.Dd $Mdocdate: August 30 2014 $
+.Dd $Mdocdate: November 8 2015 $
 .Dt SSH-KEYSCAN 1
 .Os
 .Sh NAME
@@ -15,7 +15,7 @@
 .Sh SYNOPSIS
 .Nm ssh-keyscan
 .Bk -words
-.Op Fl 46Hv
+.Op Fl 46cHv
 .Op Fl f Ar file
 .Op Fl p Ar port
 .Op Fl T Ar timeout
@@ -54,6 +54,8 @@ to use IPv4 addresses only.
 Forces
 .Nm
 to use IPv6 addresses only.
+.It Fl c
+Request certificates from target hosts instead of plain keys.
 .It Fl f Ar file
 Read hosts or
 .Dq addrlist namelist
index 57d8842..1f95239 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.101 2015/04/10 00:08:55 djm Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.109 2017/03/10 04:26:06 djm Exp $ */
 /*
  * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
  *
@@ -60,6 +60,7 @@ int ssh_port = SSH_DEFAULT_PORT;
 #define KT_ECDSA       8
 #define KT_ED25519     16
 
+int get_cert = 0;
 int get_keytypes = KT_RSA|KT_ECDSA|KT_ED25519;
 
 int hash_hosts = 0;            /* Hash hostname on output */
@@ -267,11 +268,32 @@ keygrab_ssh2(con *c)
        int r;
 
        enable_compat20();
-       myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] =
-           c->c_keytype == KT_DSA ?  "ssh-dss" :
-           (c->c_keytype == KT_RSA ? "ssh-rsa" :
-           (c->c_keytype == KT_ED25519 ? "ssh-ed25519" :
-           "ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521"));
+       switch (c->c_keytype) {
+       case KT_DSA:
+               myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
+                   "ssh-dss-cert-v01@openssh.com" : "ssh-dss";
+               break;
+       case KT_RSA:
+               myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
+                   "ssh-rsa-cert-v01@openssh.com" : "ssh-rsa";
+               break;
+       case KT_ED25519:
+               myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
+                   "ssh-ed25519-cert-v01@openssh.com" : "ssh-ed25519";
+               break;
+       case KT_ECDSA:
+               myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
+                   "ecdsa-sha2-nistp256-cert-v01@openssh.com,"
+                   "ecdsa-sha2-nistp384-cert-v01@openssh.com,"
+                   "ecdsa-sha2-nistp521-cert-v01@openssh.com" :
+                   "ecdsa-sha2-nistp256,"
+                   "ecdsa-sha2-nistp384,"
+                   "ecdsa-sha2-nistp521";
+               break;
+       default:
+               fatal("unknown key type %d", c->c_keytype);
+               break;
+       }
        if ((r = kex_setup(c->c_ssh, myproposal)) != 0) {
                free(c->c_ssh);
                fprintf(stderr, "kex_setup: %s\n", ssh_err(r));
@@ -280,6 +302,9 @@ keygrab_ssh2(con *c)
 #ifdef WITH_OPENSSL
        c->c_ssh->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
        c->c_ssh->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
+       c->c_ssh->kex->kex[KEX_DH_GRP14_SHA256] = kexdh_client;
+       c->c_ssh->kex->kex[KEX_DH_GRP16_SHA512] = kexdh_client;
+       c->c_ssh->kex->kex[KEX_DH_GRP18_SHA512] = kexdh_client;
        c->c_ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
        c->c_ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
 # ifdef OPENSSL_HAS_ECC
@@ -296,23 +321,41 @@ keygrab_ssh2(con *c)
 }
 
 static void
-keyprint(con *c, struct sshkey *key)
+keyprint_one(const char *host, struct sshkey *key)
 {
-       char *host = c->c_output_name ? c->c_output_name : c->c_name;
-       char *hostport = NULL;
-
-       if (!key)
-               return;
-       if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL)
-               fatal("host_hash failed");
+       char *hostport;
+       const char *known_host, *hashed;
 
        hostport = put_host_port(host, ssh_port);
-       fprintf(stdout, "%s ", hostport);
+       lowercase(hostport);
+       if (hash_hosts && (hashed = host_hash(host, NULL, 0)) == NULL)
+               fatal("host_hash failed");
+       known_host = hash_hosts ? hashed : hostport;
+       if (!get_cert)
+               fprintf(stdout, "%s ", known_host);
        sshkey_write(key, stdout);
        fputs("\n", stdout);
        free(hostport);
 }
 
+static void
+keyprint(con *c, struct sshkey *key)
+{
+       char *hosts = c->c_output_name ? c->c_output_name : c->c_name;
+       char *host, *ohosts;
+
+       if (key == NULL)
+               return;
+       if (get_cert || (!hash_hosts && ssh_port == SSH_DEFAULT_PORT)) {
+               keyprint_one(hosts, key);
+               return;
+       }
+       ohosts = hosts = xstrdup(hosts);
+       while ((host = strsep(&hosts, ",")) != NULL)
+               keyprint_one(host, key);
+       free(ohosts);
+}
+
 static int
 tcpconnect(char *host)
 {
@@ -369,6 +412,7 @@ conalloc(char *iname, char *oname, int keytype)
        if (fdcon[s].c_status)
                fatal("conalloc: attempt to reuse fdno %d", s);
 
+       debug3("%s: oname %s kt %d", __func__, oname, keytype);
        fdcon[s].c_fd = s;
        fdcon[s].c_status = CS_CON;
        fdcon[s].c_namebase = namebase;
@@ -639,7 +683,7 @@ static void
 usage(void)
 {
        fprintf(stderr,
-           "usage: %s [-46Hv] [-f file] [-p port] [-T timeout] [-t type]\n"
+           "usage: %s [-46cHv] [-f file] [-p port] [-T timeout] [-t type]\n"
            "\t\t   [host | addrlist namelist] ...\n",
            __progname);
        exit(1);
@@ -657,6 +701,7 @@ main(int argc, char **argv)
        extern int optind;
        extern char *optarg;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        __progname = ssh_get_progname(argv[0]);
        seed_rng();
        TAILQ_INIT(&tq);
@@ -667,11 +712,14 @@ main(int argc, char **argv)
        if (argc <= 1)
                usage();
 
-       while ((opt = getopt(argc, argv, "Hv46p:T:t:f:")) != -1) {
+       while ((opt = getopt(argc, argv, "cHv46p:T:t:f:")) != -1) {
                switch (opt) {
                case 'H':
                        hash_hosts = 1;
                        break;
+               case 'c':
+                       get_cert = 1;
+                       break;
                case 'p':
                        ssh_port = a2port(optarg);
                        if (ssh_port <= 0) {
@@ -706,10 +754,13 @@ main(int argc, char **argv)
                        tname = strtok(optarg, ",");
                        while (tname) {
                                int type = sshkey_type_from_name(tname);
+
                                switch (type) {
+#ifdef WITH_SSH1
                                case KEY_RSA1:
                                        get_keytypes |= KT_RSA1;
                                        break;
+#endif
                                case KEY_DSA:
                                        get_keytypes |= KT_DSA;
                                        break;
@@ -723,7 +774,8 @@ main(int argc, char **argv)
                                        get_keytypes |= KT_ED25519;
                                        break;
                                case KEY_UNSPEC:
-                                       fatal("unknown key type %s", tname);
+                               default:
+                                       fatal("Unknown key type \"%s\"", tname);
                                }
                                tname = strtok(NULL, ",");
                        }
index 7db72c7..34a451d 100644 (file)
@@ -8,8 +8,7 @@ SYNOPSIS
 
 DESCRIPTION
      ssh-keysign is used by ssh(1) to access the local host keys and generate
-     the digital signature required during host-based authentication with SSH
-     protocol version 2.
+     the digital signature required during host-based authentication.
 
      ssh-keysign is disabled by default and can only be enabled in the global
      client configuration file /etc/ssh/ssh_config by setting EnableSSHKeysign
@@ -50,4 +49,4 @@ HISTORY
 AUTHORS
      Markus Friedl <markus@openbsd.org>
 
-OpenBSD 5.8                    December 7, 2013                    OpenBSD 5.8
+OpenBSD 6.0                    February 17, 2016                   OpenBSD 6.0
index 69d0829..19b0dbc 100644 (file)
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ssh-keysign.8,v 1.14 2013/12/07 11:58:46 naddy Exp $
+.\" $OpenBSD: ssh-keysign.8,v 1.15 2016/02/17 07:38:19 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Markus Friedl.  All rights reserved.
 .\"
@@ -22,7 +22,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd $Mdocdate: December 7 2013 $
+.Dd $Mdocdate: February 17 2016 $
 .Dt SSH-KEYSIGN 8
 .Os
 .Sh NAME
@@ -35,7 +35,7 @@
 is used by
 .Xr ssh 1
 to access the local host keys and generate the digital signature
-required during host-based authentication with SSH protocol version 2.
+required during host-based authentication.
 .Pp
 .Nm
 is disabled by default and can only be enabled in the
index 1dca3e2..ac5034d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keysign.c,v 1.49 2015/07/03 03:56:25 djm Exp $ */
+/* $OpenBSD: ssh-keysign.c,v 1.52 2016/02/15 09:47:49 dtucker Exp $ */
 /*
  * Copyright (c) 2002 Markus Friedl.  All rights reserved.
  *
@@ -34,6 +34,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <errno.h>
 
 #ifdef WITH_OPENSSL
 #include <openssl/evp.h>
@@ -59,6 +60,8 @@
 
 struct ssh *active_state = NULL; /* XXX needed for linking */
 
+extern char *__progname;
+
 /* XXX readconf.c needs these */
 uid_t original_real_uid;
 
@@ -179,6 +182,10 @@ main(int argc, char **argv)
        u_int32_t rnd[256];
 #endif
 
+       ssh_malloc_init();      /* must be called before any mallocs */
+       if (pledge("stdio rpath getpw dns id", NULL) != 0)
+               fatal("%s: pledge: %s", __progname, strerror(errno));
+
        /* Ensure that stdin and stdout are connected */
        if ((fd = open(_PATH_DEVNULL, O_RDWR)) < 2)
                exit(1);
@@ -245,23 +252,26 @@ main(int argc, char **argv)
        if (!found)
                fatal("no hostkey found");
 
+       if (pledge("stdio dns", NULL) != 0)
+               fatal("%s: pledge: %s", __progname, strerror(errno));
+
        if ((b = sshbuf_new()) == NULL)
-               fatal("%s: sshbuf_new failed", __func__);
+               fatal("%s: sshbuf_new failed", __progname);
        if (ssh_msg_recv(STDIN_FILENO, b) < 0)
                fatal("ssh_msg_recv failed");
        if ((r = sshbuf_get_u8(b, &rver)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
+               fatal("%s: buffer error: %s", __progname, ssh_err(r));
        if (rver != version)
                fatal("bad version: received %d, expected %d", rver, version);
        if ((r = sshbuf_get_u32(b, (u_int *)&fd)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
+               fatal("%s: buffer error: %s", __progname, ssh_err(r));
        if (fd < 0 || fd == STDIN_FILENO || fd == STDOUT_FILENO)
                fatal("bad fd");
        if ((host = get_local_name(fd)) == NULL)
                fatal("cannot get local name for fd");
 
        if ((r = sshbuf_get_string(b, &data, &dlen)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
+               fatal("%s: buffer error: %s", __progname, ssh_err(r));
        if (valid_request(pw, host, &key, data, dlen) < 0)
                fatal("not a valid request");
        free(host);
@@ -277,19 +287,20 @@ main(int argc, char **argv)
        if (!found) {
                if ((fp = sshkey_fingerprint(key, options.fingerprint_hash,
                    SSH_FP_DEFAULT)) == NULL)
-                       fatal("%s: sshkey_fingerprint failed", __func__);
+                       fatal("%s: sshkey_fingerprint failed", __progname);
                fatal("no matching hostkey found for key %s %s",
                    sshkey_type(key), fp ? fp : "");
        }
 
-       if ((r = sshkey_sign(keys[i], &signature, &slen, data, dlen, 0)) != 0)
+       if ((r = sshkey_sign(keys[i], &signature, &slen, data, dlen, NULL, 0))
+           != 0)
                fatal("sshkey_sign failed: %s", ssh_err(r));
        free(data);
 
        /* send reply */
        sshbuf_reset(b);
        if ((r = sshbuf_put_string(b, signature, slen)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
+               fatal("%s: buffer error: %s", __progname, ssh_err(r));
        if (ssh_msg_send(STDOUT_FILENO, version, b) == -1)
                fatal("ssh_msg_send failed");
 
index 8c74864..fac0167 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11-client.c,v 1.5 2014/06/24 01:13:21 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11-client.c,v 1.6 2015/12/11 00:20:04 mmcc Exp $ */
 /*
  * Copyright (c) 2010 Markus Friedl.  All rights reserved.
  *
@@ -173,7 +173,7 @@ pkcs11_start_helper(void)
                close(pair[0]);
                close(pair[1]);
                execlp(_PATH_SSH_PKCS11_HELPER, _PATH_SSH_PKCS11_HELPER,
-                   (char *) 0);
+                   (char *)NULL);
                fprintf(stderr, "exec: %s: %s\n", _PATH_SSH_PKCS11_HELPER,
                    strerror(errno));
                _exit(1);
index 7fac805..1b58361 100644 (file)
@@ -22,4 +22,4 @@ HISTORY
 AUTHORS
      Markus Friedl <markus@openbsd.org>
 
-OpenBSD 5.8                      July 16, 2013                     OpenBSD 5.8
+OpenBSD 6.0                      July 16, 2013                     OpenBSD 6.0
index f2d5863..53f41c5 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11-helper.c,v 1.11 2015/08/20 22:32:42 deraadt Exp $ */
+/* $OpenBSD: ssh-pkcs11-helper.c,v 1.12 2016/02/15 09:47:49 dtucker Exp $ */
 /*
  * Copyright (c) 2010 Markus Friedl.  All rights reserved.
  *
@@ -280,6 +280,7 @@ main(int argc, char **argv)
 
        extern char *__progname;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        TAILQ_INIT(&pkcs11_keylist);
        pkcs11_init(0);
 
index 92614a5..aaf712d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11.c,v 1.21 2015/07/18 08:02:17 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11.c,v 1.23 2016/10/28 03:33:52 djm Exp $ */
 /*
  * Copyright (c) 2010 Markus Friedl.  All rights reserved.
  *
@@ -322,8 +322,10 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
        k11->slotidx = slotidx;
        /* identify key object on smartcard */
        k11->keyid_len = keyid_attrib->ulValueLen;
-       k11->keyid = xmalloc(k11->keyid_len);
-       memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len);
+       if (k11->keyid_len > 0) {
+               k11->keyid = xmalloc(k11->keyid_len);
+               memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len);
+       }
        k11->orig_finish = def->finish;
        memcpy(&k11->rsa_method, def, sizeof(k11->rsa_method));
        k11->rsa_method.name = "pkcs11";
@@ -575,7 +577,8 @@ pkcs11_add_provider(char *provider_id, char *pin, struct sshkey ***keyp)
 
        *keyp = NULL;
        if (pkcs11_provider_lookup(provider_id) != NULL) {
-               error("provider already registered: %s", provider_id);
+               debug("%s: provider already registered: %s",
+                   __func__, provider_id);
                goto fail;
        }
        /* open shared pkcs11-libarary */
@@ -592,23 +595,27 @@ pkcs11_add_provider(char *provider_id, char *pin, struct sshkey ***keyp)
        p->handle = handle;
        /* setup the pkcs11 callbacks */
        if ((rv = (*getfunctionlist)(&f)) != CKR_OK) {
-               error("C_GetFunctionList failed: %lu", rv);
+               error("C_GetFunctionList for provider %s failed: %lu",
+                   provider_id, rv);
                goto fail;
        }
        p->function_list = f;
        if ((rv = f->C_Initialize(NULL)) != CKR_OK) {
-               error("C_Initialize failed: %lu", rv);
+               error("C_Initialize for provider %s failed: %lu",
+                   provider_id, rv);
                goto fail;
        }
        need_finalize = 1;
        if ((rv = f->C_GetInfo(&p->info)) != CKR_OK) {
-               error("C_GetInfo failed: %lu", rv);
+               error("C_GetInfo for provider %s failed: %lu",
+                   provider_id, rv);
                goto fail;
        }
        rmspace(p->info.manufacturerID, sizeof(p->info.manufacturerID));
        rmspace(p->info.libraryDescription, sizeof(p->info.libraryDescription));
-       debug("manufacturerID <%s> cryptokiVersion %d.%d"
+       debug("provider %s: manufacturerID <%s> cryptokiVersion %d.%d"
            " libraryDescription <%s> libraryVersion %d.%d",
+           provider_id,
            p->info.manufacturerID,
            p->info.cryptokiVersion.major,
            p->info.cryptokiVersion.minor,
@@ -620,13 +627,15 @@ pkcs11_add_provider(char *provider_id, char *pin, struct sshkey ***keyp)
                goto fail;
        }
        if (p->nslots == 0) {
-               error("no slots");
+               debug("%s: provider %s returned no slots", __func__,
+                   provider_id);
                goto fail;
        }
        p->slotlist = xcalloc(p->nslots, sizeof(CK_SLOT_ID));
        if ((rv = f->C_GetSlotList(CK_TRUE, p->slotlist, &p->nslots))
            != CKR_OK) {
-               error("C_GetSlotList failed: %lu", rv);
+               error("C_GetSlotList for provider %s failed: %lu",
+                   provider_id, rv);
                goto fail;
        }
        p->slotinfo = xcalloc(p->nslots, sizeof(struct pkcs11_slotinfo));
@@ -636,20 +645,23 @@ pkcs11_add_provider(char *provider_id, char *pin, struct sshkey ***keyp)
                token = &p->slotinfo[i].token;
                if ((rv = f->C_GetTokenInfo(p->slotlist[i], token))
                    != CKR_OK) {
-                       error("C_GetTokenInfo failed: %lu", rv);
+                       error("C_GetTokenInfo for provider %s slot %lu "
+                           "failed: %lu", provider_id, (unsigned long)i, rv);
                        continue;
                }
                if ((token->flags & CKF_TOKEN_INITIALIZED) == 0) {
-                       debug2("%s: ignoring uninitialised token in slot %lu",
-                           __func__, (unsigned long)i);
+                       debug2("%s: ignoring uninitialised token in "
+                           "provider %s slot %lu", __func__,
+                           provider_id, (unsigned long)i);
                        continue;
                }
                rmspace(token->label, sizeof(token->label));
                rmspace(token->manufacturerID, sizeof(token->manufacturerID));
                rmspace(token->model, sizeof(token->model));
                rmspace(token->serialNumber, sizeof(token->serialNumber));
-               debug("label <%s> manufacturerID <%s> model <%s> serial <%s>"
-                   " flags 0x%lx",
+               debug("provider %s slot %lu: label <%s> manufacturerID <%s> "
+                   "model <%s> serial <%s> flags 0x%lx",
+                   provider_id, (unsigned long)i,
                    token->label, token->manufacturerID, token->model,
                    token->serialNumber, token->flags);
                /* open session, login with pin and retrieve public keys */
@@ -661,11 +673,12 @@ pkcs11_add_provider(char *provider_id, char *pin, struct sshkey ***keyp)
                p->refcount++;  /* add to provider list */
                return (nkeys);
        }
-       error("no keys");
+       debug("%s: provider %s returned no keys", __func__, provider_id);
        /* don't add the provider, since it does not have any keys */
 fail:
        if (need_finalize && (rv = f->C_Finalize(NULL)) != CKR_OK)
-               error("C_Finalize failed: %lu", rv);
+               error("C_Finalize for provider %s failed: %lu",
+                   provider_id, rv);
        if (p) {
                free(p->slotlist);
                free(p->slotinfo);
index cdc18a4..cde05df 100644 (file)
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-rsa.c,v 1.53 2015/06/15 01:32:50 djm Exp $ */
+/* $OpenBSD: ssh-rsa.c,v 1.60 2016/09/12 23:39:34 djm Exp $ */
 /*
  * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org>
  *
 
 static int openssh_RSA_verify(int, u_char *, size_t, u_char *, size_t, RSA *);
 
+static const char *
+rsa_hash_alg_ident(int hash_alg)
+{
+       switch (hash_alg) {
+       case SSH_DIGEST_SHA1:
+               return "ssh-rsa";
+       case SSH_DIGEST_SHA256:
+               return "rsa-sha2-256";
+       case SSH_DIGEST_SHA512:
+               return "rsa-sha2-512";
+       }
+       return NULL;
+}
+
+static int
+rsa_hash_alg_from_ident(const char *ident)
+{
+       if (strcmp(ident, "ssh-rsa") == 0 ||
+           strcmp(ident, "ssh-rsa-cert-v01@openssh.com") == 0)
+               return SSH_DIGEST_SHA1;
+       if (strcmp(ident, "rsa-sha2-256") == 0)
+               return SSH_DIGEST_SHA256;
+       if (strcmp(ident, "rsa-sha2-512") == 0)
+               return SSH_DIGEST_SHA512;
+       return -1;
+}
+
+static int
+rsa_hash_alg_nid(int type)
+{
+       switch (type) {
+       case SSH_DIGEST_SHA1:
+               return NID_sha1;
+       case SSH_DIGEST_SHA256:
+               return NID_sha256;
+       case SSH_DIGEST_SHA512:
+               return NID_sha512;
+       default:
+               return -1;
+       }
+}
+
 /* RSASSA-PKCS1-v1_5 (PKCS #1 v2.0 signature) with SHA1 */
 int
 ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
-    const u_char *data, size_t datalen, u_int compat)
+    const u_char *data, size_t datalen, const char *alg_ident)
 {
-       int hash_alg;
        u_char digest[SSH_DIGEST_MAX_LENGTH], *sig = NULL;
        size_t slen;
        u_int dlen, len;
-       int nid, ret = SSH_ERR_INTERNAL_ERROR;
+       int nid, hash_alg, ret = SSH_ERR_INTERNAL_ERROR;
        struct sshbuf *b = NULL;
 
        if (lenp != NULL)
@@ -53,16 +94,20 @@ ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
        if (sigp != NULL)
                *sigp = NULL;
 
-       if (key == NULL || key->rsa == NULL ||
-           sshkey_type_plain(key->type) != KEY_RSA)
+       if (alg_ident == NULL || strlen(alg_ident) == 0)
+               hash_alg = SSH_DIGEST_SHA1;
+       else
+               hash_alg = rsa_hash_alg_from_ident(alg_ident);
+       if (key == NULL || key->rsa == NULL || hash_alg == -1 ||
+           sshkey_type_plain(key->type) != KEY_RSA ||
+           BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
                return SSH_ERR_INVALID_ARGUMENT;
        slen = RSA_size(key->rsa);
        if (slen <= 0 || slen > SSHBUF_MAX_BIGNUM)
                return SSH_ERR_INVALID_ARGUMENT;
 
        /* hash the data */
-       hash_alg = SSH_DIGEST_SHA1;
-       nid = NID_sha1;
+       nid = rsa_hash_alg_nid(hash_alg);
        if ((dlen = ssh_digest_bytes(hash_alg)) == 0)
                return SSH_ERR_INTERNAL_ERROR;
        if ((ret = ssh_digest_memory(hash_alg, data, datalen,
@@ -91,7 +136,7 @@ ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
                ret = SSH_ERR_ALLOC_FAIL;
                goto out;
        }
-       if ((ret = sshbuf_put_cstring(b, "ssh-rsa")) != 0 ||
+       if ((ret = sshbuf_put_cstring(b, rsa_hash_alg_ident(hash_alg))) != 0 ||
            (ret = sshbuf_put_string(b, sig, slen)) != 0)
                goto out;
        len = sshbuf_len(b);
@@ -111,15 +156,13 @@ ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
                explicit_bzero(sig, slen);
                free(sig);
        }
-       if (b != NULL)
-               sshbuf_free(b);
+       sshbuf_free(b);
        return ret;
 }
 
 int
 ssh_rsa_verify(const struct sshkey *key,
-    const u_char *signature, size_t signaturelen,
-    const u_char *data, size_t datalen, u_int compat)
+    const u_char *sig, size_t siglen, const u_char *data, size_t datalen)
 {
        char *ktype = NULL;
        int hash_alg, ret = SSH_ERR_INTERNAL_ERROR;
@@ -129,16 +172,17 @@ ssh_rsa_verify(const struct sshkey *key,
 
        if (key == NULL || key->rsa == NULL ||
            sshkey_type_plain(key->type) != KEY_RSA ||
-           BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
+           BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE ||
+           sig == NULL || siglen == 0)
                return SSH_ERR_INVALID_ARGUMENT;
 
-       if ((b = sshbuf_from(signature, signaturelen)) == NULL)
+       if ((b = sshbuf_from(sig, siglen)) == NULL)
                return SSH_ERR_ALLOC_FAIL;
        if (sshbuf_get_cstring(b, &ktype, NULL) != 0) {
                ret = SSH_ERR_INVALID_FORMAT;
                goto out;
        }
-       if (strcmp("ssh-rsa", ktype) != 0) {
+       if ((hash_alg = rsa_hash_alg_from_ident(ktype)) == -1) {
                ret = SSH_ERR_KEY_TYPE_MISMATCH;
                goto out;
        }
@@ -167,7 +211,6 @@ ssh_rsa_verify(const struct sshkey *key,
                explicit_bzero(sigblob, diff);
                len = modlen;
        }
-       hash_alg = SSH_DIGEST_SHA1;
        if ((dlen = ssh_digest_bytes(hash_alg)) == 0) {
                ret = SSH_ERR_INTERNAL_ERROR;
                goto out;
@@ -183,10 +226,8 @@ ssh_rsa_verify(const struct sshkey *key,
                explicit_bzero(sigblob, len);
                free(sigblob);
        }
-       if (ktype != NULL)
-               free(ktype);
-       if (b != NULL)
-               sshbuf_free(b);
+       free(ktype);
+       sshbuf_free(b);
        explicit_bzero(digest, sizeof(digest));
        return ret;
 }
@@ -196,6 +237,7 @@ ssh_rsa_verify(const struct sshkey *key,
  * http://www.rsasecurity.com/rsalabs/pkcs/pkcs-1/
  * ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.asn
  */
+
 /*
  * id-sha1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
  *     oiw(14) secsig(3) algorithms(2) 26 }
@@ -209,25 +251,71 @@ static const u_char id_sha1[] = {
        0x04, 0x14  /* Octet string, length 0x14 (20), followed by sha1 hash */
 };
 
+/*
+ * See http://csrc.nist.gov/groups/ST/crypto_apps_infra/csor/algorithms.html
+ * id-sha256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840)
+ *      organization(1) gov(101) csor(3) nistAlgorithm(4) hashAlgs(2)
+ *      id-sha256(1) }
+ */
+static const u_char id_sha256[] = {
+       0x30, 0x31, /* type Sequence, length 0x31 (49) */
+       0x30, 0x0d, /* type Sequence, length 0x0d (13) */
+       0x06, 0x09, /* type OID, length 0x09 */
+       0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, /* id-sha256 */
+       0x05, 0x00, /* NULL */
+       0x04, 0x20  /* Octet string, length 0x20 (32), followed by sha256 hash */
+};
+
+/*
+ * See http://csrc.nist.gov/groups/ST/crypto_apps_infra/csor/algorithms.html
+ * id-sha512 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840)
+ *      organization(1) gov(101) csor(3) nistAlgorithm(4) hashAlgs(2)
+ *      id-sha256(3) }
+ */
+static const u_char id_sha512[] = {
+       0x30, 0x51, /* type Sequence, length 0x51 (81) */
+       0x30, 0x0d, /* type Sequence, length 0x0d (13) */
+       0x06, 0x09, /* type OID, length 0x09 */
+       0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, /* id-sha512 */
+       0x05, 0x00, /* NULL */
+       0x04, 0x40  /* Octet string, length 0x40 (64), followed by sha512 hash */
+};
+
+static int
+rsa_hash_alg_oid(int hash_alg, const u_char **oidp, size_t *oidlenp)
+{
+       switch (hash_alg) {
+       case SSH_DIGEST_SHA1:
+               *oidp = id_sha1;
+               *oidlenp = sizeof(id_sha1);
+               break;
+       case SSH_DIGEST_SHA256:
+               *oidp = id_sha256;
+               *oidlenp = sizeof(id_sha256);
+               break;
+       case SSH_DIGEST_SHA512:
+               *oidp = id_sha512;
+               *oidlenp = sizeof(id_sha512);
+               break;
+       default:
+               return SSH_ERR_INVALID_ARGUMENT;
+       }
+       return 0;
+}
+
 static int
 openssh_RSA_verify(int hash_alg, u_char *hash, size_t hashlen,
     u_char *sigbuf, size_t siglen, RSA *rsa)
 {
-       size_t ret, rsasize = 0, oidlen = 0, hlen = 0;
-       int len, oidmatch, hashmatch;
+       size_t rsasize = 0, oidlen = 0, hlen = 0;
+       int ret, len, oidmatch, hashmatch;
        const u_char *oid = NULL;
        u_char *decrypted = NULL;
 
+       if ((ret = rsa_hash_alg_oid(hash_alg, &oid, &oidlen)) != 0)
+               return ret;
        ret = SSH_ERR_INTERNAL_ERROR;
-       switch (hash_alg) {
-       case SSH_DIGEST_SHA1:
-               oid = id_sha1;
-               oidlen = sizeof(id_sha1);
-               hlen = 20;
-               break;
-       default:
-               goto done;
-       }
+       hlen = ssh_digest_bytes(hash_alg);
        if (hashlen != hlen) {
                ret = SSH_ERR_INVALID_ARGUMENT;
                goto done;
diff --git a/ssh.0 b/ssh.0
index ad4817a..67ce809 100644 (file)
--- a/ssh.0
+++ b/ssh.0
@@ -6,24 +6,22 @@ NAME
 SYNOPSIS
      ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
          [-D [bind_address:]port] [-E log_file] [-e escape_char]
-         [-F configfile] [-I pkcs11] [-i identity_file] [-L address]
-         [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
-         [-Q cipher | cipher-auth | mac | kex | key | protocol-version]
-         [-R address] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
+         [-F configfile] [-I pkcs11] [-i identity_file]
+         [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]
+         [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address]
+         [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
          [user@]hostname [command]
 
 DESCRIPTION
      ssh (SSH client) is a program for logging into a remote machine and for
-     executing commands on a remote machine.  It is intended to replace rlogin
-     and rsh, and provide secure encrypted communications between two
-     untrusted hosts over an insecure network.  X11 connections, arbitrary TCP
-     ports and UNIX-domain sockets can also be forwarded over the secure
-     channel.
+     executing commands on a remote machine.  It is intended to provide secure
+     encrypted communications between two untrusted hosts over an insecure
+     network.  X11 connections, arbitrary TCP ports and UNIX-domain sockets
+     can also be forwarded over the secure channel.
 
      ssh connects and logs into the specified hostname (with optional user
      name).  The user must prove his/her identity to the remote machine using
-     one of several methods depending on the protocol version used (see
-     below).
+     one of several methods (see below).
 
      If command is specified, it is executed on the remote host instead of a
      login shell.
@@ -144,9 +142,18 @@ DESCRIPTION
              ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
              Identity files may also be specified on a per-host basis in the
              configuration file.  It is possible to have multiple -i options
-             (and multiple identities specified in configuration files).  ssh
-             will also try to load certificate information from the filename
-             obtained by appending -cert.pub to identity filenames.
+             (and multiple identities specified in configuration files).  If
+             no certificates have been explicitly specified by the
+             CertificateFile directive, ssh will also try to load certificate
+             information from the filename obtained by appending -cert.pub to
+             identity filenames.
+
+     -J [user@]host[:port]
+             Connect to the target host by first making a ssh connection to
+             the jump host and then establishing a TCP forwarding to the
+             ultimate destination from there.  Multiple jump hops may be
+             specified separated by comma characters.  This is a shortcut to
+             specify a ProxyJump configuration directive.
 
      -K      Enables GSSAPI-based authentication and forwarding (delegation)
              of GSSAPI credentials to the server.
@@ -190,12 +197,12 @@ DESCRIPTION
              details.
 
      -m mac_spec
-             Additionally, for protocol version 2 a comma-separated list of
-             MAC (message authentication code) algorithms can be specified in
-             order of preference.  See the MACs keyword for more information.
+             A comma-separated list of MAC (message authentication code)
+             algorithms, specified in order of preference.  See the MACs
+             keyword for more information.
 
      -N      Do not execute a remote command.  This is useful for just
-             forwarding ports (protocol version 2 only).
+             forwarding ports.
 
      -n      Redirects stdin from /dev/null (actually, prevents reading from
              stdin).  This must be used when ssh is run in the background.  A
@@ -224,6 +231,7 @@ DESCRIPTION
              of the options listed below, and their possible values, see
              ssh_config(5).
 
+                   AddKeysToAgent
                    AddressFamily
                    BatchMode
                    BindAddress
@@ -232,6 +240,7 @@ DESCRIPTION
                    CanonicalizeHostname
                    CanonicalizeMaxDots
                    CanonicalizePermittedCNAMEs
+                   CertificateFile
                    ChallengeResponseAuthentication
                    CheckHostIP
                    Cipher
@@ -263,8 +272,10 @@ DESCRIPTION
                    HostKeyAlgorithms
                    HostKeyAlias
                    HostName
-                   IdentityFile
                    IdentitiesOnly
+                   IdentityAgent
+                   IdentityFile
+                   Include
                    IPQoS
                    KbdInteractiveAuthentication
                    KbdInteractiveDevices
@@ -283,6 +294,7 @@ DESCRIPTION
                    PreferredAuthentications
                    Protocol
                    ProxyCommand
+                   ProxyJump
                    ProxyUseFdpass
                    PubkeyAcceptedKeyTypes
                    PubkeyAuthentication
@@ -312,13 +324,14 @@ DESCRIPTION
              Port to connect to on the remote host.  This can be specified on
              a per-host basis in the configuration file.
 
-     -Q cipher | cipher-auth | mac | kex | key | protocol-version
+     -Q query_option
              Queries ssh for the algorithms supported for the specified
              version 2.  The available features are: cipher (supported
              symmetric ciphers), cipher-auth (supported symmetric ciphers that
              support authenticated encryption), mac (supported message
-             integrity codes), kex (key exchange algorithms), key (key types)
-             and protocol-version (supported SSH protocol versions).
+             integrity codes), kex (key exchange algorithms), key (key types),
+             key-cert (certificate key types), key-plain (non-certificate key
+             types), and protocol-version (supported SSH protocol versions).
 
      -q      Quiet mode.  Causes most warning and diagnostic messages to be
              suppressed.
@@ -361,10 +374,9 @@ DESCRIPTION
              ssh_config(5) for details.
 
      -s      May be used to request invocation of a subsystem on the remote
-             system.  Subsystems are a feature of the SSH2 protocol which
-             facilitate the use of SSH as a secure transport for other
-             applications (eg. sftp(1)).  The subsystem is specified as the
-             remote command.
+             system.  Subsystems facilitate the use of SSH as a secure
+             transport for other applications (e.g. sftp(1)).  The subsystem
+             is specified as the remote command.
 
      -T      Disable pseudo-terminal allocation.
 
@@ -383,8 +395,9 @@ DESCRIPTION
      -W host:port
              Requests that standard input and output on the client be
              forwarded to host on port over the secure channel.  Implies -N,
-             -T, ExitOnForwardFailure and ClearAllForwardings.  Works with
-             Protocol version 2 only.
+             -T, ExitOnForwardFailure and ClearAllForwardings, though these
+             can be overridden in the configuration file or using -o command
+             line options.
 
      -w local_tun[:remote_tun]
              Requests tunnel device forwarding with the specified tun(4)
@@ -427,20 +440,16 @@ DESCRIPTION
 AUTHENTICATION
      The OpenSSH SSH client supports SSH protocols 1 and 2.  The default is to
      use protocol 2 only, though this can be changed via the Protocol option
-     in ssh_config(5) or the -1 and -2 options (see above).  Both protocols
-     support similar authentication methods, but protocol 2 is the default
-     since it provides additional mechanisms for confidentiality (the traffic
-     is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) and
-     integrity (hmac-md5, hmac-sha1, hmac-sha2-256, hmac-sha2-512, umac-64,
-     umac-128, hmac-ripemd160).  Protocol 1 lacks a strong mechanism for
-     ensuring the integrity of the connection.
+     in ssh_config(5) or the -1 and -2 options (see above).  Protocol 1 should
+     not be used and is only offered to support legacy devices.  It suffers
+     from a number of cryptographic weaknesses and doesn't support many of the
+     advanced features available for protocol 2.
 
      The methods available for authentication are: GSSAPI-based
      authentication, host-based authentication, public key authentication,
      challenge-response authentication, and password authentication.
      Authentication methods are tried in the order specified above, though
-     protocol 2 has a configuration option to change the default order:
-     PreferredAuthentications.
+     PreferredAuthentications can be used to change the default order.
 
      Host-based authentication works as follows: If the machine the user logs
      in from is listed in /etc/hosts.equiv or /etc/shosts.equiv on the remote
@@ -463,10 +472,8 @@ AUTHENTICATION
      creates a public/private key pair for authentication purposes.  The
      server knows the public key, and only the user knows the private key.
      ssh implements public key authentication protocol automatically, using
-     one of the DSA, ECDSA, Ed25519 or RSA algorithms.  Protocol 1 is
-     restricted to using only RSA keys, but protocol 2 may use any.  The
-     HISTORY section of ssl(8) contains a brief discussion of the DSA and RSA
-     algorithms.
+     one of the DSA, ECDSA, Ed25519 or RSA algorithms.  The HISTORY section of
+     ssl(8) contains a brief discussion of the DSA and RSA algorithms.
 
      The file ~/.ssh/authorized_keys lists the public keys that are permitted
      for logging in.  When the user logs in, the ssh program tells the server
@@ -475,13 +482,12 @@ AUTHENTICATION
      the corresponding public key is authorized to accept the account.
 
      The user creates his/her key pair by running ssh-keygen(1).  This stores
-     the private key in ~/.ssh/identity (protocol 1), ~/.ssh/id_dsa (protocol
-     2 DSA), ~/.ssh/id_ecdsa (protocol 2 ECDSA), ~/.ssh/id_ed25519 (protocol 2
-     Ed25519), or ~/.ssh/id_rsa (protocol 2 RSA) and stores the public key in
-     ~/.ssh/identity.pub (protocol 1), ~/.ssh/id_dsa.pub (protocol 2 DSA),
-     ~/.ssh/id_ecdsa.pub (protocol 2 ECDSA), ~/.ssh/id_ed25519.pub (protocol 2
-     Ed25519), or ~/.ssh/id_rsa.pub (protocol 2 RSA) in the user's home
-     directory.  The user should then copy the public key to
+     the private key in ~/.ssh/identity (protocol 1), ~/.ssh/id_dsa (DSA),
+     ~/.ssh/id_ecdsa (ECDSA), ~/.ssh/id_ed25519 (Ed25519), or ~/.ssh/id_rsa
+     (RSA) and stores the public key in ~/.ssh/identity.pub (protocol 1),
+     ~/.ssh/id_dsa.pub (DSA), ~/.ssh/id_ecdsa.pub (ECDSA),
+     ~/.ssh/id_ed25519.pub (Ed25519), or ~/.ssh/id_rsa.pub (RSA) in the user's
+     home directory.  The user should then copy the public key to
      ~/.ssh/authorized_keys in his/her home directory on the remote machine.
      The authorized_keys file corresponds to the conventional ~/.rhosts file,
      and has one key per line, though the lines can be very long.  After this,
@@ -495,15 +501,13 @@ AUTHENTICATION
      more information.
 
      The most convenient way to use public key or certificate authentication
-     may be with an authentication agent.  See ssh-agent(1) for more
-     information.
+     may be with an authentication agent.  See ssh-agent(1) and (optionally)
+     the AddKeysToAgent directive in ssh_config(5) for more information.
 
      Challenge-response authentication works as follows: The server sends an
-     arbitrary "challenge" text, and prompts for a response.  Protocol 2
-     allows multiple challenges and responses; protocol 1 is restricted to
-     just one challenge/response.  Examples of challenge-response
-     authentication include BSD Authentication (see login.conf(5)) and PAM
-     (some non-OpenBSD systems).
+     arbitrary "challenge" text, and prompts for a response.  Examples of
+     challenge-response authentication include BSD Authentication (see
+     login.conf(5)) and PAM (some non-OpenBSD systems).
 
      Finally, if other authentication methods fail, ssh prompts the user for a
      password.  The password is sent to the remote host for checking; however,
@@ -565,8 +569,8 @@ ESCAPE CHARACTERS
 
      ~?      Display a list of escape characters.
 
-     ~B      Send a BREAK to the remote system (only useful for SSH protocol
-             version 2 and if the peer supports it).
+     ~B      Send a BREAK to the remote system (only useful if the peer
+             supports it).
 
      ~C      Open command line.  Currently this allows the addition of port
              forwardings using the -L, -R and -D options (see above).  It also
@@ -577,8 +581,8 @@ ESCAPE CHARACTERS
              PermitLocalCommand option is enabled in ssh_config(5).  Basic
              help is available, using the -h option.
 
-     ~R      Request rekeying of the connection (only useful for SSH protocol
-             version 2 and if the peer supports it).
+     ~R      Request rekeying of the connection (only useful if the peer
+             supports it).
 
      ~V      Decrease the verbosity (LogLevel) when errors are being written
              to stderr.
@@ -892,12 +896,7 @@ FILES
      /etc/ssh/ssh_host_ed25519_key
      /etc/ssh/ssh_host_rsa_key
              These files contain the private parts of the host keys and are
-             used for host-based authentication.  If protocol version 1 is
-             used, ssh must be setuid root, since the host key is readable
-             only by root.  For protocol version 2, ssh uses ssh-keysign(8) to
-             access the host keys, eliminating the requirement that ssh be
-             setuid root when host-based authentication is used.  By default
-             ssh is not setuid root.
+             used for host-based authentication.
 
      /etc/ssh/ssh_known_hosts
              Systemwide list of known host keys.  This file should be prepared
@@ -969,4 +968,4 @@ AUTHORS
      created OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-OpenBSD 5.8                      July 20, 2015                     OpenBSD 5.8
+OpenBSD 6.0                      July 16, 2016                     OpenBSD 6.0
diff --git a/ssh.1 b/ssh.1
index 2ea0a20..4011c65 100644 (file)
--- a/ssh.1
+++ b/ssh.1
@@ -33,8 +33,8 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: ssh.1,v 1.361 2015/07/20 18:44:12 millert Exp $
-.Dd $Mdocdate: July 20 2015 $
+.\" $OpenBSD: ssh.1,v 1.376 2016/07/16 06:57:55 jmc Exp $
+.Dd $Mdocdate: July 16 2016 $
 .Dt SSH 1
 .Os
 .Sh NAME
 .Op Fl F Ar configfile
 .Op Fl I Ar pkcs11
 .Op Fl i Ar identity_file
+.Op Fl J Oo Ar user Ns @ Oc Ns Ar host Ns Op : Ns Ar port
 .Op Fl L Ar address
 .Op Fl l Ar login_name
 .Op Fl m Ar mac_spec
 .Op Fl O Ar ctl_cmd
 .Op Fl o Ar option
 .Op Fl p Ar port
-.Op Fl Q Cm cipher | cipher-auth | mac | kex | key | protocol-version
+.Op Fl Q Ar query_option
 .Op Fl R Ar address
 .Op Fl S Ar ctl_path
 .Op Fl W Ar host : Ns Ar port
@@ -70,8 +71,7 @@
 .Nm
 (SSH client) is a program for logging into a remote machine and for
 executing commands on a remote machine.
-It is intended to replace rlogin and rsh,
-and provide secure encrypted communications between
+It is intended to provide secure encrypted communications between
 two untrusted hosts over an insecure network.
 X11 connections, arbitrary TCP ports and
 .Ux Ns -domain
@@ -85,7 +85,7 @@ connects and logs into the specified
 name).
 The user must prove
 his/her identity to the remote machine using one of several methods
-depending on the protocol version used (see below).
+(see below).
 .Pp
 If
 .Ar command
@@ -304,12 +304,33 @@ It is possible to have multiple
 .Fl i
 options (and multiple identities specified in
 configuration files).
+If no certificates have been explicitly specified by the
+.Cm CertificateFile
+directive,
 .Nm
 will also try to load certificate information from the filename obtained
 by appending
 .Pa -cert.pub
 to identity filenames.
 .Pp
+.It Fl J Xo
+.Sm off
+.Op Ar user No @
+.Ar host
+.Op : Ar port
+.Sm on
+.Xc
+Connect to the target host by first making a
+.Nm
+connection to the jump
+.Ar host
+and then establishing a TCP forwarding to the ultimate destination from
+there.
+Multiple jump hops may be specified separated by comma characters.
+This is a shortcut to specify a
+.Cm ProxyJump
+configuration directive.
+.Pp
 .It Fl K
 Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
 credentials to the server.
@@ -400,17 +421,15 @@ in
 for details.
 .Pp
 .It Fl m Ar mac_spec
-Additionally, for protocol version 2 a comma-separated list of MAC
-(message authentication code) algorithms can
-be specified in order of preference.
+A comma-separated list of MAC (message authentication code) algorithms,
+specified in order of preference.
 See the
 .Cm MACs
 keyword for more information.
 .Pp
 .It Fl N
 Do not execute a remote command.
-This is useful for just forwarding ports
-(protocol version 2 only).
+This is useful for just forwarding ports.
 .Pp
 .It Fl n
 Redirects stdin from
@@ -460,6 +479,7 @@ For full details of the options listed below, and their possible values, see
 .Xr ssh_config 5 .
 .Pp
 .Bl -tag -width Ds -offset indent -compact
+.It AddKeysToAgent
 .It AddressFamily
 .It BatchMode
 .It BindAddress
@@ -468,6 +488,7 @@ For full details of the options listed below, and their possible values, see
 .It CanonicalizeHostname
 .It CanonicalizeMaxDots
 .It CanonicalizePermittedCNAMEs
+.It CertificateFile
 .It ChallengeResponseAuthentication
 .It CheckHostIP
 .It Cipher
@@ -499,8 +520,10 @@ For full details of the options listed below, and their possible values, see
 .It HostKeyAlgorithms
 .It HostKeyAlias
 .It HostName
-.It IdentityFile
 .It IdentitiesOnly
+.It IdentityAgent
+.It IdentityFile
+.It Include
 .It IPQoS
 .It KbdInteractiveAuthentication
 .It KbdInteractiveDevices
@@ -519,6 +542,7 @@ For full details of the options listed below, and their possible values, see
 .It PreferredAuthentications
 .It Protocol
 .It ProxyCommand
+.It ProxyJump
 .It ProxyUseFdpass
 .It PubkeyAcceptedKeyTypes
 .It PubkeyAuthentication
@@ -550,7 +574,7 @@ Port to connect to on the remote host.
 This can be specified on a
 per-host basis in the configuration file.
 .Pp
-.It Fl Q Cm cipher | cipher-auth | mac | kex | key | protocol-version
+.It Fl Q Ar query_option
 Queries
 .Nm
 for the algorithms supported for the specified version 2.
@@ -564,7 +588,11 @@ The available features are:
 .Ar kex
 (key exchange algorithms),
 .Ar key
-(key types) and
+(key types),
+.Ar key-cert
+(certificate key types),
+.Ar key-plain
+(non-certificate key types), and
 .Ar protocol-version
 (supported SSH protocol versions).
 .Pp
@@ -656,8 +684,8 @@ for details.
 .Pp
 .It Fl s
 May be used to request invocation of a subsystem on the remote system.
-Subsystems are a feature of the SSH2 protocol which facilitate the use
-of SSH as a secure transport for other applications (eg.\&
+Subsystems facilitate the use of SSH
+as a secure transport for other applications (e.g.\&
 .Xr sftp 1 ) .
 The subsystem is specified as the remote command.
 .Pp
@@ -701,8 +729,10 @@ Implies
 .Fl T ,
 .Cm ExitOnForwardFailure
 and
-.Cm ClearAllForwardings .
-Works with Protocol version 2 only.
+.Cm ClearAllForwardings ,
+though these can be overridden in the configuration file or using
+.Fl o
+command line options.
 .Pp
 .It Fl w Xo
 .Ar local_tun Ns Op : Ns Ar remote_tun
@@ -787,15 +817,10 @@ or the
 and
 .Fl 2
 options (see above).
-Both protocols support similar authentication methods,
-but protocol 2 is the default since
-it provides additional mechanisms for confidentiality
-(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour)
-and integrity (hmac-md5, hmac-sha1,
-hmac-sha2-256, hmac-sha2-512,
-umac-64, umac-128, hmac-ripemd160).
-Protocol 1 lacks a strong mechanism for ensuring the
-integrity of the connection.
+Protocol 1 should not be used
+and is only offered to support legacy devices.
+It suffers from a number of cryptographic weaknesses
+and doesn't support many of the advanced features available for protocol 2.
 .Pp
 The methods available for authentication are:
 GSSAPI-based authentication,
@@ -804,8 +829,9 @@ public key authentication,
 challenge-response authentication,
 and password authentication.
 Authentication methods are tried in the order specified above,
-though protocol 2 has a configuration option to change the default order:
-.Cm PreferredAuthentications .
+though
+.Cm PreferredAuthentications
+can be used to change the default order.
 .Pp
 Host-based authentication works as follows:
 If the machine the user logs in from is listed in
@@ -849,8 +875,6 @@ The server knows the public key, and only the user knows the private key.
 .Nm
 implements public key authentication protocol automatically,
 using one of the DSA, ECDSA, Ed25519 or RSA algorithms.
-Protocol 1 is restricted to using only RSA keys,
-but protocol 2 may use any.
 The HISTORY section of
 .Xr ssl 8
 contains a brief discussion of the DSA and RSA algorithms.
@@ -872,26 +896,26 @@ This stores the private key in
 .Pa ~/.ssh/identity
 (protocol 1),
 .Pa ~/.ssh/id_dsa
-(protocol 2 DSA),
+(DSA),
 .Pa ~/.ssh/id_ecdsa
-(protocol 2 ECDSA),
+(ECDSA),
 .Pa ~/.ssh/id_ed25519
-(protocol 2 Ed25519),
+(Ed25519),
 or
 .Pa ~/.ssh/id_rsa
-(protocol 2 RSA)
+(RSA)
 and stores the public key in
 .Pa ~/.ssh/identity.pub
 (protocol 1),
 .Pa ~/.ssh/id_dsa.pub
-(protocol 2 DSA),
+(DSA),
 .Pa ~/.ssh/id_ecdsa.pub
-(protocol 2 ECDSA),
+(ECDSA),
 .Pa ~/.ssh/id_ed25519.pub
-(protocol 2 Ed25519),
+(Ed25519),
 or
 .Pa ~/.ssh/id_rsa.pub
-(protocol 2 RSA)
+(RSA)
 in the user's home directory.
 The user should then copy the public key
 to
@@ -919,14 +943,16 @@ The most convenient way to use public key or certificate authentication
 may be with an authentication agent.
 See
 .Xr ssh-agent 1
+and (optionally) the
+.Cm AddKeysToAgent
+directive in
+.Xr ssh_config 5
 for more information.
 .Pp
 Challenge-response authentication works as follows:
 The server sends an arbitrary
 .Qq challenge
 text, and prompts for a response.
-Protocol 2 allows multiple challenges and responses;
-protocol 1 is restricted to just one challenge/response.
 Examples of challenge-response authentication include
 .Bx
 Authentication (see
@@ -1025,7 +1051,7 @@ at logout when waiting for forwarded connection / X11 sessions to terminate.
 Display a list of escape characters.
 .It Cm ~B
 Send a BREAK to the remote system
-(only useful for SSH protocol version 2 and if the peer supports it).
+(only useful if the peer supports it).
 .It Cm ~C
 Open command line.
 Currently this allows the addition of port forwardings using the
@@ -1058,7 +1084,7 @@ Basic help is available, using the
 option.
 .It Cm ~R
 Request rekeying of the connection
-(only useful for SSH protocol version 2 and if the peer supports it).
+(only useful if the peer supports it).
 .It Cm ~V
 Decrease the verbosity
 .Pq Ic LogLevel
@@ -1526,20 +1552,6 @@ The file format and configuration options are described in
 .It Pa /etc/ssh/ssh_host_rsa_key
 These files contain the private parts of the host keys
 and are used for host-based authentication.
-If protocol version 1 is used,
-.Nm
-must be setuid root, since the host key is readable only by root.
-For protocol version 2,
-.Nm
-uses
-.Xr ssh-keysign 8
-to access the host keys,
-eliminating the requirement that
-.Nm
-be setuid root when host-based authentication is used.
-By default
-.Nm
-is not setuid root.
 .Pp
 .It Pa /etc/ssh/ssh_known_hosts
 Systemwide list of known host keys.
diff --git a/ssh.c b/ssh.c
index 67c1ebf..32b27bb 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.420 2015/07/30 00:01:34 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.451 2017/03/10 04:07:20 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -67,6 +67,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <limits.h>
+#include <locale.h>
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include "match.h"
 #include "msg.h"
 #include "uidswap.h"
-#include "roaming.h"
 #include "version.h"
 #include "ssherr.h"
 #include "myproposal.h"
+#include "utf8.h"
 
 #ifdef ENABLE_PKCS11
 #include "ssh-pkcs11.h"
@@ -152,10 +153,6 @@ int ostdin_null_flag, ono_shell_flag, otty_flag, orequest_tty;
  */
 int fork_after_authentication_flag = 0;
 
-/* forward stdio to remote host and port */
-char *stdio_forward_host = NULL;
-int stdio_forward_port = 0;
-
 /*
  * General data structure for command line options and options configurable
  * in configuration files.  See readconf.h.
@@ -204,11 +201,10 @@ usage(void)
 "usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]\n"
 "           [-D [bind_address:]port] [-E log_file] [-e escape_char]\n"
 "           [-F configfile] [-I pkcs11] [-i identity_file]\n"
-"           [-L address] [-l login_name] [-m mac_spec]\n"
-"           [-O ctl_cmd] [-o option] [-p port]\n"
-"           [-Q cipher | cipher-auth | mac | kex | key]\n"
-"           [-R address] [-S ctl_path] [-W host:port]\n"
-"           [-w local_tun[:remote_tun]] [user@]hostname [command]\n"
+"           [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]\n"
+"           [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address]\n"
+"           [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]\n"
+"           [user@]hostname [command]\n"
        );
        exit(255);
 }
@@ -218,10 +214,6 @@ static int ssh_session2(void);
 static void load_public_identity_files(void);
 static void main_sigchld_handler(int);
 
-/* from muxclient.c */
-void muxclient(const char *);
-void muxserver_listen(void);
-
 /* ~/ expand a list of paths. NB. assumes path[n] is heap-allocated. */
 static void
 tilde_expand_paths(char **paths, u_int num_paths)
@@ -252,7 +244,7 @@ resolve_host(const char *name, int port, int logerr, char *cname, size_t clen)
        if (port <= 0)
                port = default_ssh_port();
 
-       snprintf(strport, sizeof strport, "%u", port);
+       snprintf(strport, sizeof strport, "%d", port);
        memset(&hints, 0, sizeof(hints));
        hints.ai_family = options.address_family == -1 ?
            AF_UNSPEC : options.address_family;
@@ -337,7 +329,7 @@ resolve_addr(const char *name, int port, char *caddr, size_t clen)
  * NB. this function must operate with a options having undefined members.
  */
 static int
-check_follow_cname(char **namep, const char *cname)
+check_follow_cname(int direct, char **namep, const char *cname)
 {
        int i;
        struct allowed_cname *rule;
@@ -349,9 +341,9 @@ check_follow_cname(char **namep, const char *cname)
                return 0;
        /*
         * Don't attempt to canonicalize names that will be interpreted by
-        * a proxy unless the user specifically requests so.
+        * a proxy or jump host unless the user specifically requests so.
         */
-       if (!option_clear_or_none(options.proxy_command) &&
+       if (!direct &&
            options.canonicalize_hostname != SSH_CANONICALISE_ALWAYS)
                return 0;
        debug3("%s: check \"%s\" CNAME \"%s\"", __func__, *namep, cname);
@@ -378,7 +370,7 @@ check_follow_cname(char **namep, const char *cname)
 static struct addrinfo *
 resolve_canonicalize(char **hostp, int port)
 {
-       int i, ndots;
+       int i, direct, ndots;
        char *cp, *fullhost, newname[NI_MAXHOST];
        struct addrinfo *addrs;
 
@@ -389,7 +381,9 @@ resolve_canonicalize(char **hostp, int port)
         * Don't attempt to canonicalize names that will be interpreted by
         * a proxy unless the user specifically requests so.
         */
-       if (!option_clear_or_none(options.proxy_command) &&
+       direct = option_clear_or_none(options.proxy_command) &&
+           options.jump_host == NULL;
+       if (!direct &&
            options.canonicalize_hostname != SSH_CANONICALISE_ALWAYS)
                return NULL;
 
@@ -406,6 +400,17 @@ resolve_canonicalize(char **hostp, int port)
                return addrs;
        }
 
+       /* If domain name is anchored, then resolve it now */
+       if ((*hostp)[strlen(*hostp) - 1] == '.') {
+               debug3("%s: name is fully qualified", __func__);
+               fullhost = xstrdup(*hostp);
+               if ((addrs = resolve_host(fullhost, port, 0,
+                   newname, sizeof(newname))) != NULL)
+                       goto found;
+               free(fullhost);
+               goto notfound;
+       }
+
        /* Don't apply canonicalization to sufficiently-qualified hostnames */
        ndots = 0;
        for (cp = *hostp; *cp != '\0'; cp++) {
@@ -429,10 +434,11 @@ resolve_canonicalize(char **hostp, int port)
                        free(fullhost);
                        continue;
                }
+ found:
                /* Remove trailing '.' */
                fullhost[strlen(fullhost) - 1] = '\0';
                /* Follow CNAME if requested */
-               if (!check_follow_cname(&fullhost, newname)) {
+               if (!check_follow_cname(direct, &fullhost, newname)) {
                        debug("Canonicalized hostname \"%s\" => \"%s\"",
                            *hostp, fullhost);
                }
@@ -440,6 +446,7 @@ resolve_canonicalize(char **hostp, int port)
                *hostp = fullhost;
                return addrs;
        }
+ notfound:
        if (!options.canonicalize_fallback_local)
                fatal("%s: Could not resolve host \"%s\"", __progname, *hostp);
        debug2("%s: host %s not found in any suffix", __func__, *hostp);
@@ -503,10 +510,11 @@ set_addrinfo_port(struct addrinfo *addrs, int port)
 int
 main(int ac, char **av)
 {
-       int i, r, opt, exit_status, use_syslog, config_test = 0;
+       struct ssh *ssh = NULL;
+       int i, r, opt, exit_status, use_syslog, direct, config_test = 0;
        char *p, *cp, *line, *argv0, buf[PATH_MAX], *host_arg, *logfile;
        char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV];
-       char cname[NI_MAXHOST];
+       char cname[NI_MAXHOST], uidstr[32], *conn_hash_hex;
        struct stat st;
        struct passwd *pw;
        int timeout_ms;
@@ -516,8 +524,8 @@ main(int ac, char **av)
        struct addrinfo *addrs = NULL;
        struct ssh_digest_ctx *md;
        u_char conn_hash[SSH_DIGEST_MAX_LENGTH];
-       char *conn_hash_hex;
 
+       ssh_malloc_init();      /* must be called before any mallocs */
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
        sanitise_stdfd();
 
@@ -582,6 +590,8 @@ main(int ac, char **av)
         */
        umask(022);
 
+       msetlocale();
+
        /*
         * Initialize option structure to indicate that no values have been
         * set.
@@ -596,7 +606,7 @@ main(int ac, char **av)
 
  again:
        while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
-           "ACD:E:F:GI:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
+           "ACD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
                switch (opt) {
                case '1':
                        options.protocol = SSH_PROTO_1;
@@ -627,7 +637,7 @@ main(int ac, char **av)
                        use_syslog = 1;
                        break;
                case 'E':
-                       logfile = xstrdup(optarg);
+                       logfile = optarg;
                        break;
                case 'G':
                        config_test = 1;
@@ -640,7 +650,7 @@ main(int ac, char **av)
                        options.fwd_opts.gateway_ports = 1;
                        break;
                case 'O':
-                       if (stdio_forward_host != NULL)
+                       if (options.stdio_forward_host != NULL)
                                fatal("Cannot specify multiplexing "
                                    "command with -W");
                        else if (muxclient_command != 0)
@@ -655,6 +665,8 @@ main(int ac, char **av)
                                muxclient_command = SSHMUX_COMMAND_STOP;
                        else if (strcmp(optarg, "cancel") == 0)
                                muxclient_command = SSHMUX_COMMAND_CANCEL_FWD;
+                       else if (strcmp(optarg, "proxy") == 0)
+                               muxclient_command = SSHMUX_COMMAND_PROXY;
                        else
                                fatal("Invalid multiplex command.");
                        break;
@@ -672,11 +684,11 @@ main(int ac, char **av)
                        else if (strcmp(optarg, "kex") == 0)
                                cp = kex_alg_list('\n');
                        else if (strcmp(optarg, "key") == 0)
-                               cp = key_alg_list(0, 0);
+                               cp = sshkey_alg_list(0, 0, 0, '\n');
                        else if (strcmp(optarg, "key-cert") == 0)
-                               cp = key_alg_list(1, 0);
+                               cp = sshkey_alg_list(1, 0, 0, '\n');
                        else if (strcmp(optarg, "key-plain") == 0)
-                               cp = key_alg_list(0, 1);
+                               cp = sshkey_alg_list(0, 1, 0, '\n');
                        else if (strcmp(optarg, "protocol-version") == 0) {
 #ifdef WITH_SSH1
                                cp = xstrdup("1\n2");
@@ -704,21 +716,32 @@ main(int ac, char **av)
                        options.gss_deleg_creds = 1;
                        break;
                case 'i':
-                       if (stat(optarg, &st) < 0) {
+                       p = tilde_expand_filename(optarg, original_real_uid);
+                       if (stat(p, &st) < 0)
                                fprintf(stderr, "Warning: Identity file %s "
-                                   "not accessible: %s.\n", optarg,
+                                   "not accessible: %s.\n", p,
                                    strerror(errno));
-                               break;
-                       }
-                       add_identity_file(&options, NULL, optarg, 1);
+                       else
+                               add_identity_file(&options, NULL, p, 1);
+                       free(p);
                        break;
                case 'I':
 #ifdef ENABLE_PKCS11
+                       free(options.pkcs11_provider);
                        options.pkcs11_provider = xstrdup(optarg);
 #else
                        fprintf(stderr, "no support for PKCS#11.\n");
 #endif
                        break;
+               case 'J':
+                       if (options.jump_host != NULL)
+                               fatal("Only a single -J option permitted");
+                       if (options.proxy_command != NULL)
+                               fatal("Cannot specify -J with ProxyCommand");
+                       if (parse_jump(optarg, &options, 1) == -1)
+                               fatal("Invalid -J argument");
+                       options.proxy_command = xstrdup("none");
+                       break;
                case 't':
                        if (options.request_tty == REQUEST_TTY_YES)
                                options.request_tty = REQUEST_TTY_FORCE;
@@ -730,8 +753,10 @@ main(int ac, char **av)
                                debug_flag = 1;
                                options.log_level = SYSLOG_LEVEL_DEBUG1;
                        } else {
-                               if (options.log_level < SYSLOG_LEVEL_DEBUG3)
+                               if (options.log_level < SYSLOG_LEVEL_DEBUG3) {
+                                       debug_flag++;
                                        options.log_level++;
+                               }
                        }
                        break;
                case 'V':
@@ -757,13 +782,13 @@ main(int ac, char **av)
                        }
                        break;
                case 'W':
-                       if (stdio_forward_host != NULL)
+                       if (options.stdio_forward_host != NULL)
                                fatal("stdio forward already specified");
                        if (muxclient_command != 0)
                                fatal("Cannot specify stdio forward with -O");
                        if (parse_forward(&fwd, optarg, 1, 0)) {
-                               stdio_forward_host = fwd.listen_host;
-                               stdio_forward_port = fwd.listen_port;
+                               options.stdio_forward_host = fwd.listen_host;
+                               options.stdio_forward_port = fwd.listen_port;
                                free(fwd.connect_host);
                        } else {
                                fprintf(stderr,
@@ -773,8 +798,6 @@ main(int ac, char **av)
                        }
                        options.request_tty = REQUEST_TTY_NO;
                        no_shell_flag = 1;
-                       options.clear_forwardings = 1;
-                       options.exit_on_forward_failure = 1;
                        break;
                case 'q':
                        options.log_level = SYSLOG_LEVEL_QUIET;
@@ -798,6 +821,7 @@ main(int ac, char **av)
                        if (ciphers_valid(*optarg == '+' ?
                            optarg + 1 : optarg)) {
                                /* SSH2 only */
+                               free(options.ciphers);
                                options.ciphers = xstrdup(optarg);
                                options.cipher = SSH_CIPHER_INVALID;
                                break;
@@ -817,9 +841,10 @@ main(int ac, char **av)
                                options.ciphers = xstrdup(KEX_CLIENT_ENCRYPT);
                        break;
                case 'm':
-                       if (mac_valid(optarg))
+                       if (mac_valid(optarg)) {
+                               free(options.macs);
                                options.macs = xstrdup(optarg);
-                       else {
+                       else {
                                fprintf(stderr, "Unknown mac type '%s'\n",
                                    optarg);
                                exit(255);
@@ -897,8 +922,7 @@ main(int ac, char **av)
                        subsystem_flag = 1;
                        break;
                case 'S':
-                       if (options.control_path != NULL)
-                               free(options.control_path);
+                       free(options.control_path);
                        options.control_path = xstrdup(optarg);
                        break;
                case 'b':
@@ -980,10 +1004,8 @@ main(int ac, char **av)
         */
        if (use_syslog && logfile != NULL)
                fatal("Can't specify both -y and -E");
-       if (logfile != NULL) {
+       if (logfile != NULL)
                log_redirect_stderr_to(logfile);
-               free(logfile);
-       }
        log_init(argv0,
            options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level,
            SYSLOG_FACILITY_USER, !use_syslog);
@@ -1032,9 +1054,10 @@ main(int ac, char **av)
         * has specifically requested canonicalisation for this case via
         * CanonicalizeHostname=always
         */
-       if (addrs == NULL && options.num_permitted_cnames != 0 &&
-           (option_clear_or_none(options.proxy_command) ||
-            options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) {
+       direct = option_clear_or_none(options.proxy_command) &&
+           options.jump_host == NULL;
+       if (addrs == NULL && options.num_permitted_cnames != 0 && (direct ||
+           options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) {
                if ((addrs = resolve_host(host, options.port,
                    option_clear_or_none(options.proxy_command),
                    cname, sizeof(cname))) == NULL) {
@@ -1042,7 +1065,7 @@ main(int ac, char **av)
                        if (option_clear_or_none(options.proxy_command))
                                cleanup_exit(255); /* logged in resolve_host */
                } else
-                       check_follow_cname(&host, cname);
+                       check_follow_cname(direct, &host, cname);
        }
 
        /*
@@ -1067,6 +1090,41 @@ main(int ac, char **av)
        /* Fill configuration defaults. */
        fill_default_options(&options);
 
+       /*
+        * If ProxyJump option specified, then construct a ProxyCommand now.
+        */
+       if (options.jump_host != NULL) {
+               char port_s[8];
+
+               /* Consistency check */
+               if (options.proxy_command != NULL)
+                       fatal("inconsistent options: ProxyCommand+ProxyJump");
+               /* Never use FD passing for ProxyJump */
+               options.proxy_use_fdpass = 0;
+               snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
+               xasprintf(&options.proxy_command,
+                   "ssh%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s",
+                   /* Optional "-l user" argument if jump_user set */
+                   options.jump_user == NULL ? "" : " -l ",
+                   options.jump_user == NULL ? "" : options.jump_user,
+                   /* Optional "-p port" argument if jump_port set */
+                   options.jump_port <= 0 ? "" : " -p ",
+                   options.jump_port <= 0 ? "" : port_s,
+                   /* Optional additional jump hosts ",..." */
+                   options.jump_extra == NULL ? "" : " -J ",
+                   options.jump_extra == NULL ? "" : options.jump_extra,
+                   /* Optional "-F" argumment if -F specified */
+                   config == NULL ? "" : " -F ",
+                   config == NULL ? "" : config,
+                   /* Optional "-v" arguments if -v set */
+                   debug_flag ? " -" : "",
+                   debug_flag, "vvv",
+                   /* Mandatory hostname */
+                   options.jump_host);
+               debug("Setting implicit ProxyCommand from ProxyJump: %s",
+                   options.proxy_command);
+       }
+
        if (options.port == 0)
                options.port = default_ssh_port();
        channel_set_af(options.address_family);
@@ -1084,6 +1142,8 @@ main(int ac, char **av)
                    "disabling");
                options.update_hostkeys = 0;
        }
+       if (options.connection_attempts <= 0)
+               fatal("Invalid number of ConnectionAttempts");
 #ifndef HAVE_CYGWIN
        if (original_effective_uid != 0)
                options.use_privileged_port = 0;
@@ -1101,7 +1161,8 @@ main(int ac, char **av)
                tty_flag = options.request_tty != REQUEST_TTY_NO;
 
        /* Force no tty */
-       if (options.request_tty == REQUEST_TTY_NO || muxclient_command != 0)
+       if (options.request_tty == REQUEST_TTY_NO ||
+           (muxclient_command && muxclient_command != SSHMUX_COMMAND_PROXY))
                tty_flag = 0;
        /* Do not allocate a tty if stdin is not a tty. */
        if ((!isatty(fileno(stdin)) || stdin_null_flag) &&
@@ -1122,6 +1183,7 @@ main(int ac, char **av)
        strlcpy(shorthost, thishost, sizeof(shorthost));
        shorthost[strcspn(thishost, ".")] = '\0';
        snprintf(portstr, sizeof(portstr), "%d", options.port);
+       snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid);
 
        if ((md = ssh_digest_start(SSH_DIGEST_SHA1)) == NULL ||
            ssh_digest_update(md, thishost, strlen(thishost)) < 0 ||
@@ -1164,6 +1226,7 @@ main(int ac, char **av)
                    "p", portstr,
                    "r", options.user,
                    "u", pw->pw_name,
+                   "i", uidstr,
                    (char *)NULL);
                free(cp);
        }
@@ -1176,14 +1239,23 @@ main(int ac, char **av)
 
        if (muxclient_command != 0 && options.control_path == NULL)
                fatal("No ControlPath specified for \"-O\" command");
-       if (options.control_path != NULL)
-               muxclient(options.control_path);
+       if (options.control_path != NULL) {
+               int sock;
+               if ((sock = muxclient(options.control_path)) >= 0) {
+                       packet_set_connection(sock, sock);
+                       ssh = active_state; /* XXX */
+                       enable_compat20();      /* XXX */
+                       packet_set_mux();
+                       goto skip_connect;
+               }
+       }
 
        /*
         * If hostname canonicalisation was not enabled, then we may not
         * have yet resolved the hostname. Do so now.
         */
        if (addrs == NULL && options.proxy_command == NULL) {
+               debug2("resolving \"%s\" port %d", host, options.port);
                if ((addrs = resolve_host(host, options.port, 1,
                    cname, sizeof(cname))) == NULL)
                        cleanup_exit(255); /* resolve_host logs the error */
@@ -1204,6 +1276,8 @@ main(int ac, char **av)
        packet_set_timeout(options.server_alive_interval,
            options.server_alive_count_max);
 
+       ssh = active_state; /* XXX */
+
        if (timeout_ms > 0)
                debug3("timeout: %d ms remain after connect", timeout_ms);
 
@@ -1227,8 +1301,10 @@ main(int ac, char **av)
                        sensitive_data.keys[i] = NULL;
 
                PRIV_START;
+#if WITH_SSH1
                sensitive_data.keys[0] = key_load_private_type(KEY_RSA1,
                    _PATH_HOST_KEY_FILE, "", NULL, NULL);
+#endif
 #ifdef OPENSSL_HAS_ECC
                sensitive_data.keys[1] = key_load_private_cert(KEY_ECDSA,
                    _PATH_HOST_ECDSA_KEY_FILE, "", NULL);
@@ -1314,6 +1390,23 @@ main(int ac, char **av)
        /* load options.identity_files */
        load_public_identity_files();
 
+       /* optionally set the SSH_AUTHSOCKET_ENV_NAME varibale */
+       if (options.identity_agent &&
+           strcmp(options.identity_agent, SSH_AUTHSOCKET_ENV_NAME) != 0) {
+               if (strcmp(options.identity_agent, "none") == 0) {
+                       unsetenv(SSH_AUTHSOCKET_ENV_NAME);
+               } else {
+                       p = tilde_expand_filename(options.identity_agent,
+                           original_real_uid);
+                       cp = percent_expand(p, "d", pw->pw_dir,
+                           "u", pw->pw_name, "l", thishost, "h", host,
+                           "r", options.user, (char *)NULL);
+                       setenv(SSH_AUTHSOCKET_ENV_NAME, cp, 1);
+                       free(cp);
+                       free(p);
+               }
+       }
+
        /* Expand ~ in known host file names. */
        tilde_expand_paths(options.system_hostfiles,
            options.num_system_hostfiles);
@@ -1328,7 +1421,7 @@ main(int ac, char **av)
 
        if (packet_connection_is_on_socket()) {
                verbose("Authenticated to %s ([%s]:%d).", host,
-                   get_remote_ipaddr(), get_remote_port());
+                   ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
        } else {
                verbose("Authenticated to %s (via proxy).", host);
        }
@@ -1353,7 +1446,12 @@ main(int ac, char **av)
                        options.identity_keys[i] = NULL;
                }
        }
+       for (i = 0; i < options.num_certificate_files; i++) {
+               free(options.certificate_files[i]);
+               options.certificate_files[i] = NULL;
+       }
 
+ skip_connect:
        exit_status = compat20 ? ssh_session2() : ssh_session();
        packet_close();
 
@@ -1370,7 +1468,7 @@ static void
 control_persist_detach(void)
 {
        pid_t pid;
-       int devnull;
+       int devnull, keep_stderr;
 
        debug("%s: backgrounding master process", __func__);
 
@@ -1401,8 +1499,10 @@ control_persist_detach(void)
                error("%s: open(\"/dev/null\"): %s", __func__,
                    strerror(errno));
        } else {
+               keep_stderr = log_is_on_stderr() && debug_flag;
                if (dup2(devnull, STDIN_FILENO) == -1 ||
-                   dup2(devnull, STDOUT_FILENO) == -1)
+                   dup2(devnull, STDOUT_FILENO) == -1 ||
+                   (!keep_stderr && dup2(devnull, STDERR_FILENO) == -1))
                        error("%s: dup2: %s", __func__, strerror(errno));
                if (devnull > STDERR_FILENO)
                        close(devnull);
@@ -1494,18 +1594,19 @@ ssh_init_stdio_forwarding(void)
        Channel *c;
        int in, out;
 
-       if (stdio_forward_host == NULL)
+       if (options.stdio_forward_host == NULL)
                return;
        if (!compat20)
                fatal("stdio forwarding require Protocol 2");
 
-       debug3("%s: %s:%d", __func__, stdio_forward_host, stdio_forward_port);
+       debug3("%s: %s:%d", __func__, options.stdio_forward_host,
+           options.stdio_forward_port);
 
        if ((in = dup(STDIN_FILENO)) < 0 ||
            (out = dup(STDOUT_FILENO)) < 0)
                fatal("channel_connect_stdio_fwd: dup() in/out failed");
-       if ((c = channel_connect_stdio_fwd(stdio_forward_host,
-           stdio_forward_port, in, out)) == NULL)
+       if ((c = channel_connect_stdio_fwd(options.stdio_forward_host,
+           options.stdio_forward_port, in, out)) == NULL)
                fatal("%s: channel_connect_stdio_fwd failed", __func__);
        channel_register_cleanup(c->self, client_cleanup_stdio_fwd, 0);
        channel_register_open_confirm(c->self, ssh_stdio_confirm, NULL);
@@ -1604,6 +1705,7 @@ ssh_session(void)
        struct winsize ws;
        char *cp;
        const char *display;
+       char *proto = NULL, *data = NULL;
 
        /* Enable compression if requested. */
        if (options.compression) {
@@ -1674,13 +1776,9 @@ ssh_session(void)
        display = getenv("DISPLAY");
        if (display == NULL && options.forward_x11)
                debug("X11 forwarding requested but DISPLAY not set");
-       if (options.forward_x11 && display != NULL) {
-               char *proto, *data;
-               /* Get reasonable local authentication information. */
-               client_x11_get_proto(display, options.xauth_location,
-                   options.forward_x11_trusted,
-                   options.forward_x11_timeout,
-                   &proto, &data);
+       if (options.forward_x11 && client_x11_get_proto(display,
+           options.xauth_location, options.forward_x11_trusted,
+           options.forward_x11_timeout, &proto, &data) == 0) {
                /* Request forwarding with authentication spoofing. */
                debug("Requesting X11 forwarding with authentication "
                    "spoofing.");
@@ -1770,6 +1868,7 @@ ssh_session2_setup(int id, int success, void *arg)
        extern char **environ;
        const char *display;
        int interactive = tty_flag;
+       char *proto = NULL, *data = NULL;
 
        if (!success)
                return; /* No need for error message, channels code sens one */
@@ -1777,12 +1876,9 @@ ssh_session2_setup(int id, int success, void *arg)
        display = getenv("DISPLAY");
        if (display == NULL && options.forward_x11)
                debug("X11 forwarding requested but DISPLAY not set");
-       if (options.forward_x11 && display != NULL) {
-               char *proto, *data;
-               /* Get reasonable local authentication information. */
-               client_x11_get_proto(display, options.xauth_location,
-                   options.forward_x11_trusted,
-                   options.forward_x11_timeout, &proto, &data);
+       if (options.forward_x11 && client_x11_get_proto(display,
+           options.xauth_location, options.forward_x11_trusted,
+           options.forward_x11_timeout, &proto, &data) == 0) {
                /* Request forwarding with authentication spoofing. */
                debug("Requesting X11 forwarding with authentication "
                    "spoofing.");
@@ -1866,7 +1962,8 @@ ssh_session2(void)
        ssh_init_forwarding();
 
        /* Start listening for multiplex clients */
-       muxserver_listen();
+       if (!packet_get_mux())
+               muxserver_listen();
 
        /*
         * If we are in control persist mode and have a working mux listen
@@ -1936,25 +2033,30 @@ ssh_session2(void)
            options.escape_char : SSH_ESCAPECHAR_NONE, id);
 }
 
+/* Loads all IdentityFile and CertificateFile keys */
 static void
 load_public_identity_files(void)
 {
        char *filename, *cp, thishost[NI_MAXHOST];
        char *pwdir = NULL, *pwname = NULL;
-       int i = 0;
        Key *public;
        struct passwd *pw;
-       u_int n_ids;
+       int i;
+       u_int n_ids, n_certs;
        char *identity_files[SSH_MAX_IDENTITY_FILES];
        Key *identity_keys[SSH_MAX_IDENTITY_FILES];
+       char *certificate_files[SSH_MAX_CERTIFICATE_FILES];
+       struct sshkey *certificates[SSH_MAX_CERTIFICATE_FILES];
 #ifdef ENABLE_PKCS11
        Key **keys;
        int nkeys;
 #endif /* PKCS11 */
 
-       n_ids = 0;
+       n_ids = n_certs = 0;
        memset(identity_files, 0, sizeof(identity_files));
        memset(identity_keys, 0, sizeof(identity_keys));
+       memset(certificate_files, 0, sizeof(certificate_files));
+       memset(certificates, 0, sizeof(certificates));
 
 #ifdef ENABLE_PKCS11
        if (options.pkcs11_provider != NULL &&
@@ -1986,6 +2088,7 @@ load_public_identity_files(void)
                if (n_ids >= SSH_MAX_IDENTITY_FILES ||
                    strcasecmp(options.identity_files[i], "none") == 0) {
                        free(options.identity_files[i]);
+                       options.identity_files[i] = NULL;
                        continue;
                }
                cp = tilde_expand_filename(options.identity_files[i],
@@ -2004,7 +2107,12 @@ load_public_identity_files(void)
                if (++n_ids >= SSH_MAX_IDENTITY_FILES)
                        continue;
 
-               /* Try to add the certificate variant too */
+               /*
+                * If no certificates have been explicitly listed then try
+                * to add the default certificate variant too.
+                */
+               if (options.num_certificate_files != 0)
+                       continue;
                xasprintf(&cp, "%s-cert", filename);
                public = key_load_public(cp, NULL);
                debug("identity file %s type %d", cp,
@@ -2020,15 +2128,52 @@ load_public_identity_files(void)
                        free(cp);
                        continue;
                }
-               identity_keys[n_ids] = public;
-               /* point to the original path, most likely the private key */
+               /* NB. leave filename pointing to private key */
                identity_files[n_ids] = xstrdup(filename);
+               identity_keys[n_ids] = public;
                n_ids++;
        }
+
+       if (options.num_certificate_files > SSH_MAX_CERTIFICATE_FILES)
+               fatal("%s: too many certificates", __func__);
+       for (i = 0; i < options.num_certificate_files; i++) {
+               cp = tilde_expand_filename(options.certificate_files[i],
+                   original_real_uid);
+               filename = percent_expand(cp, "d", pwdir,
+                   "u", pwname, "l", thishost, "h", host,
+                   "r", options.user, (char *)NULL);
+               free(cp);
+
+               public = key_load_public(filename, NULL);
+               debug("certificate file %s type %d", filename,
+                   public ? public->type : -1);
+               free(options.certificate_files[i]);
+               options.certificate_files[i] = NULL;
+               if (public == NULL) {
+                       free(filename);
+                       continue;
+               }
+               if (!key_is_cert(public)) {
+                       debug("%s: key %s type %s is not a certificate",
+                           __func__, filename, key_type(public));
+                       key_free(public);
+                       free(filename);
+                       continue;
+               }
+               certificate_files[n_certs] = filename;
+               certificates[n_certs] = public;
+               ++n_certs;
+       }
+
        options.num_identity_files = n_ids;
        memcpy(options.identity_files, identity_files, sizeof(identity_files));
        memcpy(options.identity_keys, identity_keys, sizeof(identity_keys));
 
+       options.num_certificate_files = n_certs;
+       memcpy(options.certificate_files,
+           certificate_files, sizeof(certificate_files));
+       memcpy(options.certificates, certificates, sizeof(certificates));
+
        explicit_bzero(pwname, strlen(pwname));
        free(pwname);
        explicit_bzero(pwdir, strlen(pwdir));
diff --git a/ssh.h b/ssh.h
index 39c7e18..50467a7 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.h,v 1.81 2015/08/04 05:23:06 djm Exp $ */
+/* $OpenBSD: ssh.h,v 1.83 2015/12/11 03:19:09 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
 #define SSH_DEFAULT_PORT       22
 
 /*
+ * Maximum number of certificate files that can be specified
+ * in configuration files or on the command line.
+ */
+#define SSH_MAX_CERTIFICATE_FILES      100
+
+/*
  * Maximum number of RSA authentication identity files that can be specified
  * in configuration files or on the command line.
  */
@@ -29,7 +35,7 @@
  * Current value permits 16kbit RSA and RSA1 keys and 8kbit DSA keys, with
  * some room for options and comments.
  */
-#define SSH_MAX_PUBKEY_BYTES           8192
+#define SSH_MAX_PUBKEY_BYTES           16384
 
 /*
  * Major protocol version.  Different version indicates major incompatibility
diff --git a/ssh1.h b/ssh1.h
index 353d930..6a05c47 100644 (file)
--- a/ssh1.h
+++ b/ssh1.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh1.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */
+/* $OpenBSD: ssh1.h,v 1.7 2016/05/04 14:22:33 markus Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -22,7 +22,6 @@
 #define SSH_MSG_MIN                            1
 #define SSH_MSG_MAX                            254
 /* Message name */                     /* msg code */  /* arguments */
-#define SSH_MSG_NONE                           0       /* no message */
 #define SSH_MSG_DISCONNECT                     1       /* cause (string) */
 #define SSH_SMSG_PUBLIC_KEY                    2       /* ck,msk,srvk,hostk */
 #define SSH_CMSG_SESSION_KEY                   3       /* key (BIGNUM) */
diff --git a/ssh2.h b/ssh2.h
index 59417e6..f2e37c9 100644 (file)
--- a/ssh2.h
+++ b/ssh2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh2.h,v 1.15 2014/01/29 06:18:35 djm Exp $ */
+/* $OpenBSD: ssh2.h,v 1.18 2016/05/04 14:22:33 markus Exp $ */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *     192-255  Local extensions
  */
 
+/* special marker for no message */
+
+#define SSH_MSG_NONE                                   0
+
 /* ranges */
 
 #define SSH2_MSG_TRANSPORT_MIN                         1
@@ -80,6 +84,7 @@
 #define SSH2_MSG_DEBUG                                 4
 #define SSH2_MSG_SERVICE_REQUEST                       5
 #define SSH2_MSG_SERVICE_ACCEPT                                6
+#define SSH2_MSG_EXT_INFO                              7
 
 /* transport layer: alg negotiation */
 
 
 #define SSH2_EXTENDED_DATA_STDERR                      1
 
-/* kex messages for resume@appgate.com */
-#define SSH2_MSG_KEX_ROAMING_RESUME                    30
-#define SSH2_MSG_KEX_ROAMING_AUTH_REQUIRED             31
-#define SSH2_MSG_KEX_ROAMING_AUTH                      32
-#define SSH2_MSG_KEX_ROAMING_AUTH_OK                   33
-#define SSH2_MSG_KEX_ROAMING_AUTH_FAIL                 34
-
 /* Certificate types for OpenSSH certificate keys extension */
 #define SSH2_CERT_TYPE_USER                            1
 #define SSH2_CERT_TYPE_HOST                            2
index 6c71258..2a9f149 100644 (file)
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh_api.c,v 1.4 2015/02/16 22:13:32 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.7 2016/05/04 14:22:33 markus Exp $ */
 /*
  * Copyright (c) 2012 Markus Friedl.  All rights reserved.
  *
 
 #include "includes.h"
 
-#include "ssh1.h" /* For SSH_MSG_NONE */
 #include "ssh_api.h"
 #include "compat.h"
 #include "log.h"
 #include "authfile.h"
 #include "sshkey.h"
 #include "misc.h"
-#include "ssh1.h"
 #include "ssh2.h"
 #include "version.h"
 #include "myproposal.h"
@@ -40,8 +38,8 @@ int   _ssh_order_hostkeyalgs(struct ssh *);
 int    _ssh_verify_host_key(struct sshkey *, struct ssh *);
 struct sshkey *_ssh_host_public_key(int, int, struct ssh *);
 struct sshkey *_ssh_host_private_key(int, int, struct ssh *);
-int    _ssh_host_key_sign(struct sshkey *, struct sshkey *, u_char **,
-    size_t *, const u_char *, size_t, u_int);
+int    _ssh_host_key_sign(struct sshkey *, struct sshkey *,
+    u_char **, size_t *, const u_char *, size_t, const char *, u_int);
 
 /*
  * stubs for the server side implementation of kex.
@@ -49,7 +47,7 @@ int   _ssh_host_key_sign(struct sshkey *, struct sshkey *, u_char **,
  */
 int    use_privsep = 0;
 int    mm_sshkey_sign(struct sshkey *, u_char **, u_int *,
-    u_char *, u_int, u_int);
+    u_char *, u_int, char *, u_int);
 DH     *mm_choose_dh(int, int, int);
 
 /* Define these two variables here so that they are part of the library */
@@ -58,7 +56,7 @@ u_int session_id2_len = 0;
 
 int
 mm_sshkey_sign(struct sshkey *key, u_char **sigp, u_int *lenp,
-    u_char *data, u_int datalen, u_int compat)
+    u_char *data, u_int datalen, char *alg, u_int compat)
 {
        return (-1);
 }
@@ -103,6 +101,9 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
 #ifdef WITH_OPENSSL
                ssh->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
                ssh->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
+               ssh->kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server;
+               ssh->kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server;
+               ssh->kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server;
                ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
                ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
 # ifdef OPENSSL_HAS_ECC
@@ -117,6 +118,9 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
 #ifdef WITH_OPENSSL
                ssh->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
                ssh->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
+               ssh->kex->kex[KEX_DH_GRP14_SHA256] = kexdh_client;
+               ssh->kex->kex[KEX_DH_GRP16_SHA512] = kexdh_client;
+               ssh->kex->kex[KEX_DH_GRP18_SHA512] = kexdh_client;
                ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
                ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
 # ifdef OPENSSL_HAS_ECC
@@ -530,8 +534,8 @@ _ssh_order_hostkeyalgs(struct ssh *ssh)
 
 int
 _ssh_host_key_sign(struct sshkey *privkey, struct sshkey *pubkey,
-    u_char **signature, size_t *slen,
-    const u_char *data, size_t dlen, u_int compat)
+    u_char **signature, size_t *slen, const u_char *data, size_t dlen,
+    const char *alg, u_int compat)
 {
-       return sshkey_sign(privkey, signature, slen, data, dlen, compat);
+       return sshkey_sign(privkey, signature, slen, data, dlen, alg, compat);
 }
index 03a228f..90fb63f 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $
+#      $OpenBSD: ssh_config,v 1.30 2016/02/20 23:06:23 sobrado Exp $
 
 # This is the ssh client system-wide configuration file.  See
 # ssh_config(5) for more information.  This file provides defaults for
 #   IdentityFile ~/.ssh/identity
 #   IdentityFile ~/.ssh/id_rsa
 #   IdentityFile ~/.ssh/id_dsa
+#   IdentityFile ~/.ssh/id_ecdsa
+#   IdentityFile ~/.ssh/id_ed25519
 #   Port 22
-#   Protocol 2,1
+#   Protocol 2
 #   Cipher 3des
 #   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
 #   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
index 67133cd..ade8e65 100644 (file)
@@ -16,25 +16,23 @@ DESCRIPTION
            3.   system-wide configuration file (/etc/ssh/ssh_config)
 
      For each parameter, the first obtained value will be used.  The
-     configuration files contain sections separated by M-bM-^@M-^\HostM-bM-^@M-^] specifications,
+     configuration files contain sections separated by Host specifications,
      and that section is only applied for hosts that match one of the patterns
      given in the specification.  The matched host name is usually the one
      given on the command line (see the CanonicalizeHostname option for
-     exceptions.)
+     exceptions).
 
      Since the first obtained value for each parameter is used, more host-
      specific declarations should be given near the beginning of the file, and
      general defaults at the end.
 
-     The configuration file has the following format:
-
-     Empty lines and lines starting with M-bM-^@M-^X#M-bM-^@M-^Y are comments.  Otherwise a line
-     is of the format M-bM-^@M-^\keyword argumentsM-bM-^@M-^].  Configuration options may be
-     separated by whitespace or optional whitespace and exactly one M-bM-^@M-^X=M-bM-^@M-^Y; the
-     latter format is useful to avoid the need to quote whitespace when
-     specifying configuration options using the ssh, scp, and sftp -o option.
-     Arguments may optionally be enclosed in double quotes (") in order to
-     represent arguments containing spaces.
+     The file contains keyword-argument pairs, one per line.  Lines starting
+     with M-bM-^@M-^X#M-bM-^@M-^Y and empty lines are interpreted as comments.  Arguments may
+     optionally be enclosed in double quotes (") in order to represent
+     arguments containing spaces.  Configuration options may be separated by
+     whitespace or optional whitespace and exactly one M-bM-^@M-^X=M-bM-^@M-^Y; the latter format
+     is useful to avoid the need to quote whitespace when specifying
+     configuration options using the ssh, scp, and sftp -o option.
 
      The possible keywords and their meanings are as follows (note that
      keywords are case-insensitive and arguments are case-sensitive):
@@ -45,8 +43,8 @@ DESCRIPTION
              provided, they should be separated by whitespace.  A single M-bM-^@M-^X*M-bM-^@M-^Y
              as a pattern can be used to provide global defaults for all
              hosts.  The host is usually the hostname argument given on the
-             command line (see the CanonicalizeHostname option for
-             exceptions.)
+             command line (see the CanonicalizeHostname keyword for
+             exceptions).
 
              A pattern entry may be negated by prefixing it with an
              exclamation mark (M-bM-^@M-^X!M-bM-^@M-^Y).  If a negated entry is matched, then the
@@ -59,7 +57,7 @@ DESCRIPTION
      Match   Restricts the following declarations (up to the next Host or
              Match keyword) to be used only when the conditions following the
              Match keyword are satisfied.  Match conditions are specified
-             using one or more critera or the single token all which always
+             using one or more criteria or the single token all which always
              matches.  The available criteria keywords are: canonical, exec,
              host, originalhost, user, and localuser.  The all criteria must
              appear alone or immediately after canonical.  Other criteria may
@@ -74,14 +72,8 @@ DESCRIPTION
              keyword executes the specified command under the user's shell.
              If the command returns a zero exit status then the condition is
              considered true.  Commands containing whitespace characters must
-             be quoted.  The following character sequences in the command will
-             be expanded prior to execution: M-bM-^@M-^X%LM-bM-^@M-^Y will be substituted by the
-             first component of the local host name, M-bM-^@M-^X%lM-bM-^@M-^Y will be substituted
-             by the local host name (including any domain name), M-bM-^@M-^X%hM-bM-^@M-^Y will be
-             substituted by the target host name, M-bM-^@M-^X%nM-bM-^@M-^Y will be substituted by
-             the original target host name specified on the command-line, M-bM-^@M-^X%pM-bM-^@M-^Y
-             the destination port, M-bM-^@M-^X%rM-bM-^@M-^Y by the remote login username, and M-bM-^@M-^X%uM-bM-^@M-^Y
-             by the username of the user running ssh(1).
+             be quoted.  Arguments to exec accept the tokens described in the
+             TOKENS section.
 
              The other keywords' criteria must be single entries or comma-
              separated lists and may use the wildcard and negation operators
@@ -94,22 +86,35 @@ DESCRIPTION
              matches against the name of the local user running ssh(1) (this
              keyword may be useful in system-wide ssh_config files).
 
+     AddKeysToAgent
+             Specifies whether keys should be automatically added to a running
+             ssh-agent(1).  If this option is set to yes and a key is loaded
+             from a file, the key and its passphrase are added to the agent
+             with the default lifetime, as if by ssh-add(1).  If this option
+             is set to ask, ssh(1) will require confirmation using the
+             SSH_ASKPASS program before adding a key (see ssh-add(1) for
+             details).  If this option is set to confirm, each use of the key
+             must be confirmed, as if the -c option was specified to
+             ssh-add(1).  If this option is set to no, no keys are added to
+             the agent.  The argument must be yes, confirm, ask, or no (the
+             default).
+
      AddressFamily
              Specifies which address family to use when connecting.  Valid
-             arguments are M-bM-^@M-^\anyM-bM-^@M-^], M-bM-^@M-^\inetM-bM-^@M-^] (use IPv4 only), or M-bM-^@M-^\inet6M-bM-^@M-^] (use IPv6
-             only).
+             arguments are any (the default), inet (use IPv4 only), or inet6
+             (use IPv6 only).
 
      BatchMode
-             If set to M-bM-^@M-^\yesM-bM-^@M-^], passphrase/password querying will be disabled.
+             If set to yes, passphrase/password querying will be disabled.
              This option is useful in scripts and other batch jobs where no
-             user is present to supply the password.  The argument must be
-             M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             user is present to supply the password.  The argument must be yes
+             or no (the default).
 
      BindAddress
              Use the specified address on the local machine as the source
              address of the connection.  Only useful on systems with more than
              one address.  Note that this option does not work if
-             UsePrivilegedPort is set to M-bM-^@M-^\yesM-bM-^@M-^].
+             UsePrivilegedPort is set to yes.
 
      CanonicalDomains
              When CanonicalizeHostname is enabled, this option specifies the
@@ -118,21 +123,21 @@ DESCRIPTION
 
      CanonicalizeFallbackLocal
              Specifies whether to fail with an error when hostname
-             canonicalization fails.  The default, M-bM-^@M-^\yesM-bM-^@M-^], will attempt to look
+             canonicalization fails.  The default, yes, will attempt to look
              up the unqualified hostname using the system resolver's search
-             rules.  A value of M-bM-^@M-^\noM-bM-^@M-^] will cause ssh(1) to fail instantly if
+             rules.  A value of no will cause ssh(1) to fail instantly if
              CanonicalizeHostname is enabled and the target hostname cannot be
              found in any of the domains specified by CanonicalDomains.
 
      CanonicalizeHostname
              Controls whether explicit hostname canonicalization is performed.
-             The default, M-bM-^@M-^\noM-bM-^@M-^], is not to perform any name rewriting and let
-             the system resolver handle all hostname lookups.  If set to M-bM-^@M-^\yesM-bM-^@M-^]
-             then, for connections that do not use a ProxyCommand, ssh(1) will
+             The default, no, is not to perform any name rewriting and let the
+             system resolver handle all hostname lookups.  If set to yes then,
+             for connections that do not use a ProxyCommand, ssh(1) will
              attempt to canonicalize the hostname specified on the command
              line using the CanonicalDomains suffixes and
              CanonicalizePermittedCNAMEs rules.  If CanonicalizeHostname is
-             set to M-bM-^@M-^\alwaysM-bM-^@M-^], then canonicalization is applied to proxied
+             set to always, then canonicalization is applied to proxied
              connections too.
 
              If this option is enabled, then the configuration files are
@@ -141,7 +146,7 @@ DESCRIPTION
 
      CanonicalizeMaxDots
              Specifies the maximum number of dot characters in a hostname
-             before canonicalization is disabled.  The default, M-bM-^@M-^\1M-bM-^@M-^], allows a
+             before canonicalization is disabled.  The default, 1, allows a
              single dot (i.e. hostname.subdomain).
 
      CanonicalizePermittedCNAMEs
@@ -152,38 +157,53 @@ DESCRIPTION
              CNAMEs in canonicalization, and target_domain_list is a pattern-
              list of domains that they may resolve to.
 
-             For example, M-bM-^@M-^\*.a.example.com:*.b.example.com,*.c.example.comM-bM-^@M-^]
-             will allow hostnames matching M-bM-^@M-^\*.a.example.comM-bM-^@M-^] to be
-             canonicalized to names in the M-bM-^@M-^\*.b.example.comM-bM-^@M-^] or
-             M-bM-^@M-^\*.c.example.comM-bM-^@M-^] domains.
+             For example, "*.a.example.com:*.b.example.com,*.c.example.com"
+             will allow hostnames matching "*.a.example.com" to be
+             canonicalized to names in the "*.b.example.com" or
+             "*.c.example.com" domains.
+
+     CertificateFile
+             Specifies a file from which the user's certificate is read.  A
+             corresponding private key must be provided separately in order to
+             use this certificate either from an IdentityFile directive or -i
+             flag to ssh(1), via ssh-agent(1), or via a PKCS11Provider.
+
+             Arguments to CertificateFile may use the tilde syntax to refer to
+             a user's home directory or the tokens described in the TOKENS
+             section.
+
+             It is possible to have multiple certificate files specified in
+             configuration files; these certificates will be tried in
+             sequence.  Multiple CertificateFile directives will add to the
+             list of certificates used for authentication.
 
      ChallengeResponseAuthentication
              Specifies whether to use challenge-response authentication.  The
-             argument to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is
-             M-bM-^@M-^\yesM-bM-^@M-^].
+             argument to this keyword must be yes (the default) or no.
 
      CheckHostIP
-             If this flag is set to M-bM-^@M-^\yesM-bM-^@M-^], ssh(1) will additionally check the
-             host IP address in the known_hosts file.  This allows ssh to
+             If set to yes (the default), ssh(1) will additionally check the
+             host IP address in the known_hosts file.  This allows it to
              detect if a host key changed due to DNS spoofing and will add
              addresses of destination hosts to ~/.ssh/known_hosts in the
              process, regardless of the setting of StrictHostKeyChecking.  If
-             the option is set to M-bM-^@M-^\noM-bM-^@M-^], the check will not be executed.  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].
+             the option is set to no, the check will not be executed.
 
      Cipher  Specifies the cipher to use for encrypting the session in
-             protocol version 1.  Currently, M-bM-^@M-^\blowfishM-bM-^@M-^], M-bM-^@M-^\3desM-bM-^@M-^], and M-bM-^@M-^\desM-bM-^@M-^] are
-             supported.  des is only supported in the ssh(1) client for
-             interoperability with legacy protocol 1 implementations that do
-             not support the 3des cipher.  Its use is strongly discouraged due
-             to cryptographic weaknesses.  The default is M-bM-^@M-^\3desM-bM-^@M-^].
+             protocol version 1.  Currently, blowfish, 3des (the default), and
+             des are supported, though des is only supported in the ssh(1)
+             client for interoperability with legacy protocol 1
+             implementations; its use is strongly discouraged due to
+             cryptographic weaknesses.
 
      Ciphers
              Specifies the ciphers allowed for protocol version 2 in order of
              preference.  Multiple ciphers must be comma-separated.  If the
              specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified
              ciphers will be appended to the default set instead of replacing
-             them.
+             them.  If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y character, then
+             the specified ciphers (including wildcards) will be removed from
+             the default set instead of replacing them.
 
              The supported ciphers are:
 
@@ -208,12 +228,10 @@ DESCRIPTION
                    chacha20-poly1305@openssh.com,
                    aes128-ctr,aes192-ctr,aes256-ctr,
                    aes128-gcm@openssh.com,aes256-gcm@openssh.com,
-                   arcfour256,arcfour128,
-                   aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,
-                   aes192-cbc,aes256-cbc,arcfour
+                   aes128-cbc,aes192-cbc,aes256-cbc
 
-             The list of available ciphers may also be obtained using the -Q
-             option of ssh(1) with an argument of M-bM-^@M-^\cipherM-bM-^@M-^].
+             The list of available ciphers may also be obtained using "ssh -Q
+             cipher".
 
      ClearAllForwardings
              Specifies that all local, remote, and dynamic port forwardings
@@ -221,12 +239,11 @@ DESCRIPTION
              cleared.  This option is primarily useful when used from the
              ssh(1) command line to clear port forwardings set in
              configuration files, and is automatically set by scp(1) and
-             sftp(1).  The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is
-             M-bM-^@M-^\noM-bM-^@M-^].
+             sftp(1).  The argument must be yes or no (the default).
 
      Compression
-             Specifies whether to use compression.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^]
-             or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             Specifies whether to use compression.  The argument must be yes
+             or no (the default).
 
      CompressionLevel
              Specifies the compression level to use if compression is enabled.
@@ -248,18 +265,18 @@ DESCRIPTION
 
      ControlMaster
              Enables the sharing of multiple sessions over a single network
-             connection.  When set to M-bM-^@M-^\yesM-bM-^@M-^], ssh(1) will listen for
-             connections on a control socket specified using the ControlPath
-             argument.  Additional sessions can connect to this socket using
-             the same ControlPath with ControlMaster set to M-bM-^@M-^\noM-bM-^@M-^] (the
-             default).  These sessions will try to reuse the master instance's
-             network connection rather than initiating new ones, but will fall
-             back to connecting normally if the control socket does not exist,
-             or is not listening.
-
-             Setting this to M-bM-^@M-^\askM-bM-^@M-^] will cause ssh to listen for control
+             connection.  When set to yes, ssh(1) will listen for connections
+             on a control socket specified using the ControlPath argument.
+             Additional sessions can connect to this socket using the same
+             ControlPath with ControlMaster set to no (the default).  These
+             sessions will try to reuse the master instance's network
+             connection rather than initiating new ones, but will fall back to
+             connecting normally if the control socket does not exist, or is
+             not listening.
+
+             Setting this to ask will cause ssh(1) to listen for control
              connections, but require confirmation using ssh-askpass(1).  If
-             the ControlPath cannot be opened, ssh will continue without
+             the ControlPath cannot be opened, ssh(1) will continue without
              connecting to a master instance.
 
              X11 and ssh-agent(1) forwarding is supported over these
@@ -269,24 +286,18 @@ DESCRIPTION
 
              Two additional options allow for opportunistic multiplexing: try
              to use a master connection but fall back to creating a new one if
-             one does not already exist.  These options are: M-bM-^@M-^\autoM-bM-^@M-^] and
-             M-bM-^@M-^\autoaskM-bM-^@M-^].  The latter requires confirmation like the M-bM-^@M-^\askM-bM-^@M-^]
-             option.
+             one does not already exist.  These options are: auto and autoask.
+             The latter requires confirmation like the ask option.
 
      ControlPath
              Specify the path to the control socket used for connection
              sharing as described in the ControlMaster section above or the
-             string M-bM-^@M-^\noneM-bM-^@M-^] to disable connection sharing.  In the path, M-bM-^@M-^X%LM-bM-^@M-^Y
-             will be substituted by the first component of the local host
-             name, M-bM-^@M-^X%lM-bM-^@M-^Y will be substituted by the local host name (including
-             any domain name), M-bM-^@M-^X%hM-bM-^@M-^Y will be substituted by the target host
-             name, M-bM-^@M-^X%nM-bM-^@M-^Y will be substituted by the original target host name
-             specified on the command line, M-bM-^@M-^X%pM-bM-^@M-^Y the destination port, M-bM-^@M-^X%rM-bM-^@M-^Y by
-             the remote login username, M-bM-^@M-^X%uM-bM-^@M-^Y by the username of the user
-             running ssh(1), and M-bM-^@M-^X%CM-bM-^@M-^Y by a hash of the concatenation:
-             %l%h%p%r.  It is recommended that any ControlPath used for
-             opportunistic connection sharing include at least %h, %p, and %r
-             (or alternatively %C) and be placed in a directory that is not
+             string none to disable connection sharing.  Arguments to
+             ControlPath may use the tilde syntax to refer to a user's home
+             directory or the tokens described in the TOKENS section.  It is
+             recommended that any ControlPath used for opportunistic
+             connection sharing include at least %h, %p, and %r (or
+             alternatively %C) and be placed in a directory that is not
              writable by other users.  This ensures that shared connections
              are uniquely identified.
 
@@ -294,16 +305,16 @@ DESCRIPTION
              When used in conjunction with ControlMaster, specifies that the
              master connection should remain open in the background (waiting
              for future client connections) after the initial client
-             connection has been closed.  If set to M-bM-^@M-^\noM-bM-^@M-^], then the master
+             connection has been closed.  If set to no, then the master
              connection will not be placed into the background, and will close
              as soon as the initial client connection is closed.  If set to
-             M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\0M-bM-^@M-^], then the master connection will remain in the
+             yes or 0, then the master connection will remain in the
              background indefinitely (until killed or closed via a mechanism
-             such as the ssh(1) M-bM-^@M-^\-O exitM-bM-^@M-^] option).  If set to a time in
-             seconds, or a time in any of the formats documented in
-             sshd_config(5), then the backgrounded master connection will
-             automatically terminate after it has remained idle (with no
-             client connections) for the specified time.
+             such as the "ssh -O exit").  If set to a time in seconds, or a
+             time in any of the formats documented in sshd_config(5), then the
+             backgrounded master connection will automatically terminate after
+             it has remained idle (with no client connections) for the
+             specified time.
 
      DynamicForward
              Specifies that a TCP port on the local machine be forwarded over
@@ -315,7 +326,7 @@ DESCRIPTION
              the local port is bound in accordance with the GatewayPorts
              setting.  However, an explicit bind_address may be used to bind
              the connection to a specific address.  The bind_address of
-             M-bM-^@M-^\localhostM-bM-^@M-^] indicates that the listening port be bound for local
+             localhost indicates that the listening port be bound for local
              use only, while an empty address or M-bM-^@M-^X*M-bM-^@M-^Y indicates that the port
              should be available from all interfaces.
 
@@ -325,35 +336,38 @@ DESCRIPTION
              line.  Only the superuser can forward privileged ports.
 
      EnableSSHKeysign
-             Setting this option to M-bM-^@M-^\yesM-bM-^@M-^] in the global client configuration
+             Setting this option to yes in the global client configuration
              file /etc/ssh/ssh_config enables the use of the helper program
              ssh-keysign(8) during HostbasedAuthentication.  The argument must
-             be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].  This option should be
-             placed in the non-hostspecific section.  See ssh-keysign(8) for
-             more information.
+             be yes or no (the default).  This option should be placed in the
+             non-hostspecific section.  See ssh-keysign(8) for more
+             information.
 
      EscapeChar
              Sets the escape character (default: M-bM-^@M-^X~M-bM-^@M-^Y).  The escape character
              can also be set on the command line.  The argument should be a
-             single character, M-bM-^@M-^X^M-bM-^@M-^Y followed by a letter, or M-bM-^@M-^\noneM-bM-^@M-^] to disable
+             single character, M-bM-^@M-^X^M-bM-^@M-^Y followed by a letter, or none to disable
              the escape character entirely (making the connection transparent
              for binary data).
 
      ExitOnForwardFailure
              Specifies whether ssh(1) should terminate the connection if it
              cannot set up all requested dynamic, tunnel, local, and remote
-             port forwardings.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The
-             default is M-bM-^@M-^\noM-bM-^@M-^].
+             port forwardings, (e.g. if either end is unable to bind and
+             listen on a specified port).  Note that ExitOnForwardFailure does
+             not apply to connections made over port forwardings and will not,
+             for example, cause ssh(1) to exit if TCP connections to the
+             ultimate forwarding destination fail.  The argument must be yes
+             or no (the default).
 
      FingerprintHash
              Specifies the hash algorithm used when displaying key
-             fingerprints.  Valid options are: M-bM-^@M-^\md5M-bM-^@M-^] and M-bM-^@M-^\sha256M-bM-^@M-^].  The
-             default is M-bM-^@M-^\sha256M-bM-^@M-^].
+             fingerprints.  Valid options are: md5 and sha256 (the default).
 
      ForwardAgent
              Specifies whether the connection to the authentication agent (if
              any) will be forwarded to the remote machine.  The argument must
-             be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             be yes or no (the default).
 
              Agent forwarding should be enabled with caution.  Users with the
              ability to bypass file permissions on the remote host (for the
@@ -366,7 +380,7 @@ DESCRIPTION
      ForwardX11
              Specifies whether X11 connections will be automatically
              redirected over the secure channel and DISPLAY set.  The argument
-             must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             must be yes or no (the default).
 
              X11 forwarding should be enabled with caution.  Users with the
              ability to bypass file permissions on the remote host (for the
@@ -383,17 +397,15 @@ DESCRIPTION
              minutes has elapsed.
 
      ForwardX11Trusted
-             If this option is set to M-bM-^@M-^\yesM-bM-^@M-^], remote X11 clients will have full
+             If this option is set to yes, remote X11 clients will have full
              access to the original X11 display.
 
-             If this option is set to M-bM-^@M-^\noM-bM-^@M-^], remote X11 clients will be
-             considered untrusted and prevented from stealing or tampering
-             with data belonging to trusted X11 clients.  Furthermore, the
-             xauth(1) token used for the session will be set to expire after
-             20 minutes.  Remote clients will be refused access after this
-             time.
-
-             The default is M-bM-^@M-^\noM-bM-^@M-^].
+             If this option is set to no (the default), remote X11 clients
+             will be considered untrusted and prevented from stealing or
+             tampering with data belonging to trusted X11 clients.
+             Furthermore, the xauth(1) token used for the session will be set
+             to expire after 20 minutes.  Remote clients will be refused
+             access after this time.
 
              See the X11 SECURITY extension specification for full details on
              the restrictions imposed on untrusted clients.
@@ -405,8 +417,7 @@ DESCRIPTION
              connecting to forwarded ports.  GatewayPorts can be used to
              specify that ssh should bind local port forwardings to the
              wildcard address, thus allowing remote hosts to connect to
-             forwarded ports.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The
-             default is M-bM-^@M-^\noM-bM-^@M-^].
+             forwarded ports.  The argument must be yes or no (the default).
 
      GlobalKnownHostsFile
              Specifies one or more files to use for the global host key
@@ -415,34 +426,34 @@ DESCRIPTION
 
      GSSAPIAuthentication
              Specifies whether user authentication based on GSSAPI is allowed.
-             The default is M-bM-^@M-^\noM-bM-^@M-^].  Note that this option applies to protocol
-             version 2 only.
+             The default is no.
 
      GSSAPIDelegateCredentials
-             Forward (delegate) credentials to the server.  The default is
-             M-bM-^@M-^\noM-bM-^@M-^].  Note that this option applies to protocol version 2 only.
+             Forward (delegate) credentials to the server.  The default is no.
 
      HashKnownHosts
              Indicates that ssh(1) should hash host names and addresses when
              they are added to ~/.ssh/known_hosts.  These hashed names may be
              used normally by ssh(1) and sshd(8), but they do not reveal
              identifying information should the file's contents be disclosed.
-             The default is M-bM-^@M-^\noM-bM-^@M-^].  Note that existing names and addresses in
+             The default is no.  Note that existing names and addresses in
              known hosts files will not be converted automatically, but may be
              manually hashed using ssh-keygen(1).
 
      HostbasedAuthentication
              Specifies whether to try rhosts based authentication with public
-             key authentication.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The
-             default is M-bM-^@M-^\noM-bM-^@M-^].  This option applies to protocol version 2 only
-             and is similar to RhostsRSAAuthentication.
+             key authentication.  The argument must be yes or no (the
+             default).
 
      HostbasedKeyTypes
              Specifies the key types that will be used for hostbased
              authentication as a comma-separated pattern list.  Alternately if
              the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the
              specified key types will be appended to the default set instead
-             of replacing them.  The default for this option is:
+             of replacing them.  If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
+             character, then the specified key types (including wildcards)
+             will be removed from the default set instead of replacing them.
+             The default for this option is:
 
                 ecdsa-sha2-nistp256-cert-v01@openssh.com,
                 ecdsa-sha2-nistp384-cert-v01@openssh.com,
@@ -455,11 +466,13 @@ DESCRIPTION
              The -Q option of ssh(1) may be used to list supported key types.
 
      HostKeyAlgorithms
-             Specifies the protocol version 2 host key algorithms that the
-             client wants to use in order of preference.  Alternately if the
-             specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified
-             key types will be appended to the default set instead of
-             replacing them.  The default for this option is:
+             Specifies the host key algorithms that the client wants to use in
+             order of preference.  Alternately if the specified value begins
+             with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified key types will be
+             appended to the default set instead of replacing them.  If the
+             specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y character, then the specified
+             key types (including wildcards) will be removed from the default
+             set instead of replacing them.  The default for this option is:
 
                 ecdsa-sha2-nistp256-cert-v01@openssh.com,
                 ecdsa-sha2-nistp384-cert-v01@openssh.com,
@@ -472,8 +485,8 @@ DESCRIPTION
              If hostkeys are known for the destination host then this default
              is modified to prefer their algorithms.
 
-             The list of available key types may also be obtained using the -Q
-             option of ssh(1) with an argument of M-bM-^@M-^\keyM-bM-^@M-^].
+             The list of available key types may also be obtained using "ssh
+             -Q key".
 
      HostKeyAlias
              Specifies an alias that should be used instead of the real host
@@ -483,24 +496,33 @@ DESCRIPTION
 
      HostName
              Specifies the real host name to log into.  This can be used to
-             specify nicknames or abbreviations for hosts.  If the hostname
-             contains the character sequence M-bM-^@M-^X%hM-bM-^@M-^Y, then this will be replaced
-             with the host name specified on the command line (this is useful
-             for manipulating unqualified names).  The character sequence M-bM-^@M-^X%%M-bM-^@M-^Y
-             will be replaced by a single M-bM-^@M-^X%M-bM-^@M-^Y character, which may be used
-             when specifying IPv6 link-local addresses.
-
-             The default is the name given on the command line.  Numeric IP
-             addresses are also permitted (both on the command line and in
-             HostName specifications).
+             specify nicknames or abbreviations for hosts.  Arguments to
+             HostName accept the tokens described in the TOKENS section.
+             Numeric IP addresses are also permitted (both on the command line
+             and in HostName specifications).  The default is the name given
+             on the command line.
 
      IdentitiesOnly
              Specifies that ssh(1) should only use the authentication identity
-             files configured in the ssh_config files, even if ssh-agent(1) or
-             a PKCS11Provider offers more identities.  The argument to this
-             keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  This option is intended for
-             situations where ssh-agent offers many different identities.  The
-             default is M-bM-^@M-^\noM-bM-^@M-^].
+             and certificate files explicitly configured in the ssh_config
+             files or passed on the ssh(1) command-line, even if ssh-agent(1)
+             or a PKCS11Provider offers more identities.  The argument to this
+             keyword must be yes or no (the default).  This option is intended
+             for situations where ssh-agent offers many different identities.
+
+     IdentityAgent
+             Specifies the UNIX-domain socket used to communicate with the
+             authentication agent.
+
+             This option overrides the SSH_AUTH_SOCK environment variable and
+             can be used to select a specific agent.  Setting the socket name
+             to none disables the use of an authentication agent.  If the
+             string "SSH_AUTH_SOCK" is specified, the location of the socket
+             will be read from the SSH_AUTH_SOCK environment variable.
+
+             Arguments to IdentityAgent may use the tilde syntax to refer to a
+             user's home directory or the tokens described in the TOKENS
+             section.
 
      IdentityFile
              Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA
@@ -509,14 +531,14 @@ DESCRIPTION
              ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
              Additionally, any identities represented by the authentication
              agent will be used for authentication unless IdentitiesOnly is
-             set.  ssh(1) will try to load certificate information from the
-             filename obtained by appending -cert.pub to the path of a
-             specified IdentityFile.
+             set.  If no certificates have been explicitly specified by
+             CertificateFile, ssh(1) will try to load certificate information
+             from the filename obtained by appending -cert.pub to the path of
+             a specified IdentityFile.
 
-             The file name may use the tilde syntax to refer to a user's home
-             directory or one of the following escape characters: M-bM-^@M-^X%dM-bM-^@M-^Y (local
-             user's home directory), M-bM-^@M-^X%uM-bM-^@M-^Y (local user name), M-bM-^@M-^X%lM-bM-^@M-^Y (local host
-             name), M-bM-^@M-^X%hM-bM-^@M-^Y (remote host name) or M-bM-^@M-^X%rM-bM-^@M-^Y (remote user name).
+             Arguments to IdentityFile may use the tilde syntax to refer to a
+             user's home directory or the tokens described in the TOKENS
+             section.
 
              It is possible to have multiple identity files specified in
              configuration files; all these identities will be tried in
@@ -526,7 +548,9 @@ DESCRIPTION
 
              IdentityFile may be used in conjunction with IdentitiesOnly to
              select which identities in an agent are offered during
-             authentication.
+             authentication.  IdentityFile may also be used in conjunction
+             with CertificateFile in order to provide any certificate also
+             needed for authentication with the identity.
 
      IgnoreUnknown
              Specifies a pattern-list of unknown options to be ignored if they
@@ -536,58 +560,63 @@ DESCRIPTION
              listed early in the configuration file as it will not be applied
              to unknown options that appear before it.
 
+     Include
+             Include the specified configuration file(s).  Multiple pathnames
+             may be specified and each pathname may contain glob(3) wildcards
+             and, for user configurations, shell-like M-bM-^@M-^X~M-bM-^@M-^Y references to user
+             home directories.  Files without absolute paths are assumed to be
+             in ~/.ssh if included in a user configuration file or /etc/ssh if
+             included from the system configuration file.  Include directive
+             may appear inside a Match or Host block to perform conditional
+             inclusion.
+
      IPQoS   Specifies the IPv4 type-of-service or DSCP class for connections.
-             Accepted values are M-bM-^@M-^\af11M-bM-^@M-^], M-bM-^@M-^\af12M-bM-^@M-^], M-bM-^@M-^\af13M-bM-^@M-^], M-bM-^@M-^\af21M-bM-^@M-^], M-bM-^@M-^\af22M-bM-^@M-^],
-             M-bM-^@M-^\af23M-bM-^@M-^], M-bM-^@M-^\af31M-bM-^@M-^], M-bM-^@M-^\af32M-bM-^@M-^], M-bM-^@M-^\af33M-bM-^@M-^], M-bM-^@M-^\af41M-bM-^@M-^], M-bM-^@M-^\af42M-bM-^@M-^], M-bM-^@M-^\af43M-bM-^@M-^], M-bM-^@M-^\cs0M-bM-^@M-^],
-             M-bM-^@M-^\cs1M-bM-^@M-^], M-bM-^@M-^\cs2M-bM-^@M-^], M-bM-^@M-^\cs3M-bM-^@M-^], M-bM-^@M-^\cs4M-bM-^@M-^], M-bM-^@M-^\cs5M-bM-^@M-^], M-bM-^@M-^\cs6M-bM-^@M-^], M-bM-^@M-^\cs7M-bM-^@M-^], M-bM-^@M-^\efM-bM-^@M-^],
-             M-bM-^@M-^\lowdelayM-bM-^@M-^], M-bM-^@M-^\throughputM-bM-^@M-^], M-bM-^@M-^\reliabilityM-bM-^@M-^], or a numeric value.
+             Accepted values are af11, af12, af13, af21, af22, af23, af31,
+             af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3, cs4, cs5, cs6,
+             cs7, ef, lowdelay, throughput, reliability, or a numeric value.
              This option may take one or two arguments, separated by
              whitespace.  If one argument is specified, it is used as the
              packet class unconditionally.  If two values are specified, the
              first is automatically selected for interactive sessions and the
-             second for non-interactive sessions.  The default is M-bM-^@M-^\lowdelayM-bM-^@M-^]
-             for interactive sessions and M-bM-^@M-^\throughputM-bM-^@M-^] for non-interactive
-             sessions.
+             second for non-interactive sessions.  The default is lowdelay for
+             interactive sessions and throughput for non-interactive sessions.
 
      KbdInteractiveAuthentication
              Specifies whether to use keyboard-interactive authentication.
-             The argument to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default
-             is M-bM-^@M-^\yesM-bM-^@M-^].
+             The argument to this keyword must be yes (the default) or no.
 
      KbdInteractiveDevices
              Specifies the list of methods to use in keyboard-interactive
              authentication.  Multiple method names must be comma-separated.
              The default is to use the server specified list.  The methods
              available vary depending on what the server supports.  For an
-             OpenSSH server, it may be zero or more of: M-bM-^@M-^\bsdauthM-bM-^@M-^], M-bM-^@M-^\pamM-bM-^@M-^], and
-             M-bM-^@M-^\skeyM-bM-^@M-^].
+             OpenSSH server, it may be zero or more of: bsdauth, pam, and
+             skey.
 
      KexAlgorithms
              Specifies the available KEX (Key Exchange) algorithms.  Multiple
              algorithms must be comma-separated.  Alternately if the specified
              value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified methods
              will be appended to the default set instead of replacing them.
-             The default is:
+             If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y character, then the
+             specified methods (including wildcards) will be removed from the
+             default set instead of replacing them.  The default is:
 
-                   curve25519-sha256@libssh.org,
+                   curve25519-sha256,curve25519-sha256@libssh.org,
                    ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
                    diffie-hellman-group-exchange-sha256,
                    diffie-hellman-group-exchange-sha1,
                    diffie-hellman-group14-sha1
 
              The list of available key exchange algorithms may also be
-             obtained using the -Q option of ssh(1) with an argument of M-bM-^@M-^\kexM-bM-^@M-^].
+             obtained using "ssh -Q kex".
 
      LocalCommand
              Specifies a command to execute on the local machine after
              successfully connecting to the server.  The command string
              extends to the end of the line, and is executed with the user's
-             shell.  The following escape character substitutions will be
-             performed: M-bM-^@M-^X%dM-bM-^@M-^Y (local user's home directory), M-bM-^@M-^X%hM-bM-^@M-^Y (remote host
-             name), M-bM-^@M-^X%lM-bM-^@M-^Y (local host name), M-bM-^@M-^X%nM-bM-^@M-^Y (host name as provided on the
-             command line), M-bM-^@M-^X%pM-bM-^@M-^Y (remote port), M-bM-^@M-^X%rM-bM-^@M-^Y (remote user name) or
-             M-bM-^@M-^X%uM-bM-^@M-^Y (local user name) or M-bM-^@M-^X%CM-bM-^@M-^Y by a hash of the concatenation:
-             %l%h%p%r.
+             shell.  Arguments to LocalCommand accept the tokens described in
+             the TOKENS section.
 
              The command is run synchronously and does not have access to the
              session of the ssh(1) that spawned it.  It should not be used for
@@ -607,7 +636,7 @@ DESCRIPTION
              privileged ports.  By default, the local port is bound in
              accordance with the GatewayPorts setting.  However, an explicit
              bind_address may be used to bind the connection to a specific
-             address.  The bind_address of M-bM-^@M-^\localhostM-bM-^@M-^] indicates that the
+             address.  The bind_address of localhost indicates that the
              listening port be bound for local use only, while an empty
              address or M-bM-^@M-^X*M-bM-^@M-^Y indicates that the port should be available from
              all interfaces.
@@ -620,13 +649,16 @@ DESCRIPTION
              higher levels of verbose output.
 
      MACs    Specifies the MAC (message authentication code) algorithms in
-             order of preference.  The MAC algorithm is used in protocol
-             version 2 for data integrity protection.  Multiple algorithms
-             must be comma-separated.  If the specified value begins with a
-             M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified algorithms will be appended to
-             the default set instead of replacing them.
-
-             The algorithms that contain M-bM-^@M-^\-etmM-bM-^@M-^] calculate the MAC after
+             order of preference.  The MAC algorithm is used for data
+             integrity protection.  Multiple algorithms must be comma-
+             separated.  If the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character,
+             then the specified algorithms will be appended to the default set
+             instead of replacing them.  If the specified value begins with a
+             M-bM-^@M-^X-M-bM-^@M-^Y character, then the specified algorithms (including
+             wildcards) will be removed from the default set instead of
+             replacing them.
+
+             The algorithms that contain "-etm" calculate the MAC after
              encryption (encrypt-then-mac).  These are considered safer and
              their use recommended.
 
@@ -634,16 +666,12 @@ DESCRIPTION
 
                    umac-64-etm@openssh.com,umac-128-etm@openssh.com,
                    hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
+                   hmac-sha1-etm@openssh.com,
                    umac-64@openssh.com,umac-128@openssh.com,
-                   hmac-sha2-256,hmac-sha2-512,
-                   hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
-                   hmac-ripemd160-etm@openssh.com,
-                   hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,
-                   hmac-md5,hmac-sha1,hmac-ripemd160,
-                   hmac-sha1-96,hmac-md5-96
+                   hmac-sha2-256,hmac-sha2-512,hmac-sha1
 
              The list of available MAC algorithms may also be obtained using
-             the -Q option of ssh(1) with an argument of M-bM-^@M-^\macM-bM-^@M-^].
+             "ssh -Q mac".
 
      NoHostAuthenticationForLocalhost
              This option can be used if the home directory is shared across
@@ -651,8 +679,7 @@ DESCRIPTION
              machine on each of the machines and the user will get many
              warnings about changed host keys.  However, this option disables
              host authentication for localhost.  The argument to this keyword
-             must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is to check the host key for
-             localhost.
+             must be yes or no (the default).
 
      NumberOfPasswordPrompts
              Specifies the number of password prompts before giving up.  The
@@ -660,12 +687,12 @@ DESCRIPTION
 
      PasswordAuthentication
              Specifies whether to use password authentication.  The argument
-             to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\yesM-bM-^@M-^].
+             to this keyword must be yes (the default) or no.
 
      PermitLocalCommand
              Allow local command execution via the LocalCommand option or
              using the !command escape sequence in ssh(1).  The argument must
-             be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             be yes or no (the default).
 
      PKCS11Provider
              Specifies which PKCS#11 provider to use.  The argument to this
@@ -677,20 +704,22 @@ DESCRIPTION
              default is 22.
 
      PreferredAuthentications
-             Specifies the order in which the client should try protocol 2
-             authentication methods.  This allows a client to prefer one
-             method (e.g. keyboard-interactive) over another method (e.g.
-             password).  The default is:
+             Specifies the order in which the client should try authentication
+             methods.  This allows a client to prefer one method (e.g.
+             keyboard-interactive) over another method (e.g. password).  The
+             default is:
 
                    gssapi-with-mic,hostbased,publickey,
                    keyboard-interactive,password
 
      Protocol
              Specifies the protocol versions ssh(1) should support in order of
-             preference.  The possible values are M-bM-^@M-^X1M-bM-^@M-^Y and M-bM-^@M-^X2M-bM-^@M-^Y.  Multiple
-             versions must be comma-separated.  When this option is set to
-             M-bM-^@M-^\2,1M-bM-^@M-^] ssh will try version 2 and fall back to version 1 if
-             version 2 is not available.  The default is M-bM-^@M-^X2M-bM-^@M-^Y.
+             preference.  The possible values are 1 and 2.  Multiple versions
+             must be comma-separated.  When this option is set to 2,1 ssh will
+             try version 2 and fall back to version 1 if version 2 is not
+             available.  The default is version 2.  Protocol 1 suffers from a
+             number of cryptographic weaknesses and should not be used.  It is
+             only offered to support legacy devices.
 
      ProxyCommand
              Specifies the command to use to connect to the server.  The
@@ -698,15 +727,14 @@ DESCRIPTION
              using the user's shell M-bM-^@M-^XexecM-bM-^@M-^Y directive to avoid a lingering
              shell process.
 
-             In the command string, any occurrence of M-bM-^@M-^X%hM-bM-^@M-^Y will be substituted
-             by the host name to connect, M-bM-^@M-^X%pM-bM-^@M-^Y by the port, and M-bM-^@M-^X%rM-bM-^@M-^Y by the
-             remote user name.  The command can be basically anything, and
+             Arguments to ProxyCommand accept the tokens described in the
+             TOKENS section.  The command can be basically anything, and
              should read from its standard input and write to its standard
              output.  It should eventually connect an sshd(8) server running
              on some machine, or execute sshd -i somewhere.  Host key
              management will be done using the HostName of the host being
              connected (defaulting to the name typed by the user).  Setting
-             the command to M-bM-^@M-^\noneM-bM-^@M-^] disables this option entirely.  Note that
+             the command to none disables this option entirely.  Note that
              CheckHostIP is not available for connects with a proxy command.
 
              This directive is useful in conjunction with nc(1) and its proxy
@@ -715,17 +743,32 @@ DESCRIPTION
 
                 ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
 
+     ProxyJump
+             Specifies one or more jump proxies as [user@]host[:port].
+             Multiple proxies may be separated by comma characters and will be
+             visited sequentially.  Setting this option will cause ssh(1) to
+             connect to the target host by first making a ssh(1) connection to
+             the specified ProxyJump host and then establishing a TCP
+             forwarding to the ultimate target from there.
+
+             Note that this option will compete with the ProxyCommand option -
+             whichever is specified first will prevent later instances of the
+             other from taking effect.
+
      ProxyUseFdpass
              Specifies that ProxyCommand will pass a connected file descriptor
              back to ssh(1) instead of continuing to execute and pass data.
-             The default is M-bM-^@M-^\noM-bM-^@M-^].
+             The default is no.
 
      PubkeyAcceptedKeyTypes
              Specifies the key types that will be used for public key
              authentication as a comma-separated pattern list.  Alternately if
              the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the key
              types after it will be appended to the default instead of
-             replacing it.  The default for this option is:
+             replacing it.  If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
+             character, then the specified key types (including wildcards)
+             will be removed from the default set instead of replacing them.
+             The default for this option is:
 
                 ecdsa-sha2-nistp256-cert-v01@openssh.com,
                 ecdsa-sha2-nistp384-cert-v01@openssh.com,
@@ -735,12 +778,12 @@ DESCRIPTION
                 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
                 ssh-ed25519,ssh-rsa
 
-             The -Q option of ssh(1) may be used to list supported key types.
+             The list of available key types may also be obtained using "ssh
+             -Q key".
 
      PubkeyAuthentication
              Specifies whether to try public key authentication.  The argument
-             to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\yesM-bM-^@M-^].
-             This option applies to protocol version 2 only.
+             to this keyword must be yes (the default) or no.
 
      RekeyLimit
              Specifies the maximum amount of data that may be transmitted
@@ -752,10 +795,9 @@ DESCRIPTION
              M-bM-^@M-^X1GM-bM-^@M-^Y and M-bM-^@M-^X4GM-bM-^@M-^Y, depending on the cipher.  The optional second
              value is specified in seconds and may use any of the units
              documented in the TIME FORMATS section of sshd_config(5).  The
-             default value for RekeyLimit is M-bM-^@M-^\default noneM-bM-^@M-^], which means that
+             default value for RekeyLimit is default none, which means that
              rekeying is performed after the cipher's default amount of data
              has been sent or received and no time based rekeying is done.
-             This option applies to protocol version 2 only.
 
      RemoteForward
              Specifies that a TCP port on the remote machine be forwarded over
@@ -767,7 +809,7 @@ DESCRIPTION
              given on the command line.  Privileged ports can be forwarded
              only when logging in as root on the remote machine.
 
-             If the port argument is M-bM-^@M-^X0M-bM-^@M-^Y, the listen port will be dynamically
+             If the port argument is 0, the listen port will be dynamically
              allocated on the server and reported to the client at run time.
 
              If the bind_address is not specified, the default is to only bind
@@ -779,9 +821,9 @@ DESCRIPTION
 
      RequestTTY
              Specifies whether to request a pseudo-tty for the session.  The
-             argument may be one of: M-bM-^@M-^\noM-bM-^@M-^] (never request a TTY), M-bM-^@M-^\yesM-bM-^@M-^] (always
-             request a TTY when standard input is a TTY), M-bM-^@M-^\forceM-bM-^@M-^] (always
-             request a TTY) or M-bM-^@M-^\autoM-bM-^@M-^] (request a TTY when opening a login
+             argument may be one of: no (never request a TTY), yes (always
+             request a TTY when standard input is a TTY), force (always
+             request a TTY) or auto (request a TTY when opening a login
              session).  This option mirrors the -t and -T flags for ssh(1).
 
      RevokedHostKeys
@@ -795,21 +837,20 @@ DESCRIPTION
 
      RhostsRSAAuthentication
              Specifies whether to try rhosts based authentication with RSA
-             host authentication.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The
-             default is M-bM-^@M-^\noM-bM-^@M-^].  This option applies to protocol version 1 only
-             and requires ssh(1) to be setuid root.
+             host authentication.  The argument must be yes or no (the
+             default).  This option applies to protocol version 1 only and
+             requires ssh(1) to be setuid root.
 
      RSAAuthentication
              Specifies whether to try RSA authentication.  The argument to
-             this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  RSA authentication will only
-             be attempted if the identity file exists, or an authentication
-             agent is running.  The default is M-bM-^@M-^\yesM-bM-^@M-^].  Note that this option
-             applies to protocol version 1 only.
+             this keyword must be yes (the default) or no.  RSA authentication
+             will only be attempted if the identity file exists, or an
+             authentication agent is running.  Note that this option applies
+             to protocol version 1 only.
 
      SendEnv
              Specifies what variables from the local environ(7) should be sent
-             to the server.  Note that environment passing is only supported
-             for protocol 2.  The server must also support it, and the server
+             to the server.  The server must also support it, and the server
              must be configured to accept these environment variables.  Note
              that the TERM environment variable is always sent whenever a
              pseudo-terminal is requested as it is required by the protocol.
@@ -838,15 +879,14 @@ DESCRIPTION
              The default value is 3.  If, for example, ServerAliveInterval
              (see below) is set to 15 and ServerAliveCountMax is left at the
              default, if the server becomes unresponsive, ssh will disconnect
-             after approximately 45 seconds.  This option applies to protocol
-             version 2 only.
+             after approximately 45 seconds.
 
      ServerAliveInterval
              Sets a timeout interval in seconds after which if no data has
              been received from the server, ssh(1) will send a message through
              the encrypted channel to request a response from the server.  The
              default is 0, indicating that these messages will not be sent to
-             the server.  This option applies to protocol version 2 only.
+             the server.
 
      StreamLocalBindMask
              Sets the octal file creation mode mask (umask) used when creating
@@ -867,24 +907,23 @@ DESCRIPTION
              domain socket file.  This option is only used for port forwarding
              to a Unix-domain socket file.
 
-             The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             The argument must be yes or no (the default).
 
      StrictHostKeyChecking
-             If this flag is set to M-bM-^@M-^\yesM-bM-^@M-^], ssh(1) will never automatically add
+             If this flag is set to yes, ssh(1) will never automatically add
              host keys to the ~/.ssh/known_hosts file, and refuses to connect
              to hosts whose host key has changed.  This provides maximum
              protection against trojan horse attacks, though it can be
              annoying when the /etc/ssh/ssh_known_hosts file is poorly
              maintained or when connections to new hosts are frequently made.
              This option forces the user to manually add all new hosts.  If
-             this flag is set to M-bM-^@M-^\noM-bM-^@M-^], ssh will automatically add new host
-             keys to the user known hosts files.  If this flag is set to
-             M-bM-^@M-^\askM-bM-^@M-^], new host keys will be added to the user known host files
-             only after the user has confirmed that is what they really want
-             to do, and ssh will refuse to connect to hosts whose host key has
-             changed.  The host keys of known hosts will be verified
-             automatically in all cases.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^], M-bM-^@M-^\noM-bM-^@M-^], or
-             M-bM-^@M-^\askM-bM-^@M-^].  The default is M-bM-^@M-^\askM-bM-^@M-^].
+             this flag is set to no, ssh will automatically add new host keys
+             to the user known hosts files.  If this flag is set to ask (the
+             default), new host keys will be added to the user known host
+             files only after the user has confirmed that is what they really
+             want to do, and ssh will refuse to connect to hosts whose host
+             key has changed.  The host keys of known hosts will be verified
+             automatically in all cases.
 
      TCPKeepAlive
              Specifies whether the system should send TCP keepalive messages
@@ -893,53 +932,50 @@ DESCRIPTION
              this means that connections will die if the route is down
              temporarily, and some people find it annoying.
 
-             The default is M-bM-^@M-^\yesM-bM-^@M-^] (to send TCP keepalive messages), and the
+             The default is yes (to send TCP keepalive messages), and the
              client will notice if the network goes down or the remote host
              dies.  This is important in scripts, and many users want it too.
 
-             To disable TCP keepalive messages, the value should be set to
-             M-bM-^@M-^\noM-bM-^@M-^].
+             To disable TCP keepalive messages, the value should be set to no.
 
      Tunnel  Request tun(4) device forwarding between the client and the
-             server.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^], M-bM-^@M-^\point-to-pointM-bM-^@M-^] (layer 3),
-             M-bM-^@M-^\ethernetM-bM-^@M-^] (layer 2), or M-bM-^@M-^\noM-bM-^@M-^].  Specifying M-bM-^@M-^\yesM-bM-^@M-^] requests the
-             default tunnel mode, which is M-bM-^@M-^\point-to-pointM-bM-^@M-^].  The default is
-             M-bM-^@M-^\noM-bM-^@M-^].
+             server.  The argument must be yes, point-to-point (layer 3),
+             ethernet (layer 2), or no (the default).  Specifying yes requests
+             the default tunnel mode, which is point-to-point.
 
      TunnelDevice
              Specifies the tun(4) devices to open on the client (local_tun)
              and the server (remote_tun).
 
              The argument must be local_tun[:remote_tun].  The devices may be
-             specified by numerical ID or the keyword M-bM-^@M-^\anyM-bM-^@M-^], which uses the
-             next available tunnel device.  If remote_tun is not specified, it
-             defaults to M-bM-^@M-^\anyM-bM-^@M-^].  The default is M-bM-^@M-^\any:anyM-bM-^@M-^].
+             specified by numerical ID or the keyword any, which uses the next
+             available tunnel device.  If remote_tun is not specified, it
+             defaults to any.  The default is any:any.
 
      UpdateHostKeys
              Specifies whether ssh(1) should accept notifications of
              additional hostkeys from the server sent after authentication has
              completed and add them to UserKnownHostsFile.  The argument must
-             be M-bM-^@M-^\yesM-bM-^@M-^], M-bM-^@M-^\noM-bM-^@M-^] (the default) or M-bM-^@M-^\askM-bM-^@M-^].  Enabling this option
-             allows learning alternate hostkeys for a server and supports
-             graceful key rotation by allowing a server to send replacement
-             public keys before old ones are removed.  Additional hostkeys are
-             only accepted if the key used to authenticate the host was
-             already trusted or explicity accepted by the user.  If
-             UpdateHostKeys is set to M-bM-^@M-^\askM-bM-^@M-^], then the user is asked to confirm
-             the modifications to the known_hosts file.  Confirmation is
-             currently incompatible with ControlPersist, and will be disabled
-             if it is enabled.
+             be yes, no (the default) or ask.  Enabling this option allows
+             learning alternate hostkeys for a server and supports graceful
+             key rotation by allowing a server to send replacement public keys
+             before old ones are removed.  Additional hostkeys are only
+             accepted if the key used to authenticate the host was already
+             trusted or explicitly accepted by the user.  If UpdateHostKeys is
+             set to ask, then the user is asked to confirm the modifications
+             to the known_hosts file.  Confirmation is currently incompatible
+             with ControlPersist, and will be disabled if it is enabled.
 
              Presently, only sshd(8) from OpenSSH 6.8 and greater support the
-             M-bM-^@M-^\hostkeys@openssh.comM-bM-^@M-^] protocol extension used to inform the
+             "hostkeys@openssh.com" protocol extension used to inform the
              client of all the server's hostkeys.
 
      UsePrivilegedPort
              Specifies whether to use a privileged port for outgoing
-             connections.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is
-             M-bM-^@M-^\noM-bM-^@M-^].  If set to M-bM-^@M-^\yesM-bM-^@M-^], ssh(1) must be setuid root.  Note that
-             this option must be set to M-bM-^@M-^\yesM-bM-^@M-^] for RhostsRSAAuthentication with
-             older servers.
+             connections.  The argument must be yes or no (the default).  If
+             set to yes, ssh(1) must be setuid root.  Note that this option
+             must be set to yes for RhostsRSAAuthentication with older
+             servers.
 
      User    Specifies the user to log in as.  This can be useful when a
              different user name is used on different machines.  This saves
@@ -953,25 +989,23 @@ DESCRIPTION
 
      VerifyHostKeyDNS
              Specifies whether to verify the remote key using DNS and SSHFP
-             resource records.  If this option is set to M-bM-^@M-^\yesM-bM-^@M-^], the client
-             will implicitly trust keys that match a secure fingerprint from
-             DNS.  Insecure fingerprints will be handled as if this option was
-             set to M-bM-^@M-^\askM-bM-^@M-^].  If this option is set to M-bM-^@M-^\askM-bM-^@M-^], information on
-             fingerprint match will be displayed, but the user will still need
-             to confirm new host keys according to the StrictHostKeyChecking
-             option.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^], M-bM-^@M-^\noM-bM-^@M-^], or M-bM-^@M-^\askM-bM-^@M-^].  The default
-             is M-bM-^@M-^\noM-bM-^@M-^].  Note that this option applies to protocol version 2
-             only.
+             resource records.  If this option is set to yes, the client will
+             implicitly trust keys that match a secure fingerprint from DNS.
+             Insecure fingerprints will be handled as if this option was set
+             to ask.  If this option is set to ask, information on fingerprint
+             match will be displayed, but the user will still need to confirm
+             new host keys according to the StrictHostKeyChecking option.  The
+             default is no.
 
              See also VERIFYING HOST KEYS in ssh(1).
 
      VisualHostKey
-             If this flag is set to M-bM-^@M-^\yesM-bM-^@M-^], an ASCII art representation of the
+             If this flag is set to yes, an ASCII art representation of the
              remote host key fingerprint is printed in addition to the
              fingerprint string at login and for unknown host keys.  If this
-             flag is set to M-bM-^@M-^\noM-bM-^@M-^], no fingerprint strings are printed at login
-             and only the fingerprint string will be printed for unknown host
-             keys.  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             flag is set to no (the default), no fingerprint strings are
+             printed at login and only the fingerprint string will be printed
+             for unknown host keys.
 
      XAuthLocation
              Specifies the full pathname of the xauth(1) program.  The default
@@ -981,7 +1015,7 @@ PATTERNS
      A pattern consists of zero or more non-whitespace characters, M-bM-^@M-^X*M-bM-^@M-^Y (a
      wildcard that matches zero or more characters), or M-bM-^@M-^X?M-bM-^@M-^Y (a wildcard that
      matches exactly one character).  For example, to specify a set of
-     declarations for any host in the M-bM-^@M-^\.co.ukM-bM-^@M-^] set of domains, the following
+     declarations for any host in the ".co.uk" set of domains, the following
      pattern could be used:
 
            Host *.co.uk
@@ -994,11 +1028,43 @@ PATTERNS
      A pattern-list is a comma-separated list of patterns.  Patterns within
      pattern-lists may be negated by preceding them with an exclamation mark
      (M-bM-^@M-^X!M-bM-^@M-^Y).  For example, to allow a key to be used from anywhere within an
-     organization except from the M-bM-^@M-^\dialupM-bM-^@M-^] pool, the following entry (in
+     organization except from the "dialup" pool, the following entry (in
      authorized_keys) could be used:
 
            from="!*.dialup.example.com,*.example.com"
 
+TOKENS
+     Arguments to some keywords can make use of tokens, which are expanded at
+     runtime:
+
+           %%    A literal M-bM-^@M-^X%M-bM-^@M-^Y.
+           %C    Shorthand for %l%h%p%r.
+           %d    Local user's home directory.
+           %h    The remote hostname.
+           %i    The local user ID.
+           %L    The local hostname.
+           %l    The local hostname, including the domain name.
+           %n    The original remote hostname, as given on the command line.
+           %p    The remote port.
+           %r    The remote username.
+           %u    The local username.
+
+     Match exec accepts the tokens %%, %h, %L, %l, %n, %p, %r, and %u.
+
+     CertificateFile accepts the tokens %%, %d, %h, %l, %r, and %u.
+
+     ControlPath accepts the tokens %%, %C, %h, %i, %L, %l, %n, %p, %r, and
+     %u.
+
+     HostName accepts the tokens %% and %h.
+
+     IdentityAgent and IdentityFile accept the tokens %%, %d, %h, %l, %r, and
+     %u.
+
+     LocalCommand accepts the tokens %%, %C, %d, %h, %l, %n, %p, %r, and %u.
+
+     ProxyCommand accepts the tokens %%, %h, %p, and %r.
+
 FILES
      ~/.ssh/config
              This is the per-user configuration file.  The format of this file
@@ -1023,4 +1089,4 @@ AUTHORS
      created OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-OpenBSD 5.8                     August 14, 2015                    OpenBSD 5.8
+OpenBSD 6.0                    February 27, 2017                   OpenBSD 6.0
index a47f3ca..532745b 100644 (file)
@@ -33,8 +33,8 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: ssh_config.5,v 1.215 2015/08/14 15:32:41 jmc Exp $
-.Dd $Mdocdate: August 14 2015 $
+.\" $OpenBSD: ssh_config.5,v 1.242 2017/02/27 14:30:33 jmc Exp $
+.Dd $Mdocdate: February 27 2017 $
 .Dt SSH_CONFIG 5
 .Os
 .Sh NAME
@@ -62,25 +62,25 @@ system-wide configuration file
 For each parameter, the first obtained value
 will be used.
 The configuration files contain sections separated by
-.Dq Host
+.Cm Host
 specifications, and that section is only applied for hosts that
 match one of the patterns given in the specification.
 The matched host name is usually the one given on the command line
 (see the
 .Cm CanonicalizeHostname
-option for exceptions.)
+option for exceptions).
 .Pp
 Since the first obtained value for each parameter is used, more
 host-specific declarations should be given near the beginning of the
 file, and general defaults at the end.
 .Pp
-The configuration file has the following format:
-.Pp
-Empty lines and lines starting with
+The file contains keyword-argument pairs, one per line.
+Lines starting with
 .Ql #
-are comments.
-Otherwise a line is of the format
-.Dq keyword arguments .
+and empty lines are interpreted as comments.
+Arguments may optionally be enclosed in double quotes
+.Pq \&"
+in order to represent arguments containing spaces.
 Configuration options may be separated by whitespace or
 optional whitespace and exactly one
 .Ql = ;
@@ -92,9 +92,6 @@ and
 .Nm sftp
 .Fl o
 option.
-Arguments may optionally be enclosed in double quotes
-.Pq \&"
-in order to represent arguments containing spaces.
 .Pp
 The possible
 keywords and their meanings are as follows (note that
@@ -117,7 +114,7 @@ The host is usually the
 argument given on the command line
 (see the
 .Cm CanonicalizeHostname
-option for exceptions.)
+keyword for exceptions).
 .Pp
 A pattern entry may be negated by prefixing it with an exclamation mark
 .Pq Sq !\& .
@@ -139,7 +136,7 @@ or
 keyword) to be used only when the conditions following the
 .Cm Match
 keyword are satisfied.
-Match conditions are specified using one or more critera
+Match conditions are specified using one or more criteria
 or the single token
 .Cm all
 which always matches.
@@ -177,24 +174,11 @@ The
 keyword executes the specified command under the user's shell.
 If the command returns a zero exit status then the condition is considered true.
 Commands containing whitespace characters must be quoted.
-The following character sequences in the command will be expanded prior to
-execution:
-.Ql %L
-will be substituted by the first component of the local host name,
-.Ql %l
-will be substituted by the local host name (including any domain name),
-.Ql %h
-will be substituted by the target host name,
-.Ql %n
-will be substituted by the original target host name
-specified on the command-line,
-.Ql %p
-the destination port,
-.Ql %r
-by the remote login username, and
-.Ql %u
-by the username of the user running
-.Xr ssh 1 .
+Arguments to
+.Cm exec
+accept the tokens described in the
+.Sx TOKENS
+section.
 .Pp
 The other keywords' criteria must be single entries or comma-separated
 lists and may use the wildcard and negation operators described in the
@@ -221,26 +205,58 @@ keyword matches against the name of the local user running
 (this keyword may be useful in system-wide
 .Nm
 files).
+.It Cm AddKeysToAgent
+Specifies whether keys should be automatically added to a running
+.Xr ssh-agent 1 .
+If this option is set to
+.Cm yes
+and a key is loaded from a file, the key and its passphrase are added to
+the agent with the default lifetime, as if by
+.Xr ssh-add 1 .
+If this option is set to
+.Cm ask ,
+.Xr ssh 1
+will require confirmation using the
+.Ev SSH_ASKPASS
+program before adding a key (see
+.Xr ssh-add 1
+for details).
+If this option is set to
+.Cm confirm ,
+each use of the key must be confirmed, as if the
+.Fl c
+option was specified to
+.Xr ssh-add 1 .
+If this option is set to
+.Cm no ,
+no keys are added to the agent.
+The argument must be
+.Cm yes ,
+.Cm confirm ,
+.Cm ask ,
+or
+.Cm no
+(the default).
 .It Cm AddressFamily
 Specifies which address family to use when connecting.
 Valid arguments are
-.Dq any ,
-.Dq inet
+.Cm any
+(the default),
+.Cm inet
 (use IPv4 only), or
-.Dq inet6
+.Cm inet6
 (use IPv6 only).
 .It Cm BatchMode
 If set to
-.Dq yes ,
+.Cm yes ,
 passphrase/password querying will be disabled.
 This option is useful in scripts and other batch jobs where no user
 is present to supply the password.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .It Cm BindAddress
 Use the specified address on the local machine as the source address of
 the connection.
@@ -248,7 +264,7 @@ Only useful on systems with more than one address.
 Note that this option does not work if
 .Cm UsePrivilegedPort
 is set to
-.Dq yes .
+.Cm yes .
 .It Cm CanonicalDomains
 When
 .Cm CanonicalizeHostname
@@ -257,11 +273,11 @@ search for the specified destination host.
 .It Cm CanonicalizeFallbackLocal
 Specifies whether to fail with an error when hostname canonicalization fails.
 The default,
-.Dq yes ,
+.Cm yes ,
 will attempt to look up the unqualified hostname using the system resolver's
 search rules.
 A value of
-.Dq no
+.Cm no
 will cause
 .Xr ssh 1
 to fail instantly if
@@ -272,11 +288,11 @@ specified by
 .It Cm CanonicalizeHostname
 Controls whether explicit hostname canonicalization is performed.
 The default,
-.Dq no ,
+.Cm no ,
 is not to perform any name rewriting and let the system resolver handle all
 hostname lookups.
 If set to
-.Dq yes
+.Cm yes
 then, for connections that do not use a
 .Cm ProxyCommand ,
 .Xr ssh 1
@@ -289,7 +305,7 @@ rules.
 If
 .Cm CanonicalizeHostname
 is set to
-.Dq always ,
+.Cm always ,
 then canonicalization is applied to proxied connections too.
 .Pp
 If this option is enabled, then the configuration files are processed
@@ -301,8 +317,7 @@ stanzas.
 .It Cm CanonicalizeMaxDots
 Specifies the maximum number of dot characters in a hostname before
 canonicalization is disabled.
-The default,
-.Dq 1 ,
+The default, 1,
 allows a single dot (i.e. hostname.subdomain).
 .It Cm CanonicalizePermittedCNAMEs
 Specifies rules to determine whether CNAMEs should be followed when
@@ -317,58 +332,81 @@ and
 is a pattern-list of domains that they may resolve to.
 .Pp
 For example,
-.Dq *.a.example.com:*.b.example.com,*.c.example.com
+.Qq *.a.example.com:*.b.example.com,*.c.example.com
 will allow hostnames matching
-.Dq *.a.example.com
+.Qq *.a.example.com
 to be canonicalized to names in the
-.Dq *.b.example.com
+.Qq *.b.example.com
 or
-.Dq *.c.example.com
+.Qq *.c.example.com
 domains.
+.It Cm CertificateFile
+Specifies a file from which the user's certificate is read.
+A corresponding private key must be provided separately in order
+to use this certificate either
+from an
+.Cm IdentityFile
+directive or
+.Fl i
+flag to
+.Xr ssh 1 ,
+via
+.Xr ssh-agent 1 ,
+or via a
+.Cm PKCS11Provider .
+.Pp
+Arguments to
+.Cm CertificateFile
+may use the tilde syntax to refer to a user's home directory
+or the tokens described in the
+.Sx TOKENS
+section.
+.Pp
+It is possible to have multiple certificate files specified in
+configuration files; these certificates will be tried in sequence.
+Multiple
+.Cm CertificateFile
+directives will add to the list of certificates used for
+authentication.
 .It Cm ChallengeResponseAuthentication
 Specifies whether to use challenge-response authentication.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
+(the default)
 or
-.Dq no .
-The default is
-.Dq yes .
+.Cm no .
 .It Cm CheckHostIP
-If this flag is set to
-.Dq yes ,
+If set to
+.Cm yes
+(the default),
 .Xr ssh 1
 will additionally check the host IP address in the
 .Pa known_hosts
 file.
-This allows ssh to detect if a host key changed due to DNS spoofing
+This allows it to detect if a host key changed due to DNS spoofing
 and will add addresses of destination hosts to
 .Pa ~/.ssh/known_hosts
 in the process, regardless of the setting of
 .Cm StrictHostKeyChecking .
 If the option is set to
-.Dq no ,
+.Cm no ,
 the check will not be executed.
-The default is
-.Dq yes .
 .It Cm Cipher
 Specifies the cipher to use for encrypting the session
 in protocol version 1.
 Currently,
-.Dq blowfish ,
-.Dq 3des ,
+.Cm blowfish ,
+.Cm 3des
+(the default),
 and
-.Dq des
-are supported.
-.Ar des
+.Cm des
+are supported,
+though
+.Cm des
 is only supported in the
 .Xr ssh 1
-client for interoperability with legacy protocol 1 implementations
-that do not support the
-.Ar 3des
-cipher.
-Its use is strongly discouraged due to cryptographic weaknesses.
-The default is
-.Dq 3des .
+client for interoperability with legacy protocol 1 implementations;
+its use is strongly discouraged due to cryptographic weaknesses.
 .It Cm Ciphers
 Specifies the ciphers allowed for protocol version 2
 in order of preference.
@@ -377,58 +415,40 @@ If the specified value begins with a
 .Sq +
 character, then the specified ciphers will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified ciphers (including wildcards) will be removed
+from the default set instead of replacing them.
 .Pp
 The supported ciphers are:
-.Pp
-.Bl -item -compact -offset indent
-.It
+.Bd -literal -offset indent
 3des-cbc
-.It
 aes128-cbc
-.It
 aes192-cbc
-.It
 aes256-cbc
-.It
 aes128-ctr
-.It
 aes192-ctr
-.It
 aes256-ctr
-.It
 aes128-gcm@openssh.com
-.It
 aes256-gcm@openssh.com
-.It
 arcfour
-.It
 arcfour128
-.It
 arcfour256
-.It
 blowfish-cbc
-.It
 cast128-cbc
-.It
 chacha20-poly1305@openssh.com
-.El
+.Ed
 .Pp
 The default is:
 .Bd -literal -offset indent
 chacha20-poly1305@openssh.com,
 aes128-ctr,aes192-ctr,aes256-ctr,
 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
-arcfour256,arcfour128,
-aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,
-aes192-cbc,aes256-cbc,arcfour
+aes128-cbc,aes192-cbc,aes256-cbc
 .Ed
 .Pp
-The list of available ciphers may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq cipher .
+The list of available ciphers may also be obtained using
+.Qq ssh -Q cipher .
 .It Cm ClearAllForwardings
 Specifies that all local, remote, and dynamic port forwardings
 specified in the configuration files or on the command line be
@@ -441,19 +461,17 @@ configuration files, and is automatically set by
 and
 .Xr sftp 1 .
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .It Cm Compression
 Specifies whether to use compression.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .It Cm CompressionLevel
 Specifies the compression level to use if compression is enabled.
 The argument must be an integer from 1 (fast) to 9 (slow, best).
@@ -474,7 +492,7 @@ not when it refuses the connection.
 .It Cm ControlMaster
 Enables the sharing of multiple sessions over a single network connection.
 When set to
-.Dq yes ,
+.Cm yes ,
 .Xr ssh 1
 will listen for connections on a control socket specified using the
 .Cm ControlPath
@@ -484,21 +502,23 @@ Additional sessions can connect to this socket using the same
 with
 .Cm ControlMaster
 set to
-.Dq no
+.Cm no
 (the default).
 These sessions will try to reuse the master instance's network connection
 rather than initiating new ones, but will fall back to connecting normally
 if the control socket does not exist, or is not listening.
 .Pp
 Setting this to
-.Dq ask
-will cause ssh
+.Cm ask
+will cause
+.Xr ssh 1
 to listen for control connections, but require confirmation using
 .Xr ssh-askpass 1 .
 If the
 .Cm ControlPath
 cannot be opened,
-ssh will continue without connecting to a master instance.
+.Xr ssh 1
+will continue without connecting to a master instance.
 .Pp
 X11 and
 .Xr ssh-agent 1
@@ -510,38 +530,25 @@ Two additional options allow for opportunistic multiplexing: try to use a
 master connection but fall back to creating a new one if one does not already
 exist.
 These options are:
-.Dq auto
+.Cm auto
 and
-.Dq autoask .
+.Cm autoask .
 The latter requires confirmation like the
-.Dq ask
+.Cm ask
 option.
 .It Cm ControlPath
 Specify the path to the control socket used for connection sharing as described
 in the
 .Cm ControlMaster
 section above or the string
-.Dq none
+.Cm none
 to disable connection sharing.
-In the path,
-.Ql %L
-will be substituted by the first component of the local host name,
-.Ql %l
-will be substituted by the local host name (including any domain name),
-.Ql %h
-will be substituted by the target host name,
-.Ql %n
-will be substituted by the original target host name
-specified on the command line,
-.Ql %p
-the destination port,
-.Ql %r
-by the remote login username,
-.Ql %u
-by the username of the user running
-.Xr ssh 1 , and
-.Ql \&%C
-by a hash of the concatenation: %l%h%p%r.
+Arguments to
+.Cm ControlPath
+may use the tilde syntax to refer to a user's home directory
+or the tokens described in the
+.Sx TOKENS
+section.
 It is recommended that any
 .Cm ControlPath
 used for opportunistic connection sharing include
@@ -555,18 +562,15 @@ specifies that the master connection should remain open
 in the background (waiting for future client connections)
 after the initial client connection has been closed.
 If set to
-.Dq no ,
+.Cm no ,
 then the master connection will not be placed into the background,
 and will close as soon as the initial client connection is closed.
 If set to
-.Dq yes
-or
-.Dq 0 ,
+.Cm yes
+or 0,
 then the master connection will remain in the background indefinitely
 (until killed or closed via a mechanism such as the
-.Xr ssh 1
-.Dq Fl O No exit
-option).
+.Qq ssh -O exit ) .
 If set to a time in seconds, or a time in any of the formats documented in
 .Xr sshd_config 5 ,
 then the backgrounded master connection will automatically terminate
@@ -592,7 +596,7 @@ may be used to bind the connection to a specific address.
 The
 .Ar bind_address
 of
-.Dq localhost
+.Cm localhost
 indicates that the listening port be bound for local use only, while an
 empty address or
 .Sq *
@@ -606,7 +610,7 @@ additional forwardings can be given on the command line.
 Only the superuser can forward privileged ports.
 .It Cm EnableSSHKeysign
 Setting this option to
-.Dq yes
+.Cm yes
 in the global client configuration file
 .Pa /etc/ssh/ssh_config
 enables the use of the helper program
@@ -614,11 +618,10 @@ enables the use of the helper program
 during
 .Cm HostbasedAuthentication .
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 This option should be placed in the non-hostspecific section.
 See
 .Xr ssh-keysign 8
@@ -631,7 +634,7 @@ be set on the command line.
 The argument should be a single character,
 .Ql ^
 followed by a letter, or
-.Dq none
+.Cm none
 to disable the escape
 character entirely (making the connection transparent for binary
 data).
@@ -639,30 +642,34 @@ data).
 Specifies whether
 .Xr ssh 1
 should terminate the connection if it cannot set up all requested
-dynamic, tunnel, local, and remote port forwardings.
+dynamic, tunnel, local, and remote port forwardings, (e.g.\&
+if either end is unable to bind and listen on a specified port).
+Note that
+.Cm ExitOnForwardFailure
+does not apply to connections made over port forwardings and will not,
+for example, cause
+.Xr ssh 1
+to exit if TCP connections to the ultimate forwarding destination fail.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .It Cm FingerprintHash
 Specifies the hash algorithm used when displaying key fingerprints.
 Valid options are:
-.Dq md5
+.Cm md5
 and
-.Dq sha256 .
-The default is
-.Dq sha256 .
+.Cm sha256
+(the default).
 .It Cm ForwardAgent
 Specifies whether the connection to the authentication agent (if any)
 will be forwarded to the remote machine.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .Pp
 Agent forwarding should be enabled with caution.
 Users with the ability to bypass file permissions on the remote host
@@ -677,11 +684,10 @@ over the secure channel and
 .Ev DISPLAY
 set.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .Pp
 X11 forwarding should be enabled with caution.
 Users with the ability to bypass file permissions on the remote host
@@ -694,7 +700,8 @@ option is also enabled.
 .It Cm ForwardX11Timeout
 Specify a timeout for untrusted X11 forwarding
 using the format described in the
-TIME FORMATS section of
+.Sx TIME FORMATS
+section of
 .Xr sshd_config 5 .
 X11 connections received by
 .Xr ssh 1
@@ -703,11 +710,12 @@ The default is to disable untrusted X11 forwarding after twenty minutes has
 elapsed.
 .It Cm ForwardX11Trusted
 If this option is set to
-.Dq yes ,
+.Cm yes ,
 remote X11 clients will have full access to the original X11 display.
 .Pp
 If this option is set to
-.Dq no ,
+.Cm no
+(the default),
 remote X11 clients will be considered untrusted and prevented
 from stealing or tampering with data belonging to trusted X11
 clients.
@@ -716,9 +724,6 @@ Furthermore, the
 token used for the session will be set to expire after 20 minutes.
 Remote clients will be refused access after this time.
 .Pp
-The default is
-.Dq no .
-.Pp
 See the X11 SECURITY extension specification for full details on
 the restrictions imposed on untrusted clients.
 .It Cm GatewayPorts
@@ -733,11 +738,10 @@ can be used to specify that ssh
 should bind local port forwardings to the wildcard address,
 thus allowing remote hosts to connect to forwarded ports.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .It Cm GlobalKnownHostsFile
 Specifies one or more files to use for the global
 host key database, separated by whitespace.
@@ -747,13 +751,11 @@ The default is
 .It Cm GSSAPIAuthentication
 Specifies whether user authentication based on GSSAPI is allowed.
 The default is
-.Dq no .
-Note that this option applies to protocol version 2 only.
+.Cm no .
 .It Cm GSSAPIDelegateCredentials
 Forward (delegate) credentials to the server.
 The default is
-.Dq no .
-Note that this option applies to protocol version 2 only.
+.Cm no .
 .It Cm HashKnownHosts
 Indicates that
 .Xr ssh 1
@@ -766,7 +768,7 @@ and
 but they do not reveal identifying information should the file's contents
 be disclosed.
 The default is
-.Dq no .
+.Cm no .
 Note that existing names and addresses in known hosts files
 will not be converted automatically,
 but may be manually hashed using
@@ -775,14 +777,10 @@ but may be manually hashed using
 Specifies whether to try rhosts based authentication with public key
 authentication.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
-This option applies to protocol version 2 only and
-is similar to
-.Cm RhostsRSAAuthentication .
+.Cm no
+(the default).
 .It Cm HostbasedKeyTypes
 Specifies the key types that will be used for hostbased authentication
 as a comma-separated pattern list.
@@ -790,6 +788,10 @@ Alternately if the specified value begins with a
 .Sq +
 character, then the specified key types will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified key types (including wildcards) will be removed
+from the default set instead of replacing them.
 The default for this option is:
 .Bd -literal -offset 3n
 ecdsa-sha2-nistp256-cert-v01@openssh.com,
@@ -807,12 +809,16 @@ option of
 .Xr ssh 1
 may be used to list supported key types.
 .It Cm HostKeyAlgorithms
-Specifies the protocol version 2 host key algorithms
+Specifies the host key algorithms
 that the client wants to use in order of preference.
 Alternately if the specified value begins with a
 .Sq +
 character, then the specified key types will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified key types (including wildcards) will be removed
+from the default set instead of replacing them.
 The default for this option is:
 .Bd -literal -offset 3n
 ecdsa-sha2-nistp256-cert-v01@openssh.com,
@@ -827,12 +833,8 @@ ssh-ed25519,ssh-rsa
 If hostkeys are known for the destination host then this default is modified
 to prefer their algorithms.
 .Pp
-The list of available key types may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq key .
+The list of available key types may also be obtained using
+.Qq ssh -Q key .
 .It Cm HostKeyAlias
 Specifies an alias that should be used instead of the
 real host name when looking up or saving the host key
@@ -842,39 +844,60 @@ or for multiple servers running on a single host.
 .It Cm HostName
 Specifies the real host name to log into.
 This can be used to specify nicknames or abbreviations for hosts.
-If the hostname contains the character sequence
-.Ql %h ,
-then this will be replaced with the host name specified on the command line
-(this is useful for manipulating unqualified names).
-The character sequence
-.Ql %%
-will be replaced by a single
-.Ql %
-character, which may be used when specifying IPv6 link-local addresses.
-.Pp
-The default is the name given on the command line.
+Arguments to
+.Cm HostName
+accept the tokens described in the
+.Sx TOKENS
+section.
 Numeric IP addresses are also permitted (both on the command line and in
 .Cm HostName
 specifications).
+The default is the name given on the command line.
 .It Cm IdentitiesOnly
 Specifies that
 .Xr ssh 1
-should only use the authentication identity files configured in the
+should only use the authentication identity and certificate files explicitly
+configured in the
 .Nm
-files,
+files
+or passed on the
+.Xr ssh 1
+command-line,
 even if
 .Xr ssh-agent 1
 or a
 .Cm PKCS11Provider
 offers more identities.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
+.Cm no
+(the default).
 This option is intended for situations where ssh-agent
 offers many different identities.
-The default is
-.Dq no .
+.It Cm IdentityAgent
+Specifies the
+.Ux Ns -domain
+socket used to communicate with the authentication agent.
+.Pp
+This option overrides the
+.Ev SSH_AUTH_SOCK
+environment variable and can be used to select a specific agent.
+Setting the socket name to
+.Cm none
+disables the use of an authentication agent.
+If the string
+.Qq SSH_AUTH_SOCK
+is specified, the location of the socket will be read from the
+.Ev SSH_AUTH_SOCK
+environment variable.
+.Pp
+Arguments to
+.Cm IdentityAgent
+may use the tilde syntax to refer to a user's home directory
+or the tokens described in the
+.Sx TOKENS
+section.
 .It Cm IdentityFile
 Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA authentication
 identity is read.
@@ -891,6 +914,8 @@ Additionally, any identities represented by the authentication agent
 will be used for authentication unless
 .Cm IdentitiesOnly
 is set.
+If no certificates have been explicitly specified by
+.Cm CertificateFile ,
 .Xr ssh 1
 will try to load certificate information from the filename obtained by
 appending
@@ -898,19 +923,12 @@ appending
 to the path of a specified
 .Cm IdentityFile .
 .Pp
-The file name may use the tilde
-syntax to refer to a user's home directory or one of the following
-escape characters:
-.Ql %d
-(local user's home directory),
-.Ql %u
-(local user name),
-.Ql %l
-(local host name),
-.Ql %h
-(remote host name) or
-.Ql %r
-(remote user name).
+Arguments to
+.Cm IdentityFile
+may use the tilde syntax to refer to a user's home directory
+or the tokens described in the
+.Sx TOKENS
+section.
 .Pp
 It is possible to have
 multiple identity files specified in configuration files; all these
@@ -924,6 +942,11 @@ differs from that of other configuration directives).
 may be used in conjunction with
 .Cm IdentitiesOnly
 to select which identities in an agent are offered during authentication.
+.Cm IdentityFile
+may also be used in conjunction with
+.Cm CertificateFile
+in order to provide any certificate also needed for authentication with
+the identity.
 .It Cm IgnoreUnknown
 Specifies a pattern-list of unknown options to be ignored if they are
 encountered in configuration parsing.
@@ -935,51 +958,69 @@ It is recommended that
 .Cm IgnoreUnknown
 be listed early in the configuration file as it will not be applied
 to unknown options that appear before it.
+.It Cm Include
+Include the specified configuration file(s).
+Multiple pathnames may be specified and each pathname may contain
+.Xr glob 3
+wildcards and, for user configurations, shell-like
+.Sq ~
+references to user home directories.
+Files without absolute paths are assumed to be in
+.Pa ~/.ssh
+if included in a user configuration file or
+.Pa /etc/ssh
+if included from the system configuration file.
+.Cm Include
+directive may appear inside a
+.Cm Match
+or
+.Cm Host
+block
+to perform conditional inclusion.
 .It Cm IPQoS
 Specifies the IPv4 type-of-service or DSCP class for connections.
 Accepted values are
-.Dq af11 ,
-.Dq af12 ,
-.Dq af13 ,
-.Dq af21 ,
-.Dq af22 ,
-.Dq af23 ,
-.Dq af31 ,
-.Dq af32 ,
-.Dq af33 ,
-.Dq af41 ,
-.Dq af42 ,
-.Dq af43 ,
-.Dq cs0 ,
-.Dq cs1 ,
-.Dq cs2 ,
-.Dq cs3 ,
-.Dq cs4 ,
-.Dq cs5 ,
-.Dq cs6 ,
-.Dq cs7 ,
-.Dq ef ,
-.Dq lowdelay ,
-.Dq throughput ,
-.Dq reliability ,
+.Cm af11 ,
+.Cm af12 ,
+.Cm af13 ,
+.Cm af21 ,
+.Cm af22 ,
+.Cm af23 ,
+.Cm af31 ,
+.Cm af32 ,
+.Cm af33 ,
+.Cm af41 ,
+.Cm af42 ,
+.Cm af43 ,
+.Cm cs0 ,
+.Cm cs1 ,
+.Cm cs2 ,
+.Cm cs3 ,
+.Cm cs4 ,
+.Cm cs5 ,
+.Cm cs6 ,
+.Cm cs7 ,
+.Cm ef ,
+.Cm lowdelay ,
+.Cm throughput ,
+.Cm reliability ,
 or a numeric value.
 This option may take one or two arguments, separated by whitespace.
 If one argument is specified, it is used as the packet class unconditionally.
 If two values are specified, the first is automatically selected for
 interactive sessions and the second for non-interactive sessions.
 The default is
-.Dq lowdelay
+.Cm lowdelay
 for interactive sessions and
-.Dq throughput
+.Cm throughput
 for non-interactive sessions.
 .It Cm KbdInteractiveAuthentication
 Specifies whether to use keyboard-interactive authentication.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
+(the default)
 or
-.Dq no .
-The default is
-.Dq yes .
+.Cm no .
 .It Cm KbdInteractiveDevices
 Specifies the list of methods to use in keyboard-interactive authentication.
 Multiple method names must be comma-separated.
@@ -987,10 +1028,10 @@ The default is to use the server specified list.
 The methods available vary depending on what the server supports.
 For an OpenSSH server,
 it may be zero or more of:
-.Dq bsdauth ,
-.Dq pam ,
+.Cm bsdauth ,
+.Cm pam ,
 and
-.Dq skey .
+.Cm skey .
 .It Cm KexAlgorithms
 Specifies the available KEX (Key Exchange) algorithms.
 Multiple algorithms must be comma-separated.
@@ -998,43 +1039,31 @@ Alternately if the specified value begins with a
 .Sq +
 character, then the specified methods will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified methods (including wildcards) will be removed
+from the default set instead of replacing them.
 The default is:
 .Bd -literal -offset indent
-curve25519-sha256@libssh.org,
+curve25519-sha256,curve25519-sha256@libssh.org,
 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
 diffie-hellman-group-exchange-sha256,
 diffie-hellman-group-exchange-sha1,
 diffie-hellman-group14-sha1
 .Ed
 .Pp
-The list of available key exchange algorithms may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq kex .
+The list of available key exchange algorithms may also be obtained using
+.Qq ssh -Q kex .
 .It Cm LocalCommand
 Specifies a command to execute on the local machine after successfully
 connecting to the server.
 The command string extends to the end of the line, and is executed with
 the user's shell.
-The following escape character substitutions will be performed:
-.Ql %d
-(local user's home directory),
-.Ql %h
-(remote host name),
-.Ql %l
-(local host name),
-.Ql %n
-(host name as provided on the command line),
-.Ql %p
-(remote port),
-.Ql %r
-(remote user name) or
-.Ql %u
-(local user name) or
-.Ql \&%C
-by a hash of the concatenation: %l%h%p%r.
+Arguments to
+.Cm LocalCommand
+accept the tokens described in the
+.Sx TOKENS
+section.
 .Pp
 The command is run synchronously and does not have access to the
 session of the
@@ -1067,7 +1096,7 @@ may be used to bind the connection to a specific address.
 The
 .Ar bind_address
 of
-.Dq localhost
+.Cm localhost
 indicates that the listening port be bound for local use only, while an
 empty address or
 .Sq *
@@ -1083,16 +1112,19 @@ DEBUG2 and DEBUG3 each specify higher levels of verbose output.
 .It Cm MACs
 Specifies the MAC (message authentication code) algorithms
 in order of preference.
-The MAC algorithm is used in protocol version 2
-for data integrity protection.
+The MAC algorithm is used for data integrity protection.
 Multiple algorithms must be comma-separated.
 If the specified value begins with a
 .Sq +
 character, then the specified algorithms will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified algorithms (including wildcards) will be removed
+from the default set instead of replacing them.
 .Pp
 The algorithms that contain
-.Dq -etm
+.Qq -etm
 calculate the MAC after encryption (encrypt-then-mac).
 These are considered safer and their use recommended.
 .Pp
@@ -1100,31 +1132,23 @@ The default is:
 .Bd -literal -offset indent
 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
+hmac-sha1-etm@openssh.com,
 umac-64@openssh.com,umac-128@openssh.com,
-hmac-sha2-256,hmac-sha2-512,
-hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
-hmac-ripemd160-etm@openssh.com,
-hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,
-hmac-md5,hmac-sha1,hmac-ripemd160,
-hmac-sha1-96,hmac-md5-96
+hmac-sha2-256,hmac-sha2-512,hmac-sha1
 .Ed
 .Pp
-The list of available MAC algorithms may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq mac .
+The list of available MAC algorithms may also be obtained using
+.Qq ssh -Q mac .
 .It Cm NoHostAuthenticationForLocalhost
 This option can be used if the home directory is shared across machines.
 In this case localhost will refer to a different machine on each of
 the machines and the user will get many warnings about changed host keys.
 However, this option disables host authentication for localhost.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is to check the host key for localhost.
+.Cm no
+(the default).
 .It Cm NumberOfPasswordPrompts
 Specifies the number of password prompts before giving up.
 The argument to this keyword must be an integer.
@@ -1132,11 +1156,10 @@ The default is 3.
 .It Cm PasswordAuthentication
 Specifies whether to use password authentication.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
+(the default)
 or
-.Dq no .
-The default is
-.Dq yes .
+.Cm no .
 .It Cm PermitLocalCommand
 Allow local command execution via the
 .Ic LocalCommand
@@ -1145,11 +1168,10 @@ option or using the
 escape sequence in
 .Xr ssh 1 .
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .It Cm PKCS11Provider
 Specifies which PKCS#11 provider to use.
 The argument to this keyword is the PKCS#11 shared library
@@ -1160,8 +1182,7 @@ private RSA key.
 Specifies the port number to connect on the remote host.
 The default is 22.
 .It Cm PreferredAuthentications
-Specifies the order in which the client should try protocol 2
-authentication methods.
+Specifies the order in which the client should try authentication methods.
 This allows a client to prefer one method (e.g.\&
 .Cm keyboard-interactive )
 over another method (e.g.\&
@@ -1175,18 +1196,17 @@ keyboard-interactive,password
 Specifies the protocol versions
 .Xr ssh 1
 should support in order of preference.
-The possible values are
-.Sq 1
-and
-.Sq 2 .
+The possible values are 1 and 2.
 Multiple versions must be comma-separated.
 When this option is set to
-.Dq 2,1
+.Cm 2,1
 .Nm ssh
 will try version 2 and fall back to version 1
 if version 2 is not available.
-The default is
-.Sq 2 .
+The default is version 2.
+Protocol 1 suffers from a number of cryptographic weaknesses and should
+not be used.
+It is only offered to support legacy devices.
 .It Cm ProxyCommand
 Specifies the command to use to connect to the server.
 The command
@@ -1195,14 +1215,11 @@ using the user's shell
 .Ql exec
 directive to avoid a lingering shell process.
 .Pp
-In the command string, any occurrence of
-.Ql %h
-will be substituted by the host name to
-connect,
-.Ql %p
-by the port, and
-.Ql %r
-by the remote user name.
+Arguments to
+.Cm ProxyCommand
+accept the tokens described in the
+.Sx TOKENS
+section.
 The command can be basically anything,
 and should read from its standard input and write to its standard output.
 It should eventually connect an
@@ -1214,7 +1231,7 @@ Host key management will be done using the
 HostName of the host being connected (defaulting to the name typed by
 the user).
 Setting the command to
-.Dq none
+.Cm none
 disables this option entirely.
 Note that
 .Cm CheckHostIP
@@ -1228,6 +1245,30 @@ For example, the following directive would connect via an HTTP proxy at
 .Bd -literal -offset 3n
 ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
 .Ed
+.It Cm ProxyJump
+Specifies one or more jump proxies as
+.Xo
+.Sm off
+.Op Ar user No @
+.Ar host
+.Op : Ns Ar port
+.Sm on
+.Xc .
+Multiple proxies may be separated by comma characters and will be visited
+sequentially.
+Setting this option will cause
+.Xr ssh 1
+to connect to the target host by first making a
+.Xr ssh 1
+connection to the specified
+.Cm ProxyJump
+host and then establishing a
+TCP forwarding to the ultimate target from there.
+.Pp
+Note that this option will compete with the
+.Cm ProxyCommand
+option - whichever is specified first will prevent later instances of the
+other from taking effect.
 .It Cm ProxyUseFdpass
 Specifies that
 .Cm ProxyCommand
@@ -1235,7 +1276,7 @@ will pass a connected file descriptor back to
 .Xr ssh 1
 instead of continuing to execute and pass data.
 The default is
-.Dq no .
+.Cm no .
 .It Cm PubkeyAcceptedKeyTypes
 Specifies the key types that will be used for public key authentication
 as a comma-separated pattern list.
@@ -1243,6 +1284,10 @@ Alternately if the specified value begins with a
 .Sq +
 character, then the key types after it will be appended to the default
 instead of replacing it.
+If the specified value begins with a
+.Sq -
+character, then the specified key types (including wildcards) will be removed
+from the default set instead of replacing them.
 The default for this option is:
 .Bd -literal -offset 3n
 ecdsa-sha2-nistp256-cert-v01@openssh.com,
@@ -1254,20 +1299,15 @@ ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
 ssh-ed25519,ssh-rsa
 .Ed
 .Pp
-The
-.Fl Q
-option of
-.Xr ssh 1
-may be used to list supported key types.
+The list of available key types may also be obtained using
+.Qq ssh -Q key .
 .It Cm PubkeyAuthentication
 Specifies whether to try public key authentication.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
+(the default)
 or
-.Dq no .
-The default is
-.Dq yes .
-This option applies to protocol version 2 only.
+.Cm no .
 .It Cm RekeyLimit
 Specifies the maximum amount of data that may be transmitted before the
 session key is renegotiated, optionally followed a maximum amount of
@@ -1285,15 +1325,15 @@ and
 depending on the cipher.
 The optional second value is specified in seconds and may use any of the
 units documented in the
-TIME FORMATS section of
+.Sx TIME FORMATS
+section of
 .Xr sshd_config 5 .
 The default value for
 .Cm RekeyLimit
 is
-.Dq default none ,
+.Cm default none ,
 which means that rekeying is performed after the cipher's default amount
 of data has been sent or received and no time based rekeying is done.
-This option applies to protocol version 2 only.
 .It Cm RemoteForward
 Specifies that a TCP port on the remote machine be forwarded over
 the secure channel to the specified host and port from the local machine.
@@ -1311,8 +1351,7 @@ logging in as root on the remote machine.
 .Pp
 If the
 .Ar port
-argument is
-.Ql 0 ,
+argument is 0,
 the listen port will be dynamically allocated on the server and reported
 to the client at run time.
 .Pp
@@ -1334,13 +1373,13 @@ option is enabled (see
 .It Cm RequestTTY
 Specifies whether to request a pseudo-tty for the session.
 The argument may be one of:
-.Dq no
+.Cm no
 (never request a TTY),
-.Dq yes
+.Cm yes
 (always request a TTY when standard input is a TTY),
-.Dq force
+.Cm force
 (always request a TTY) or
-.Dq auto
+.Cm auto
 (request a TTY when opening a login session).
 This option mirrors the
 .Fl t
@@ -1362,31 +1401,28 @@ For more information on KRLs, see the KEY REVOCATION LISTS section in
 Specifies whether to try rhosts based authentication with RSA host
 authentication.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 This option applies to protocol version 1 only and requires
 .Xr ssh 1
 to be setuid root.
 .It Cm RSAAuthentication
 Specifies whether to try RSA authentication.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
+(the default)
 or
-.Dq no .
+.Cm no .
 RSA authentication will only be
 attempted if the identity file exists, or an authentication agent is
 running.
-The default is
-.Dq yes .
 Note that this option applies to protocol version 1 only.
 .It Cm SendEnv
 Specifies what variables from the local
 .Xr environ 7
 should be sent to the server.
-Note that environment passing is only supported for protocol 2.
 The server must also support it, and the server must be configured to
 accept these environment variables.
 Note that the
@@ -1434,7 +1470,6 @@ If, for example,
 .Cm ServerAliveCountMax
 is left at the default, if the server becomes unresponsive,
 ssh will disconnect after approximately 45 seconds.
-This option applies to protocol version 2 only.
 .It Cm ServerAliveInterval
 Sets a timeout interval in seconds after which if no data has been received
 from the server,
@@ -1443,7 +1478,6 @@ will send a message through the encrypted
 channel to request a response from the server.
 The default
 is 0, indicating that these messages will not be sent to the server.
-This option applies to protocol version 2 only.
 .It Cm StreamLocalBindMask
 Sets the octal file creation mode mask
 .Pq umask
@@ -1466,14 +1500,13 @@ will be unable to forward the port to the Unix-domain socket file.
 This option is only used for port forwarding to a Unix-domain socket file.
 .Pp
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 .It Cm StrictHostKeyChecking
 If this flag is set to
-.Dq yes ,
+.Cm yes ,
 .Xr ssh 1
 will never automatically add host keys to the
 .Pa ~/.ssh/known_hosts
@@ -1486,24 +1519,18 @@ frequently made.
 This option forces the user to manually
 add all new hosts.
 If this flag is set to
-.Dq no ,
+.Cm no ,
 ssh will automatically add new host keys to the
 user known hosts files.
 If this flag is set to
-.Dq ask ,
+.Cm ask
+(the default),
 new host keys
 will be added to the user known host files only after the user
 has confirmed that is what they really want to do, and
 ssh will refuse to connect to hosts whose host key has changed.
 The host keys of
 known hosts will be verified automatically in all cases.
-The argument must be
-.Dq yes ,
-.Dq no ,
-or
-.Dq ask .
-The default is
-.Dq ask .
 .It Cm TCPKeepAlive
 Specifies whether the system should send TCP keepalive messages to the
 other side.
@@ -1514,31 +1541,30 @@ connections will die if the route is down temporarily, and some people
 find it annoying.
 .Pp
 The default is
-.Dq yes
+.Cm yes
 (to send TCP keepalive messages), and the client will notice
 if the network goes down or the remote host dies.
 This is important in scripts, and many users want it too.
 .Pp
 To disable TCP keepalive messages, the value should be set to
-.Dq no .
+.Cm no .
 .It Cm Tunnel
 Request
 .Xr tun 4
 device forwarding between the client and the server.
 The argument must be
-.Dq yes ,
-.Dq point-to-point
+.Cm yes ,
+.Cm point-to-point
 (layer 3),
-.Dq ethernet
+.Cm ethernet
 (layer 2),
 or
-.Dq no .
+.Cm no
+(the default).
 Specifying
-.Dq yes
+.Cm yes
 requests the default tunnel mode, which is
-.Dq point-to-point .
-The default is
-.Dq no .
+.Cm point-to-point .
 .It Cm TunnelDevice
 Specifies the
 .Xr tun 4
@@ -1552,14 +1578,14 @@ The argument must be
 .Ar local_tun Op : Ar remote_tun .
 .Sm on
 The devices may be specified by numerical ID or the keyword
-.Dq any ,
+.Cm any ,
 which uses the next available tunnel device.
 If
 .Ar remote_tun
 is not specified, it defaults to
-.Dq any .
+.Cm any .
 The default is
-.Dq any:any .
+.Cm any:any .
 .It Cm UpdateHostKeys
 Specifies whether
 .Xr ssh 1
@@ -1567,19 +1593,19 @@ should accept notifications of additional hostkeys from the server sent
 after authentication has completed and add them to
 .Cm UserKnownHostsFile .
 The argument must be
-.Dq yes ,
-.Dq no
+.Cm yes ,
+.Cm no
 (the default) or
-.Dq ask .
+.Cm ask .
 Enabling this option allows learning alternate hostkeys for a server
 and supports graceful key rotation by allowing a server to send replacement
 public keys before old ones are removed.
 Additional hostkeys are only accepted if the key used to authenticate the
-host was already trusted or explicity accepted by the user.
+host was already trusted or explicitly accepted by the user.
 If
 .Cm UpdateHostKeys
 is set to
-.Dq ask ,
+.Cm ask ,
 then the user is asked to confirm the modifications to the known_hosts file.
 Confirmation is currently incompatible with
 .Cm ControlPersist ,
@@ -1588,22 +1614,21 @@ and will be disabled if it is enabled.
 Presently, only
 .Xr sshd 8
 from OpenSSH 6.8 and greater support the
-.Dq hostkeys@openssh.com
+.Qq hostkeys@openssh.com
 protocol extension used to inform the client of all the server's hostkeys.
 .It Cm UsePrivilegedPort
 Specifies whether to use a privileged port for outgoing connections.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
-The default is
-.Dq no .
+.Cm no
+(the default).
 If set to
-.Dq yes ,
+.Cm yes ,
 .Xr ssh 1
 must be setuid root.
 Note that this option must be set to
-.Dq yes
+.Cm yes
 for
 .Cm RhostsRSAAuthentication
 with older servers.
@@ -1622,40 +1647,35 @@ The default is
 Specifies whether to verify the remote key using DNS and SSHFP resource
 records.
 If this option is set to
-.Dq yes ,
+.Cm yes ,
 the client will implicitly trust keys that match a secure fingerprint
 from DNS.
 Insecure fingerprints will be handled as if this option was set to
-.Dq ask .
+.Cm ask .
 If this option is set to
-.Dq ask ,
+.Cm ask ,
 information on fingerprint match will be displayed, but the user will still
 need to confirm new host keys according to the
 .Cm StrictHostKeyChecking
 option.
-The argument must be
-.Dq yes ,
-.Dq no ,
-or
-.Dq ask .
 The default is
-.Dq no .
-Note that this option applies to protocol version 2 only.
+.Cm no .
 .Pp
-See also VERIFYING HOST KEYS in
+See also
+.Sx VERIFYING HOST KEYS
+in
 .Xr ssh 1 .
 .It Cm VisualHostKey
 If this flag is set to
-.Dq yes ,
+.Cm yes ,
 an ASCII art representation of the remote host key fingerprint is
 printed in addition to the fingerprint string at login and
 for unknown host keys.
 If this flag is set to
-.Dq no ,
+.Cm no
+(the default),
 no fingerprint strings are printed at login and
 only the fingerprint string will be printed for unknown host keys.
-The default is
-.Dq no .
 .It Cm XAuthLocation
 Specifies the full pathname of the
 .Xr xauth 1
@@ -1673,7 +1693,7 @@ or
 .Sq ?\&
 (a wildcard that matches exactly one character).
 For example, to specify a set of declarations for any host in the
-.Dq .co.uk
+.Qq .co.uk
 set of domains,
 the following pattern could be used:
 .Pp
@@ -1693,11 +1713,63 @@ by preceding them with an exclamation mark
 For example,
 to allow a key to be used from anywhere within an organization
 except from the
-.Dq dialup
+.Qq dialup
 pool,
 the following entry (in authorized_keys) could be used:
 .Pp
 .Dl from=\&"!*.dialup.example.com,*.example.com\&"
+.Sh TOKENS
+Arguments to some keywords can make use of tokens,
+which are expanded at runtime:
+.Pp
+.Bl -tag -width XXXX -offset indent -compact
+.It %%
+A literal
+.Sq % .
+.It \&%C
+Shorthand for %l%h%p%r.
+.It %d
+Local user's home directory.
+.It %h
+The remote hostname.
+.It %i
+The local user ID.
+.It %L
+The local hostname.
+.It %l
+The local hostname, including the domain name.
+.It %n
+The original remote hostname, as given on the command line.
+.It %p
+The remote port.
+.It %r
+The remote username.
+.It %u
+The local username.
+.El
+.Pp
+.Cm Match exec
+accepts the tokens %%, %h, %L, %l, %n, %p, %r, and %u.
+.Pp
+.Cm CertificateFile
+accepts the tokens %%, %d, %h, %l, %r, and %u.
+.Pp
+.Cm ControlPath
+accepts the tokens %%, %C, %h, %i, %L, %l, %n, %p, %r, and %u.
+.Pp
+.Cm HostName
+accepts the tokens %% and %h.
+.Pp
+.Cm IdentityAgent
+and
+.Cm IdentityFile
+accept the tokens %%, %d, %h, %l, %r, and %u.
+.Pp
+.Cm LocalCommand
+accepts the tokens %%, %C, %d, %h, %l, %n, %p, %r, and %u.
+.Pp
+.Cm ProxyCommand
+accepts the tokens %%, %h, %p, and %r.
 .Sh FILES
 .Bl -tag -width Ds
 .It Pa ~/.ssh/config
@@ -1716,11 +1788,15 @@ This file must be world-readable.
 .Sh SEE ALSO
 .Xr ssh 1
 .Sh AUTHORS
+.An -nosplit
 OpenSSH is a derivative of the original and free
-ssh 1.2.12 release by Tatu Ylonen.
-Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
-Theo de Raadt and Dug Song
+ssh 1.2.12 release by
+.An Tatu Ylonen .
+.An Aaron Campbell , Bob Beck , Markus Friedl ,
+.An Niels Provos , Theo de Raadt
+and
+.An Dug Song
 removed many bugs, re-added newer features and
 created OpenSSH.
-Markus Friedl contributed the support for SSH
-protocol versions 1.5 and 2.0.
+.An Markus Friedl
+contributed the support for SSH protocol versions 1.5 and 2.0.
index 8ff8a0a..74c49be 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sshbuf-getput-basic.c,v 1.4 2015/01/14 15:02:39 djm Exp $     */
+/*     $OpenBSD: sshbuf-getput-basic.c,v 1.6 2016/06/16 11:00:17 dtucker Exp $ */
 /*
  * Copyright (c) 2011 Damien Miller
  *
@@ -19,6 +19,8 @@
 #include "includes.h"
 
 #include <sys/types.h>
+
+#include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -131,7 +133,7 @@ sshbuf_get_string_direct(struct sshbuf *buf, const u_char **valp, size_t *lenp)
                *lenp = 0;
        if ((r = sshbuf_peek_string_direct(buf, &p, &len)) < 0)
                return r;
-       if (valp != 0)
+       if (valp != NULL)
                *valp = p;
        if (lenp != NULL)
                *lenp = len;
@@ -168,7 +170,7 @@ sshbuf_peek_string_direct(const struct sshbuf *buf, const u_char **valp,
                SSHBUF_DBG(("SSH_ERR_MESSAGE_INCOMPLETE"));
                return SSH_ERR_MESSAGE_INCOMPLETE;
        }
-       if (valp != 0)
+       if (valp != NULL)
                *valp = p + 4;
        if (lenp != NULL)
                *lenp = len;
@@ -268,7 +270,7 @@ sshbuf_putfv(struct sshbuf *buf, const char *fmt, va_list ap)
        int r, len;
        u_char *p;
 
-       va_copy(ap2, ap);
+       VA_COPY(ap2, ap);
        if ((len = vsnprintf(NULL, 0, fmt, ap2)) < 0) {
                r = SSH_ERR_INVALID_ARGUMENT;
                goto out;
@@ -278,7 +280,7 @@ sshbuf_putfv(struct sshbuf *buf, const char *fmt, va_list ap)
                goto out; /* Nothing to do */
        }
        va_end(ap2);
-       va_copy(ap2, ap);
+       VA_COPY(ap2, ap);
        if ((r = sshbuf_reserve(buf, (size_t)len + 1, &p)) < 0)
                goto out;
        if ((r = vsnprintf((char *)p, len + 1, fmt, ap2)) != len) {
@@ -448,7 +450,7 @@ sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf,
                d++;
                len--;
        }
-       if (valp != 0)
+       if (valp != NULL)
                *valp = d;
        if (lenp != NULL)
                *lenp = len;
index 3da4b80..15dcfbc 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sshbuf-misc.c,v 1.5 2015/10/05 17:11:21 djm Exp $     */
+/*     $OpenBSD: sshbuf-misc.c,v 1.6 2016/05/02 08:49:03 djm Exp $     */
 /*
  * Copyright (c) 2011 Damien Miller
  *
@@ -136,3 +136,26 @@ sshbuf_b64tod(struct sshbuf *buf, const char *b64)
        return 0;
 }
 
+char *
+sshbuf_dup_string(struct sshbuf *buf)
+{
+       const u_char *p = NULL, *s = sshbuf_ptr(buf);
+       size_t l = sshbuf_len(buf);
+       char *r;
+
+       if (s == NULL || l > SIZE_MAX)
+               return NULL;
+       /* accept a nul only as the last character in the buffer */
+       if (l > 0 && (p = memchr(s, '\0', l)) != NULL) {
+               if (p != s + l - 1)
+                       return NULL;
+               l--; /* the nul is put back below */
+       }
+       if ((r = malloc(l + 1)) == NULL)
+               return NULL;
+       if (l > 0)
+               memcpy(r, s, l);
+       r[l] = '\0';
+       return r;
+}
+
index 19e162c..cbf7ed4 100644 (file)
--- a/sshbuf.c
+++ b/sshbuf.c
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sshbuf.c,v 1.4 2015/10/05 17:11:21 djm Exp $  */
+/*     $OpenBSD: sshbuf.c,v 1.8 2016/11/25 23:22:04 djm Exp $  */
 /*
  * Copyright (c) 2011 Damien Miller
  *
@@ -18,7 +18,6 @@
 #define SSHBUF_INTERNAL
 #include "includes.h"
 
-#include <sys/param.h> /* roundup */
 #include <sys/types.h>
 #include <signal.h>
 #include <stdlib.h>
@@ -27,6 +26,7 @@
 
 #include "ssherr.h"
 #include "sshbuf.h"
+#include "misc.h"
 
 static inline int
 sshbuf_check_sanity(const struct sshbuf *buf)
@@ -163,10 +163,8 @@ sshbuf_free(struct sshbuf *buf)
         * If we are a child, the free our parent to decrement its reference
         * count and possibly free it.
         */
-       if (buf->parent != NULL) {
-               sshbuf_free(buf->parent);
-               buf->parent = NULL;
-       }
+       sshbuf_free(buf->parent);
+       buf->parent = NULL;
        /*
         * If we are a parent with still-extant children, then don't free just
         * yet. The last child's call to sshbuf_free should decrement our
@@ -252,7 +250,7 @@ sshbuf_set_max_size(struct sshbuf *buf, size_t max_size)
                if (buf->size < SSHBUF_SIZE_INIT)
                        rlen = SSHBUF_SIZE_INIT;
                else
-                       rlen = roundup(buf->size, SSHBUF_SIZE_INC);
+                       rlen = ROUNDUP(buf->size, SSHBUF_SIZE_INC);
                if (rlen > max_size)
                        rlen = max_size;
                explicit_bzero(buf->d + buf->size, buf->alloc - buf->size);
@@ -318,16 +316,13 @@ sshbuf_check_reserve(const struct sshbuf *buf, size_t len)
 }
 
 int
-sshbuf_reserve(struct sshbuf *buf, size_t len, u_char **dpp)
+sshbuf_allocate(struct sshbuf *buf, size_t len)
 {
        size_t rlen, need;
        u_char *dp;
        int r;
 
-       if (dpp != NULL)
-               *dpp = NULL;
-
-       SSHBUF_DBG(("reserve buf = %p len = %zu", buf, len));
+       SSHBUF_DBG(("allocate buf = %p len = %zu", buf, len));
        if ((r = sshbuf_check_reserve(buf, len)) != 0)
                return r;
        /*
@@ -335,36 +330,49 @@ sshbuf_reserve(struct sshbuf *buf, size_t len, u_char **dpp)
         * then pack the buffer, zeroing buf->off.
         */
        sshbuf_maybe_pack(buf, buf->size + len > buf->max_size);
-       SSHBUF_TELL("reserve");
-       if (len + buf->size > buf->alloc) {
-               /*
-                * Prefer to alloc in SSHBUF_SIZE_INC units, but
-                * allocate less if doing so would overflow max_size.
-                */
-               need = len + buf->size - buf->alloc;
-               rlen = roundup(buf->alloc + need, SSHBUF_SIZE_INC);
-               SSHBUF_DBG(("need %zu initial rlen %zu", need, rlen));
-               if (rlen > buf->max_size)
-                       rlen = buf->alloc + need;
-               SSHBUF_DBG(("adjusted rlen %zu", rlen));
-               if ((dp = realloc(buf->d, rlen)) == NULL) {
-                       SSHBUF_DBG(("realloc fail"));
-                       if (dpp != NULL)
-                               *dpp = NULL;
-                       return SSH_ERR_ALLOC_FAIL;
-               }
-               buf->alloc = rlen;
-               buf->cd = buf->d = dp;
-               if ((r = sshbuf_check_reserve(buf, len)) < 0) {
-                       /* shouldn't fail */
-                       if (dpp != NULL)
-                               *dpp = NULL;
-                       return r;
-               }
+       SSHBUF_TELL("allocate");
+       if (len + buf->size <= buf->alloc)
+               return 0; /* already have it. */
+
+       /*
+        * Prefer to alloc in SSHBUF_SIZE_INC units, but
+        * allocate less if doing so would overflow max_size.
+        */
+       need = len + buf->size - buf->alloc;
+       rlen = ROUNDUP(buf->alloc + need, SSHBUF_SIZE_INC);
+       SSHBUF_DBG(("need %zu initial rlen %zu", need, rlen));
+       if (rlen > buf->max_size)
+               rlen = buf->alloc + need;
+       SSHBUF_DBG(("adjusted rlen %zu", rlen));
+       if ((dp = realloc(buf->d, rlen)) == NULL) {
+               SSHBUF_DBG(("realloc fail"));
+               return SSH_ERR_ALLOC_FAIL;
+       }
+       buf->alloc = rlen;
+       buf->cd = buf->d = dp;
+       if ((r = sshbuf_check_reserve(buf, len)) < 0) {
+               /* shouldn't fail */
+               return r;
        }
+       SSHBUF_TELL("done");
+       return 0;
+}
+
+int
+sshbuf_reserve(struct sshbuf *buf, size_t len, u_char **dpp)
+{
+       u_char *dp;
+       int r;
+
+       if (dpp != NULL)
+               *dpp = NULL;
+
+       SSHBUF_DBG(("reserve buf = %p len = %zu", buf, len));
+       if ((r = sshbuf_allocate(buf, len)) != 0)
+               return r;
+
        dp = buf->d + buf->size;
        buf->size += len;
-       SSHBUF_TELL("done");
        if (dpp != NULL)
                *dpp = dp;
        return 0;
index eb0d92e..1ac4b8c 100644 (file)
--- a/sshbuf.h
+++ b/sshbuf.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sshbuf.h,v 1.4 2015/01/14 15:02:39 djm Exp $  */
+/*     $OpenBSD: sshbuf.h,v 1.8 2016/11/25 23:22:04 djm Exp $  */
 /*
  * Copyright (c) 2011 Damien Miller
  *
@@ -120,12 +120,12 @@ size_t    sshbuf_len(const struct sshbuf *buf);
 size_t sshbuf_avail(const struct sshbuf *buf);
 
 /*
- * Returns a read-only pointer to the start of the the data in buf
+ * Returns a read-only pointer to the start of the data in buf
  */
 const u_char *sshbuf_ptr(const struct sshbuf *buf);
 
 /*
- * Returns a mutable pointer to the start of the the data in buf, or
+ * Returns a mutable pointer to the start of the data in buf, or
  * NULL if the buffer is read-only.
  */
 u_char *sshbuf_mutable_ptr(const struct sshbuf *buf);
@@ -139,6 +139,14 @@ u_char *sshbuf_mutable_ptr(const struct sshbuf *buf);
 int    sshbuf_check_reserve(const struct sshbuf *buf, size_t len);
 
 /*
+ * Preallocates len additional bytes in buf.
+ * Useful for cases where the caller knows how many bytes will ultimately be
+ * required to avoid realloc in the buffer code.
+ * Returns 0 on success, or a negative SSH_ERR_* error code on failure.
+ */
+int    sshbuf_allocate(struct sshbuf *buf, size_t len);
+
+/*
  * Reserve len bytes in buf.
  * Returns 0 on success and a pointer to the first reserved byte via the
  * optional dpp parameter or a negative * SSH_ERR_* error code on failure.
@@ -239,47 +247,57 @@ char      *sshbuf_dtob64(struct sshbuf *buf);
 /* Decode base64 data and append it to the buffer */
 int    sshbuf_b64tod(struct sshbuf *buf, const char *b64);
 
+/*
+ * Duplicate the contents of a buffer to a string (caller to free).
+ * Returns NULL on buffer error, or if the buffer contains a premature
+ * nul character.
+ */
+char *sshbuf_dup_string(struct sshbuf *buf);
+
 /* Macros for decoding/encoding integers */
 #define PEEK_U64(p) \
-       (((u_int64_t)(((u_char *)(p))[0]) << 56) | \
-        ((u_int64_t)(((u_char *)(p))[1]) << 48) | \
-        ((u_int64_t)(((u_char *)(p))[2]) << 40) | \
-        ((u_int64_t)(((u_char *)(p))[3]) << 32) | \
-        ((u_int64_t)(((u_char *)(p))[4]) << 24) | \
-        ((u_int64_t)(((u_char *)(p))[5]) << 16) | \
-        ((u_int64_t)(((u_char *)(p))[6]) << 8) | \
-         (u_int64_t)(((u_char *)(p))[7]))
+       (((u_int64_t)(((const u_char *)(p))[0]) << 56) | \
+        ((u_int64_t)(((const u_char *)(p))[1]) << 48) | \
+        ((u_int64_t)(((const u_char *)(p))[2]) << 40) | \
+        ((u_int64_t)(((const u_char *)(p))[3]) << 32) | \
+        ((u_int64_t)(((const u_char *)(p))[4]) << 24) | \
+        ((u_int64_t)(((const u_char *)(p))[5]) << 16) | \
+        ((u_int64_t)(((const u_char *)(p))[6]) << 8) | \
+         (u_int64_t)(((const u_char *)(p))[7]))
 #define PEEK_U32(p) \
-       (((u_int32_t)(((u_char *)(p))[0]) << 24) | \
-        ((u_int32_t)(((u_char *)(p))[1]) << 16) | \
-        ((u_int32_t)(((u_char *)(p))[2]) << 8) | \
-         (u_int32_t)(((u_char *)(p))[3]))
+       (((u_int32_t)(((const u_char *)(p))[0]) << 24) | \
+        ((u_int32_t)(((const u_char *)(p))[1]) << 16) | \
+        ((u_int32_t)(((const u_char *)(p))[2]) << 8) | \
+         (u_int32_t)(((const u_char *)(p))[3]))
 #define PEEK_U16(p) \
-       (((u_int16_t)(((u_char *)(p))[0]) << 8) | \
-         (u_int16_t)(((u_char *)(p))[1]))
+       (((u_int16_t)(((const u_char *)(p))[0]) << 8) | \
+         (u_int16_t)(((const u_char *)(p))[1]))
 
 #define POKE_U64(p, v) \
        do { \
-               ((u_char *)(p))[0] = (((u_int64_t)(v)) >> 56) & 0xff; \
-               ((u_char *)(p))[1] = (((u_int64_t)(v)) >> 48) & 0xff; \
-               ((u_char *)(p))[2] = (((u_int64_t)(v)) >> 40) & 0xff; \
-               ((u_char *)(p))[3] = (((u_int64_t)(v)) >> 32) & 0xff; \
-               ((u_char *)(p))[4] = (((u_int64_t)(v)) >> 24) & 0xff; \
-               ((u_char *)(p))[5] = (((u_int64_t)(v)) >> 16) & 0xff; \
-               ((u_char *)(p))[6] = (((u_int64_t)(v)) >> 8) & 0xff; \
-               ((u_char *)(p))[7] = ((u_int64_t)(v)) & 0xff; \
+               const u_int64_t __v = (v); \
+               ((u_char *)(p))[0] = (__v >> 56) & 0xff; \
+               ((u_char *)(p))[1] = (__v >> 48) & 0xff; \
+               ((u_char *)(p))[2] = (__v >> 40) & 0xff; \
+               ((u_char *)(p))[3] = (__v >> 32) & 0xff; \
+               ((u_char *)(p))[4] = (__v >> 24) & 0xff; \
+               ((u_char *)(p))[5] = (__v >> 16) & 0xff; \
+               ((u_char *)(p))[6] = (__v >> 8) & 0xff; \
+               ((u_char *)(p))[7] = __v & 0xff; \
        } while (0)
 #define POKE_U32(p, v) \
        do { \
-               ((u_char *)(p))[0] = (((u_int64_t)(v)) >> 24) & 0xff; \
-               ((u_char *)(p))[1] = (((u_int64_t)(v)) >> 16) & 0xff; \
-               ((u_char *)(p))[2] = (((u_int64_t)(v)) >> 8) & 0xff; \
-               ((u_char *)(p))[3] = ((u_int64_t)(v)) & 0xff; \
+               const u_int32_t __v = (v); \
+               ((u_char *)(p))[0] = (__v >> 24) & 0xff; \
+               ((u_char *)(p))[1] = (__v >> 16) & 0xff; \
+               ((u_char *)(p))[2] = (__v >> 8) & 0xff; \
+               ((u_char *)(p))[3] = __v & 0xff; \
        } while (0)
 #define POKE_U16(p, v) \
        do { \
-               ((u_char *)(p))[0] = (((u_int64_t)(v)) >> 8) & 0xff; \
-               ((u_char *)(p))[1] = ((u_int64_t)(v)) & 0xff; \
+               const u_int16_t __v = (v); \
+               ((u_char *)(p))[0] = (__v >> 8) & 0xff; \
+               ((u_char *)(p))[1] = __v & 0xff; \
        } while (0)
 
 /* Internal definitions follow. Exposed for regress tests */
index 17fbe39..948b638 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.263 2015/08/20 22:32:42 deraadt Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.273 2017/03/10 03:22:40 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -15,7 +15,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* roundup */
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/stat.h>
 #include "readconf.h"
 #include "atomicio.h"
 #include "dns.h"
-#include "roaming.h"
 #include "monitor_fdpass.h"
 #include "ssh2.h"
 #include "version.h"
 #include "authfile.h"
 #include "ssherr.h"
+#include "authfd.h"
 
 char *client_version_string = NULL;
 char *server_version_string = NULL;
@@ -167,6 +166,7 @@ ssh_proxy_fdpass_connect(const char *host, u_short port,
 
        if ((sock = mm_receive_fd(sp[1])) == -1)
                fatal("proxy dialer did not pass back a connection");
+       close(sp[1]);
 
        while (waitpid(pid, NULL, 0) == -1)
                if (errno != EINTR)
@@ -432,7 +432,9 @@ ssh_connect_direct(const char *host, struct addrinfo *aitop,
        char ntop[NI_MAXHOST], strport[NI_MAXSERV];
        struct addrinfo *ai;
 
-       debug2("ssh_connect: needpriv %d", needpriv);
+       debug2("%s: needpriv %d", __func__, needpriv);
+       memset(ntop, 0, sizeof(ntop));
+       memset(strport, 0, sizeof(strport));
 
        for (attempt = 0; attempt < connection_attempts; attempt++) {
                if (attempt > 0) {
@@ -451,7 +453,7 @@ ssh_connect_direct(const char *host, struct addrinfo *aitop,
                        if (getnameinfo(ai->ai_addr, ai->ai_addrlen,
                            ntop, sizeof(ntop), strport, sizeof(strport),
                            NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
-                               error("ssh_connect: getnameinfo failed");
+                               error("%s: getnameinfo failed", __func__);
                                continue;
                        }
                        debug("Connecting to %.200s [%.100s] port %s.",
@@ -529,7 +531,7 @@ send_client_banner(int connection_out, int minor1)
                xasprintf(&client_version_string, "SSH-%d.%d-%.100s\n",
                    PROTOCOL_MAJOR_1, minor1, SSH_VERSION);
        }
-       if (roaming_atomicio(vwrite, connection_out, client_version_string,
+       if (atomicio(vwrite, connection_out, client_version_string,
            strlen(client_version_string)) != strlen(client_version_string))
                fatal("write: %.100s", strerror(errno));
        chop(client_version_string);
@@ -589,7 +591,7 @@ ssh_exchange_identification(int timeout_ms)
                                }
                        }
 
-                       len = roaming_atomicio(read, connection_in, &buf[i], 1);
+                       len = atomicio(read, connection_in, &buf[i], 1);
 
                        if (len != 1 && errno == EPIPE)
                                fatal("ssh_exchange_identification: "
@@ -925,7 +927,7 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
                            options.fingerprint_hash, SSH_FP_RANDOMART);
                        if (fp == NULL || ra == NULL)
                                fatal("%s: sshkey_fingerprint fail", __func__);
-                       logit("Host key fingerprint is %s\n%s\n", fp, ra);
+                       logit("Host key fingerprint is %s\n%s", fp, ra);
                        free(ra);
                        free(fp);
                }
@@ -1236,8 +1238,9 @@ fail:
 int
 verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
 {
+       u_int i;
        int r = -1, flags = 0;
-       char *fp = NULL;
+       char valid[64], *fp = NULL, *cafp = NULL;
        struct sshkey *plain = NULL;
 
        if ((fp = sshkey_fingerprint(host_key,
@@ -1247,8 +1250,31 @@ verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
                goto out;
        }
 
-       debug("Server host key: %s %s",
-           compat20 ? sshkey_ssh_name(host_key) : sshkey_type(host_key), fp);
+       if (sshkey_is_cert(host_key)) {
+               if ((cafp = sshkey_fingerprint(host_key->cert->signature_key,
+                   options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL) {
+                       error("%s: fingerprint CA key: %s",
+                           __func__, ssh_err(r));
+                       r = -1;
+                       goto out;
+               }
+               sshkey_format_cert_validity(host_key->cert,
+                   valid, sizeof(valid));
+               debug("Server host certificate: %s %s, serial %llu "
+                   "ID \"%s\" CA %s %s valid %s",
+                   sshkey_ssh_name(host_key), fp,
+                   (unsigned long long)host_key->cert->serial,
+                   host_key->cert->key_id,
+                   sshkey_ssh_name(host_key->cert->signature_key), cafp,
+                   valid);
+               for (i = 0; i < host_key->cert->nprincipals; i++) {
+                       debug2("Server host certificate hostname: %s",
+                           host_key->cert->principals[i]);
+               }
+       } else {
+               debug("Server host key: %s %s", compat20 ?
+                   sshkey_ssh_name(host_key) : sshkey_type(host_key), fp);
+       }
 
        if (sshkey_equal(previous_host_key, host_key)) {
                debug2("%s: server host key %s %s matches cached key",
@@ -1313,6 +1339,7 @@ verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
 out:
        sshkey_free(plain);
        free(fp);
+       free(cafp);
        if (r == 0 && host_key != NULL) {
                key_free(previous_host_key);
                previous_host_key = key_from_private(host_key);
@@ -1375,7 +1402,7 @@ ssh_put_password(char *password)
                packet_put_cstring(password);
                return;
        }
-       size = roundup(strlen(password) + 1, 32);
+       size = ROUNDUP(strlen(password) + 1, 32);
        padded = xcalloc(1, size);
        strlcpy(padded, password, size);
        packet_put_string(padded, size);
@@ -1487,3 +1514,32 @@ ssh_local_cmd(const char *args)
 
        return (WEXITSTATUS(status));
 }
+
+void
+maybe_add_key_to_agent(char *authfile, Key *private, char *comment,
+    char *passphrase)
+{
+       int auth_sock = -1, r;
+
+       if (options.add_keys_to_agent == 0)
+               return;
+
+       if ((r = ssh_get_authentication_socket(&auth_sock)) != 0) {
+               debug3("no authentication agent, not adding key");
+               return;
+       }
+
+       if (options.add_keys_to_agent == 2 &&
+           !ask_permission("Add key %s (%s) to agent?", authfile, comment)) {
+               debug3("user denied adding this key");
+               close(auth_sock);
+               return;
+       }
+
+       if ((r = ssh_add_identity_constrained(auth_sock, private, comment, 0,
+           (options.add_keys_to_agent == 3))) == 0)
+               debug("identity added to agent: %s", authfile);
+       else
+               debug("could not add identity to agent: %s (%d)", authfile, r);
+       close(auth_sock);
+}
index 0ea6e99..cf1851a 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.h,v 1.28 2013/10/16 02:31:47 djm Exp $ */
+/* $OpenBSD: sshconnect.h,v 1.29 2015/11/15 22:26:49 jcs Exp $ */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -55,6 +55,8 @@ void   ssh_userauth2(const char *, const char *, char *, Sensitive *);
 void    ssh_put_password(char *);
 int     ssh_local_cmd(const char *);
 
+void    maybe_add_key_to_agent(char *, Key *, char *, char *);
+
 /*
  * Macros to raise/lower permissions.
  */
index 016abbc..dc00b4c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect1.c,v 1.77 2015/01/14 20:05:27 djm Exp $ */
+/* $OpenBSD: sshconnect1.c,v 1.80 2017/03/10 03:53:11 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -221,7 +221,7 @@ try_rsa_authentication(int idx)
 {
        BIGNUM *challenge;
        Key *public, *private;
-       char buf[300], *passphrase, *comment, *authfile;
+       char buf[300], *passphrase = NULL, *comment, *authfile;
        int i, perm_ok = 1, type, quit;
 
        public = options.identity_keys[idx];
@@ -283,13 +283,20 @@ try_rsa_authentication(int idx)
                                debug2("no passphrase given, try next key");
                                quit = 1;
                        }
-                       explicit_bzero(passphrase, strlen(passphrase));
-                       free(passphrase);
                        if (private != NULL || quit)
                                break;
                        debug2("bad passphrase given, try again...");
                }
        }
+
+       if (private != NULL)
+               maybe_add_key_to_agent(authfile, private, comment, passphrase);
+
+       if (passphrase != NULL) {
+               explicit_bzero(passphrase, strlen(passphrase));
+               free(passphrase);
+       }
+
        /* We no longer need the comment. */
        free(comment);
 
@@ -502,7 +509,6 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
        u_char cookie[8];
        u_int supported_ciphers;
        u_int server_flags, client_flags;
-       u_int32_t rnd = 0;
 
        debug("Waiting for server public key.");
 
@@ -514,7 +520,8 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
                cookie[i] = packet_get_char();
 
        /* Get the public key. */
-       server_key = key_new(KEY_RSA1);
+       if ((server_key = key_new(KEY_RSA1)) == NULL)
+               fatal("%s: key_new(KEY_RSA1) failed", __func__);
        bits = packet_get_int();
        packet_get_bignum(server_key->rsa->e);
        packet_get_bignum(server_key->rsa->n);
@@ -526,7 +533,8 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
                logit("Warning: This may be due to an old implementation of ssh.");
        }
        /* Get the host key. */
-       host_key = key_new(KEY_RSA1);
+       if ((host_key = key_new(KEY_RSA1)) == NULL)
+               fatal("%s: key_new(KEY_RSA1) failed", __func__);
        bits = packet_get_int();
        packet_get_bignum(host_key->rsa->e);
        packet_get_bignum(host_key->rsa->n);
@@ -561,12 +569,7 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
         * random number, interpreted as a 32-byte key, with the least
         * significant 8 bits being the first byte of the key.
         */
-       for (i = 0; i < 32; i++) {
-               if (i % 4 == 0)
-                       rnd = arc4random();
-               session_key[i] = rnd & 0xff;
-               rnd >>= 8;
-       }
+       arc4random_buf(session_key, sizeof(session_key));
 
        /*
         * According to the protocol spec, the first byte of the session key
index 7751031..f8a54be 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.226 2015/07/30 00:01:34 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.255 2017/03/11 23:40:26 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -71,6 +71,7 @@
 #include "uidswap.h"
 #include "hostfile.h"
 #include "ssherr.h"
+#include "utf8.h"
 
 #ifdef GSSAPI
 #include "ssh-gss.h"
@@ -157,25 +158,23 @@ void
 ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
 {
        char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT };
+       char *s;
        struct kex *kex;
        int r;
 
        xxx_host = host;
        xxx_hostaddr = hostaddr;
 
-       myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(
-           options.kex_algorithms);
+       if ((s = kex_names_cat(options.kex_algorithms, "ext-info-c")) == NULL)
+               fatal("%s: kex_names_cat", __func__);
+       myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(s);
        myproposal[PROPOSAL_ENC_ALGS_CTOS] =
            compat_cipher_proposal(options.ciphers);
        myproposal[PROPOSAL_ENC_ALGS_STOC] =
            compat_cipher_proposal(options.ciphers);
-       if (options.compression) {
-               myproposal[PROPOSAL_COMP_ALGS_CTOS] =
-               myproposal[PROPOSAL_COMP_ALGS_STOC] = "zlib@openssh.com,zlib,none";
-       } else {
-               myproposal[PROPOSAL_COMP_ALGS_CTOS] =
-               myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com,zlib";
-       }
+       myproposal[PROPOSAL_COMP_ALGS_CTOS] =
+           myproposal[PROPOSAL_COMP_ALGS_STOC] = options.compression ?
+           "zlib@openssh.com,zlib,none" : "none,zlib@openssh.com,zlib";
        myproposal[PROPOSAL_MAC_ALGS_CTOS] =
            myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
        if (options.hostkeyalgorithms != NULL) {
@@ -194,8 +193,8 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
        }
 
        if (options.rekey_limit || options.rekey_interval)
-               packet_set_rekey_limits((u_int32_t)options.rekey_limit,
-                   (time_t)options.rekey_interval);
+               packet_set_rekey_limits(options.rekey_limit,
+                   options.rekey_interval);
 
        /* start key exchange */
        if ((r = kex_setup(active_state, myproposal)) != 0)
@@ -204,6 +203,9 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
 #ifdef WITH_OPENSSL
        kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
        kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
+       kex->kex[KEX_DH_GRP14_SHA256] = kexdh_client;
+       kex->kex[KEX_DH_GRP16_SHA512] = kexdh_client;
+       kex->kex[KEX_DH_GRP18_SHA512] = kexdh_client;
        kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
        kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
 # ifdef OPENSSL_HAS_ECC
@@ -217,10 +219,11 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
 
        dispatch_run(DISPATCH_BLOCK, &kex->done, active_state);
 
-       if (options.use_roaming && !kex->roaming) {
-               debug("Roaming not allowed by server");
-               options.use_roaming = 0;
-       }
+       /* remove ext-info from the KEX proposals for rekeying */
+       myproposal[PROPOSAL_KEX_ALGS] =
+           compat_kex_proposal(options.kex_algorithms);
+       if ((r = kex_prop2buf(kex->my, myproposal)) != 0)
+               fatal("kex_prop2buf: %s", ssh_err(r));
 
        session_id2 = kex->session_id;
        session_id2_len = kex->session_id_len;
@@ -284,6 +287,8 @@ struct cauthmethod {
        int     *batch_flag;    /* flag in option struct that disables method */
 };
 
+int    input_userauth_service_accept(int, u_int32_t, void *);
+int    input_userauth_ext_info(int, u_int32_t, void *);
 int    input_userauth_success(int, u_int32_t, void *);
 int    input_userauth_success_unexpected(int, u_int32_t, void *);
 int    input_userauth_failure(int, u_int32_t, void *);
@@ -313,7 +318,8 @@ void        userauth(Authctxt *, char *);
 static int sign_and_send_pubkey(Authctxt *, Identity *);
 static void pubkey_prepare(Authctxt *);
 static void pubkey_cleanup(Authctxt *);
-static Key *load_identity_file(char *, int);
+static void pubkey_reset(Authctxt *);
+static Key *load_identity_file(Identity *);
 
 static Authmethod *authmethod_get(char *authlist);
 static Authmethod *authmethod_lookup(const char *name);
@@ -359,30 +365,12 @@ void
 ssh_userauth2(const char *local_user, const char *server_user, char *host,
     Sensitive *sensitive)
 {
+       struct ssh *ssh = active_state;
        Authctxt authctxt;
-       int type;
+       int r;
 
        if (options.challenge_response_authentication)
                options.kbd_interactive_authentication = 1;
-
-       packet_start(SSH2_MSG_SERVICE_REQUEST);
-       packet_put_cstring("ssh-userauth");
-       packet_send();
-       debug("SSH2_MSG_SERVICE_REQUEST sent");
-       packet_write_wait();
-       type = packet_read();
-       if (type != SSH2_MSG_SERVICE_ACCEPT)
-               fatal("Server denied authentication request: %d", type);
-       if (packet_remaining() > 0) {
-               char *reply = packet_get_string(NULL);
-               debug2("service_accept: %s", reply);
-               free(reply);
-       } else {
-               debug2("buggy server: service_accept w/o service");
-       }
-       packet_check_eom();
-       debug("SSH2_MSG_SERVICE_ACCEPT received");
-
        if (options.preferred_authentications == NULL)
                options.preferred_authentications = authmethods_get();
 
@@ -404,21 +392,65 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
        if (authctxt.method == NULL)
                fatal("ssh_userauth2: internal error: cannot send userauth none request");
 
-       /* initial userauth request */
-       userauth_none(&authctxt);
+       if ((r = sshpkt_start(ssh, SSH2_MSG_SERVICE_REQUEST)) != 0 ||
+           (r = sshpkt_put_cstring(ssh, "ssh-userauth")) != 0 ||
+           (r = sshpkt_send(ssh)) != 0)
+               fatal("%s: %s", __func__, ssh_err(r));
 
-       dispatch_init(&input_userauth_error);
-       dispatch_set(SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success);
-       dispatch_set(SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure);
-       dispatch_set(SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner);
-       dispatch_run(DISPATCH_BLOCK, &authctxt.success, &authctxt);     /* loop until success */
+       ssh_dispatch_init(ssh, &input_userauth_error);
+       ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info);
+       ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept);
+       ssh_dispatch_run(ssh, DISPATCH_BLOCK, &authctxt.success, &authctxt);    /* loop until success */
 
        pubkey_cleanup(&authctxt);
-       dispatch_range(SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL);
+       ssh_dispatch_range(ssh, SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL);
 
+       if (!authctxt.success)
+               fatal("Authentication failed.");
        debug("Authentication succeeded (%s).", authctxt.method->name);
 }
 
+/* ARGSUSED */
+int
+input_userauth_service_accept(int type, u_int32_t seqnr, void *ctxt)
+{
+       Authctxt *authctxt = ctxt;
+       struct ssh *ssh = active_state;
+       int r;
+
+       if (ssh_packet_remaining(ssh) > 0) {
+               char *reply;
+
+               if ((r = sshpkt_get_cstring(ssh, &reply, NULL)) != 0)
+                       goto out;
+               debug2("service_accept: %s", reply);
+               free(reply);
+       } else {
+               debug2("buggy server: service_accept w/o service");
+       }
+       if ((r = sshpkt_get_end(ssh)) != 0)
+               goto out;
+       debug("SSH2_MSG_SERVICE_ACCEPT received");
+
+       /* initial userauth request */
+       userauth_none(authctxt);
+
+       ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_error);
+       ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success);
+       ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_FAILURE, &input_userauth_failure);
+       ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner);
+       r = 0;
+ out:
+       return r;
+}
+
+/* ARGSUSED */
+int
+input_userauth_ext_info(int type, u_int32_t seqnr, void *ctxt)
+{
+       return kex_input_ext_info(type, seqnr, active_state);
+}
+
 void
 userauth(Authctxt *authctxt, char *authlist)
 {
@@ -467,21 +499,15 @@ input_userauth_error(int type, u_int32_t seq, void *ctxt)
 int
 input_userauth_banner(int type, u_int32_t seq, void *ctxt)
 {
-       char *msg, *raw, *lang;
+       char *msg, *lang;
        u_int len;
 
-       debug3("input_userauth_banner");
-       raw = packet_get_string(&len);
+       debug3("%s", __func__);
+       msg = packet_get_string(&len);
        lang = packet_get_string(NULL);
-       if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO) {
-               if (len > 65536)
-                       len = 65536;
-               msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
-               strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
-               fprintf(stderr, "%s", msg);
-               free(msg);
-       }
-       free(raw);
+       if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO)
+               fmprintf(stderr, "%s", msg);
+       free(msg);
        free(lang);
        return 0;
 }
@@ -533,10 +559,9 @@ input_userauth_failure(int type, u_int32_t seq, void *ctxt)
        packet_check_eom();
 
        if (partial != 0) {
-               logit("Authenticated with partial success.");
+               verbose("Authenticated with partial success.");
                /* reset state */
-               pubkey_cleanup(authctxt);
-               pubkey_prepare(authctxt);
+               pubkey_reset(authctxt);
        }
        debug("Authentications that can continue: %s", authlist);
 
@@ -909,14 +934,14 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
        Authctxt *authctxt = ctxt;
        char *info, *lang, *password = NULL, *retype = NULL;
        char prompt[150];
-       const char *host = options.host_key_alias ? options.host_key_alias :
-           authctxt->host;
+       const char *host;
 
        debug2("input_userauth_passwd_changereq");
 
        if (authctxt == NULL)
                fatal("input_userauth_passwd_changereq: "
                    "no authentication context");
+       host = options.host_key_alias ? options.host_key_alias : authctxt->host;
 
        info = packet_get_string(NULL);
        lang = packet_get_string(NULL);
@@ -970,6 +995,22 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
        return 0;
 }
 
+static const char *
+key_sign_encode(const struct sshkey *key)
+{
+       struct ssh *ssh = active_state;
+
+       if (key->type == KEY_RSA) {
+               switch (ssh->kex->rsa_sha2) {
+               case 256:
+                       return "rsa-sha2-256";
+               case 512:
+                       return "rsa-sha2-512";
+               }
+       }
+       return key_ssh_name(key);
+}
+
 static int
 identity_sign(struct identity *id, u_char **sigp, size_t *lenp,
     const u_char *data, size_t datalen, u_int compat)
@@ -978,41 +1019,62 @@ identity_sign(struct identity *id, u_char **sigp, size_t *lenp,
        int ret;
 
        /* the agent supports this key */
-       if (id->agent_fd)
+       if (id->key != NULL && id->agent_fd != -1)
                return ssh_agent_sign(id->agent_fd, id->key, sigp, lenp,
-                   data, datalen, compat);
+                   data, datalen, key_sign_encode(id->key), compat);
 
        /*
         * we have already loaded the private key or
         * the private key is stored in external hardware
         */
-       if (id->isprivate || (id->key->flags & SSHKEY_FLAG_EXT))
+       if (id->key != NULL &&
+           (id->isprivate || (id->key->flags & SSHKEY_FLAG_EXT)))
                return (sshkey_sign(id->key, sigp, lenp, data, datalen,
-                   compat));
+                   key_sign_encode(id->key), compat));
+
        /* load the private key from the file */
-       if ((prv = load_identity_file(id->filename, id->userprovided)) == NULL)
-               return (-1); /* XXX return decent error code */
-       ret = sshkey_sign(prv, sigp, lenp, data, datalen, compat);
+       if ((prv = load_identity_file(id)) == NULL)
+               return SSH_ERR_KEY_NOT_FOUND;
+       ret = sshkey_sign(prv, sigp, lenp, data, datalen,
+           key_sign_encode(prv), compat);
        sshkey_free(prv);
        return (ret);
 }
 
 static int
+id_filename_matches(Identity *id, Identity *private_id)
+{
+       const char *suffixes[] = { ".pub", "-cert.pub", NULL };
+       size_t len = strlen(id->filename), plen = strlen(private_id->filename);
+       size_t i, slen;
+
+       if (strcmp(id->filename, private_id->filename) == 0)
+               return 1;
+       for (i = 0; suffixes[i]; i++) {
+               slen = strlen(suffixes[i]);
+               if (len > slen && plen == len - slen &&
+                   strcmp(id->filename + (len - slen), suffixes[i]) == 0 &&
+                   memcmp(id->filename, private_id->filename, plen) == 0)
+                       return 1;
+       }
+       return 0;
+}
+
+static int
 sign_and_send_pubkey(Authctxt *authctxt, Identity *id)
 {
        Buffer b;
+       Identity *private_id;
        u_char *blob, *signature;
-       u_int bloblen;
        size_t slen;
-       u_int skip = 0;
-       int ret = -1;
-       int have_sig = 1;
+       u_int bloblen, skip = 0;
+       int matched, ret = -1, have_sig = 1;
        char *fp;
 
        if ((fp = sshkey_fingerprint(id->key, options.fingerprint_hash,
            SSH_FP_DEFAULT)) == NULL)
                return 0;
-       debug3("sign_and_send_pubkey: %s %s", key_type(id->key), fp);
+       debug3("%s: %s %s", __func__, key_type(id->key), fp);
        free(fp);
 
        if (key_to_blob(id->key, &blob, &bloblen) == 0) {
@@ -1040,14 +1102,60 @@ sign_and_send_pubkey(Authctxt *authctxt, Identity *id)
        } else {
                buffer_put_cstring(&b, authctxt->method->name);
                buffer_put_char(&b, have_sig);
-               buffer_put_cstring(&b, key_ssh_name(id->key));
+               buffer_put_cstring(&b, key_sign_encode(id->key));
        }
        buffer_put_string(&b, blob, bloblen);
 
+       /*
+        * If the key is an certificate, try to find a matching private key
+        * and use it to complete the signature.
+        * If no such private key exists, fall back to trying the certificate
+        * key itself in case it has a private half already loaded.
+        */
+       if (key_is_cert(id->key)) {
+               matched = 0;
+               TAILQ_FOREACH(private_id, &authctxt->keys, next) {
+                       if (sshkey_equal_public(id->key, private_id->key) &&
+                           id->key->type != private_id->key->type) {
+                               id = private_id;
+                               matched = 1;
+                               break;
+                       }
+               }
+               /*
+                * Exact key matches are preferred, but also allow
+                * filename matches for non-PKCS#11/agent keys that
+                * didn't load public keys. This supports the case
+                * of keeping just a private key file and public
+                * certificate on disk.
+                */
+               if (!matched && !id->isprivate && id->agent_fd == -1 &&
+                   (id->key->flags & SSHKEY_FLAG_EXT) == 0) {
+                       TAILQ_FOREACH(private_id, &authctxt->keys, next) {
+                               if (private_id->key == NULL &&
+                                   id_filename_matches(id, private_id)) {
+                                       id = private_id;
+                                       matched = 1;
+                                       break;
+                               }
+                       }
+               }
+               if (matched) {
+                       debug2("%s: using private key \"%s\"%s for "
+                           "certificate", __func__, id->filename,
+                           id->agent_fd != -1 ? " from agent" : "");
+               } else {
+                       debug("%s: no separate private key for certificate "
+                           "\"%s\"", __func__, id->filename);
+               }
+       }
+
        /* generate signature */
        ret = identity_sign(id, &signature, &slen,
            buffer_ptr(&b), buffer_len(&b), datafellows);
        if (ret != 0) {
+               if (ret != SSH_ERR_KEY_NOT_FOUND)
+                       error("%s: signing failed: %s", __func__, ssh_err(ret));
                free(blob);
                buffer_free(&b);
                return 0;
@@ -1110,7 +1218,7 @@ send_pubkey_test(Authctxt *authctxt, Identity *id)
        packet_put_cstring(authctxt->method->name);
        packet_put_char(have_sig);
        if (!(datafellows & SSH_BUG_PKAUTH))
-               packet_put_cstring(key_ssh_name(id->key));
+               packet_put_cstring(key_sign_encode(id->key));
        packet_put_string(blob, bloblen);
        free(blob);
        packet_send();
@@ -1118,20 +1226,20 @@ send_pubkey_test(Authctxt *authctxt, Identity *id)
 }
 
 static Key *
-load_identity_file(char *filename, int userprovided)
+load_identity_file(Identity *id)
 {
-       Key *private;
-       char prompt[300], *passphrase;
+       Key *private = NULL;
+       char prompt[300], *passphrase, *comment;
        int r, perm_ok = 0, quit = 0, i;
        struct stat st;
 
-       if (stat(filename, &st) < 0) {
-               (userprovided ? logit : debug3)("no such identity: %s: %s",
-                   filename, strerror(errno));
+       if (stat(id->filename, &st) < 0) {
+               (id->userprovided ? logit : debug3)("no such identity: %s: %s",
+                   id->filename, strerror(errno));
                return NULL;
        }
        snprintf(prompt, sizeof prompt,
-           "Enter passphrase for key '%.100s': ", filename);
+           "Enter passphrase for key '%.100s': ", id->filename);
        for (i = 0; i <= options.number_of_password_prompts; i++) {
                if (i == 0)
                        passphrase = "";
@@ -1143,8 +1251,8 @@ load_identity_file(char *filename, int userprovided)
                                break;
                        }
                }
-               switch ((r = sshkey_load_private_type(KEY_UNSPEC, filename,
-                   passphrase, &private, NULL, &perm_ok))) {
+               switch ((r = sshkey_load_private_type(KEY_UNSPEC, id->filename,
+                   passphrase, &private, &comment, &perm_ok))) {
                case 0:
                        break;
                case SSH_ERR_KEY_WRONG_PASSPHRASE:
@@ -1158,20 +1266,25 @@ load_identity_file(char *filename, int userprovided)
                case SSH_ERR_SYSTEM_ERROR:
                        if (errno == ENOENT) {
                                debug2("Load key \"%s\": %s",
-                                   filename, ssh_err(r));
+                                   id->filename, ssh_err(r));
                                quit = 1;
                                break;
                        }
                        /* FALLTHROUGH */
                default:
-                       error("Load key \"%s\": %s", filename, ssh_err(r));
+                       error("Load key \"%s\": %s", id->filename, ssh_err(r));
                        quit = 1;
                        break;
                }
+               if (!quit && private != NULL && id->agent_fd == -1 &&
+                   !(id->key && id->isprivate))
+                       maybe_add_key_to_agent(id->filename, private, comment,
+                           passphrase);
                if (i > 0) {
                        explicit_bzero(passphrase, strlen(passphrase));
                        free(passphrase);
                }
+               free(comment);
                if (private != NULL || quit)
                        break;
        }
@@ -1180,9 +1293,11 @@ load_identity_file(char *filename, int userprovided)
 
 /*
  * try keys in the following order:
- *     1. agent keys that are found in the config file
- *     2. other agent keys
- *     3. keys that are only listed in the config file
+ *     1. certificates listed in the config file
+ *     2. other input certificates
+ *     3. agent keys that are found in the config file
+ *     4. other agent keys
+ *     5. keys that are only listed in the config file
  */
 static void
 pubkey_prepare(Authctxt *authctxt)
@@ -1190,7 +1305,7 @@ pubkey_prepare(Authctxt *authctxt)
        struct identity *id, *id2, *tmp;
        struct idlist agent, files, *preferred;
        struct sshkey *key;
-       int agent_fd, i, r, found;
+       int agent_fd = -1, i, r, found;
        size_t j;
        struct ssh_identitylist *idlist;
 
@@ -1208,33 +1323,24 @@ pubkey_prepare(Authctxt *authctxt)
                        continue;
                options.identity_keys[i] = NULL;
                id = xcalloc(1, sizeof(*id));
+               id->agent_fd = -1;
                id->key = key;
                id->filename = xstrdup(options.identity_files[i]);
                id->userprovided = options.identity_file_userprovided[i];
                TAILQ_INSERT_TAIL(&files, id, next);
        }
-       /* Prefer PKCS11 keys that are explicitly listed */
-       TAILQ_FOREACH_SAFE(id, &files, next, tmp) {
-               if (id->key == NULL || (id->key->flags & SSHKEY_FLAG_EXT) == 0)
+       /* list of certificates specified by user */
+       for (i = 0; i < options.num_certificate_files; i++) {
+               key = options.certificates[i];
+               if (!key_is_cert(key) || key->cert == NULL ||
+                   key->cert->type != SSH2_CERT_TYPE_USER)
                        continue;
-               found = 0;
-               TAILQ_FOREACH(id2, &files, next) {
-                       if (id2->key == NULL ||
-                           (id2->key->flags & SSHKEY_FLAG_EXT) == 0)
-                               continue;
-                       if (sshkey_equal(id->key, id2->key)) {
-                               TAILQ_REMOVE(&files, id, next);
-                               TAILQ_INSERT_TAIL(preferred, id, next);
-                               found = 1;
-                               break;
-                       }
-               }
-               /* If IdentitiesOnly set and key not found then don't use it */
-               if (!found && options.identities_only) {
-                       TAILQ_REMOVE(&files, id, next);
-                       explicit_bzero(id, sizeof(*id));
-                       free(id);
-               }
+               id = xcalloc(1, sizeof(*id));
+               id->agent_fd = -1;
+               id->key = key;
+               id->filename = xstrdup(options.certificate_files[i]);
+               id->userprovided = options.certificate_file_userprovided[i];
+               TAILQ_INSERT_TAIL(preferred, id, next);
        }
        /* list of keys supported by the agent */
        if ((r = ssh_get_authentication_socket(&agent_fd)) != 0) {
@@ -1245,6 +1351,7 @@ pubkey_prepare(Authctxt *authctxt)
                if (r != SSH_ERR_AGENT_NO_IDENTITIES)
                        debug("%s: ssh_fetch_identitylist: %s",
                            __func__, ssh_err(r));
+               close(agent_fd);
        } else {
                for (j = 0; j < idlist->nkeys; j++) {
                        found = 0;
@@ -1280,14 +1387,51 @@ pubkey_prepare(Authctxt *authctxt)
                }
                authctxt->agent_fd = agent_fd;
        }
+       /* Prefer PKCS11 keys that are explicitly listed */
+       TAILQ_FOREACH_SAFE(id, &files, next, tmp) {
+               if (id->key == NULL || (id->key->flags & SSHKEY_FLAG_EXT) == 0)
+                       continue;
+               found = 0;
+               TAILQ_FOREACH(id2, &files, next) {
+                       if (id2->key == NULL ||
+                           (id2->key->flags & SSHKEY_FLAG_EXT) == 0)
+                               continue;
+                       if (sshkey_equal(id->key, id2->key)) {
+                               TAILQ_REMOVE(&files, id, next);
+                               TAILQ_INSERT_TAIL(preferred, id, next);
+                               found = 1;
+                               break;
+                       }
+               }
+               /* If IdentitiesOnly set and key not found then don't use it */
+               if (!found && options.identities_only) {
+                       TAILQ_REMOVE(&files, id, next);
+                       explicit_bzero(id, sizeof(*id));
+                       free(id);
+               }
+       }
        /* append remaining keys from the config file */
        for (id = TAILQ_FIRST(&files); id; id = TAILQ_FIRST(&files)) {
                TAILQ_REMOVE(&files, id, next);
                TAILQ_INSERT_TAIL(preferred, id, next);
        }
-       TAILQ_FOREACH(id, preferred, next) {
-               debug2("key: %s (%p),%s", id->filename, id->key,
-                   id->userprovided ? " explicit" : "");
+       /* finally, filter by PubkeyAcceptedKeyTypes */
+       TAILQ_FOREACH_SAFE(id, preferred, next, id2) {
+               if (id->key != NULL &&
+                   match_pattern_list(sshkey_ssh_name(id->key),
+                   options.pubkey_key_types, 0) != 1) {
+                       debug("Skipping %s key %s - "
+                           "not in PubkeyAcceptedKeyTypes",
+                           sshkey_ssh_name(id->key), id->filename);
+                       TAILQ_REMOVE(preferred, id, next);
+                       sshkey_free(id->key);
+                       free(id->filename);
+                       memset(id, 0, sizeof(*id));
+                       continue;
+               }
+               debug2("key: %s (%p)%s%s", id->filename, id->key,
+                   id->userprovided ? ", explicit" : "",
+                   id->agent_fd != -1 ? ", agent" : "");
        }
 }
 
@@ -1301,24 +1445,26 @@ pubkey_cleanup(Authctxt *authctxt)
        for (id = TAILQ_FIRST(&authctxt->keys); id;
            id = TAILQ_FIRST(&authctxt->keys)) {
                TAILQ_REMOVE(&authctxt->keys, id, next);
-               if (id->key)
-                       sshkey_free(id->key);
+               sshkey_free(id->key);
                free(id->filename);
                free(id);
        }
 }
 
+static void
+pubkey_reset(Authctxt *authctxt)
+{
+       Identity *id;
+
+       TAILQ_FOREACH(id, &authctxt->keys, next)
+               id->tried = 0;
+}
+
 static int
 try_identity(Identity *id)
 {
        if (!id->key)
                return (0);
-       if (match_pattern_list(sshkey_ssh_name(id->key),
-           options.pubkey_key_types, 0) != 1) {
-               debug("Skipping %s key %s for not in PubkeyAcceptedKeyTypes",
-                   sshkey_ssh_name(id->key), id->filename);
-               return (0);
-       }
        if (key_type_plain(id->key->type) == KEY_RSA &&
            (datafellows & SSH_BUG_RSASIGMD5) != 0) {
                debug("Skipped %s key %s for RSA/MD5 server",
@@ -1353,8 +1499,7 @@ userauth_pubkey(Authctxt *authctxt)
                        }
                } else {
                        debug("Trying private key: %s", id->filename);
-                       id->key = load_identity_file(id->filename,
-                           id->userprovided);
+                       id->key = load_identity_file(id);
                        if (id->key != NULL) {
                                if (try_identity(id)) {
                                        id->isprivate = 1;
@@ -1363,6 +1508,7 @@ userauth_pubkey(Authctxt *authctxt)
                                }
                                key_free(id->key);
                                id->key = NULL;
+                               id->isprivate = 0;
                        }
                }
                if (sent)
@@ -1513,7 +1659,7 @@ ssh_keysign(struct sshkey *key, u_char **sigp, size_t *lenp,
                closefrom(sock + 1);
                debug3("%s: [child] pid=%ld, exec %s",
                    __func__, (long)getpid(), _PATH_SSH_KEY_SIGN);
-               execl(_PATH_SSH_KEY_SIGN, _PATH_SSH_KEY_SIGN, (char *) 0);
+               execl(_PATH_SSH_KEY_SIGN, _PATH_SSH_KEY_SIGN, (char *)NULL);
                fatal("%s: exec(%s): %s", __func__, _PATH_SSH_KEY_SIGN,
                    strerror(errno));
        }
@@ -1523,7 +1669,7 @@ ssh_keysign(struct sshkey *key, u_char **sigp, size_t *lenp,
        if ((b = sshbuf_new()) == NULL)
                fatal("%s: sshbuf_new failed", __func__);
        /* send # of sock, data to be signed */
-       if ((r = sshbuf_put_u32(b, sock) != 0) ||
+       if ((r = sshbuf_put_u32(b, sock)) != 0 ||
            (r = sshbuf_put_string(b, data, datalen)) != 0)
                fatal("%s: buffer error: %s", __func__, ssh_err(r));
        if (ssh_msg_send(to[1], version, b) == -1)
@@ -1685,7 +1831,7 @@ userauth_hostbased(Authctxt *authctxt)
                r = ssh_keysign(private, &sig, &siglen,
                    sshbuf_ptr(b), sshbuf_len(b));
        else if ((r = sshkey_sign(private, &sig, &siglen,
-           sshbuf_ptr(b), sshbuf_len(b), datafellows)) != 0)
+           sshbuf_ptr(b), sshbuf_len(b), NULL, datafellows)) != 0)
                debug("%s: sshkey_sign: %s", __func__, ssh_err(r));
        if (r != 0) {
                error("sign using hostkey %s %s failed",
@@ -1819,8 +1965,8 @@ authmethods_get(void)
                        buffer_append(&b, method->name, strlen(method->name));
                }
        }
-       buffer_append(&b, "\0", 1);
-       list = xstrdup(buffer_ptr(&b));
+       if ((list = sshbuf_dup_string(&b)) == NULL)
+               fatal("%s: sshbuf_dup_string failed", __func__);
        buffer_free(&b);
        return list;
 }
diff --git a/sshd.0 b/sshd.0
index 7980225..6cd5f03 100644 (file)
--- a/sshd.0
+++ b/sshd.0
@@ -4,10 +4,9 @@ NAME
      sshd M-bM-^@M-^S OpenSSH SSH daemon
 
 SYNOPSIS
-     sshd [-46DdeiqTt] [-b bits] [-C connection_spec]
-          [-c host_certificate_file] [-E log_file] [-f config_file]
-          [-g login_grace_time] [-h host_key_file] [-k key_gen_time]
-          [-o option] [-p port] [-u len]
+     sshd [-46DdeiqTt] [-C connection_spec] [-c host_certificate_file]
+          [-E log_file] [-f config_file] [-g login_grace_time]
+          [-h host_key_file] [-o option] [-p port] [-u len]
 
 DESCRIPTION
      sshd (OpenSSH Daemon) is the daemon program for ssh(1).  Together these
@@ -31,10 +30,6 @@ DESCRIPTION
 
      -6      Forces sshd to use IPv6 addresses only.
 
-     -b bits
-             Specifies the number of bits in the ephemeral protocol version 1
-             server key (default 1024).
-
      -C connection_spec
              Specify the connection parameters to use for the -T extended test
              mode.  If provided, any Match directives in the configuration
@@ -80,28 +75,12 @@ DESCRIPTION
              Specifies a file from which a host key is read.  This option must
              be given if sshd is not run as root (as the normal host key files
              are normally not readable by anyone but root).  The default is
-             /etc/ssh/ssh_host_key for protocol version 1, and
-             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key.
-             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
-             protocol version 2.  It is possible to have multiple host key
-             files for the different protocol versions and host key
-             algorithms.
-
-     -i      Specifies that sshd is being run from inetd(8).  If SSH protocol
-             1 is enabled, sshd should not  normally be run from inetd because
-             it needs to generate the server key before it can respond to the
-             client, and this may take some time.  Clients may have to wait
-             too long if the key was regenerated every time.
-
-     -k key_gen_time
-             Specifies how often the ephemeral protocol version 1 server key
-             is regenerated (default 3600 seconds, or one hour).  The
-             motivation for regenerating the key fairly often is that the key
-             is not stored anywhere, and after about an hour it becomes
-             impossible to recover the key for decrypting intercepted
-             communications even if the machine is cracked into or physically
-             seized.  A value of zero indicates that the key will never be
-             regenerated.
+             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key,
+             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key.  It
+             is possible to have multiple host key files for the different
+             host key algorithms.
+
+     -i      Specifies that sshd is being run from inetd(8).
 
      -o option
              Can be used to give options in the format used in the
@@ -138,33 +117,17 @@ DESCRIPTION
              into the utmp file.  -u0 may also be used to prevent sshd from
              making DNS requests unless the authentication mechanism or
              configuration requires it.  Authentication mechanisms that may
-             require DNS include RhostsRSAAuthentication,
-             HostbasedAuthentication, and using a from="pattern-list" option
-             in a key file.  Configuration options that require DNS include
-             using a USER@HOST pattern in AllowUsers or DenyUsers.
+             require DNS include HostbasedAuthentication and using a
+             from="pattern-list" option in a key file.  Configuration options
+             that require DNS include using a USER@HOST pattern in AllowUsers
+             or DenyUsers.
 
 AUTHENTICATION
-     The OpenSSH SSH daemon supports SSH protocols 1 and 2.  The default is to
-     use protocol 2 only, though this can be changed via the Protocol option
-     in sshd_config(5).  Protocol 2 supports DSA, ECDSA, Ed25519 and RSA keys;
-     protocol 1 only supports RSA keys.  For both protocols, each host has a
-     host-specific key, normally 2048 bits, used to identify the host.
-
-     Forward security for protocol 1 is provided through an additional server
-     key, normally 1024 bits, generated when the server starts.  This key is
-     normally regenerated every hour if it has been used, and is never stored
-     on disk.  Whenever a client connects, the daemon responds with its public
-     host and server keys.  The client compares the RSA host key against its
-     own database to verify that it has not changed.  The client then
-     generates a 256-bit random number.  It encrypts this random number using
-     both the host key and the server key, and sends the encrypted number to
-     the server.  Both sides then use this random number as a session key
-     which is used to encrypt all further communications in the session.  The
-     rest of the session is encrypted using a conventional cipher, currently
-     Blowfish or 3DES, with 3DES being used by default.  The client selects
-     the encryption algorithm to use from those offered by the server.
-
-     For protocol 2, forward security is provided through a Diffie-Hellman key
+     The OpenSSH SSH daemon supports SSH protocol 2 only.  Each host has a
+     host-specific key, used to identify the host.  Whenever a client
+     connects, the daemon responds with its public host key.  The client
+     compares the host key against its own database to verify that it has not
+     changed.  Forward security is provided through a Diffie-Hellman key
      agreement.  This key agreement results in a shared session key.  The rest
      of the session is encrypted using a symmetric cipher, currently 128-bit
      AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES.  The
@@ -268,36 +231,33 @@ SSHRC
 
 AUTHORIZED_KEYS FILE FORMAT
      AuthorizedKeysFile specifies the files containing public keys for public
-     key authentication; if none is specified, the default is
+     key authentication; if this option is not specified, the default is
      ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2.  Each line of the
      file contains one key (empty lines and lines starting with a M-bM-^@M-^X#M-bM-^@M-^Y are
-     ignored as comments).  Protocol 1 public keys consist of the following
-     space-separated fields: options, bits, exponent, modulus, comment.
-     Protocol 2 public key consist of: options, keytype, base64-encoded key,
-     comment.  The options field is optional; its presence is determined by
-     whether the line starts with a number or not (the options field never
-     starts with a number).  The bits, exponent, modulus, and comment fields
-     give the RSA key for protocol version 1; the comment field is not used
-     for anything (but may be convenient for the user to identify the key).
-     For protocol version 2 the keytype is M-bM-^@M-^\ecdsa-sha2-nistp256M-bM-^@M-^],
+     ignored as comments).  Public keys consist of the following space-
+     separated fields: options, keytype, base64-encoded key, comment.  The
+     options field is optional.  The keytype is M-bM-^@M-^\ecdsa-sha2-nistp256M-bM-^@M-^],
      M-bM-^@M-^\ecdsa-sha2-nistp384M-bM-^@M-^], M-bM-^@M-^\ecdsa-sha2-nistp521M-bM-^@M-^], M-bM-^@M-^\ssh-ed25519M-bM-^@M-^], M-bM-^@M-^\ssh-dssM-bM-^@M-^] or
-     M-bM-^@M-^\ssh-rsaM-bM-^@M-^].
+     M-bM-^@M-^\ssh-rsaM-bM-^@M-^]; the comment field is not used for anything (but may be
+     convenient for the user to identify the key).
 
-     Note that lines in this file are usually several hundred bytes long
-     (because of the size of the public key encoding) up to a limit of 8
-     kilobytes, which permits DSA keys up to 8 kilobits and RSA keys up to 16
-     kilobits.  You don't want to type them in; instead, copy the
-     identity.pub, id_dsa.pub, id_ecdsa.pub, id_ed25519.pub, or the id_rsa.pub
-     file and edit it.
+     Note that lines in this file can be several hundred bytes long (because
+     of the size of the public key encoding) up to a limit of 8 kilobytes,
+     which permits DSA keys up to 8 kilobits and RSA keys up to 16 kilobits.
+     You don't want to type them in; instead, copy the id_dsa.pub,
+     id_ecdsa.pub, id_ed25519.pub, or the id_rsa.pub file and edit it.
 
-     sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
-     2 keys of 768 bits.
+     sshd enforces a minimum RSA key modulus size of 768 bits.
 
      The options (if present) consist of comma-separated option
      specifications.  No spaces are permitted, except within double quotes.
      The following option specifications are supported (note that option
      keywords are case-insensitive):
 
+     agent-forwarding
+             Enable authentication agent forwarding previously disabled by the
+             restrict option.
+
      cert-authority
              Specifies that the listed key is a certification authority (CA)
              that is trusted to validate signed certificates for user
@@ -314,16 +274,23 @@ AUTHORIZED_KEYS FILE FORMAT
              pty; otherwise it is run without a tty.  If an 8-bit clean
              channel is required, one must not request a pty or should specify
              no-pty.  A quote may be included in the command by quoting it
-             with a backslash.  This option might be useful to restrict
-             certain public keys to perform just a specific operation.  An
-             example might be a key that permits remote backups but nothing
-             else.  Note that the client may specify TCP and/or X11 forwarding
-             unless they are explicitly prohibited.  The command originally
-             supplied by the client is available in the SSH_ORIGINAL_COMMAND
-             environment variable.  Note that this option applies to shell,
-             command or subsystem execution.  Also note that this command may
-             be superseded by either a sshd_config(5) ForceCommand directive
-             or a command embedded in a certificate.
+             with a backslash.
+
+             This option might be useful to restrict certain public keys to
+             perform just a specific operation.  An example might be a key
+             that permits remote backups but nothing else.  Note that the
+             client may specify TCP and/or X11 forwarding unless they are
+             explicitly prohibited, e.g. using the restrict key option.
+
+             The command originally supplied by the client is available in the
+             SSH_ORIGINAL_COMMAND environment variable.  Note that this option
+             applies to shell, command or subsystem execution.  Also note that
+             this command may be superseded by a sshd_config(5) ForceCommand
+             directive.
+
+             If a command is specified and a forced-command is embedded in a
+             certificate used for authentication, then the certificate will be
+             accepted only if the two commands are identical.
 
      environment="NAME=value"
              Specifies that the string is to be added to the environment when
@@ -331,7 +298,6 @@ AUTHORIZED_KEYS FILE FORMAT
              override other default environment values.  Multiple options of
              this type are permitted.  Environment processing is disabled by
              default and is controlled via the PermitUserEnvironment option.
-             This option is automatically disabled if UseLogin is enabled.
 
      from="pattern-list"
              Specifies that in addition to public key authentication, either
@@ -378,6 +344,9 @@ AUTHORIZED_KEYS FILE FORMAT
              must be literal domains or addresses.  A port specification of *
              matches any port.
 
+     port-forwarding
+             Enable port forwarding previously disabled by the restrict
+
      principals="principals"
              On a cert-authority line, specifies allowed principals for
              certificate authentication as a comma-separated list.  At least
@@ -386,11 +355,28 @@ AUTHORIZED_KEYS FILE FORMAT
              ignored for keys that are not marked as trusted certificate
              signers using the cert-authority option.
 
+     pty     Permits tty allocation previously disabled by the restrict
+             option.
+
+     restrict
+             Enable all restrictions, i.e. disable port, agent and X11
+             forwarding, as well as disabling PTY allocation and execution of
+             ~/.ssh/rc.  If any future restriction capabilities are added to
+             authorized_keys files they will be included in this set.
+
      tunnel="n"
              Force a tun(4) device on the server.  Without this option, the
              next available device will be used if the client requests a
              tunnel.
 
+     user-rc
+             Enables execution of ~/.ssh/rc previously disabled by the
+             restrict option.
+
+     X11-forwarding
+             Permits X11 forwarding previously disabled by the restrict
+             option.
+
      An example authorized_keys file:
 
         # Comments allowed at start of line
@@ -403,17 +389,21 @@ AUTHORIZED_KEYS FILE FORMAT
         AAAAB5...21S==
         tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...==
         jane@example.net
+        restrict,command="uptime" ssh-rsa AAAA1C8...32Tv==
+        user@example.net
+        restrict,pty,command="nethack" ssh-rsa AAAA1f8...IrrC5==
+        user@example.net
 
 SSH_KNOWN_HOSTS FILE FORMAT
      The /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts files contain host
      public keys for all known hosts.  The global file should be prepared by
      the administrator (optional), and the per-user file is maintained
-     automatically: whenever the user connects from an unknown host, its key
-     is added to the per-user file.
+     automatically: whenever the user connects to an unknown host, its key is
+     added to the per-user file.
 
      Each line in these files contains the following fields: markers
-     (optional), hostnames, bits, exponent, modulus, comment.  The fields are
-     separated by spaces.
+     (optional), hostnames, keytype, base64-encoded key, comment.  The fields
+     are separated by spaces.
 
      The marker is optional, but if it is present then it must be one of
      M-bM-^@M-^\@cert-authorityM-bM-^@M-^], to indicate that the line contains a certification
@@ -436,9 +426,10 @@ SSH_KNOWN_HOSTS FILE FORMAT
      appear on a single line and none of the above negation or wildcard
      operators may be applied.
 
-     Bits, exponent, and modulus are taken directly from the RSA host key;
-     they can be obtained, for example, from /etc/ssh/ssh_host_key.pub.  The
-     optional comment field continues to the end of the line, and is not used.
+     The keytype and base64-encoded key are taken directly from the host key;
+     they can be obtained, for example, from /etc/ssh/ssh_host_rsa_key.pub.
+     The optional comment field continues to the end of the line, and is not
+     used.
 
      Lines starting with M-bM-^@M-^X#M-bM-^@M-^Y and empty lines are ignored as comments.
 
@@ -465,9 +456,9 @@ SSH_KNOWN_HOSTS FILE FORMAT
 
      Note that the lines in these files are typically hundreds of characters
      long, and you definitely don't want to type in the host keys by hand.
-     Rather, generate them by a script, ssh-keyscan(1) or by taking
-     /etc/ssh/ssh_host_key.pub and adding the host names at the front.
-     ssh-keygen(1) also offers some basic automated editing for
+     Rather, generate them by a script, ssh-keyscan(1) or by taking, for
+     example, /etc/ssh/ssh_host_rsa_key.pub and adding the host names at the
+     front.  ssh-keygen(1) also offers some basic automated editing for
      ~/.ssh/known_hosts including removing hosts matching a host name and
      converting all host names to their hashed representations.
 
@@ -552,7 +543,9 @@ FILES
 
      /etc/moduli
              Contains Diffie-Hellman groups used for the "Diffie-Hellman Group
-             Exchange".  The file format is described in moduli(5).
+             Exchange" key exchange method.  The file format is described in
+             moduli(5).  If no usable groups are found in this file then fixed
+             internal groups will be used.
 
      /etc/motd
              See motd(5).
@@ -568,7 +561,6 @@ FILES
              allows host-based authentication without permitting login with
              rlogin/rsh.
 
-     /etc/ssh/ssh_host_key
      /etc/ssh/ssh_host_dsa_key
      /etc/ssh/ssh_host_ecdsa_key
      /etc/ssh/ssh_host_ed25519_key
@@ -578,7 +570,6 @@ FILES
              not accessible to others.  Note that sshd does not start if these
              files are group/world-accessible.
 
-     /etc/ssh/ssh_host_key.pub
      /etc/ssh/ssh_host_dsa_key.pub
      /etc/ssh/ssh_host_ecdsa_key.pub
      /etc/ssh/ssh_host_ed25519_key.pub
@@ -632,4 +623,4 @@ AUTHORS
      versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
      for privilege separation.
 
-OpenBSD 5.8                      July 3, 2015                      OpenBSD 5.8
+OpenBSD 6.0                    January 30, 2017                    OpenBSD 6.0
diff --git a/sshd.8 b/sshd.8
index 213b5fc..7725a69 100644 (file)
--- a/sshd.8
+++ b/sshd.8
@@ -33,8 +33,8 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: sshd.8,v 1.280 2015/07/03 03:49:45 djm Exp $
-.Dd $Mdocdate: July 3 2015 $
+.\" $OpenBSD: sshd.8,v 1.288 2017/01/30 23:27:39 dtucker Exp $
+.Dd $Mdocdate: January 30 2017 $
 .Dt SSHD 8
 .Os
 .Sh NAME
 .Nm sshd
 .Bk -words
 .Op Fl 46DdeiqTt
-.Op Fl b Ar bits
 .Op Fl C Ar connection_spec
 .Op Fl c Ar host_certificate_file
 .Op Fl E Ar log_file
 .Op Fl f Ar config_file
 .Op Fl g Ar login_grace_time
 .Op Fl h Ar host_key_file
-.Op Fl k Ar key_gen_time
 .Op Fl o Ar option
 .Op Fl p Ar port
 .Op Fl u Ar len
@@ -96,9 +94,6 @@ to use IPv4 addresses only.
 Forces
 .Nm
 to use IPv6 addresses only.
-.It Fl b Ar bits
-Specifies the number of bits in the ephemeral protocol version 1
-server key (default 1024).
 .It Fl C Ar connection_spec
 Specify the connection parameters to use for the
 .Fl T
@@ -169,36 +164,18 @@ This option must be given if
 is not run as root (as the normal
 host key files are normally not readable by anyone but root).
 The default is
-.Pa /etc/ssh/ssh_host_key
-for protocol version 1, and
 .Pa /etc/ssh/ssh_host_dsa_key ,
-.Pa /etc/ssh/ssh_host_ecdsa_key .
+.Pa /etc/ssh/ssh_host_ecdsa_key ,
 .Pa /etc/ssh/ssh_host_ed25519_key
 and
-.Pa /etc/ssh/ssh_host_rsa_key
-for protocol version 2.
+.Pa /etc/ssh/ssh_host_rsa_key .
 It is possible to have multiple host key files for
-the different protocol versions and host key algorithms.
+the different host key algorithms.
 .It Fl i
 Specifies that
 .Nm
 is being run from
 .Xr inetd 8 .
-If SSH protocol 1 is enabled,
-.Nm
-should not  normally be run
-from inetd because it needs to generate the server key before it can
-respond to the client, and this may take some time.
-Clients may have to wait too long if the key was regenerated every time.
-.It Fl k Ar key_gen_time
-Specifies how often the ephemeral protocol version 1 server key is
-regenerated (default 3600 seconds, or one hour).
-The motivation for regenerating the key fairly
-often is that the key is not stored anywhere, and after about an hour
-it becomes impossible to recover the key for decrypting intercepted
-communications even if the machine is cracked into or physically
-seized.
-A value of zero indicates that the key will never be regenerated.
 .It Fl o Ar option
 Can be used to give options in the format used in the configuration file.
 This is useful for specifying options for which there is no separate
@@ -257,8 +234,7 @@ may also be used to prevent
 from making DNS requests unless the authentication
 mechanism or configuration requires it.
 Authentication mechanisms that may require DNS include
-.Cm RhostsRSAAuthentication ,
-.Cm HostbasedAuthentication ,
+.Cm HostbasedAuthentication
 and using a
 .Cm from="pattern-list"
 option in a key file.
@@ -269,44 +245,14 @@ or
 .Cm DenyUsers .
 .El
 .Sh AUTHENTICATION
-The OpenSSH SSH daemon supports SSH protocols 1 and 2.
-The default is to use protocol 2 only,
-though this can be changed via the
-.Cm Protocol
-option in
-.Xr sshd_config 5 .
-Protocol 2 supports DSA, ECDSA, Ed25519 and RSA keys;
-protocol 1 only supports RSA keys.
-For both protocols,
-each host has a host-specific key,
-normally 2048 bits,
+The OpenSSH SSH daemon supports SSH protocol 2 only.
+Each host has a host-specific key,
 used to identify the host.
-.Pp
-Forward security for protocol 1 is provided through
-an additional server key,
-normally 1024 bits,
-generated when the server starts.
-This key is normally regenerated every hour if it has been used, and
-is never stored on disk.
 Whenever a client connects, the daemon responds with its public
-host and server keys.
+host key.
 The client compares the
-RSA host key against its own database to verify that it has not changed.
-The client then generates a 256-bit random number.
-It encrypts this
-random number using both the host key and the server key, and sends
-the encrypted number to the server.
-Both sides then use this
-random number as a session key which is used to encrypt all further
-communications in the session.
-The rest of the session is encrypted
-using a conventional cipher, currently Blowfish or 3DES, with 3DES
-being used by default.
-The client selects the encryption algorithm
-to use from those offered by the server.
-.Pp
-For protocol 2,
-forward security is provided through a Diffie-Hellman key agreement.
+host key against its own database to verify that it has not changed.
+Forward security is provided through a Diffie-Hellman key agreement.
 This key agreement results in a shared session key.
 The rest of the session is encrypted using a symmetric cipher, currently
 128-bit AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES.
@@ -470,7 +416,7 @@ does not exist either, xauth is used to add the cookie.
 .Cm AuthorizedKeysFile
 specifies the files containing public keys for
 public key authentication;
-if none is specified, the default is
+if this option is not specified, the default is
 .Pa ~/.ssh/authorized_keys
 and
 .Pa ~/.ssh/authorized_keys2 .
@@ -479,32 +425,25 @@ key (empty lines and lines starting with a
 .Ql #
 are ignored as
 comments).
-Protocol 1 public keys consist of the following space-separated fields:
-options, bits, exponent, modulus, comment.
-Protocol 2 public key consist of:
+Public keys consist of the following space-separated fields:
 options, keytype, base64-encoded key, comment.
-The options field is optional;
-its presence is determined by whether the line starts
-with a number or not (the options field never starts with a number).
-The bits, exponent, modulus, and comment fields give the RSA key for
-protocol version 1; the
-comment field is not used for anything (but may be convenient for the
-user to identify the key).
-For protocol version 2 the keytype is
+The options field is optional.
+The keytype is
 .Dq ecdsa-sha2-nistp256 ,
 .Dq ecdsa-sha2-nistp384 ,
 .Dq ecdsa-sha2-nistp521 ,
 .Dq ssh-ed25519 ,
 .Dq ssh-dss
 or
-.Dq ssh-rsa .
+.Dq ssh-rsa ;
+the comment field is not used for anything (but may be convenient for the
+user to identify the key).
 .Pp
-Note that lines in this file are usually several hundred bytes long
+Note that lines in this file can be several hundred bytes long
 (because of the size of the public key encoding) up to a limit of
 8 kilobytes, which permits DSA keys up to 8 kilobits and RSA
 keys up to 16 kilobits.
 You don't want to type them in; instead, copy the
-.Pa identity.pub ,
 .Pa id_dsa.pub ,
 .Pa id_ecdsa.pub ,
 .Pa id_ed25519.pub ,
@@ -513,8 +452,7 @@ or the
 file and edit it.
 .Pp
 .Nm
-enforces a minimum RSA key modulus size for protocol 1
-and protocol 2 keys of 768 bits.
+enforces a minimum RSA key modulus size of 768 bits.
 .Pp
 The options (if present) consist of comma-separated option
 specifications.
@@ -522,6 +460,10 @@ No spaces are permitted, except within double quotes.
 The following option specifications are supported (note
 that option keywords are case-insensitive):
 .Bl -tag -width Ds
+.It Cm agent-forwarding
+Enable authentication agent forwarding previously disabled by the
+.Cm restrict
+option.
 .It Cm cert-authority
 Specifies that the listed key is a certification authority (CA) that is
 trusted to validate signed certificates for user authentication.
@@ -539,19 +481,27 @@ If an 8-bit clean channel is required,
 one must not request a pty or should specify
 .Cm no-pty .
 A quote may be included in the command by quoting it with a backslash.
+.Pp
 This option might be useful
 to restrict certain public keys to perform just a specific operation.
 An example might be a key that permits remote backups but nothing else.
 Note that the client may specify TCP and/or X11
-forwarding unless they are explicitly prohibited.
+forwarding unless they are explicitly prohibited, e.g. using the
+.Cm restrict
+key option.
+.Pp
 The command originally supplied by the client is available in the
 .Ev SSH_ORIGINAL_COMMAND
 environment variable.
 Note that this option applies to shell, command or subsystem execution.
-Also note that this command may be superseded by either a
+Also note that this command may be superseded by a
 .Xr sshd_config 5
 .Cm ForceCommand
-directive or a command embedded in a certificate.
+directive.
+.Pp
+If a command is specified and a forced-command is embedded in a certificate
+used for authentication, then the certificate will be accepted only if the
+two commands are identical.
 .It Cm environment="NAME=value"
 Specifies that the string is to be added to the environment when
 logging in using this key.
@@ -562,9 +512,6 @@ Environment processing is disabled by default and is
 controlled via the
 .Cm PermitUserEnvironment
 option.
-This option is automatically disabled if
-.Cm UseLogin
-is enabled.
 .It Cm from="pattern-list"
 Specifies that in addition to public key authentication, either the canonical
 name of the remote host or its IP address must be present in the
@@ -616,6 +563,9 @@ they must be literal domains or addresses.
 A port specification of
 .Cm *
 matches any port.
+.It Cm port-forwarding
+Enable port forwarding previously disabled by the
+.Cm restrict
 .It Cm principals="principals"
 On a
 .Cm cert-authority
@@ -627,12 +577,33 @@ This option is ignored for keys that are not marked as trusted certificate
 signers using the
 .Cm cert-authority
 option.
+.It Cm pty
+Permits tty allocation previously disabled by the
+.Cm restrict
+option.
+.It Cm restrict
+Enable all restrictions, i.e. disable port, agent and X11 forwarding,
+as well as disabling PTY allocation
+and execution of
+.Pa ~/.ssh/rc .
+If any future restriction capabilities are added to authorized_keys files
+they will be included in this set.
 .It Cm tunnel="n"
 Force a
 .Xr tun 4
 device on the server.
 Without this option, the next available device will be used if
 the client requests a tunnel.
+.It Cm user-rc
+Enables execution of
+.Pa ~/.ssh/rc
+previously disabled by the
+.Cm restrict
+option.
+.It Cm X11-forwarding
+Permits X11 forwarding previously disabled by the
+.Cm restrict
+option.
 .El
 .Pp
 An example authorized_keys file:
@@ -647,6 +618,10 @@ permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss
 AAAAB5...21S==
 tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...==
 jane@example.net
+restrict,command="uptime" ssh-rsa AAAA1C8...32Tv==
+user@example.net
+restrict,pty,command="nethack" ssh-rsa AAAA1f8...IrrC5==
+user@example.net
 .Ed
 .Sh SSH_KNOWN_HOSTS FILE FORMAT
 The
@@ -656,11 +631,11 @@ and
 files contain host public keys for all known hosts.
 The global file should
 be prepared by the administrator (optional), and the per-user file is
-maintained automatically: whenever the user connects from an unknown host,
+maintained automatically: whenever the user connects to an unknown host,
 its key is added to the per-user file.
 .Pp
 Each line in these files contains the following fields: markers (optional),
-hostnames, bits, exponent, modulus, comment.
+hostnames, keytype, base64-encoded key, comment.
 The fields are separated by spaces.
 .Pp
 The marker is optional, but if it is present then it must be one of
@@ -701,9 +676,9 @@ character.
 Only one hashed hostname may appear on a single line and none of the above
 negation or wildcard operators may be applied.
 .Pp
-Bits, exponent, and modulus are taken directly from the RSA host key; they
+The keytype and base64-encoded key are taken directly from the host key; they
 can be obtained, for example, from
-.Pa /etc/ssh/ssh_host_key.pub .
+.Pa /etc/ssh/ssh_host_rsa_key.pub .
 The optional comment field continues to the end of the line, and is not used.
 .Pp
 Lines starting with
@@ -742,8 +717,8 @@ Note that the lines in these files are typically hundreds of characters
 long, and you definitely don't want to type in the host keys by hand.
 Rather, generate them by a script,
 .Xr ssh-keyscan 1
-or by taking
-.Pa /etc/ssh/ssh_host_key.pub
+or by taking, for example,
+.Pa /etc/ssh/ssh_host_rsa_key.pub
 and adding the host names at the front.
 .Xr ssh-keygen 1
 also offers some basic automated editing for
@@ -856,9 +831,12 @@ This file is for host-based authentication (see
 It should only be writable by root.
 .Pp
 .It Pa /etc/moduli
-Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".
+Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange"
+key exchange method.
 The file format is described in
 .Xr moduli 5 .
+If no usable groups are found in this file then fixed internal groups will
+be used.
 .Pp
 .It Pa /etc/motd
 See
@@ -879,7 +857,6 @@ This file is used in exactly the same way as
 but allows host-based authentication without permitting login with
 rlogin/rsh.
 .Pp
-.It Pa /etc/ssh/ssh_host_key
 .It Pa /etc/ssh/ssh_host_dsa_key
 .It Pa /etc/ssh/ssh_host_ecdsa_key
 .It Pa /etc/ssh/ssh_host_ed25519_key
@@ -891,7 +868,6 @@ Note that
 .Nm
 does not start if these files are group/world-accessible.
 .Pp
-.It Pa /etc/ssh/ssh_host_key.pub
 .It Pa /etc/ssh/ssh_host_dsa_key.pub
 .It Pa /etc/ssh/ssh_host_ecdsa_key.pub
 .It Pa /etc/ssh/ssh_host_ed25519_key.pub
diff --git a/sshd.c b/sshd.c
index 1745dfa..bf0d7a2 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.458 2015/08/20 22:32:42 deraadt Exp $ */
+/* $OpenBSD: sshd.c,v 1.485 2017/03/15 03:52:30 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -87,7 +87,6 @@
 
 #include "xmalloc.h"
 #include "ssh.h"
-#include "ssh1.h"
 #include "ssh2.h"
 #include "rsa.h"
 #include "sshpty.h"
 #include "dispatch.h"
 #include "channels.h"
 #include "session.h"
-#include "monitor_mm.h"
 #include "monitor.h"
 #ifdef GSSAPI
 #include "ssh-gss.h"
 #endif
 #include "monitor_wrap.h"
-#include "roaming.h"
 #include "ssh-sandbox.h"
 #include "version.h"
 #include "ssherr.h"
 
-#ifndef O_NOCTTY
-#define O_NOCTTY       0
-#endif
-
 /* Re-exec fds */
 #define REEXEC_DEVCRYPTO_RESERVED_FD   (STDERR_FILENO + 1)
 #define REEXEC_STARTUP_PIPE_FD         (STDERR_FILENO + 2)
@@ -202,22 +195,12 @@ int have_agent = 0;
  * not very useful.  Currently, memory locking is not implemented.
  */
 struct {
-       Key     *server_key;            /* ephemeral server key */
-       Key     *ssh1_host_key;         /* ssh1 host key */
        Key     **host_keys;            /* all private host keys */
        Key     **host_pubkeys;         /* all public host keys */
        Key     **host_certificates;    /* all public host certificates */
-       int     have_ssh1_key;
        int     have_ssh2_key;
-       u_char  ssh1_cookie[SSH_SESSION_KEY_LENGTH];
 } sensitive_data;
 
-/*
- * Flag indicating whether the RSA server key needs to be regenerated.
- * Is set in the SIGALRM handler and cleared when the key is regenerated.
- */
-static volatile sig_atomic_t key_do_regen = 0;
-
 /* This is set to true when a signal is received. */
 static volatile sig_atomic_t received_sighup = 0;
 static volatile sig_atomic_t received_sigterm = 0;
@@ -256,10 +239,6 @@ struct passwd *privsep_pw = NULL;
 /* Prototypes for various functions defined later in this file. */
 void destroy_sensitive_data(void);
 void demote_sensitive_data(void);
-
-#ifdef WITH_SSH1
-static void do_ssh1_kex(void);
-#endif
 static void do_ssh2_kex(void);
 
 /*
@@ -311,6 +290,8 @@ static void
 sighup_restart(void)
 {
        logit("Received SIGHUP; restarting.");
+       if (options.pid_file != NULL)
+               unlink(options.pid_file);
        platform_pre_restart();
        close_listen_socks();
        close_startup_pipes();
@@ -372,84 +353,40 @@ grace_alarm_handler(int sig)
        }
 
        /* Log error and exit. */
-       sigdie("Timeout before authentication for %s", get_remote_ipaddr());
-}
-
-/*
- * Signal handler for the key regeneration alarm.  Note that this
- * alarm only occurs in the daemon waiting for connections, and it does not
- * do anything with the private key or random state before forking.
- * Thus there should be no concurrency control/asynchronous execution
- * problems.
- */
-static void
-generate_ephemeral_server_key(void)
-{
-       verbose("Generating %s%d bit RSA key.",
-           sensitive_data.server_key ? "new " : "", options.server_key_bits);
-       if (sensitive_data.server_key != NULL)
-               key_free(sensitive_data.server_key);
-       sensitive_data.server_key = key_generate(KEY_RSA1,
-           options.server_key_bits);
-       verbose("RSA key generation complete.");
-
-       arc4random_buf(sensitive_data.ssh1_cookie, SSH_SESSION_KEY_LENGTH);
-}
-
-/*ARGSUSED*/
-static void
-key_regeneration_alarm(int sig)
-{
-       int save_errno = errno;
-
-       signal(SIGALRM, SIG_DFL);
-       errno = save_errno;
-       key_do_regen = 1;
+       sigdie("Timeout before authentication for %s port %d",
+           ssh_remote_ipaddr(active_state), ssh_remote_port(active_state));
 }
 
 static void
-sshd_exchange_identification(int sock_in, int sock_out)
+sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out)
 {
        u_int i;
-       int mismatch;
        int remote_major, remote_minor;
-       int major, minor;
-       char *s, *newline = "\n";
+       char *s;
        char buf[256];                  /* Must not be larger than remote_version. */
        char remote_version[256];       /* Must be at least as big as buf. */
 
-       if ((options.protocol & SSH_PROTO_1) &&
-           (options.protocol & SSH_PROTO_2)) {
-               major = PROTOCOL_MAJOR_1;
-               minor = 99;
-       } else if (options.protocol & SSH_PROTO_2) {
-               major = PROTOCOL_MAJOR_2;
-               minor = PROTOCOL_MINOR_2;
-               newline = "\r\n";
-       } else {
-               major = PROTOCOL_MAJOR_1;
-               minor = PROTOCOL_MINOR_1;
-       }
-
-       xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s",
-           major, minor, SSH_VERSION,
+       xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s\r\n",
+           PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
            *options.version_addendum == '\0' ? "" : " ",
-           options.version_addendum, newline);
+           options.version_addendum);
 
        /* Send our protocol version identification. */
-       if (roaming_atomicio(vwrite, sock_out, server_version_string,
+       if (atomicio(vwrite, sock_out, server_version_string,
            strlen(server_version_string))
            != strlen(server_version_string)) {
-               logit("Could not write ident string to %s", get_remote_ipaddr());
+               logit("Could not write ident string to %s port %d",
+                   ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
                cleanup_exit(255);
        }
 
        /* Read other sides version identification. */
        memset(buf, 0, sizeof(buf));
        for (i = 0; i < sizeof(buf) - 1; i++) {
-               if (roaming_atomicio(read, sock_in, &buf[i], 1) != 1) {
-                       logit("Did not receive identification string from %s",
-                           get_remote_ipaddr());
+               if (atomicio(read, sock_in, &buf[i], 1) != 1) {
+                       logit("Did not receive identification string "
+                           "from %s port %d",
+                           ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
                        cleanup_exit(255);
                }
                if (buf[i] == '\r') {
@@ -478,7 +415,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
                (void) atomicio(vwrite, sock_out, s, strlen(s));
                logit("Bad protocol version identification '%.100s' "
                    "from %s port %d", client_version_string,
-                   get_remote_ipaddr(), get_remote_port());
+                   ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));
                close(sock_in);
                close(sock_out);
                cleanup_exit(255);
@@ -486,69 +423,43 @@ sshd_exchange_identification(int sock_in, int sock_out)
        debug("Client protocol version %d.%d; client software version %.100s",
            remote_major, remote_minor, remote_version);
 
-       active_state->compat = compat_datafellows(remote_version);
+       ssh->compat = compat_datafellows(remote_version);
 
-       if ((datafellows & SSH_BUG_PROBE) != 0) {
-               logit("probed from %s with %s.  Don't panic.",
-                   get_remote_ipaddr(), client_version_string);
+       if ((ssh->compat & SSH_BUG_PROBE) != 0) {
+               logit("probed from %s port %d with %s.  Don't panic.",
+                   ssh_remote_ipaddr(ssh), ssh_remote_port(ssh),
+                   client_version_string);
                cleanup_exit(255);
        }
-       if ((datafellows & SSH_BUG_SCANNER) != 0) {
-               logit("scanned from %s with %s.  Don't panic.",
-                   get_remote_ipaddr(), client_version_string);
+       if ((ssh->compat & SSH_BUG_SCANNER) != 0) {
+               logit("scanned from %s port %d with %s.  Don't panic.",
+                   ssh_remote_ipaddr(ssh), ssh_remote_port(ssh),
+                   client_version_string);
                cleanup_exit(255);
        }
-       if ((datafellows & SSH_BUG_RSASIGMD5) != 0) {
+       if ((ssh->compat & SSH_BUG_RSASIGMD5) != 0) {
                logit("Client version \"%.100s\" uses unsafe RSA signature "
                    "scheme; disabling use of RSA keys", remote_version);
        }
-       if ((datafellows & SSH_BUG_DERIVEKEY) != 0) {
+       if ((ssh->compat & SSH_BUG_DERIVEKEY) != 0) {
                fatal("Client version \"%.100s\" uses unsafe key agreement; "
                    "refusing connection", remote_version);
        }
 
-       mismatch = 0;
-       switch (remote_major) {
-       case 1:
-               if (remote_minor == 99) {
-                       if (options.protocol & SSH_PROTO_2)
-                               enable_compat20();
-                       else
-                               mismatch = 1;
-                       break;
-               }
-               if (!(options.protocol & SSH_PROTO_1)) {
-                       mismatch = 1;
-                       break;
-               }
-               if (remote_minor < 3) {
-                       packet_disconnect("Your ssh version is too old and "
-                           "is no longer supported.  Please install a newer version.");
-               } else if (remote_minor == 3) {
-                       /* note that this disables agent-forwarding */
-                       enable_compat13();
-               }
-               break;
-       case 2:
-               if (options.protocol & SSH_PROTO_2) {
-                       enable_compat20();
-                       break;
-               }
-               /* FALLTHROUGH */
-       default:
-               mismatch = 1;
-               break;
-       }
        chop(server_version_string);
        debug("Local version string %.200s", server_version_string);
 
-       if (mismatch) {
+       if (remote_major == 2 ||
+           (remote_major == 1 && remote_minor == 99)) {
+               enable_compat20();
+       } else {
                s = "Protocol major versions differ.\n";
                (void) atomicio(vwrite, sock_out, s, strlen(s));
                close(sock_in);
                close(sock_out);
-               logit("Protocol major versions differ for %s: %.200s vs. %.200s",
-                   get_remote_ipaddr(),
+               logit("Protocol major versions differ for %s port %d: "
+                   "%.200s vs. %.200s",
+                   ssh_remote_ipaddr(ssh), ssh_remote_port(ssh),
                    server_version_string, client_version_string);
                cleanup_exit(255);
        }
@@ -560,10 +471,6 @@ destroy_sensitive_data(void)
 {
        int i;
 
-       if (sensitive_data.server_key) {
-               key_free(sensitive_data.server_key);
-               sensitive_data.server_key = NULL;
-       }
        for (i = 0; i < options.num_host_key_files; i++) {
                if (sensitive_data.host_keys[i]) {
                        key_free(sensitive_data.host_keys[i]);
@@ -574,8 +481,6 @@ destroy_sensitive_data(void)
                        sensitive_data.host_certificates[i] = NULL;
                }
        }
-       sensitive_data.ssh1_host_key = NULL;
-       explicit_bzero(sensitive_data.ssh1_cookie, SSH_SESSION_KEY_LENGTH);
 }
 
 /* Demote private to public keys for network child */
@@ -585,30 +490,40 @@ demote_sensitive_data(void)
        Key *tmp;
        int i;
 
-       if (sensitive_data.server_key) {
-               tmp = key_demote(sensitive_data.server_key);
-               key_free(sensitive_data.server_key);
-               sensitive_data.server_key = tmp;
-       }
-
        for (i = 0; i < options.num_host_key_files; i++) {
                if (sensitive_data.host_keys[i]) {
                        tmp = key_demote(sensitive_data.host_keys[i]);
                        key_free(sensitive_data.host_keys[i]);
                        sensitive_data.host_keys[i] = tmp;
-                       if (tmp->type == KEY_RSA1)
-                               sensitive_data.ssh1_host_key = tmp;
                }
                /* Certs do not need demotion */
        }
+}
 
-       /* We do not clear ssh1_host key and cookie.  XXX - Okay Niels? */
+static void
+reseed_prngs(void)
+{
+       u_int32_t rnd[256];
+
+#ifdef WITH_OPENSSL
+       RAND_poll();
+#endif
+       arc4random_stir(); /* noop on recent arc4random() implementations */
+       arc4random_buf(rnd, sizeof(rnd)); /* let arc4random notice PID change */
+
+#ifdef WITH_OPENSSL
+       RAND_seed(rnd, sizeof(rnd));
+       /* give libcrypto a chance to notice the PID change */
+       if ((RAND_bytes((u_char *)rnd, 1)) != 1)
+               fatal("%s: RAND_bytes failed", __func__);
+#endif
+
+       explicit_bzero(rnd, sizeof(rnd));
 }
 
 static void
 privsep_preauth_child(void)
 {
-       u_int32_t rnd[256];
        gid_t gidset[1];
 
        /* Enable challenge-response authentication for privilege separation */
@@ -620,37 +535,28 @@ privsep_preauth_child(void)
                ssh_gssapi_prepare_supported_oids();
 #endif
 
-       arc4random_stir();
-       arc4random_buf(rnd, sizeof(rnd));
-#ifdef WITH_OPENSSL
-       RAND_seed(rnd, sizeof(rnd));
-       if ((RAND_bytes((u_char *)rnd, 1)) != 1)
-               fatal("%s: RAND_bytes failed", __func__);
-#endif
-       explicit_bzero(rnd, sizeof(rnd));
+       reseed_prngs();
 
        /* Demote the private keys to public keys. */
        demote_sensitive_data();
 
-       /* Change our root directory */
-       if (chroot(_PATH_PRIVSEP_CHROOT_DIR) == -1)
-               fatal("chroot(\"%s\"): %s", _PATH_PRIVSEP_CHROOT_DIR,
-                   strerror(errno));
-       if (chdir("/") == -1)
-               fatal("chdir(\"/\"): %s", strerror(errno));
-
-       /* Drop our privileges */
-       debug3("privsep user:group %u:%u", (u_int)privsep_pw->pw_uid,
-           (u_int)privsep_pw->pw_gid);
-#if 0
-       /* XXX not ready, too heavy after chroot */
-       do_setusercontext(privsep_pw);
-#else
-       gidset[0] = privsep_pw->pw_gid;
-       if (setgroups(1, gidset) < 0)
-               fatal("setgroups: %.100s", strerror(errno));
-       permanently_set_uid(privsep_pw);
-#endif
+       /* Demote the child */
+       if (getuid() == 0 || geteuid() == 0) {
+               /* Change our root directory */
+               if (chroot(_PATH_PRIVSEP_CHROOT_DIR) == -1)
+                       fatal("chroot(\"%s\"): %s", _PATH_PRIVSEP_CHROOT_DIR,
+                           strerror(errno));
+               if (chdir("/") == -1)
+                       fatal("chdir(\"/\"): %s", strerror(errno));
+
+               /* Drop our privileges */
+               debug3("privsep user:group %u:%u", (u_int)privsep_pw->pw_uid,
+                   (u_int)privsep_pw->pw_gid);
+               gidset[0] = privsep_pw->pw_gid;
+               if (setgroups(1, gidset) < 0)
+                       fatal("setgroups: %.100s", strerror(errno));
+               permanently_set_uid(privsep_pw);
+       }
 }
 
 static int
@@ -686,9 +592,6 @@ privsep_preauth(Authctxt *authctxt)
                        ssh_sandbox_parent_preauth(box, pid);
                monitor_child_preauth(authctxt, pmonitor);
 
-               /* Sync memory */
-               monitor_sync(pmonitor);
-
                /* Wait for the child's exit status */
                while (waitpid(pid, &status, 0) < 0) {
                        if (errno == EINTR)
@@ -716,9 +619,7 @@ privsep_preauth(Authctxt *authctxt)
                /* Arrange for logging to be sent to the monitor */
                set_log_handler(mm_log_handler, pmonitor);
 
-               /* Demote the child */
-               if (getuid() == 0 || geteuid() == 0)
-                       privsep_preauth_child();
+               privsep_preauth_child();
                setproctitle("%s", "[net]");
                if (box != NULL)
                        ssh_sandbox_child(box);
@@ -730,12 +631,10 @@ privsep_preauth(Authctxt *authctxt)
 static void
 privsep_postauth(Authctxt *authctxt)
 {
-       u_int32_t rnd[256];
-
 #ifdef DISABLE_FD_PASSING
        if (1) {
 #else
-       if (authctxt->pw->pw_uid == 0 || options.use_login) {
+       if (authctxt->pw->pw_uid == 0) {
 #endif
                /* File descriptor passing is broken or root login */
                use_privsep = 0;
@@ -765,14 +664,7 @@ privsep_postauth(Authctxt *authctxt)
        /* Demote the private keys to public keys. */
        demote_sensitive_data();
 
-       arc4random_stir();
-       arc4random_buf(rnd, sizeof(rnd));
-#ifdef WITH_OPENSSL
-       RAND_seed(rnd, sizeof(rnd));
-       if ((RAND_bytes((u_char *)rnd, 1)) != 1)
-               fatal("%s: RAND_bytes failed", __func__);
-#endif
-       explicit_bzero(rnd, sizeof(rnd));
+       reseed_prngs();
 
        /* Drop privileges */
        do_setusercontext(authctxt->pw);
@@ -802,7 +694,7 @@ list_hostkey_types(void)
                key = sensitive_data.host_keys[i];
                if (key == NULL)
                        key = sensitive_data.host_pubkeys[i];
-               if (key == NULL || key->type == KEY_RSA1)
+               if (key == NULL)
                        continue;
                /* Check that the key is accepted in HostkeyAlgorithms */
                if (match_pattern_list(sshkey_ssh_name(key),
@@ -820,6 +712,12 @@ list_hostkey_types(void)
                                buffer_append(&b, ",", 1);
                        p = key_ssh_name(key);
                        buffer_append(&b, p, strlen(p));
+
+                       /* for RSA we also support SHA2 signatures */
+                       if (key->type == KEY_RSA) {
+                               p = ",rsa-sha2-512,rsa-sha2-256";
+                               buffer_append(&b, p, strlen(p));
+                       }
                        break;
                }
                /* If the private key has a cert peer, then list that too */
@@ -838,8 +736,8 @@ list_hostkey_types(void)
                        break;
                }
        }
-       buffer_append(&b, "\0", 1);
-       ret = xstrdup(buffer_ptr(&b));
+       if ((ret = sshbuf_dup_string(&b)) == NULL)
+               fatal("%s: sshbuf_dup_string failed", __func__);
        buffer_free(&b);
        debug("list_hostkey_types: %s", ret);
        return ret;
@@ -945,7 +843,7 @@ notify_hostkeys(struct ssh *ssh)
        for (i = nkeys = 0; i < options.num_host_key_files; i++) {
                key = get_hostkey_public_by_index(i, ssh);
                if (key == NULL || key->type == KEY_UNSPEC ||
-                   key->type == KEY_RSA1 || sshkey_is_cert(key))
+                   sshkey_is_cert(key))
                        continue;
                fp = sshkey_fingerprint(key, options.fingerprint_hash,
                    SSH_FP_DEFAULT);
@@ -1011,59 +909,40 @@ usage(void)
 #endif
        );
        fprintf(stderr,
-"usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file]\n"
+"usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]\n"
 "            [-E log_file] [-f config_file] [-g login_grace_time]\n"
-"            [-h host_key_file] [-k key_gen_time] [-o option] [-p port]\n"
-"            [-u len]\n"
+"            [-h host_key_file] [-o option] [-p port] [-u len]\n"
        );
        exit(1);
 }
 
 static void
-send_rexec_state(int fd, Buffer *conf)
+send_rexec_state(int fd, struct sshbuf *conf)
 {
-       Buffer m;
+       struct sshbuf *m;
+       int r;
 
-       debug3("%s: entering fd = %d config len %d", __func__, fd,
-           buffer_len(conf));
+       debug3("%s: entering fd = %d config len %zu", __func__, fd,
+           sshbuf_len(conf));
 
        /*
         * Protocol from reexec master to child:
         *      string  configuration
-        *      u_int   ephemeral_key_follows
-        *      bignum  e               (only if ephemeral_key_follows == 1)
-        *      bignum  n                       "
-        *      bignum  d                       "
-        *      bignum  iqmp                    "
-        *      bignum  p                       "
-        *      bignum  q                       "
         *      string rngseed          (only if OpenSSL is not self-seeded)
         */
-       buffer_init(&m);
-       buffer_put_cstring(&m, buffer_ptr(conf));
-
-#ifdef WITH_SSH1
-       if (sensitive_data.server_key != NULL &&
-           sensitive_data.server_key->type == KEY_RSA1) {
-               buffer_put_int(&m, 1);
-               buffer_put_bignum(&m, sensitive_data.server_key->rsa->e);
-               buffer_put_bignum(&m, sensitive_data.server_key->rsa->n);
-               buffer_put_bignum(&m, sensitive_data.server_key->rsa->d);
-               buffer_put_bignum(&m, sensitive_data.server_key->rsa->iqmp);
-               buffer_put_bignum(&m, sensitive_data.server_key->rsa->p);
-               buffer_put_bignum(&m, sensitive_data.server_key->rsa->q);
-       } else
-#endif
-               buffer_put_int(&m, 0);
+       if ((m = sshbuf_new()) == NULL)
+               fatal("%s: sshbuf_new failed", __func__);
+       if ((r = sshbuf_put_stringb(m, conf)) != 0)
+               fatal("%s: buffer error: %s", __func__, ssh_err(r));
 
 #if defined(WITH_OPENSSL) && !defined(OPENSSL_PRNG_ONLY)
-       rexec_send_rng_seed(&m);
+       rexec_send_rng_seed(m);
 #endif
 
-       if (ssh_msg_send(fd, 0, &m) == -1)
+       if (ssh_msg_send(fd, 0, m) == -1)
                fatal("%s: ssh_msg_send failed", __func__);
 
-       buffer_free(&m);
+       sshbuf_free(m);
 
        debug3("%s: done", __func__);
 }
@@ -1086,27 +965,9 @@ recv_rexec_state(int fd, Buffer *conf)
 
        cp = buffer_get_string(&m, &len);
        if (conf != NULL)
-               buffer_append(conf, cp, len + 1);
+               buffer_append(conf, cp, len);
        free(cp);
 
-       if (buffer_get_int(&m)) {
-#ifdef WITH_SSH1
-               if (sensitive_data.server_key != NULL)
-                       key_free(sensitive_data.server_key);
-               sensitive_data.server_key = key_new_private(KEY_RSA1);
-               buffer_get_bignum(&m, sensitive_data.server_key->rsa->e);
-               buffer_get_bignum(&m, sensitive_data.server_key->rsa->n);
-               buffer_get_bignum(&m, sensitive_data.server_key->rsa->d);
-               buffer_get_bignum(&m, sensitive_data.server_key->rsa->iqmp);
-               buffer_get_bignum(&m, sensitive_data.server_key->rsa->p);
-               buffer_get_bignum(&m, sensitive_data.server_key->rsa->q);
-               if (rsa_generate_additional_parameters(
-                   sensitive_data.server_key->rsa) != 0)
-                       fatal("%s: rsa_generate_additional_parameters "
-                           "error", __func__);
-#endif
-       }
-
 #if defined(WITH_OPENSSL) && !defined(OPENSSL_PRNG_ONLY)
        rexec_recv_rng_seed(&m);
 #endif
@@ -1185,6 +1046,11 @@ server_listen(void)
                        close(listen_sock);
                        continue;
                }
+               if (fcntl(listen_sock, F_SETFD, FD_CLOEXEC) == -1) {
+                       verbose("socket: CLOEXEC: %s", strerror(errno));
+                       close(listen_sock);
+                       continue;
+               }
                /*
                 * Set socket options.
                 * Allow local port reuse in TIME_WAIT.
@@ -1230,7 +1096,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
 {
        fd_set *fdset;
        int i, j, ret, maxfd;
-       int key_used = 0, startups = 0;
+       int startups = 0;
        int startup_p[2] = { -1 , -1 };
        struct sockaddr_storage from;
        socklen_t fromlen;
@@ -1255,8 +1121,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
        for (;;) {
                if (received_sighup)
                        sighup_restart();
-               if (fdset != NULL)
-                       free(fdset);
+               free(fdset);
                fdset = xcalloc(howmany(maxfd + 1, NFDBITS),
                    sizeof(fd_mask));
 
@@ -1278,11 +1143,6 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
                                unlink(options.pid_file);
                        exit(received_sigterm == SIGTERM ? 0 : 255);
                }
-               if (key_used && key_do_regen) {
-                       generate_ephemeral_server_key();
-                       key_used = 0;
-                       key_do_regen = 0;
-               }
                if (ret < 0)
                        continue;
 
@@ -1319,7 +1179,15 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
                                continue;
                        }
                        if (drop_connection(startups) == 1) {
-                               debug("drop connection #%d", startups);
+                               char *laddr = get_local_ipaddr(*newsock);
+                               char *raddr = get_peer_ipaddr(*newsock);
+
+                               verbose("drop connection #%d from [%s]:%d "
+                                   "on [%s]:%d past MaxStartups", startups,
+                                   raddr, get_peer_port(*newsock),
+                                   laddr, get_local_port(*newsock));
+                               free(laddr);
+                               free(raddr);
                                close(*newsock);
                                continue;
                        }
@@ -1417,19 +1285,6 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
                                close(config_s[0]);
                                close(config_s[1]);
                        }
-
-                       /*
-                        * Mark that the key has been used (it
-                        * was "given" to the child).
-                        */
-                       if ((options.protocol & SSH_PROTO_1) &&
-                           key_used == 0) {
-                               /* Schedule server key regeneration alarm. */
-                               signal(SIGALRM, key_regeneration_alarm);
-                               alarm(options.key_regeneration_time);
-                               key_used = 1;
-                       }
-
                        close(*newsock);
 
                        /*
@@ -1452,6 +1307,47 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
        }
 }
 
+/*
+ * If IP options are supported, make sure there are none (log and
+ * return an error if any are found).  Basically we are worried about
+ * source routing; it can be used to pretend you are somebody
+ * (ip-address) you are not. That itself may be "almost acceptable"
+ * under certain circumstances, but rhosts autentication is useless
+ * if source routing is accepted. Notice also that if we just dropped
+ * source routing here, the other side could use IP spoofing to do
+ * rest of the interaction and could still bypass security.  So we
+ * exit here if we detect any IP options.
+ */
+static void
+check_ip_options(struct ssh *ssh)
+{
+#ifdef IP_OPTIONS
+       int sock_in = ssh_packet_get_connection_in(ssh);
+       struct sockaddr_storage from;
+       u_char opts[200];
+       socklen_t i, option_size = sizeof(opts), fromlen = sizeof(from);
+       char text[sizeof(opts) * 3 + 1];
+
+       memset(&from, 0, sizeof(from));
+       if (getpeername(sock_in, (struct sockaddr *)&from,
+           &fromlen) < 0)
+               return;
+       if (from.ss_family != AF_INET)
+               return;
+       /* XXX IPv6 options? */
+
+       if (getsockopt(sock_in, IPPROTO_IP, IP_OPTIONS, opts,
+           &option_size) >= 0 && option_size != 0) {
+               text[0] = '\0';
+               for (i = 0; i < option_size; i++)
+                       snprintf(text + i*3, sizeof(text) - i*3,
+                           " %2.2x", opts[i]);
+               fatal("Connection from %.100s port %d with IP opts: %.800s",
+                   ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), text);
+       }
+       return;
+#endif /* IP_OPTIONS */
+}
 
 /*
  * Main program for the daemon.
@@ -1459,9 +1355,10 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
 int
 main(int ac, char **av)
 {
+       struct ssh *ssh = NULL;
        extern char *optarg;
        extern int optind;
-       int r, opt, i, j, on = 1;
+       int r, opt, i, j, on = 1, already_daemon;
        int sock_in = -1, sock_out = -1, newsock = -1;
        const char *remote_ip;
        int remote_port;
@@ -1476,6 +1373,8 @@ main(int ac, char **av)
        Authctxt *authctxt;
        struct connection_info *connection_info = get_connection_info(0, 0);
 
+       ssh_malloc_init();      /* must be called before any mallocs */
+
 #ifdef HAVE_SECUREWARE
        (void)set_auth_parameters(ac, av);
 #endif
@@ -1536,7 +1435,7 @@ main(int ac, char **av)
                        no_daemon_flag = 1;
                        break;
                case 'E':
-                       logfile = xstrdup(optarg);
+                       logfile = optarg;
                        /* FALLTHROUGH */
                case 'e':
                        log_stderr = 1;
@@ -1558,8 +1457,7 @@ main(int ac, char **av)
                        options.log_level = SYSLOG_LEVEL_QUIET;
                        break;
                case 'b':
-                       options.server_key_bits = (int)strtonum(optarg, 256,
-                           32768, NULL);
+                       /* protocol 1, ignored */
                        break;
                case 'p':
                        options.ports_from_cmdline = 1;
@@ -1580,10 +1478,7 @@ main(int ac, char **av)
                        }
                        break;
                case 'k':
-                       if ((options.key_regeneration_time = convtime(optarg)) == -1) {
-                               fprintf(stderr, "Invalid key regeneration interval.\n");
-                               exit(1);
-                       }
+                       /* protocol 1, ignored */
                        break;
                case 'h':
                        if (options.num_host_key_files >= MAX_HOSTKEYS) {
@@ -1638,10 +1533,8 @@ main(int ac, char **av)
 #endif
 
        /* If requested, redirect the logs to the specified logfile. */
-       if (logfile != NULL) {
+       if (logfile != NULL)
                log_redirect_stderr_to(logfile);
-               free(logfile);
-       }
        /*
         * Force logging to stderr until we have loaded the private host
         * key (unless started from inetd)
@@ -1667,9 +1560,6 @@ main(int ac, char **av)
        drop_cray_privs();
 #endif
 
-       sensitive_data.server_key = NULL;
-       sensitive_data.ssh1_host_key = NULL;
-       sensitive_data.have_ssh1_key = 0;
        sensitive_data.have_ssh2_key = 0;
 
        /*
@@ -1722,9 +1612,6 @@ main(int ac, char **av)
         * and warns for trivial misconfigurations that could break login.
         */
        if (options.num_auth_methods != 0) {
-               if ((options.protocol & SSH_PROTO_1))
-                       fatal("AuthenticationMethods is not supported with "
-                           "SSH protocol 1");
                for (n = 0; n < options.num_auth_methods; n++) {
                        if (auth2_methods_valid(options.auth_methods[n],
                            1) == 0)
@@ -1758,14 +1645,17 @@ main(int ac, char **av)
                        fatal("Privilege separation user %s does not exist",
                            SSH_PRIVSEP_USER);
        } else {
-               if (privsep_pw->pw_passwd != NULL) {
-                       explicit_bzero(privsep_pw->pw_passwd,
-                           strlen(privsep_pw->pw_passwd));
-               }
+#if defined(ANDROID)
+/* Android does not do passwords and passes NULL for them. This breaks strlen */
+          if (privsep_pw->pw_passwd) {
+#endif
+               explicit_bzero(privsep_pw->pw_passwd,
+                   strlen(privsep_pw->pw_passwd));
                privsep_pw = pwcopy(privsep_pw);
-               if (privsep_pw->pw_passwd != NULL) {
-                       free(privsep_pw->pw_passwd);
-               }
+               free(privsep_pw->pw_passwd);
+#if defined(ANDROID)
+          }
+#endif
                privsep_pw->pw_passwd = xstrdup("*");
        }
 #if !defined(ANDROID)
@@ -1794,13 +1684,21 @@ main(int ac, char **av)
                        continue;
                key = key_load_private(options.host_key_files[i], "", NULL);
                pubkey = key_load_public(options.host_key_files[i], NULL);
+
+               if ((pubkey != NULL && pubkey->type == KEY_RSA1) ||
+                   (key != NULL && key->type == KEY_RSA1)) {
+                       verbose("Ignoring RSA1 key %s",
+                           options.host_key_files[i]);
+                       key_free(key);
+                       key_free(pubkey);
+                       continue;
+               }
                if (pubkey == NULL && key != NULL)
                        pubkey = key_demote(key);
                sensitive_data.host_keys[i] = key;
                sensitive_data.host_pubkeys[i] = pubkey;
 
-               if (key == NULL && pubkey != NULL && pubkey->type != KEY_RSA1 &&
-                   have_agent) {
+               if (key == NULL && pubkey != NULL && have_agent) {
                        debug("will rely on agent for hostkey %s",
                            options.host_key_files[i]);
                        keytype = pubkey->type;
@@ -1815,10 +1713,6 @@ main(int ac, char **av)
                }
 
                switch (keytype) {
-               case KEY_RSA1:
-                       sensitive_data.ssh1_host_key = key;
-                       sensitive_data.have_ssh1_key = 1;
-                       break;
                case KEY_RSA:
                case KEY_DSA:
                case KEY_ECDSA:
@@ -1831,19 +1725,10 @@ main(int ac, char **av)
                    SSH_FP_DEFAULT)) == NULL)
                        fatal("sshkey_fingerprint failed");
                debug("%s host key #%d: %s %s",
-                   key ? "private" : "agent", i, keytype == KEY_RSA1 ?
-                   sshkey_type(pubkey) : sshkey_ssh_name(pubkey), fp);
+                   key ? "private" : "agent", i, sshkey_ssh_name(pubkey), fp);
                free(fp);
        }
-       if ((options.protocol & SSH_PROTO_1) && !sensitive_data.have_ssh1_key) {
-               logit("Disabling protocol version 1. Could not load host key");
-               options.protocol &= ~SSH_PROTO_1;
-       }
-       if ((options.protocol & SSH_PROTO_2) && !sensitive_data.have_ssh2_key) {
-               logit("Disabling protocol version 2. Could not load host key");
-               options.protocol &= ~SSH_PROTO_2;
-       }
-       if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) {
+       if (!sensitive_data.have_ssh2_key) {
                logit("sshd: no hostkeys available -- exiting.");
                exit(1);
        }
@@ -1891,33 +1776,6 @@ main(int ac, char **av)
                    key_type(key));
        }
 
-#ifdef WITH_SSH1
-       /* Check certain values for sanity. */
-       if (options.protocol & SSH_PROTO_1) {
-               if (options.server_key_bits < SSH_RSA_MINIMUM_MODULUS_SIZE ||
-                   options.server_key_bits > OPENSSL_RSA_MAX_MODULUS_BITS) {
-                       fprintf(stderr, "Bad server key size.\n");
-                       exit(1);
-               }
-               /*
-                * Check that server and host key lengths differ sufficiently. This
-                * is necessary to make double encryption work with rsaref. Oh, I
-                * hate software patents. I dont know if this can go? Niels
-                */
-               if (options.server_key_bits >
-                   BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) -
-                   SSH_KEY_BITS_RESERVED && options.server_key_bits <
-                   BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) +
-                   SSH_KEY_BITS_RESERVED) {
-                       options.server_key_bits =
-                           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) +
-                           SSH_KEY_BITS_RESERVED;
-                       debug("Forcing server key to %d bits to make it differ from host key.",
-                           options.server_key_bits);
-               }
-       }
-#endif
-
        if (use_privsep) {
                struct stat st;
 
@@ -1977,25 +1835,17 @@ main(int ac, char **av)
        log_init(__progname, options.log_level, options.log_facility, log_stderr);
 
        /*
-        * If not in debugging mode, and not started from inetd, disconnect
-        * from the controlling terminal, and fork.  The original process
-        * exits.
+        * If not in debugging mode, not started from inetd and not already
+        * daemonized (eg re-exec via SIGHUP), disconnect from the controlling
+        * terminal, and fork.  The original process exits.
         */
-       if (!(debug_flag || inetd_flag || no_daemon_flag)) {
-#ifdef TIOCNOTTY
-               int fd;
-#endif /* TIOCNOTTY */
+       already_daemon = daemonized();
+       if (!(debug_flag || inetd_flag || no_daemon_flag || already_daemon)) {
+
                if (daemon(0, 0) < 0)
                        fatal("daemon() failed: %.200s", strerror(errno));
 
-               /* Disconnect from the controlling tty. */
-#ifdef TIOCNOTTY
-               fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
-               if (fd >= 0) {
-                       (void) ioctl(fd, TIOCNOTTY, NULL);
-                       close(fd);
-               }
-#endif /* TIOCNOTTY */
+               disconnect_controlling_tty();
        }
        /* Reinitialize the log (because of the fork above). */
        log_init(__progname, options.log_level, options.log_facility, log_stderr);
@@ -2015,9 +1865,6 @@ main(int ac, char **av)
                platform_pre_listen();
                server_listen();
 
-               if (options.protocol & SSH_PROTO_1)
-                       generate_ephemeral_server_key();
-
                signal(SIGHUP, sighup_handler);
                signal(SIGCHLD, main_sigchld_handler);
                signal(SIGTERM, sigterm_handler);
@@ -2124,28 +1971,25 @@ main(int ac, char **av)
         */
        packet_set_connection(sock_in, sock_out);
        packet_set_server();
+       ssh = active_state; /* XXX */
+       check_ip_options(ssh);
 
        /* Set SO_KEEPALIVE if requested. */
        if (options.tcp_keep_alive && packet_connection_is_on_socket() &&
            setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0)
                error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
 
-       if ((remote_port = get_remote_port()) < 0) {
-               debug("get_remote_port failed");
+       if ((remote_port = ssh_remote_port(ssh)) < 0) {
+               debug("ssh_remote_port failed");
                cleanup_exit(255);
        }
 
        /*
-        * We use get_canonical_hostname with usedns = 0 instead of
-        * get_remote_ipaddr here so IP options will be checked.
-        */
-       (void) get_canonical_hostname(0);
-       /*
         * The rest of the code depends on the fact that
-        * get_remote_ipaddr() caches the remote ip, even if
+        * ssh_remote_ipaddr() caches the remote ip, even if
         * the socket goes away.
         */
-       remote_ip = get_remote_ipaddr();
+       remote_ip = ssh_remote_ipaddr(ssh);
 
 #ifdef SSH_AUDIT_EVENTS
        audit_connection_from(remote_ip, remote_port);
@@ -2154,7 +1998,7 @@ main(int ac, char **av)
        /* Log the connection. */
        laddr = get_local_ipaddr(sock_in);
        verbose("Connection from %s port %d on %s port %d",
-           remote_ip, remote_port, laddr,  get_local_port());
+           remote_ip, remote_port, laddr,  ssh_local_port(ssh));
        free(laddr);
 
        /*
@@ -2169,12 +2013,7 @@ main(int ac, char **av)
        if (!debug_flag)
                alarm(options.login_grace_time);
 
-       sshd_exchange_identification(sock_in, sock_out);
-
-       /* In inetd mode, generate ephemeral key only for proto 1 connections */
-       if (!compat20 && inetd_flag && sensitive_data.server_key == NULL)
-               generate_ephemeral_server_key();
-
+       sshd_exchange_identification(ssh, sock_in, sock_out);
        packet_set_nonblocking();
 
        /* allocate authentication context */
@@ -2192,7 +2031,7 @@ main(int ac, char **av)
        if (use_privsep) {
                if (privsep_preauth(authctxt) == 1)
                        goto authenticated;
-       } else if (compat20 && have_agent) {
+       } else if (have_agent) {
                if ((r = ssh_get_authentication_socket(&auth_sock)) != 0) {
                        error("Unable to get agent socket: %s", ssh_err(r));
                        have_agent = 0;
@@ -2201,17 +2040,9 @@ main(int ac, char **av)
 
        /* perform the key exchange */
        /* authenticate user and start session */
-       if (compat20) {
-               do_ssh2_kex();
-               do_authentication2(authctxt);
-       } else {
-#ifdef WITH_SSH1
-               do_ssh1_kex();
-               do_authentication(authctxt);
-#else
-               fatal("ssh1 not supported");
-#endif
-       }
+       do_ssh2_kex();
+       do_authentication2(authctxt);
+
        /*
         * If we use privilege separation, the unprivileged child transfers
         * the current keystate and exits
@@ -2259,16 +2090,13 @@ main(int ac, char **av)
        if (use_privsep) {
                privsep_postauth(authctxt);
                /* the monitor process [priv] will not return */
-               if (!compat20)
-                       destroy_sensitive_data();
        }
 
        packet_set_timeout(options.client_alive_interval,
            options.client_alive_count_max);
 
        /* Try to send all our hostkeys to the client */
-       if (compat20)
-               notify_hostkeys(active_state);
+       notify_hostkeys(active_state);
 
        /* Start session. */
        do_authenticated(authctxt);
@@ -2297,246 +2125,28 @@ main(int ac, char **av)
        exit(0);
 }
 
-#ifdef WITH_SSH1
-/*
- * Decrypt session_key_int using our private server key and private host key
- * (key with larger modulus first).
- */
-int
-ssh1_session_key(BIGNUM *session_key_int)
-{
-       int rsafail = 0;
-
-       if (BN_cmp(sensitive_data.server_key->rsa->n,
-           sensitive_data.ssh1_host_key->rsa->n) > 0) {
-               /* Server key has bigger modulus. */
-               if (BN_num_bits(sensitive_data.server_key->rsa->n) <
-                   BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) +
-                   SSH_KEY_BITS_RESERVED) {
-                       fatal("do_connection: %s: "
-                           "server_key %d < host_key %d + SSH_KEY_BITS_RESERVED %d",
-                           get_remote_ipaddr(),
-                           BN_num_bits(sensitive_data.server_key->rsa->n),
-                           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
-                           SSH_KEY_BITS_RESERVED);
-               }
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.server_key->rsa) != 0)
-                       rsafail++;
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.ssh1_host_key->rsa) != 0)
-                       rsafail++;
-       } else {
-               /* Host key has bigger modulus (or they are equal). */
-               if (BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) <
-                   BN_num_bits(sensitive_data.server_key->rsa->n) +
-                   SSH_KEY_BITS_RESERVED) {
-                       fatal("do_connection: %s: "
-                           "host_key %d < server_key %d + SSH_KEY_BITS_RESERVED %d",
-                           get_remote_ipaddr(),
-                           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
-                           BN_num_bits(sensitive_data.server_key->rsa->n),
-                           SSH_KEY_BITS_RESERVED);
-               }
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.ssh1_host_key->rsa) != 0)
-                       rsafail++;
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.server_key->rsa) != 0)
-                       rsafail++;
-       }
-       return (rsafail);
-}
-
-/*
- * SSH1 key exchange
- */
-static void
-do_ssh1_kex(void)
-{
-       int i, len;
-       int rsafail = 0;
-       BIGNUM *session_key_int, *fake_key_int, *real_key_int;
-       u_char session_key[SSH_SESSION_KEY_LENGTH];
-       u_char fake_key_bytes[4096 / 8];
-       size_t fake_key_len;
-       u_char cookie[8];
-       u_int cipher_type, auth_mask, protocol_flags;
-
-       /*
-        * Generate check bytes that the client must send back in the user
-        * packet in order for it to be accepted; this is used to defy ip
-        * spoofing attacks.  Note that this only works against somebody
-        * doing IP spoofing from a remote machine; any machine on the local
-        * network can still see outgoing packets and catch the random
-        * cookie.  This only affects rhosts authentication, and this is one
-        * of the reasons why it is inherently insecure.
-        */
-       arc4random_buf(cookie, sizeof(cookie));
-
-       /*
-        * Send our public key.  We include in the packet 64 bits of random
-        * data that must be matched in the reply in order to prevent IP
-        * spoofing.
-        */
-       packet_start(SSH_SMSG_PUBLIC_KEY);
-       for (i = 0; i < 8; i++)
-               packet_put_char(cookie[i]);
-
-       /* Store our public server RSA key. */
-       packet_put_int(BN_num_bits(sensitive_data.server_key->rsa->n));
-       packet_put_bignum(sensitive_data.server_key->rsa->e);
-       packet_put_bignum(sensitive_data.server_key->rsa->n);
-
-       /* Store our public host RSA key. */
-       packet_put_int(BN_num_bits(sensitive_data.ssh1_host_key->rsa->n));
-       packet_put_bignum(sensitive_data.ssh1_host_key->rsa->e);
-       packet_put_bignum(sensitive_data.ssh1_host_key->rsa->n);
-
-       /* Put protocol flags. */
-       packet_put_int(SSH_PROTOFLAG_HOST_IN_FWD_OPEN);
-
-       /* Declare which ciphers we support. */
-       packet_put_int(cipher_mask_ssh1(0));
-
-       /* Declare supported authentication types. */
-       auth_mask = 0;
-       if (options.rhosts_rsa_authentication)
-               auth_mask |= 1 << SSH_AUTH_RHOSTS_RSA;
-       if (options.rsa_authentication)
-               auth_mask |= 1 << SSH_AUTH_RSA;
-       if (options.challenge_response_authentication == 1)
-               auth_mask |= 1 << SSH_AUTH_TIS;
-       if (options.password_authentication)
-               auth_mask |= 1 << SSH_AUTH_PASSWORD;
-       packet_put_int(auth_mask);
-
-       /* Send the packet and wait for it to be sent. */
-       packet_send();
-       packet_write_wait();
-
-       debug("Sent %d bit server key and %d bit host key.",
-           BN_num_bits(sensitive_data.server_key->rsa->n),
-           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n));
-
-       /* Read clients reply (cipher type and session key). */
-       packet_read_expect(SSH_CMSG_SESSION_KEY);
-
-       /* Get cipher type and check whether we accept this. */
-       cipher_type = packet_get_char();
-
-       if (!(cipher_mask_ssh1(0) & (1 << cipher_type)))
-               packet_disconnect("Warning: client selects unsupported cipher.");
-
-       /* Get check bytes from the packet.  These must match those we
-          sent earlier with the public key packet. */
-       for (i = 0; i < 8; i++)
-               if (cookie[i] != packet_get_char())
-                       packet_disconnect("IP Spoofing check bytes do not match.");
-
-       debug("Encryption type: %.200s", cipher_name(cipher_type));
-
-       /* Get the encrypted integer. */
-       if ((real_key_int = BN_new()) == NULL)
-               fatal("do_ssh1_kex: BN_new failed");
-       packet_get_bignum(real_key_int);
-
-       protocol_flags = packet_get_int();
-       packet_set_protocol_flags(protocol_flags);
-       packet_check_eom();
-
-       /* Setup a fake key in case RSA decryption fails */
-       if ((fake_key_int = BN_new()) == NULL)
-               fatal("do_ssh1_kex: BN_new failed");
-       fake_key_len = BN_num_bytes(real_key_int);
-       if (fake_key_len > sizeof(fake_key_bytes))
-               fake_key_len = sizeof(fake_key_bytes);
-       arc4random_buf(fake_key_bytes, fake_key_len);
-       if (BN_bin2bn(fake_key_bytes, fake_key_len, fake_key_int) == NULL)
-               fatal("do_ssh1_kex: BN_bin2bn failed");
-
-       /* Decrypt real_key_int using host/server keys */
-       rsafail = PRIVSEP(ssh1_session_key(real_key_int));
-       /* If decryption failed, use the fake key. Else, the real key. */
-       if (rsafail)
-               session_key_int = fake_key_int;
-       else
-               session_key_int = real_key_int;
-
-       /*
-        * Extract session key from the decrypted integer.  The key is in the
-        * least significant 256 bits of the integer; the first byte of the
-        * key is in the highest bits.
-        */
-       (void) BN_mask_bits(session_key_int, sizeof(session_key) * 8);
-       len = BN_num_bytes(session_key_int);
-       if (len < 0 || (u_int)len > sizeof(session_key)) {
-               error("do_ssh1_kex: bad session key len from %s: "
-                   "session_key_int %d > sizeof(session_key) %lu",
-                   get_remote_ipaddr(), len, (u_long)sizeof(session_key));
-               rsafail++;
-       } else {
-               explicit_bzero(session_key, sizeof(session_key));
-               BN_bn2bin(session_key_int,
-                   session_key + sizeof(session_key) - len);
-
-               derive_ssh1_session_id(
-                   sensitive_data.ssh1_host_key->rsa->n,
-                   sensitive_data.server_key->rsa->n,
-                   cookie, session_id);
-               /*
-                * Xor the first 16 bytes of the session key with the
-                * session id.
-                */
-               for (i = 0; i < 16; i++)
-                       session_key[i] ^= session_id[i];
-       }
-
-       /* Destroy the private and public keys. No longer. */
-       destroy_sensitive_data();
-
-       if (use_privsep)
-               mm_ssh1_session_id(session_id);
-
-       /* Destroy the decrypted integer.  It is no longer needed. */
-       BN_clear_free(real_key_int);
-       BN_clear_free(fake_key_int);
-
-       /* Set the session key.  From this on all communications will be encrypted. */
-       packet_set_encryption_key(session_key, SSH_SESSION_KEY_LENGTH, cipher_type);
-
-       /* Destroy our copy of the session key.  It is no longer needed. */
-       explicit_bzero(session_key, sizeof(session_key));
-
-       debug("Received session key; encryption turned on.");
-
-       /* Send an acknowledgment packet.  Note that this packet is sent encrypted. */
-       packet_start(SSH_SMSG_SUCCESS);
-       packet_send();
-       packet_write_wait();
-}
-#endif
-
 int
 sshd_hostkey_sign(Key *privkey, Key *pubkey, u_char **signature, size_t *slen,
-    const u_char *data, size_t dlen, u_int flag)
+    const u_char *data, size_t dlen, const char *alg, u_int flag)
 {
        int r;
        u_int xxx_slen, xxx_dlen = dlen;
 
        if (privkey) {
-               if (PRIVSEP(key_sign(privkey, signature, &xxx_slen, data, xxx_dlen) < 0))
+               if (PRIVSEP(key_sign(privkey, signature, &xxx_slen, data, xxx_dlen,
+                   alg) < 0))
                        fatal("%s: key_sign failed", __func__);
                if (slen)
                        *slen = xxx_slen;
        } else if (use_privsep) {
-               if (mm_key_sign(pubkey, signature, &xxx_slen, data, xxx_dlen) < 0)
+               if (mm_key_sign(pubkey, signature, &xxx_slen, data, xxx_dlen,
+                   alg) < 0)
                        fatal("%s: pubkey_sign failed", __func__);
                if (slen)
                        *slen = xxx_slen;
        } else {
                if ((r = ssh_agent_sign(auth_sock, pubkey, signature, slen,
-                   data, dlen, datafellows)) != 0)
+                   data, dlen, alg, datafellows)) != 0)
                        fatal("%s: ssh_agent_sign failed: %s",
                            __func__, ssh_err(r));
        }
@@ -2562,15 +2172,12 @@ do_ssh2_kex(void)
 
        if (options.compression == COMP_NONE) {
                myproposal[PROPOSAL_COMP_ALGS_CTOS] =
-               myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
-       } else if (options.compression == COMP_DELAYED) {
-               myproposal[PROPOSAL_COMP_ALGS_CTOS] =
-               myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com";
+                   myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
        }
 
        if (options.rekey_limit || options.rekey_interval)
-               packet_set_rekey_limits((u_int32_t)options.rekey_limit,
-                   (time_t)options.rekey_interval);
+               packet_set_rekey_limits(options.rekey_limit,
+                   options.rekey_interval);
 
        myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = compat_pkalg_proposal(
            list_hostkey_types());
@@ -2582,6 +2189,9 @@ do_ssh2_kex(void)
 #ifdef WITH_OPENSSL
        kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
        kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
+       kex->kex[KEX_DH_GRP14_SHA256] = kexdh_server;
+       kex->kex[KEX_DH_GRP16_SHA512] = kexdh_server;
+       kex->kex[KEX_DH_GRP18_SHA512] = kexdh_server;
        kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
        kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
 # ifdef OPENSSL_HAS_ECC
index 4d77f05..4eb2e02 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: sshd_config,v 1.97 2015/08/06 14:53:21 deraadt Exp $
+#      $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
 
 # This is the sshd server system-wide configuration file.  See
 # sshd_config(5) for more information.
 #ListenAddress 0.0.0.0
 #ListenAddress ::
 
-# The default requires explicit activation of protocol 1
-#Protocol 2
-
-# HostKey for protocol version 1
-#HostKey /etc/ssh/ssh_host_key
-# HostKeys for protocol version 2
 #HostKey /etc/ssh/ssh_host_rsa_key
 #HostKey /etc/ssh/ssh_host_dsa_key
 #HostKey /etc/ssh/ssh_host_ecdsa_key
 #HostKey /etc/ssh/ssh_host_ed25519_key
 
-# Lifetime and size of ephemeral version 1 server key
-#KeyRegenerationInterval 1h
-#ServerKeyBits 1024
-
 # Ciphers and keying
 #RekeyLimit default none
 
 # Logging
-# obsoletes QuietMode and FascistLogging
 #SyslogFacility AUTH
 #LogLevel INFO
 
@@ -46,7 +35,6 @@
 #MaxAuthTries 6
 #MaxSessions 10
 
-#RSAAuthentication yes
 #PubkeyAuthentication yes
 
 # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
@@ -59,11 +47,9 @@ AuthorizedKeysFile   .ssh/authorized_keys
 #AuthorizedKeysCommandUser nobody
 
 # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
-#RhostsRSAAuthentication no
-# similar for protocol version 2
 #HostbasedAuthentication no
 # Change to yes if you don't trust ~/.ssh/known_hosts for
-# RhostsRSAAuthentication and HostbasedAuthentication
+# HostbasedAuthentication
 #IgnoreUserKnownHosts no
 # Don't read the user's ~/.rhosts and ~/.shosts files
 #IgnoreRhosts yes
@@ -107,7 +93,6 @@ AuthorizedKeysFile   .ssh/authorized_keys
 #PrintLastLog yes
 #TCPKeepAlive yes
 #UseLogin no
-UsePrivilegeSeparation sandbox         # Default for new installations.
 #PermitUserEnvironment no
 #Compression delayed
 #ClientAliveInterval 0
index aae7fb6..b0160aa 100644 (file)
@@ -19,26 +19,25 @@ DESCRIPTION
      AcceptEnv
              Specifies what environment variables sent by the client will be
              copied into the session's environ(7).  See SendEnv in
-             ssh_config(5) for how to configure the client.  Note that
-             environment passing is only supported for protocol 2, and that
-             the TERM environment variable is always sent whenever the client
-             requests a pseudo-terminal as it is required by the protocol.
-             Variables are specified by name, which may contain the wildcard
-             characters M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y.  Multiple environment variables may be
-             separated by whitespace or spread across multiple AcceptEnv
-             directives.  Be warned that some environment variables could be
-             used to bypass restricted user environments.  For this reason,
-             care should be taken in the use of this directive.  The default
-             is not to accept any environment variables.
+             ssh_config(5) for how to configure the client.  The TERM
+             environment variable is always sent whenever the client requests
+             a pseudo-terminal as it is required by the protocol.  Variables
+             are specified by name, which may contain the wildcard characters
+             M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y.  Multiple environment variables may be separated by
+             whitespace or spread across multiple AcceptEnv directives.  Be
+             warned that some environment variables could be used to bypass
+             restricted user environments.  For this reason, care should be
+             taken in the use of this directive.  The default is not to accept
+             any environment variables.
 
      AddressFamily
              Specifies which address family should be used by sshd(8).  Valid
-             arguments are M-bM-^@M-^\anyM-bM-^@M-^], M-bM-^@M-^\inetM-bM-^@M-^] (use IPv4 only), or M-bM-^@M-^\inet6M-bM-^@M-^] (use IPv6
-             only).  The default is M-bM-^@M-^\anyM-bM-^@M-^].
+             arguments are any (the default), inet (use IPv4 only), or inet6
+             (use IPv6 only).
 
      AllowAgentForwarding
              Specifies whether ssh-agent(1) forwarding is permitted.  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].  Note that disabling agent forwarding does not
+             default is yes.  Note that disabling agent forwarding does not
              improve security unless users are also denied shell access, as
              they can always install their own forwarders.
 
@@ -54,25 +53,24 @@ DESCRIPTION
 
              See PATTERNS in ssh_config(5) for more information on patterns.
 
-     AllowTcpForwarding
-             Specifies whether TCP forwarding is permitted.  The available
-             options are M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\allM-bM-^@M-^] to allow TCP forwarding, M-bM-^@M-^\noM-bM-^@M-^] to
-             prevent all TCP forwarding, M-bM-^@M-^\localM-bM-^@M-^] to allow local (from the
-             perspective of ssh(1)) forwarding only or M-bM-^@M-^\remoteM-bM-^@M-^] to allow
-             remote forwarding only.  The default is M-bM-^@M-^\yesM-bM-^@M-^].  Note that
-             disabling TCP forwarding does not improve security unless users
-             are also denied shell access, as they can always install their
-             own forwarders.
-
      AllowStreamLocalForwarding
              Specifies whether StreamLocal (Unix-domain socket) forwarding is
-             permitted.  The available options are M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\allM-bM-^@M-^] to allow
-             StreamLocal forwarding, M-bM-^@M-^\noM-bM-^@M-^] to prevent all StreamLocal
-             forwarding, M-bM-^@M-^\localM-bM-^@M-^] to allow local (from the perspective of
-             ssh(1)) forwarding only or M-bM-^@M-^\remoteM-bM-^@M-^] to allow remote forwarding
-             only.  The default is M-bM-^@M-^\yesM-bM-^@M-^].  Note that disabling StreamLocal
-             forwarding does not improve security unless users are also denied
-             shell access, as they can always install their own forwarders.
+             permitted.  The available options are yes (the default) or all to
+             allow StreamLocal forwarding, no to prevent all StreamLocal
+             forwarding, local to allow local (from the perspective of ssh(1))
+             forwarding only or remote to allow remote forwarding only.  Note
+             that disabling StreamLocal forwarding does not improve security
+             unless users are also denied shell access, as they can always
+             install their own forwarders.
+
+     AllowTcpForwarding
+             Specifies whether TCP forwarding is permitted.  The available
+             options are yes (the default) or all to allow TCP forwarding, no
+             to prevent all TCP forwarding, local to allow local (from the
+             perspective of ssh(1)) forwarding only or remote to allow remote
+             forwarding only.  Note that disabling TCP forwarding does not
+             improve security unless users are also denied shell access, as
+             they can always install their own forwarders.
 
      AllowUsers
              This keyword can be followed by a list of user name patterns,
@@ -81,9 +79,11 @@ DESCRIPTION
              valid; a numerical user ID is not recognized.  By default, login
              is allowed for all users.  If the pattern takes the form
              USER@HOST then USER and HOST are separately checked, restricting
-             logins to particular users from particular hosts.  The allow/deny
-             directives are processed in the following order: DenyUsers,
-             AllowUsers, DenyGroups, and finally AllowGroups.
+             logins to particular users from particular hosts.  HOST criteria
+             may additionally contain addresses to match in CIDR
+             address/masklen format.  The allow/deny directives are processed
+             in the following order: DenyUsers, AllowUsers, DenyGroups, and
+             finally AllowGroups.
 
              See PATTERNS in ssh_config(5) for more information on patterns.
 
@@ -91,51 +91,42 @@ DESCRIPTION
              Specifies the authentication methods that must be successfully
              completed for a user to be granted access.  This option must be
              followed by one or more comma-separated lists of authentication
-             method names.  Successful authentication requires completion of
-             every method in at least one of these lists.
-
-             For example, an argument of M-bM-^@M-^\publickey,password
-             publickey,keyboard-interactiveM-bM-^@M-^] would require the user to
-             complete public key authentication, followed by either password
-             or keyboard interactive authentication.  Only methods that are
-             next in one or more lists are offered at each stage, so for this
-             example, it would not be possible to attempt password or
-             keyboard-interactive authentication before public key.
+             method names, or by the single string any to indicate the default
+             behaviour of accepting any single authentication method.  If the
+             default is overridden, then successful authentication requires
+             completion of every method in at least one of these lists.
+
+             For example, "publickey,password publickey,keyboard-interactive"
+             would require the user to complete public key authentication,
+             followed by either password or keyboard interactive
+             authentication.  Only methods that are next in one or more lists
+             are offered at each stage, so for this example it would not be
+             possible to attempt password or keyboard-interactive
+             authentication before public key.
 
              For keyboard interactive authentication it is also possible to
              restrict authentication to a specific device by appending a colon
-             followed by the device identifier M-bM-^@M-^\bsdauthM-bM-^@M-^], M-bM-^@M-^\pamM-bM-^@M-^], or M-bM-^@M-^\skeyM-bM-^@M-^],
+             followed by the device identifier bsdauth, pam, or skey,
              depending on the server configuration.  For example,
-             M-bM-^@M-^\keyboard-interactive:bsdauthM-bM-^@M-^] would restrict keyboard
-             interactive authentication to the M-bM-^@M-^\bsdauthM-bM-^@M-^] device.
+             "keyboard-interactive:bsdauth" would restrict keyboard
+             interactive authentication to the bsdauth device.
 
-             If the M-bM-^@M-^\publickeyM-bM-^@M-^] method is listed more than once, sshd(8)
+             If the publickey method is listed more than once, sshd(8)
              verifies that keys that have been used successfully are not
-             reused for subsequent authentications.  For example, an
-             AuthenticationMethods of M-bM-^@M-^\publickey,publickeyM-bM-^@M-^] will require
-             successful authentication using two different public keys.
+             reused for subsequent authentications.  For example,
+             "publickey,publickey" requires successful authentication using
+             two different public keys.
 
-             This option is only available for SSH protocol 2 and will yield a
-             fatal error if enabled if protocol 1 is also enabled.  Note that
-             each authentication method listed should also be explicitly
-             enabled in the configuration.  The default is not to require
-             multiple authentication; successful completion of a single
-             authentication method is sufficient.
+             Note that each authentication method listed should also be
+             explicitly enabled in the configuration.
 
      AuthorizedKeysCommand
              Specifies a program to be used to look up the user's public keys.
              The program must be owned by root, not writable by group or
-             others and specified by an absolute path.
-
-             Arguments to AuthorizedKeysCommand may be provided using the
-             following tokens, which will be expanded at runtime: %% is
-             replaced by a literal '%', %u is replaced by the username being
-             authenticated, %h is replaced by the home directory of the user
-             being authenticated, %t is replaced with the key type offered for
-             authentication, %f is replaced with the fingerprint of the key,
-             and %k is replaced with the key being offered for authentication.
-             If no arguments are specified then the username of the target
-             user will be supplied.
+             others and specified by an absolute path.  Arguments to
+             AuthorizedKeysCommand accept the tokens described in the TOKENS
+             section.  If no arguments are specified then the username of the
+             target user is used.
 
              The program should produce on standard output zero or more lines
              of authorized_keys output (see AUTHORIZED_KEYS in sshd(8)).  If a
@@ -152,30 +143,24 @@ DESCRIPTION
              is not, then sshd(8) will refuse to start.
 
      AuthorizedKeysFile
-             Specifies the file that contains the public keys that can be used
-             for user authentication.  The format is described in the
-             AUTHORIZED_KEYS FILE FORMAT section of sshd(8).
-             AuthorizedKeysFile may contain tokens of the form %T which are
-             substituted during connection setup.  The following tokens are
-             defined: %% is replaced by a literal '%', %h is replaced by the
-             home directory of the user being authenticated, and %u is
-             replaced by the username of that user.  After expansion,
-             AuthorizedKeysFile is taken to be an absolute path or one
-             relative to the user's home directory.  Multiple files may be
-             listed, separated by whitespace.  The default is
-             M-bM-^@M-^\.ssh/authorized_keys .ssh/authorized_keys2M-bM-^@M-^].
+             Specifies the file that contains the public keys used for user
+             authentication.  The format is described in the AUTHORIZED_KEYS
+             FILE FORMAT section of sshd(8).  Arguments to AuthorizedKeysFile
+             accept the tokens described in the TOKENS section.  After
+             expansion, AuthorizedKeysFile is taken to be an absolute path or
+             one relative to the user's home directory.  Multiple files may be
+             listed, separated by whitespace.  Alternately this option may be
+             set to none to skip checking for user keys in files.  The default
+             is ".ssh/authorized_keys .ssh/authorized_keys2".
 
      AuthorizedPrincipalsCommand
              Specifies a program to be used to generate the list of allowed
              certificate principals as per AuthorizedPrincipalsFile.  The
              program must be owned by root, not writable by group or others
-             and specified by an absolute path.
-
-             Arguments to AuthorizedPrincipalsCommand may be provided using
-             the following tokens, which will be expanded at runtime: %% is
-             replaced by a literal '%', %u is replaced by the username being
-             authenticated and %h is replaced by the home directory of the
-             user being authenticated.
+             and specified by an absolute path.  Arguments to
+             AuthorizedPrincipalsCommand accept the tokens described in the
+             TOKENS section.  If no arguments are specified then the username
+             of the target user is used.
 
              The program should produce on standard output zero or more lines
              of AuthorizedPrincipalsFile output.  If either
@@ -201,32 +186,27 @@ DESCRIPTION
              options (as described in AUTHORIZED_KEYS FILE FORMAT in sshd(8)).
              Empty lines and comments starting with M-bM-^@M-^X#M-bM-^@M-^Y are ignored.
 
-             AuthorizedPrincipalsFile may contain tokens of the form %T which
-             are substituted during connection setup.  The following tokens
-             are defined: %% is replaced by a literal '%', %h is replaced by
-             the home directory of the user being authenticated, and %u is
-             replaced by the username of that user.  After expansion,
-             AuthorizedPrincipalsFile is taken to be an absolute path or one
-             relative to the user's home directory.
-
-             The default is M-bM-^@M-^\noneM-bM-^@M-^], i.e. not to use a principals file M-bM-^@M-^S in
-             this case, the username of the user must appear in a
-             certificate's principals list for it to be accepted.  Note that
-             AuthorizedPrincipalsFile is only used when authentication
-             proceeds using a CA listed in TrustedUserCAKeys and is not
-             consulted for certification authorities trusted via
+             Arguments to AuthorizedPrincipalsFile accept the tokens described
+             in the TOKENS section.  After expansion, AuthorizedPrincipalsFile
+             is taken to be an absolute path or one relative to the user's
+             home directory.  The default is none, i.e. not to use a
+             principals file M-bM-^@M-^S in this case, the username of the user must
+             appear in a certificate's principals list for it to be accepted.
+
+             Note that AuthorizedPrincipalsFile is only used when
+             authentication proceeds using a CA listed in TrustedUserCAKeys
+             and is not consulted for certification authorities trusted via
              ~/.ssh/authorized_keys, though the principals= key option offers
              a similar facility (see sshd(8) for details).
 
      Banner  The contents of the specified file are sent to the remote user
-             before authentication is allowed.  If the argument is M-bM-^@M-^\noneM-bM-^@M-^] then
-             no banner is displayed.  This option is only available for
-             protocol version 2.  By default, no banner is displayed.
+             before authentication is allowed.  If the argument is none then
+             no banner is displayed.  By default, no banner is displayed.
 
      ChallengeResponseAuthentication
              Specifies whether challenge-response authentication is allowed
              (e.g. via PAM or through authentication styles supported in
-             login.conf(5)) The default is M-bM-^@M-^\yesM-bM-^@M-^].
+             login.conf(5)) The default is yes.
 
      ChrootDirectory
              Specifies the pathname of a directory to chroot(2) to after
@@ -234,37 +214,33 @@ DESCRIPTION
              components of the pathname are root-owned directories which are
              not writable by any other user or group.  After the chroot,
              sshd(8) changes the working directory to the user's home
-             directory.
-
-             The pathname may contain the following tokens that are expanded
-             at runtime once the connecting user has been authenticated: %% is
-             replaced by a literal '%', %h is replaced by the home directory
-             of the user being authenticated, and %u is replaced by the
-             username of that user.
+             directory.  Arguments to ChrootDirectory accept the tokens
+             described in the TOKENS section.
 
              The ChrootDirectory must contain the necessary files and
              directories to support the user's session.  For an interactive
              session this requires at least a shell, typically sh(1), and
              basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4),
              stderr(4), and tty(4) devices.  For file transfer sessions using
-             M-bM-^@M-^\sftpM-bM-^@M-^], no additional configuration of the environment is
-             necessary if the in-process sftp server is used, though sessions
-             which use logging may require /dev/log inside the chroot
-             directory on some operating systems (see sftp-server(8) for
-             details).
+             SFTP no additional configuration of the environment is necessary
+             if the in-process sftp-server is used, though sessions which use
+             logging may require /dev/log inside the chroot directory on some
+             operating systems (see sftp-server(8) for details).
 
              For safety, it is very important that the directory hierarchy be
              prevented from modification by other processes on the system
              (especially those outside the jail).  Misconfiguration can lead
              to unsafe environments which sshd(8) cannot detect.
 
-             The default is not to chroot(2).
+             The default is none, indicating not to chroot(2).
 
      Ciphers
-             Specifies the ciphers allowed for protocol version 2.  Multiple
-             ciphers must be comma-separated.  If the specified value begins
-             with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified ciphers will be appended
-             to the default set instead of replacing them.
+             Specifies the ciphers allowed.  Multiple ciphers must be comma-
+             separated.  If the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character,
+             then the specified ciphers will be appended to the default set
+             instead of replacing them.  If the specified value begins with a
+             M-bM-^@M-^X-M-bM-^@M-^Y character, then the specified ciphers (including wildcards)
+             will be removed from the default set instead of replacing them.
 
              The supported ciphers are:
 
@@ -290,39 +266,37 @@ DESCRIPTION
                    aes128-ctr,aes192-ctr,aes256-ctr,
                    aes128-gcm@openssh.com,aes256-gcm@openssh.com
 
-             The list of available ciphers may also be obtained using the -Q
-             option of ssh(1) with an argument of M-bM-^@M-^\cipherM-bM-^@M-^].
+             The list of available ciphers may also be obtained using "ssh -Q
+             cipher".
 
      ClientAliveCountMax
-             Sets the number of client alive messages (see below) which may be
-             sent without sshd(8) receiving any messages back from the client.
-             If this threshold is reached while client alive messages are
-             being sent, sshd will disconnect the client, terminating the
-             session.  It is important to note that the use of client alive
-             messages is very different from TCPKeepAlive (below).  The client
-             alive messages are sent through the encrypted channel and
-             therefore will not be spoofable.  The TCP keepalive option
-             enabled by TCPKeepAlive is spoofable.  The client alive mechanism
-             is valuable when the client or server depend on knowing when a
-             connection has become inactive.
-
-             The default value is 3.  If ClientAliveInterval (see below) is
-             set to 15, and ClientAliveCountMax is left at the default,
-             unresponsive SSH clients will be disconnected after approximately
-             45 seconds.  This option applies to protocol version 2 only.
+             Sets the number of client alive messages which may be sent
+             without sshd(8) receiving any messages back from the client.  If
+             this threshold is reached while client alive messages are being
+             sent, sshd will disconnect the client, terminating the session.
+             It is important to note that the use of client alive messages is
+             very different from TCPKeepAlive.  The client alive messages are
+             sent through the encrypted channel and therefore will not be
+             spoofable.  The TCP keepalive option enabled by TCPKeepAlive is
+             spoofable.  The client alive mechanism is valuable when the
+             client or server depend on knowing when a connection has become
+             inactive.
+
+             The default value is 3.  If ClientAliveInterval is set to 15, and
+             ClientAliveCountMax is left at the default, unresponsive SSH
+             clients will be disconnected after approximately 45 seconds.
 
      ClientAliveInterval
              Sets a timeout interval in seconds after which if no data has
              been received from the client, sshd(8) will send a message
              through the encrypted channel to request a response from the
              client.  The default is 0, indicating that these messages will
-             not be sent to the client.  This option applies to protocol
-             version 2 only.
+             not be sent to the client.
 
      Compression
-             Specifies whether compression is allowed, or delayed until the
-             user has authenticated successfully.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^],
-             M-bM-^@M-^\delayedM-bM-^@M-^], or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\delayedM-bM-^@M-^].
+             Specifies whether compression is enabled after the user has
+             authenticated successfully.  The argument must be yes, delayed (a
+             legacy synonym for yes) or no.  The default is yes.
 
      DenyGroups
              This keyword can be followed by a list of group name patterns,
@@ -342,15 +316,22 @@ DESCRIPTION
              numerical user ID is not recognized.  By default, login is
              allowed for all users.  If the pattern takes the form USER@HOST
              then USER and HOST are separately checked, restricting logins to
-             particular users from particular hosts.  The allow/deny
-             directives are processed in the following order: DenyUsers,
-             AllowUsers, DenyGroups, and finally AllowGroups.
+             particular users from particular hosts.  HOST criteria may
+             additionally contain addresses to match in CIDR address/masklen
+             format.  The allow/deny directives are processed in the following
+             order: DenyUsers, AllowUsers, DenyGroups, and finally
+             AllowGroups.
 
              See PATTERNS in ssh_config(5) for more information on patterns.
 
+     DisableForwarding
+             Disables all forwarding features, including X11, ssh-agent(1),
+             TCP and StreamLocal.  This option overrides all other forwarding-
+             related options and may simplify restricted configurations.
+
      FingerprintHash
              Specifies the hash algorithm used when logging key fingerprints.
-             Valid options are: M-bM-^@M-^\md5M-bM-^@M-^] and M-bM-^@M-^\sha256M-bM-^@M-^].  The default is M-bM-^@M-^\sha256M-bM-^@M-^].
+             Valid options are: md5 and sha256.  The default is sha256.
 
      ForceCommand
              Forces the execution of the command specified by ForceCommand,
@@ -360,9 +341,9 @@ DESCRIPTION
              execution.  It is most useful inside a Match block.  The command
              originally supplied by the client is available in the
              SSH_ORIGINAL_COMMAND environment variable.  Specifying a command
-             of M-bM-^@M-^\internal-sftpM-bM-^@M-^] will force the use of an in-process sftp
-             server that requires no support files when used with
-             ChrootDirectory.
+             of internal-sftp will force the use of an in-process SFTP server
+             that requires no support files when used with ChrootDirectory.
+             The default is none.
 
      GatewayPorts
              Specifies whether remote hosts are allowed to connect to ports
@@ -371,37 +352,38 @@ DESCRIPTION
              hosts from connecting to forwarded ports.  GatewayPorts can be
              used to specify that sshd should allow remote port forwardings to
              bind to non-loopback addresses, thus allowing other hosts to
-             connect.  The argument may be M-bM-^@M-^\noM-bM-^@M-^] to force remote port
-             forwardings to be available to the local host only, M-bM-^@M-^\yesM-bM-^@M-^] to
-             force remote port forwardings to bind to the wildcard address, or
-             M-bM-^@M-^\clientspecifiedM-bM-^@M-^] to allow the client to select the address to
-             which the forwarding is bound.  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             connect.  The argument may be no to force remote port forwardings
+             to be available to the local host only, yes to force remote port
+             forwardings to bind to the wildcard address, or clientspecified
+             to allow the client to select the address to which the forwarding
+             is bound.  The default is no.
 
      GSSAPIAuthentication
              Specifies whether user authentication based on GSSAPI is allowed.
-             The default is M-bM-^@M-^\noM-bM-^@M-^].  Note that this option applies to protocol
-             version 2 only.
+             The default is no.
 
      GSSAPICleanupCredentials
              Specifies whether to automatically destroy the user's credentials
-             cache on logout.  The default is M-bM-^@M-^\yesM-bM-^@M-^].  Note that this option
-             applies to protocol version 2 only.
+             cache on logout.  The default is yes.
 
      GSSAPIStrictAcceptorCheck
              Determines whether to be strict about the identity of the GSSAPI
-             acceptor a client authenticates against.  If set to M-bM-^@M-^\yesM-bM-^@M-^] then
-             the client must authenticate against the host service on the
-             current hostname.  If set to M-bM-^@M-^\noM-bM-^@M-^] then the client may
-             authenticate against any service key stored in the machine's
-             default store.  This facility is provided to assist with
-             operation on multi homed machines.  The default is M-bM-^@M-^\yesM-bM-^@M-^].
+             acceptor a client authenticates against.  If set to yes then the
+             client must authenticate against the host service on the current
+             hostname.  If set to no then the client may authenticate against
+             any service key stored in the machine's default store.  This
+             facility is provided to assist with operation on multi homed
+             machines.  The default is yes.
 
      HostbasedAcceptedKeyTypes
              Specifies the key types that will be accepted for hostbased
              authentication as a comma-separated pattern list.  Alternately if
              the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the
              specified key types will be appended to the default set instead
-             of replacing them.  The default for this option is:
+             of replacing them.  If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
+             character, then the specified key types (including wildcards)
+             will be removed from the default set instead of replacing them.
+             The default for this option is:
 
                 ecdsa-sha2-nistp256-cert-v01@openssh.com,
                 ecdsa-sha2-nistp384-cert-v01@openssh.com,
@@ -411,23 +393,22 @@ DESCRIPTION
                 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
                 ssh-ed25519,ssh-rsa
 
-             The -Q option of ssh(1) may be used to list supported key types.
+             The list of available key types may also be obtained using "ssh
+             -Q key".
 
      HostbasedAuthentication
              Specifies whether rhosts or /etc/hosts.equiv authentication
              together with successful public key client host authentication is
-             allowed (host-based authentication).  This option is similar to
-             RhostsRSAAuthentication and applies to protocol version 2 only.
-             The default is M-bM-^@M-^\noM-bM-^@M-^].
+             allowed (host-based authentication).  The default is no.
 
      HostbasedUsesNameFromPacketOnly
              Specifies whether or not the server will attempt to perform a
              reverse name lookup when matching the name in the ~/.shosts,
              ~/.rhosts, and /etc/hosts.equiv files during
-             HostbasedAuthentication.  A setting of M-bM-^@M-^\yesM-bM-^@M-^] means that sshd(8)
+             HostbasedAuthentication.  A setting of yes means that sshd(8)
              uses the name supplied by the client rather than attempting to
              resolve the name from the TCP connection itself.  The default is
-             M-bM-^@M-^\noM-bM-^@M-^].
+             no.
 
      HostCertificate
              Specifies a file containing a public host certificate.  The
@@ -437,30 +418,28 @@ DESCRIPTION
 
      HostKey
              Specifies a file containing a private host key used by SSH.  The
-             default is /etc/ssh/ssh_host_key for protocol version 1, and
-             /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key,
-             /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
-             protocol version 2.
+             defaults are /etc/ssh/ssh_host_dsa_key,
+             /etc/ssh/ssh_host_ecdsa_key, /etc/ssh/ssh_host_ed25519_key and
+             /etc/ssh/ssh_host_rsa_key.
 
              Note that sshd(8) will refuse to use a file if it is group/world-
              accessible and that the HostKeyAlgorithms option restricts which
              of the keys are actually used by sshd(8).
 
-             It is possible to have multiple host key files.  M-bM-^@M-^\rsa1M-bM-^@M-^] keys are
-             used for version 1 and M-bM-^@M-^\dsaM-bM-^@M-^], M-bM-^@M-^\ecdsaM-bM-^@M-^], M-bM-^@M-^\ed25519M-bM-^@M-^] or M-bM-^@M-^\rsaM-bM-^@M-^] are
-             used for version 2 of the SSH protocol.  It is also possible to
-             specify public host key files instead.  In this case operations
-             on the private key will be delegated to an ssh-agent(1).
+             It is possible to have multiple host key files.  It is also
+             possible to specify public host key files instead.  In this case
+             operations on the private key will be delegated to an
+             ssh-agent(1).
 
      HostKeyAgent
              Identifies the UNIX-domain socket used to communicate with an
-             agent that has access to the private host keys.  If
-             M-bM-^@M-^\SSH_AUTH_SOCKM-bM-^@M-^] is specified, the location of the socket will be
+             agent that has access to the private host keys.  If the string
+             "SSH_AUTH_SOCK" is specified, the location of the socket will be
              read from the SSH_AUTH_SOCK environment variable.
 
      HostKeyAlgorithms
-             Specifies the protocol version 2 host key algorithms that the
-             server offers.  The default for this option is:
+             Specifies the host key algorithms that the server offers.  The
+             default for this option is:
 
                 ecdsa-sha2-nistp256-cert-v01@openssh.com,
                 ecdsa-sha2-nistp384-cert-v01@openssh.com,
@@ -470,68 +449,71 @@ DESCRIPTION
                 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
                 ssh-ed25519,ssh-rsa
 
-             The list of available key types may also be obtained using the -Q
-             option of ssh(1) with an argument of M-bM-^@M-^\keyM-bM-^@M-^].
+             The list of available key types may also be obtained using "ssh
+             -Q key".
 
      IgnoreRhosts
              Specifies that .rhosts and .shosts files will not be used in
-             RhostsRSAAuthentication or HostbasedAuthentication.
+             HostbasedAuthentication.
 
              /etc/hosts.equiv and /etc/shosts.equiv are still used.  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].
+             default is yes.
 
      IgnoreUserKnownHosts
              Specifies whether sshd(8) should ignore the user's
-             ~/.ssh/known_hosts during RhostsRSAAuthentication or
-             HostbasedAuthentication.  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             ~/.ssh/known_hosts during HostbasedAuthentication.  The default
+             is no.
 
      IPQoS   Specifies the IPv4 type-of-service or DSCP class for the
-             connection.  Accepted values are M-bM-^@M-^\af11M-bM-^@M-^], M-bM-^@M-^\af12M-bM-^@M-^], M-bM-^@M-^\af13M-bM-^@M-^], M-bM-^@M-^\af21M-bM-^@M-^],
-             M-bM-^@M-^\af22M-bM-^@M-^], M-bM-^@M-^\af23M-bM-^@M-^], M-bM-^@M-^\af31M-bM-^@M-^], M-bM-^@M-^\af32M-bM-^@M-^], M-bM-^@M-^\af33M-bM-^@M-^], M-bM-^@M-^\af41M-bM-^@M-^], M-bM-^@M-^\af42M-bM-^@M-^], M-bM-^@M-^\af43M-bM-^@M-^],
-             M-bM-^@M-^\cs0M-bM-^@M-^], M-bM-^@M-^\cs1M-bM-^@M-^], M-bM-^@M-^\cs2M-bM-^@M-^], M-bM-^@M-^\cs3M-bM-^@M-^], M-bM-^@M-^\cs4M-bM-^@M-^], M-bM-^@M-^\cs5M-bM-^@M-^], M-bM-^@M-^\cs6M-bM-^@M-^], M-bM-^@M-^\cs7M-bM-^@M-^], M-bM-^@M-^\efM-bM-^@M-^],
-             M-bM-^@M-^\lowdelayM-bM-^@M-^], M-bM-^@M-^\throughputM-bM-^@M-^], M-bM-^@M-^\reliabilityM-bM-^@M-^], or a numeric value.
-             This option may take one or two arguments, separated by
-             whitespace.  If one argument is specified, it is used as the
-             packet class unconditionally.  If two values are specified, the
-             first is automatically selected for interactive sessions and the
-             second for non-interactive sessions.  The default is M-bM-^@M-^\lowdelayM-bM-^@M-^]
-             for interactive sessions and M-bM-^@M-^\throughputM-bM-^@M-^] for non-interactive
-             sessions.
+             connection.  Accepted values are af11, af12, af13, af21, af22,
+             af23, af31, af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3,
+             cs4, cs5, cs6, cs7, ef, lowdelay, throughput, reliability, or a
+             numeric value.  This option may take one or two arguments,
+             separated by whitespace.  If one argument is specified, it is
+             used as the packet class unconditionally.  If two values are
+             specified, the first is automatically selected for interactive
+             sessions and the second for non-interactive sessions.  The
+             default is lowdelay for interactive sessions and throughput for
+             non-interactive sessions.
 
      KbdInteractiveAuthentication
              Specifies whether to allow keyboard-interactive authentication.
-             The argument to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default
-             is to use whatever value ChallengeResponseAuthentication is set
-             to (by default M-bM-^@M-^\yesM-bM-^@M-^]).
+             The argument to this keyword must be yes or no.  The default is
+             to use whatever value ChallengeResponseAuthentication is set to
+             (by default yes).
 
      KerberosAuthentication
              Specifies whether the password provided by the user for
              PasswordAuthentication will be validated through the Kerberos
              KDC.  To use this option, the server needs a Kerberos servtab
              which allows the verification of the KDC's identity.  The default
-             is M-bM-^@M-^\noM-bM-^@M-^].
+             is no.
 
      KerberosGetAFSToken
              If AFS is active and the user has a Kerberos 5 TGT, attempt to
              acquire an AFS token before accessing the user's home directory.
-             The default is M-bM-^@M-^\noM-bM-^@M-^].
+             The default is no.
 
      KerberosOrLocalPasswd
              If password authentication through Kerberos fails then the
              password will be validated via any additional local mechanism
-             such as /etc/passwd.  The default is M-bM-^@M-^\yesM-bM-^@M-^].
+             such as /etc/passwd.  The default is yes.
 
      KerberosTicketCleanup
              Specifies whether to automatically destroy the user's ticket
-             cache file on logout.  The default is M-bM-^@M-^\yesM-bM-^@M-^].
+             cache file on logout.  The default is yes.
 
      KexAlgorithms
              Specifies the available KEX (Key Exchange) algorithms.  Multiple
              algorithms must be comma-separated.  Alternately if the specified
              value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified methods
              will be appended to the default set instead of replacing them.
-             The supported algorithms are:
+             If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y character, then the
+             specified methods (including wildcards) will be removed from the
+             default set instead of replacing them.  The supported algorithms
+             are:
 
+                   curve25519-sha256
                    curve25519-sha256@libssh.org
                    diffie-hellman-group1-sha1
                    diffie-hellman-group14-sha1
@@ -543,21 +525,13 @@ DESCRIPTION
 
              The default is:
 
-                   curve25519-sha256@libssh.org,
+                   curve25519-sha256,curve25519-sha256@libssh.org,
                    ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
                    diffie-hellman-group-exchange-sha256,
                    diffie-hellman-group14-sha1
 
              The list of available key exchange algorithms may also be
-             obtained using the -Q option of ssh(1) with an argument of M-bM-^@M-^\kexM-bM-^@M-^].
-
-     KeyRegenerationInterval
-             In protocol version 1, the ephemeral server key is automatically
-             regenerated after this many seconds (if it has been used).  The
-             purpose of regeneration is to prevent decrypting captured
-             sessions by later breaking into the machine and stealing the
-             keys.  The key is never stored anywhere.  If the value is 0, the
-             key is never regenerated.  The default is 3600 (seconds).
+             obtained using "ssh -Q kex".
 
      ListenAddress
              Specifies the local addresses sshd(8) should listen on.  The
@@ -585,13 +559,15 @@ DESCRIPTION
              violates the privacy of users and is not recommended.
 
      MACs    Specifies the available MAC (message authentication code)
-             algorithms.  The MAC algorithm is used in protocol version 2 for
-             data integrity protection.  Multiple algorithms must be comma-
-             separated.  If the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character,
-             then the specified algorithms will be appended to the default set
-             instead of replacing them.
-
-             The algorithms that contain M-bM-^@M-^\-etmM-bM-^@M-^] calculate the MAC after
+             algorithms.  The MAC algorithm is used for data integrity
+             protection.  Multiple algorithms must be comma-separated.  If the
+             specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified
+             algorithms will be appended to the default set instead of
+             replacing them.  If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
+             character, then the specified algorithms (including wildcards)
+             will be removed from the default set instead of replacing them.
+
+             The algorithms that contain "-etm" calculate the MAC after
              encryption (encrypt-then-mac).  These are considered safer and
              their use recommended.  The supported MACs are:
 
@@ -618,11 +594,12 @@ DESCRIPTION
 
                    umac-64-etm@openssh.com,umac-128-etm@openssh.com,
                    hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
+                   hmac-sha1-etm@openssh.com,
                    umac-64@openssh.com,umac-128@openssh.com,
-                   hmac-sha2-256,hmac-sha2-512
+                   hmac-sha2-256,hmac-sha2-512,hmac-sha1
 
              The list of available MAC algorithms may also be obtained using
-             the -Q option of ssh(1) with an argument of M-bM-^@M-^\macM-bM-^@M-^].
+             "ssh -Q mac".
 
      Match   Introduces a conditional block.  If all of the criteria on the
              Match line are satisfied, the keywords on the following lines
@@ -639,20 +616,22 @@ DESCRIPTION
              operators described in the PATTERNS section of ssh_config(5).
 
              The patterns in an Address criteria may additionally contain
-             addresses to match in CIDR address/masklen format, e.g.
-             M-bM-^@M-^\192.0.2.0/24M-bM-^@M-^] or M-bM-^@M-^\3ffe:ffff::/32M-bM-^@M-^].  Note that the mask length
+             addresses to match in CIDR address/masklen format, such as
+             192.0.2.0/24 or 2001:db8::/32.  Note that the mask length
              provided must be consistent with the address - it is an error to
              specify a mask length that is too long for the address or one
              with bits set in this host portion of the address.  For example,
-             M-bM-^@M-^\192.0.2.0/33M-bM-^@M-^] and M-bM-^@M-^\192.0.2.0/8M-bM-^@M-^] respectively.
+             192.0.2.0/33 and 192.0.2.0/8, respectively.
 
              Only a subset of keywords may be used on the lines following a
              Match keyword.  Available keywords are AcceptEnv,
              AllowAgentForwarding, AllowGroups, AllowStreamLocalForwarding,
              AllowTcpForwarding, AllowUsers, AuthenticationMethods,
              AuthorizedKeysCommand, AuthorizedKeysCommandUser,
-             AuthorizedKeysFile, AuthorizedPrincipalsFile, Banner,
-             ChrootDirectory, DenyGroups, DenyUsers, ForceCommand,
+             AuthorizedKeysFile, AuthorizedPrincipalsCommand,
+             AuthorizedPrincipalsCommandUser, AuthorizedPrincipalsFile,
+             Banner, ChrootDirectory, ClientAliveCountMax,
+             ClientAliveInterval, DenyGroups, DenyUsers, ForceCommand,
              GatewayPorts, GSSAPIAuthentication, HostbasedAcceptedKeyTypes,
              HostbasedAuthentication, HostbasedUsesNameFromPacketOnly, IPQoS,
              KbdInteractiveAuthentication, KerberosAuthentication,
@@ -660,9 +639,8 @@ DESCRIPTION
              PermitEmptyPasswords, PermitOpen, PermitRootLogin, PermitTTY,
              PermitTunnel, PermitUserRC, PubkeyAcceptedKeyTypes,
              PubkeyAuthentication, RekeyLimit, RevokedKeys,
-             RhostsRSAAuthentication, RSAAuthentication, StreamLocalBindMask,
-             StreamLocalBindUnlink, TrustedUserCAKeys, X11DisplayOffset,
-             X11Forwarding and X11UseLocalHost.
+             StreamLocalBindMask, StreamLocalBindUnlink, TrustedUserCAKeys,
+             X11DisplayOffset, X11Forwarding and X11UseLocalHost.
 
      MaxAuthTries
              Specifies the maximum number of authentication attempts permitted
@@ -670,8 +648,13 @@ DESCRIPTION
              value, additional failures are logged.  The default is 6.
 
      MaxSessions
-             Specifies the maximum number of open sessions permitted per
-             network connection.  The default is 10.
+             Specifies the maximum number of open shell, login or subsystem
+             (e.g. sftp) sessions permitted per network connection.  Multiple
+             sessions may be established by clients that support connection
+             multiplexing.  Setting MaxSessions to 1 will effectively disable
+             session multiplexing, whereas setting it to 0 will prevent all
+             shell, login and subsystem sessions while still permitting
+             forwarding.  The default is 10.
 
      MaxStartups
              Specifies the maximum number of concurrent unauthenticated
@@ -680,21 +663,21 @@ DESCRIPTION
              expires for a connection.  The default is 10:30:100.
 
              Alternatively, random early drop can be enabled by specifying the
-             three colon separated values M-bM-^@M-^\start:rate:fullM-bM-^@M-^] (e.g. "10:30:60").
+             three colon separated values start:rate:full (e.g. "10:30:60").
              sshd(8) will refuse connection attempts with a probability of
-             M-bM-^@M-^\rate/100M-bM-^@M-^] (30%) if there are currently M-bM-^@M-^\startM-bM-^@M-^] (10)
-             unauthenticated connections.  The probability increases linearly
-             and all connection attempts are refused if the number of
-             unauthenticated connections reaches M-bM-^@M-^\fullM-bM-^@M-^] (60).
+             rate/100 (30%) if there are currently start (10) unauthenticated
+             connections.  The probability increases linearly and all
+             connection attempts are refused if the number of unauthenticated
+             connections reaches full (60).
 
      PasswordAuthentication
              Specifies whether password authentication is allowed.  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].
+             default is yes.
 
      PermitEmptyPasswords
              When password authentication is allowed, it specifies whether the
              server allows login to accounts with empty password strings.  The
-             default is M-bM-^@M-^\noM-bM-^@M-^].
+             default is no.
 
      PermitOpen
              Specifies the destinations to which TCP port forwarding is
@@ -706,56 +689,57 @@ DESCRIPTION
                    PermitOpen [IPv6_addr]:port
 
              Multiple forwards may be specified by separating them with
-             whitespace.  An argument of M-bM-^@M-^\anyM-bM-^@M-^] can be used to remove all
+             whitespace.  An argument of any can be used to remove all
              restrictions and permit any forwarding requests.  An argument of
-             M-bM-^@M-^\noneM-bM-^@M-^] can be used to prohibit all forwarding requests.  By
-             default all port forwarding requests are permitted.
+             none can be used to prohibit all forwarding requests.  The
+             wildcard M-bM-^@M-^X*M-bM-^@M-^Y can be used for host or port to allow all hosts or
+             ports, respectively.  By default all port forwarding requests are
+             permitted.
 
      PermitRootLogin
              Specifies whether root can log in using ssh(1).  The argument
-             must be M-bM-^@M-^\yesM-bM-^@M-^], M-bM-^@M-^\prohibit-passwordM-bM-^@M-^], M-bM-^@M-^\without-passwordM-bM-^@M-^],
-             M-bM-^@M-^\forced-commands-onlyM-bM-^@M-^], or M-bM-^@M-^\noM-bM-^@M-^].  The default is
-             M-bM-^@M-^\prohibit-passwordM-bM-^@M-^].
+             must be yes, prohibit-password, without-password,
+             forced-commands-only, or no.  The default is prohibit-password.
 
-             If this option is set to M-bM-^@M-^\prohibit-passwordM-bM-^@M-^] or
-             M-bM-^@M-^\without-passwordM-bM-^@M-^], password and keyboard-interactive
-             authentication are disabled for root.
+             If this option is set to prohibit-password or without-password,
+             password and keyboard-interactive authentication are disabled for
+             root.
 
-             If this option is set to M-bM-^@M-^\forced-commands-onlyM-bM-^@M-^], root login with
+             If this option is set to forced-commands-only, root login with
              public key authentication will be allowed, but only if the
              command option has been specified (which may be useful for taking
              remote backups even if root login is normally not allowed).  All
              other authentication methods are disabled for root.
 
-             If this option is set to M-bM-^@M-^\noM-bM-^@M-^], root is not allowed to log in.
+             If this option is set to no, root is not allowed to log in.
+
+     PermitTTY
+             Specifies whether pty(4) allocation is permitted.  The default is
+             yes.
 
      PermitTunnel
              Specifies whether tun(4) device forwarding is allowed.  The
-             argument must be M-bM-^@M-^\yesM-bM-^@M-^], M-bM-^@M-^\point-to-pointM-bM-^@M-^] (layer 3), M-bM-^@M-^\ethernetM-bM-^@M-^]
-             (layer 2), or M-bM-^@M-^\noM-bM-^@M-^].  Specifying M-bM-^@M-^\yesM-bM-^@M-^] permits both
-             M-bM-^@M-^\point-to-pointM-bM-^@M-^] and M-bM-^@M-^\ethernetM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             argument must be yes, point-to-point (layer 3), ethernet (layer
+             2), or no.  Specifying yes permits both point-to-point and
+             ethernet.  The default is no.
 
              Independent of this setting, the permissions of the selected
              tun(4) device must allow access to the user.
 
-     PermitTTY
-             Specifies whether pty(4) allocation is permitted.  The default is
-             M-bM-^@M-^\yesM-bM-^@M-^].
-
      PermitUserEnvironment
              Specifies whether ~/.ssh/environment and environment= options in
              ~/.ssh/authorized_keys are processed by sshd(8).  The default is
-             M-bM-^@M-^\noM-bM-^@M-^].  Enabling environment processing may enable users to bypass
+             no.  Enabling environment processing may enable users to bypass
              access restrictions in some configurations using mechanisms such
              as LD_PRELOAD.
 
      PermitUserRC
              Specifies whether any ~/.ssh/rc file is executed.  The default is
-             M-bM-^@M-^\yesM-bM-^@M-^].
+             yes.
 
      PidFile
              Specifies the file that contains the process ID of the SSH
-             daemon, or M-bM-^@M-^\noneM-bM-^@M-^] to not write one.  The default is
+             daemon, or none to not write one.  The default is
              /var/run/sshd.pid.
 
      Port    Specifies the port number that sshd(8) listens on.  The default
@@ -765,27 +749,22 @@ DESCRIPTION
      PrintLastLog
              Specifies whether sshd(8) should print the date and time of the
              last user login when a user logs in interactively.  The default
-             is M-bM-^@M-^\yesM-bM-^@M-^].
+             is yes.
 
      PrintMotd
              Specifies whether sshd(8) should print /etc/motd when a user logs
              in interactively.  (On some systems it is also printed by the
-             shell, /etc/profile, or equivalent.)  The default is M-bM-^@M-^\yesM-bM-^@M-^].
-
-     Protocol
-             Specifies the protocol versions sshd(8) supports.  The possible
-             values are M-bM-^@M-^X1M-bM-^@M-^Y and M-bM-^@M-^X2M-bM-^@M-^Y.  Multiple versions must be comma-
-             separated.  The default is M-bM-^@M-^X2M-bM-^@M-^Y.  Note that the order of the
-             protocol list does not indicate preference, because the client
-             selects among multiple protocol versions offered by the server.
-             Specifying M-bM-^@M-^\2,1M-bM-^@M-^] is identical to M-bM-^@M-^\1,2M-bM-^@M-^].
+             shell, /etc/profile, or equivalent.)  The default is yes.
 
      PubkeyAcceptedKeyTypes
              Specifies the key types that will be accepted for public key
              authentication as a comma-separated pattern list.  Alternately if
              the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the
              specified key types will be appended to the default set instead
-             of replacing them.  The default for this option is:
+             of replacing them.  If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
+             character, then the specified key types (including wildcards)
+             will be removed from the default set instead of replacing them.
+             The default for this option is:
 
                 ecdsa-sha2-nistp256-cert-v01@openssh.com,
                 ecdsa-sha2-nistp384-cert-v01@openssh.com,
@@ -795,12 +774,12 @@ DESCRIPTION
                 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
                 ssh-ed25519,ssh-rsa
 
-             The -Q option of ssh(1) may be used to list supported key types.
+             The list of available key types may also be obtained using "ssh
+             -Q key".
 
      PubkeyAuthentication
              Specifies whether public key authentication is allowed.  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].  Note that this option applies to protocol
-             version 2 only.
+             default is yes.
 
      RekeyLimit
              Specifies the maximum amount of data that may be transmitted
@@ -812,14 +791,13 @@ DESCRIPTION
              M-bM-^@M-^X1GM-bM-^@M-^Y and M-bM-^@M-^X4GM-bM-^@M-^Y, depending on the cipher.  The optional second
              value is specified in seconds and may use any of the units
              documented in the TIME FORMATS section.  The default value for
-             RekeyLimit is M-bM-^@M-^\default noneM-bM-^@M-^], which means that rekeying is
+             RekeyLimit is default none, which means that rekeying is
              performed after the cipher's default amount of data has been sent
-             or received and no time based rekeying is done.  This option
-             applies to protocol version 2 only.
+             or received and no time based rekeying is done.
 
      RevokedKeys
-             Specifies revoked public keys file, or M-bM-^@M-^\noneM-bM-^@M-^] to not use one.
-             Keys listed in this file will be refused for public key
+             Specifies revoked public keys file, or none to not use one.  Keys
+             listed in this file will be refused for public key
              authentication.  Note that if this file is not readable, then
              public key authentication will be refused for all users.  Keys
              may be specified as a text file, listing one public key per line,
@@ -827,20 +805,6 @@ DESCRIPTION
              ssh-keygen(1).  For more information on KRLs, see the KEY
              REVOCATION LISTS section in ssh-keygen(1).
 
-     RhostsRSAAuthentication
-             Specifies whether rhosts or /etc/hosts.equiv authentication
-             together with successful RSA host authentication is allowed.  The
-             default is M-bM-^@M-^\noM-bM-^@M-^].  This option applies to protocol version 1 only.
-
-     RSAAuthentication
-             Specifies whether pure RSA authentication is allowed.  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].  This option applies to protocol version 1
-             only.
-
-     ServerKeyBits
-             Defines the number of bits in the ephemeral protocol version 1
-             server key.  The default and minimum value is 1024.
-
      StreamLocalBindMask
              Sets the octal file creation mode mask (umask) used when creating
              a Unix-domain socket file for local or remote port forwarding.
@@ -860,14 +824,14 @@ DESCRIPTION
              domain socket file.  This option is only used for port forwarding
              to a Unix-domain socket file.
 
-             The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             The argument must be yes or no.  The default is no.
 
      StrictModes
              Specifies whether sshd(8) should check file modes and ownership
              of the user's files and home directory before accepting login.
              This is normally desirable because novices sometimes accidentally
              leave their directory or files world-writable.  The default is
-             M-bM-^@M-^\yesM-bM-^@M-^].  Note that this does not apply to ChrootDirectory, whose
+             yes.  Note that this does not apply to ChrootDirectory, whose
              permissions and ownership are checked unconditionally.
 
      Subsystem
@@ -875,15 +839,14 @@ DESCRIPTION
              Arguments should be a subsystem name and a command (with optional
              arguments) to execute upon subsystem request.
 
-             The command sftp-server(8) implements the M-bM-^@M-^\sftpM-bM-^@M-^] file transfer
+             The command sftp-server implements the SFTP file transfer
              subsystem.
 
-             Alternately the name M-bM-^@M-^\internal-sftpM-bM-^@M-^] implements an in-process
-             M-bM-^@M-^\sftpM-bM-^@M-^] server.  This may simplify configurations using
-             ChrootDirectory to force a different filesystem root on clients.
+             Alternately the name internal-sftp implements an in-process SFTP
+             server.  This may simplify configurations using ChrootDirectory
+             to force a different filesystem root on clients.
 
-             By default no subsystems are defined.  Note that this option
-             applies to protocol version 2 only.
+             By default no subsystems are defined.
 
      SyslogFacility
              Gives the facility code that is used when logging messages from
@@ -898,23 +861,22 @@ DESCRIPTION
              this means that connections will die if the route is down
              temporarily, and some people find it annoying.  On the other
              hand, if TCP keepalives are not sent, sessions may hang
-             indefinitely on the server, leaving M-bM-^@M-^\ghostM-bM-^@M-^] users and consuming
+             indefinitely on the server, leaving "ghost" users and consuming
              server resources.
 
-             The default is M-bM-^@M-^\yesM-bM-^@M-^] (to send TCP keepalive messages), and the
+             The default is yes (to send TCP keepalive messages), and the
              server will notice if the network goes down or the client host
              crashes.  This avoids infinitely hanging sessions.
 
-             To disable TCP keepalive messages, the value should be set to
-             M-bM-^@M-^\noM-bM-^@M-^].
+             To disable TCP keepalive messages, the value should be set to no.
 
      TrustedUserCAKeys
              Specifies a file containing public keys of certificate
              authorities that are trusted to sign user certificates for
-             authentication, or M-bM-^@M-^\noneM-bM-^@M-^] to not use one.  Keys are listed one
-             per line; empty lines and comments starting with M-bM-^@M-^X#M-bM-^@M-^Y are allowed.
-             If a certificate is presented for authentication and has its
-             signing CA key listed in this file, then it may be used for
+             authentication, or none to not use one.  Keys are listed one per
+             line; empty lines and comments starting with M-bM-^@M-^X#M-bM-^@M-^Y are allowed.  If
+             a certificate is presented for authentication and has its signing
+             CA key listed in this file, then it may be used for
              authentication for any user listed in the certificate's
              principals list.  Note that certificates that lack a list of
              principals will not be permitted for authentication using
@@ -925,20 +887,12 @@ DESCRIPTION
              and to check that the resolved host name for the remote IP
              address maps back to the very same IP address.
 
-             If this option is set to M-bM-^@M-^\noM-bM-^@M-^] (the default) then only addresses
-             and not host names may be used in ~/.ssh/known_hosts from and
+             If this option is set to no (the default) then only addresses and
+             not host names may be used in ~/.ssh/authorized_keys from and
              sshd_config Match Host directives.
 
-     UseLogin
-             Specifies whether login(1) is used for interactive login
-             sessions.  The default is M-bM-^@M-^\noM-bM-^@M-^].  Note that login(1) is never used
-             for remote command execution.  Note also, that if this is
-             enabled, X11Forwarding will be disabled because login(1) does not
-             know how to handle xauth(1) cookies.  If UsePrivilegeSeparation
-             is specified, it will be disabled after authentication.
-
      UsePAM  Enables the Pluggable Authentication Module interface.  If set to
-             M-bM-^@M-^\yesM-bM-^@M-^] this will enable PAM authentication using
+             yes this will enable PAM authentication using
              ChallengeResponseAuthentication and PasswordAuthentication in
              addition to PAM account and session module processing for all
              authentication types.
@@ -948,23 +902,12 @@ DESCRIPTION
              either PasswordAuthentication or ChallengeResponseAuthentication.
 
              If UsePAM is enabled, you will not be able to run sshd(8) as a
-             non-root user.  The default is M-bM-^@M-^\noM-bM-^@M-^].
-
-     UsePrivilegeSeparation
-             Specifies whether sshd(8) separates privileges by creating an
-             unprivileged child process to deal with incoming network traffic.
-             After successful authentication, another process will be created
-             that has the privilege of the authenticated user.  The goal of
-             privilege separation is to prevent privilege escalation by
-             containing any corruption within the unprivileged processes.  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].  If UsePrivilegeSeparation is set to M-bM-^@M-^\sandboxM-bM-^@M-^]
-             then the pre-authentication unprivileged process is subject to
-             additional restrictions.
+             non-root user.  The default is no.
 
      VersionAddendum
              Optionally specifies additional text to append to the SSH
              protocol banner sent by the server upon connection.  The default
-             is M-bM-^@M-^\noneM-bM-^@M-^].
+             is none.
 
      X11DisplayOffset
              Specifies the first display number available for sshd(8)'s X11
@@ -973,41 +916,39 @@ DESCRIPTION
 
      X11Forwarding
              Specifies whether X11 forwarding is permitted.  The argument must
-             be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The default is M-bM-^@M-^\noM-bM-^@M-^].
+             be yes or no.  The default is no.
 
              When X11 forwarding is enabled, there may be additional exposure
              to the server and to client displays if the sshd(8) proxy display
              is configured to listen on the wildcard address (see
-             X11UseLocalhost below), though this is not the default.
-             Additionally, the authentication spoofing and authentication data
-             verification and substitution occur on the client side.  The
-             security risk of using X11 forwarding is that the client's X11
-             display server may be exposed to attack when the SSH client
-             requests forwarding (see the warnings for ForwardX11 in
-             ssh_config(5)).  A system administrator may have a stance in
-             which they want to protect clients that may expose themselves to
-             attack by unwittingly requesting X11 forwarding, which can
-             warrant a M-bM-^@M-^\noM-bM-^@M-^] setting.
+             X11UseLocalhost), though this is not the default.  Additionally,
+             the authentication spoofing and authentication data verification
+             and substitution occur on the client side.  The security risk of
+             using X11 forwarding is that the client's X11 display server may
+             be exposed to attack when the SSH client requests forwarding (see
+             the warnings for ForwardX11 in ssh_config(5)).  A system
+             administrator may have a stance in which they want to protect
+             clients that may expose themselves to attack by unwittingly
+             requesting X11 forwarding, which can warrant a no setting.
 
              Note that disabling X11 forwarding does not prevent users from
              forwarding X11 traffic, as users can always install their own
-             forwarders.  X11 forwarding is automatically disabled if UseLogin
-             is enabled.
+             forwarders.
 
      X11UseLocalhost
              Specifies whether sshd(8) should bind the X11 forwarding server
              to the loopback address or to the wildcard address.  By default,
              sshd binds the forwarding server to the loopback address and sets
              the hostname part of the DISPLAY environment variable to
-             M-bM-^@M-^\localhostM-bM-^@M-^].  This prevents remote hosts from connecting to the
+             localhost.  This prevents remote hosts from connecting to the
              proxy display.  However, some older X11 clients may not function
-             with this configuration.  X11UseLocalhost may be set to M-bM-^@M-^\noM-bM-^@M-^] to
+             with this configuration.  X11UseLocalhost may be set to no to
              specify that the forwarding server should be bound to the
-             wildcard address.  The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].  The
-             default is M-bM-^@M-^\yesM-bM-^@M-^].
+             wildcard address.  The argument must be yes or no.  The default
+             is yes.
 
      XAuthLocation
-             Specifies the full pathname of the xauth(1) program, or M-bM-^@M-^\noneM-bM-^@M-^] to
+             Specifies the full pathname of the xauth(1) program, or none to
              not use one.  The default is /usr/X11R6/bin/xauth.
 
 TIME FORMATS
@@ -1032,6 +973,33 @@ TIME FORMATS
            10m     10 minutes
            1h30m   1 hour 30 minutes (90 minutes)
 
+TOKENS
+     Arguments to some keywords can make use of tokens, which are expanded at
+     runtime:
+
+           %%    A literal M-bM-^@M-^X%M-bM-^@M-^Y.
+           %F    The fingerprint of the CA key.
+           %f    The fingerprint of the key or certificate.
+           %h    The home directory of the user.
+           %i    The key ID in the certificate.
+           %K    The base64-encoded CA key.
+           %k    The base64-encoded key or certificate for authentication.
+           %s    The serial number of the certificate.
+           %T    The type of the CA key.
+           %t    The key or certificate type.
+           %u    The username.
+
+     AuthorizedKeysCommand accepts the tokens %%, %f, %h, %k, %t, and %u.
+
+     AuthorizedKeysFile accepts the tokens %%, %h, and %u.
+
+     AuthorizedPrincipalsCommand accepts the tokens %%, %F, %f, %h, %i, %K,
+     %k, %s, %T, %t, and %u.
+
+     AuthorizedPrincipalsFile accepts the tokens %%, %h, and %u.
+
+     ChrootDirectory accepts the tokens %%, %h, and %u.
+
 FILES
      /etc/ssh/sshd_config
              Contains configuration data for sshd(8).  This file should be
@@ -1039,7 +1007,7 @@ FILES
              necessary) that it be world-readable.
 
 SEE ALSO
-     sshd(8)
+     sftp-server(8), sshd(8)
 
 AUTHORS
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
@@ -1049,4 +1017,4 @@ AUTHORS
      versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
      for privilege separation.
 
-OpenBSD 5.8                     August 14, 2015                    OpenBSD 5.8
+OpenBSD 6.0                     March 14, 2017                     OpenBSD 6.0
index b18d340..ac6ccc7 100644 (file)
@@ -33,8 +33,8 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: sshd_config.5,v 1.211 2015/08/14 15:32:41 jmc Exp $
-.Dd $Mdocdate: August 14 2015 $
+.\" $OpenBSD: sshd_config.5,v 1.243 2017/03/14 07:19:07 djm Exp $
+.Dd $Mdocdate: March 14 2017 $
 .Dt SSHD_CONFIG 5
 .Os
 .Sh NAME
@@ -70,8 +70,7 @@ See
 in
 .Xr ssh_config 5
 for how to configure the client.
-Note that environment passing is only supported for protocol 2, and
-that the
+The
 .Ev TERM
 environment variable is always sent whenever the client
 requests a pseudo-terminal as it is required by the protocol.
@@ -91,19 +90,18 @@ The default is not to accept any environment variables.
 Specifies which address family should be used by
 .Xr sshd 8 .
 Valid arguments are
-.Dq any ,
-.Dq inet
+.Cm any
+(the default),
+.Cm inet
 (use IPv4 only), or
-.Dq inet6
+.Cm inet6
 (use IPv6 only).
-The default is
-.Dq any .
 .It Cm AllowAgentForwarding
 Specifies whether
 .Xr ssh-agent 1
 forwarding is permitted.
 The default is
-.Dq yes .
+.Cm yes .
 Note that disabling agent forwarding does not improve security
 unless users are also denied shell access, as they can always install
 their own forwarders.
@@ -124,44 +122,42 @@ and finally
 See PATTERNS in
 .Xr ssh_config 5
 for more information on patterns.
-.It Cm AllowTcpForwarding
-Specifies whether TCP forwarding is permitted.
+.It Cm AllowStreamLocalForwarding
+Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
 The available options are
-.Dq yes
+.Cm yes
+(the default)
 or
-.Dq all
-to allow TCP forwarding,
-.Dq no
-to prevent all TCP forwarding,
-.Dq local
+.Cm all
+to allow StreamLocal forwarding,
+.Cm no
+to prevent all StreamLocal forwarding,
+.Cm local
 to allow local (from the perspective of
 .Xr ssh 1 )
 forwarding only or
-.Dq remote
+.Cm remote
 to allow remote forwarding only.
-The default is
-.Dq yes .
-Note that disabling TCP forwarding does not improve security unless
+Note that disabling StreamLocal forwarding does not improve security unless
 users are also denied shell access, as they can always install their
 own forwarders.
-.It Cm AllowStreamLocalForwarding
-Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
+.It Cm AllowTcpForwarding
+Specifies whether TCP forwarding is permitted.
 The available options are
-.Dq yes
+.Cm yes
+(the default)
 or
-.Dq all
-to allow StreamLocal forwarding,
-.Dq no
-to prevent all StreamLocal forwarding,
-.Dq local
+.Cm all
+to allow TCP forwarding,
+.Cm no
+to prevent all TCP forwarding,
+.Cm local
 to allow local (from the perspective of
 .Xr ssh 1 )
 forwarding only or
-.Dq remote
+.Cm remote
 to allow remote forwarding only.
-The default is
-.Dq yes .
-Note that disabling StreamLocal forwarding does not improve security unless
+Note that disabling TCP forwarding does not improve security unless
 users are also denied shell access, as they can always install their
 own forwarders.
 .It Cm AllowUsers
@@ -174,6 +170,8 @@ By default, login is allowed for all users.
 If the pattern takes the form USER@HOST then USER and HOST
 are separately checked, restricting logins to particular
 users from particular hosts.
+HOST criteria may additionally contain addresses to match in CIDR
+address/masklen format.
 The allow/deny directives are processed in the following order:
 .Cm DenyUsers ,
 .Cm AllowUsers ,
@@ -188,76 +186,74 @@ for more information on patterns.
 Specifies the authentication methods that must be successfully completed
 for a user to be granted access.
 This option must be followed by one or more comma-separated lists of
-authentication method names.
-Successful authentication requires completion of every method in at least
-one of these lists.
+authentication method names, or by the single string
+.Cm any
+to indicate the default behaviour of accepting any single authentication
+method.
+If the default is overridden, then successful authentication requires
+completion of every method in at least one of these lists.
 .Pp
-For example, an argument of
-.Dq publickey,password publickey,keyboard-interactive
+For example,
+.Qq publickey,password publickey,keyboard-interactive
 would require the user to complete public key authentication, followed by
 either password or keyboard interactive authentication.
 Only methods that are next in one or more lists are offered at each stage,
-so for this example, it would not be possible to attempt password or
+so for this example it would not be possible to attempt password or
 keyboard-interactive authentication before public key.
 .Pp
 For keyboard interactive authentication it is also possible to
 restrict authentication to a specific device by appending a
 colon followed by the device identifier
-.Dq bsdauth ,
-.Dq pam ,
+.Cm bsdauth ,
+.Cm pam ,
 or
-.Dq skey ,
+.Cm skey ,
 depending on the server configuration.
 For example,
-.Dq keyboard-interactive:bsdauth
+.Qq keyboard-interactive:bsdauth
 would restrict keyboard interactive authentication to the
-.Dq bsdauth
+.Cm bsdauth
 device.
 .Pp
-If the
-.Dq publickey
-method is listed more than once,
+If the publickey method is listed more than once,
 .Xr sshd 8
 verifies that keys that have been used successfully are not reused for
 subsequent authentications.
-For example, an
-.Cm AuthenticationMethods
-of
-.Dq publickey,publickey
-will require successful authentication using two different public keys.
-.Pp
-This option is only available for SSH protocol 2 and will yield a fatal
-error if enabled if protocol 1 is also enabled.
+For example,
+.Qq publickey,publickey
+requires successful authentication using two different public keys.
+.Pp
 Note that each authentication method listed should also be explicitly enabled
 in the configuration.
-The default is not to require multiple authentication; successful completion
-of a single authentication method is sufficient.
 .It Cm AuthorizedKeysCommand
 Specifies a program to be used to look up the user's public keys.
 The program must be owned by root, not writable by group or others and
 specified by an absolute path.
-.Pp
 Arguments to
 .Cm AuthorizedKeysCommand
-may be provided using the following tokens, which will be expanded
-at runtime: %% is replaced by a literal '%', %u is replaced by the
-username being authenticated, %h is replaced by the home directory
-of the user being authenticated, %t is replaced with the key type
-offered for authentication, %f is replaced with the fingerprint of
-the key, and %k is replaced with the key being offered for authentication.
-If no arguments are specified then the username of the target user
-will be supplied.
+accept the tokens described in the
+.Sx TOKENS
+section.
+If no arguments are specified then the username of the target user is used.
 .Pp
 The program should produce on standard output zero or
-more lines of authorized_keys output (see AUTHORIZED_KEYS in
+more lines of authorized_keys output (see
+.Sx AUTHORIZED_KEYS
+in
 .Xr sshd 8 ) .
-If a key supplied by AuthorizedKeysCommand does not successfully authenticate
+If a key supplied by
+.Cm AuthorizedKeysCommand
+does not successfully authenticate
 and authorize the user then public key authentication continues using the usual
 .Cm AuthorizedKeysFile
 files.
-By default, no AuthorizedKeysCommand is run.
+By default, no
+.Cm AuthorizedKeysCommand
+is run.
 .It Cm AuthorizedKeysCommandUser
-Specifies the user under whose account the AuthorizedKeysCommand is run.
+Specifies the user under whose account the
+.Cm AuthorizedKeysCommand
+is run.
 It is recommended to use a dedicated user that has no other role on the host
 than running authorized keys commands.
 If
@@ -268,38 +264,38 @@ is not, then
 .Xr sshd 8
 will refuse to start.
 .It Cm AuthorizedKeysFile
-Specifies the file that contains the public keys that can be used
-for user authentication.
+Specifies the file that contains the public keys used for user authentication.
 The format is described in the
-AUTHORIZED_KEYS FILE FORMAT
+.Sx AUTHORIZED_KEYS FILE FORMAT
 section of
 .Xr sshd 8 .
+Arguments to
 .Cm AuthorizedKeysFile
-may contain tokens of the form %T which are substituted during connection
-setup.
-The following tokens are defined: %% is replaced by a literal '%',
-%h is replaced by the home directory of the user being authenticated, and
-%u is replaced by the username of that user.
+accept the tokens described in the
+.Sx TOKENS
+section.
 After expansion,
 .Cm AuthorizedKeysFile
 is taken to be an absolute path or one relative to the user's home
 directory.
 Multiple files may be listed, separated by whitespace.
+Alternately this option may be set to
+.Cm none
+to skip checking for user keys in files.
 The default is
-.Dq .ssh/authorized_keys .ssh/authorized_keys2 .
+.Qq .ssh/authorized_keys .ssh/authorized_keys2 .
 .It Cm AuthorizedPrincipalsCommand
 Specifies a program to be used to generate the list of allowed
 certificate principals as per
 .Cm AuthorizedPrincipalsFile .
 The program must be owned by root, not writable by group or others and
 specified by an absolute path.
-.Pp
 Arguments to
 .Cm AuthorizedPrincipalsCommand
-may be provided using the following tokens, which will be expanded
-at runtime: %% is replaced by a literal '%', %u is replaced by the
-username being authenticated and %h is replaced by the home directory
-of the user being authenticated.
+accept the tokens described in the
+.Sx TOKENS
+section.
+If no arguments are specified then the username of the target user is used.
 .Pp
 The program should produce on standard output zero or
 more lines of
@@ -311,9 +307,13 @@ or
 .Cm AuthorizedPrincipalsFile
 is specified, then certificates offered by the client for authentication
 must contain a principal that is listed.
-By default, no AuthorizedPrincipalsCommand is run.
+By default, no
+.Cm AuthorizedPrincipalsCommand
+is run.
 .It Cm AuthorizedPrincipalsCommandUser
-Specifies the user under whose account the AuthorizedPrincipalsCommand is run.
+Specifies the user under whose account the
+.Cm AuthorizedPrincipalsCommand
+is run.
 It is recommended to use a dedicated user that has no other role on the host
 than running authorized principals commands.
 If
@@ -330,29 +330,28 @@ When using certificates signed by a key listed in
 .Cm TrustedUserCAKeys ,
 this file lists names, one of which must appear in the certificate for it
 to be accepted for authentication.
-Names are listed one per line preceded by key options (as described
-in AUTHORIZED_KEYS FILE FORMAT in
+Names are listed one per line preceded by key options (as described in
+.Sx AUTHORIZED_KEYS FILE FORMAT
+in
 .Xr sshd 8 ) .
 Empty lines and comments starting with
 .Ql #
 are ignored.
 .Pp
+Arguments to
 .Cm AuthorizedPrincipalsFile
-may contain tokens of the form %T which are substituted during connection
-setup.
-The following tokens are defined: %% is replaced by a literal '%',
-%h is replaced by the home directory of the user being authenticated, and
-%u is replaced by the username of that user.
+accept the tokens described in the
+.Sx TOKENS
+section.
 After expansion,
 .Cm AuthorizedPrincipalsFile
-is taken to be an absolute path or one relative to the user's home
-directory.
-.Pp
+is taken to be an absolute path or one relative to the user's home directory.
 The default is
-.Dq none ,
+.Cm none ,
 i.e. not to use a principals file \(en in this case, the username
 of the user must appear in a certificate's principals list for it to be
 accepted.
+.Pp
 Note that
 .Cm AuthorizedPrincipalsFile
 is only used when authentication proceeds using a CA listed in
@@ -368,16 +367,15 @@ for details).
 The contents of the specified file are sent to the remote user before
 authentication is allowed.
 If the argument is
-.Dq none
+.Cm none
 then no banner is displayed.
-This option is only available for protocol version 2.
 By default, no banner is displayed.
 .It Cm ChallengeResponseAuthentication
 Specifies whether challenge-response authentication is allowed (e.g. via
 PAM or through authentication styles supported in
 .Xr login.conf 5 )
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm ChrootDirectory
 Specifies the pathname of a directory to
 .Xr chroot 2
@@ -389,11 +387,11 @@ which are not writable by any other user or group.
 After the chroot,
 .Xr sshd 8
 changes the working directory to the user's home directory.
-.Pp
-The pathname may contain the following tokens that are expanded at runtime once
-the connecting user has been authenticated: %% is replaced by a literal '%',
-%h is replaced by the home directory of the user being authenticated, and
-%u is replaced by the username of that user.
+Arguments to
+.Cm ChrootDirectory
+accept the tokens described in the
+.Sx TOKENS
+section.
 .Pp
 The
 .Cm ChrootDirectory
@@ -412,10 +410,9 @@ nodes such as
 and
 .Xr tty 4
 devices.
-For file transfer sessions using
-.Dq sftp ,
-no additional configuration of the environment is necessary if the
-in-process sftp server is used,
+For file transfer sessions using SFTP
+no additional configuration of the environment is necessary if the in-process
+sftp-server is used,
 though sessions which use logging may require
 .Pa /dev/log
 inside the chroot directory on some operating systems (see
@@ -429,15 +426,21 @@ Misconfiguration can lead to unsafe environments which
 .Xr sshd 8
 cannot detect.
 .Pp
-The default is not to
+The default is
+.Cm none ,
+indicating not to
 .Xr chroot 2 .
 .It Cm Ciphers
-Specifies the ciphers allowed for protocol version 2.
+Specifies the ciphers allowed.
 Multiple ciphers must be comma-separated.
 If the specified value begins with a
 .Sq +
 character, then the specified ciphers will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified ciphers (including wildcards) will be removed
+from the default set instead of replacing them.
 .Pp
 The supported ciphers are:
 .Pp
@@ -481,23 +484,17 @@ aes128-ctr,aes192-ctr,aes256-ctr,
 aes128-gcm@openssh.com,aes256-gcm@openssh.com
 .Ed
 .Pp
-The list of available ciphers may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq cipher .
+The list of available ciphers may also be obtained using
+.Qq ssh -Q cipher .
 .It Cm ClientAliveCountMax
-Sets the number of client alive messages (see below) which may be
-sent without
+Sets the number of client alive messages which may be sent without
 .Xr sshd 8
 receiving any messages back from the client.
 If this threshold is reached while client alive messages are being sent,
 sshd will disconnect the client, terminating the session.
 It is important to note that the use of client alive messages is very
 different from
-.Cm TCPKeepAlive
-(below).
+.Cm TCPKeepAlive .
 The client alive messages are sent through the encrypted channel
 and therefore will not be spoofable.
 The TCP keepalive option enabled by
@@ -509,11 +506,10 @@ server depend on knowing when a connection has become inactive.
 The default value is 3.
 If
 .Cm ClientAliveInterval
-(see below) is set to 15, and
+is set to 15, and
 .Cm ClientAliveCountMax
 is left at the default, unresponsive SSH clients
 will be disconnected after approximately 45 seconds.
-This option applies to protocol version 2 only.
 .It Cm ClientAliveInterval
 Sets a timeout interval in seconds after which if no data has been received
 from the client,
@@ -522,17 +518,18 @@ will send a message through the encrypted
 channel to request a response from the client.
 The default
 is 0, indicating that these messages will not be sent to the client.
-This option applies to protocol version 2 only.
 .It Cm Compression
-Specifies whether compression is allowed, or delayed until
+Specifies whether compression is enabled after
 the user has authenticated successfully.
 The argument must be
-.Dq yes ,
-.Dq delayed ,
+.Cm yes ,
+.Cm delayed
+(a legacy synonym for
+.Cm yes )
 or
-.Dq no .
+.Cm no .
 The default is
-.Dq delayed .
+.Cm yes .
 .It Cm DenyGroups
 This keyword can be followed by a list of group name patterns, separated
 by spaces.
@@ -559,6 +556,8 @@ By default, login is allowed for all users.
 If the pattern takes the form USER@HOST then USER and HOST
 are separately checked, restricting logins to particular
 users from particular hosts.
+HOST criteria may additionally contain addresses to match in CIDR
+address/masklen format.
 The allow/deny directives are processed in the following order:
 .Cm DenyUsers ,
 .Cm AllowUsers ,
@@ -569,14 +568,20 @@ and finally
 See PATTERNS in
 .Xr ssh_config 5
 for more information on patterns.
+.It Cm DisableForwarding
+Disables all forwarding features, including X11,
+.Xr ssh-agent 1 ,
+TCP and StreamLocal.
+This option overrides all other forwarding-related options and may
+simplify restricted configurations.
 .It Cm FingerprintHash
 Specifies the hash algorithm used when logging key fingerprints.
 Valid options are:
-.Dq md5
+.Cm md5
 and
-.Dq sha256 .
+.Cm sha256 .
 The default is
-.Dq sha256 .
+.Cm sha256 .
 .It Cm ForceCommand
 Forces the execution of the command specified by
 .Cm ForceCommand ,
@@ -592,10 +597,12 @@ The command originally supplied by the client is available in the
 .Ev SSH_ORIGINAL_COMMAND
 environment variable.
 Specifying a command of
-.Dq internal-sftp
-will force the use of an in-process sftp server that requires no support
+.Cm internal-sftp
+will force the use of an in-process SFTP server that requires no support
 files when used with
 .Cm ChrootDirectory .
+The default is
+.Cm none .
 .It Cm GatewayPorts
 Specifies whether remote hosts are allowed to connect to ports
 forwarded for the client.
@@ -608,40 +615,37 @@ can be used to specify that sshd
 should allow remote port forwardings to bind to non-loopback addresses, thus
 allowing other hosts to connect.
 The argument may be
-.Dq no
+.Cm no
 to force remote port forwardings to be available to the local host only,
-.Dq yes
+.Cm yes
 to force remote port forwardings to bind to the wildcard address, or
-.Dq clientspecified
+.Cm clientspecified
 to allow the client to select the address to which the forwarding is bound.
 The default is
-.Dq no .
+.Cm no .
 .It Cm GSSAPIAuthentication
 Specifies whether user authentication based on GSSAPI is allowed.
 The default is
-.Dq no .
-Note that this option applies to protocol version 2 only.
+.Cm no .
 .It Cm GSSAPICleanupCredentials
 Specifies whether to automatically destroy the user's credentials cache
 on logout.
 The default is
-.Dq yes .
-Note that this option applies to protocol version 2 only.
+.Cm yes .
 .It Cm GSSAPIStrictAcceptorCheck
 Determines whether to be strict about the identity of the GSSAPI acceptor
 a client authenticates against.
 If set to
-.Dq yes
-then the client must authenticate against the
-.Pa host
+.Cm yes
+then the client must authenticate against the host
 service on the current hostname.
 If set to
-.Dq no
+.Cm no
 then the client may authenticate against any service key stored in the
 machine's default store.
 This facility is provided to assist with operation on multi homed machines.
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm HostbasedAcceptedKeyTypes
 Specifies the key types that will be accepted for hostbased authentication
 as a comma-separated pattern list.
@@ -649,6 +653,10 @@ Alternately if the specified value begins with a
 .Sq +
 character, then the specified key types will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified key types (including wildcards) will be removed
+from the default set instead of replacing them.
 The default for this option is:
 .Bd -literal -offset 3n
 ecdsa-sha2-nistp256-cert-v01@openssh.com,
@@ -660,20 +668,14 @@ ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
 ssh-ed25519,ssh-rsa
 .Ed
 .Pp
-The
-.Fl Q
-option of
-.Xr ssh 1
-may be used to list supported key types.
+The list of available key types may also be obtained using
+.Qq ssh -Q key .
 .It Cm HostbasedAuthentication
 Specifies whether rhosts or /etc/hosts.equiv authentication together
 with successful public key client host authentication is allowed
 (host-based authentication).
-This option is similar to
-.Cm RhostsRSAAuthentication
-and applies to protocol version 2 only.
 The default is
-.Dq no .
+.Cm no .
 .It Cm HostbasedUsesNameFromPacketOnly
 Specifies whether or not the server will attempt to perform a reverse
 name lookup when matching the name in the
@@ -684,13 +686,13 @@ and
 files during
 .Cm HostbasedAuthentication .
 A setting of
-.Dq yes
+.Cm yes
 means that
 .Xr sshd 8
 uses the name supplied by the client rather than
 attempting to resolve the name from the TCP connection itself.
 The default is
-.Dq no .
+.Cm no .
 .It Cm HostCertificate
 Specifies a file containing a public host certificate.
 The certificate's public key must match a private host key already specified
@@ -702,15 +704,12 @@ is not to load any certificates.
 .It Cm HostKey
 Specifies a file containing a private host key
 used by SSH.
-The default is
-.Pa /etc/ssh/ssh_host_key
-for protocol version 1, and
+The defaults are
 .Pa /etc/ssh/ssh_host_dsa_key ,
 .Pa /etc/ssh/ssh_host_ecdsa_key ,
 .Pa /etc/ssh/ssh_host_ed25519_key
 and
-.Pa /etc/ssh/ssh_host_rsa_key
-for protocol version 2.
+.Pa /etc/ssh/ssh_host_rsa_key .
 .Pp
 Note that
 .Xr sshd 8
@@ -721,14 +720,6 @@ option restricts which of the keys are actually used by
 .Xr sshd 8 .
 .Pp
 It is possible to have multiple host key files.
-.Dq rsa1
-keys are used for version 1 and
-.Dq dsa ,
-.Dq ecdsa ,
-.Dq ed25519
-or
-.Dq rsa
-are used for version 2 of the SSH protocol.
 It is also possible to specify public host key files instead.
 In this case operations on the private key will be delegated
 to an
@@ -736,13 +727,13 @@ to an
 .It Cm HostKeyAgent
 Identifies the UNIX-domain socket used to communicate
 with an agent that has access to the private host keys.
-If
-.Dq SSH_AUTH_SOCK
+If the string
+.Qq SSH_AUTH_SOCK
 is specified, the location of the socket will be read from the
 .Ev SSH_AUTH_SOCK
 environment variable.
 .It Cm HostKeyAlgorithms
-Specifies the protocol version 2 host key algorithms
+Specifies the host key algorithms
 that the server offers.
 The default for this option is:
 .Bd -literal -offset 3n
@@ -755,20 +746,14 @@ ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
 ssh-ed25519,ssh-rsa
 .Ed
 .Pp
-The list of available key types may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq key .
+The list of available key types may also be obtained using
+.Qq ssh -Q key .
 .It Cm IgnoreRhosts
 Specifies that
 .Pa .rhosts
 and
 .Pa .shosts
 files will not be used in
-.Cm RhostsRSAAuthentication
-or
 .Cm HostbasedAuthentication .
 .Pp
 .Pa /etc/hosts.equiv
@@ -776,66 +761,64 @@ and
 .Pa /etc/shosts.equiv
 are still used.
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm IgnoreUserKnownHosts
 Specifies whether
 .Xr sshd 8
 should ignore the user's
 .Pa ~/.ssh/known_hosts
 during
-.Cm RhostsRSAAuthentication
-or
 .Cm HostbasedAuthentication .
 The default is
-.Dq no .
+.Cm no .
 .It Cm IPQoS
 Specifies the IPv4 type-of-service or DSCP class for the connection.
 Accepted values are
-.Dq af11 ,
-.Dq af12 ,
-.Dq af13 ,
-.Dq af21 ,
-.Dq af22 ,
-.Dq af23 ,
-.Dq af31 ,
-.Dq af32 ,
-.Dq af33 ,
-.Dq af41 ,
-.Dq af42 ,
-.Dq af43 ,
-.Dq cs0 ,
-.Dq cs1 ,
-.Dq cs2 ,
-.Dq cs3 ,
-.Dq cs4 ,
-.Dq cs5 ,
-.Dq cs6 ,
-.Dq cs7 ,
-.Dq ef ,
-.Dq lowdelay ,
-.Dq throughput ,
-.Dq reliability ,
+.Cm af11 ,
+.Cm af12 ,
+.Cm af13 ,
+.Cm af21 ,
+.Cm af22 ,
+.Cm af23 ,
+.Cm af31 ,
+.Cm af32 ,
+.Cm af33 ,
+.Cm af41 ,
+.Cm af42 ,
+.Cm af43 ,
+.Cm cs0 ,
+.Cm cs1 ,
+.Cm cs2 ,
+.Cm cs3 ,
+.Cm cs4 ,
+.Cm cs5 ,
+.Cm cs6 ,
+.Cm cs7 ,
+.Cm ef ,
+.Cm lowdelay ,
+.Cm throughput ,
+.Cm reliability ,
 or a numeric value.
 This option may take one or two arguments, separated by whitespace.
 If one argument is specified, it is used as the packet class unconditionally.
 If two values are specified, the first is automatically selected for
 interactive sessions and the second for non-interactive sessions.
 The default is
-.Dq lowdelay
+.Cm lowdelay
 for interactive sessions and
-.Dq throughput
+.Cm throughput
 for non-interactive sessions.
 .It Cm KbdInteractiveAuthentication
 Specifies whether to allow keyboard-interactive authentication.
 The argument to this keyword must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
+.Cm no .
 The default is to use whatever value
 .Cm ChallengeResponseAuthentication
 is set to
 (by default
-.Dq yes ) .
+.Cm yes ) .
 .It Cm KerberosAuthentication
 Specifies whether the password provided by the user for
 .Cm PasswordAuthentication
@@ -843,24 +826,24 @@ will be validated through the Kerberos KDC.
 To use this option, the server needs a
 Kerberos servtab which allows the verification of the KDC's identity.
 The default is
-.Dq no .
+.Cm no .
 .It Cm KerberosGetAFSToken
 If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
 an AFS token before accessing the user's home directory.
 The default is
-.Dq no .
+.Cm no .
 .It Cm KerberosOrLocalPasswd
 If password authentication through Kerberos fails then
 the password will be validated via any additional local mechanism
 such as
 .Pa /etc/passwd .
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm KerberosTicketCleanup
 Specifies whether to automatically destroy the user's ticket cache
 file on logout.
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm KexAlgorithms
 Specifies the available KEX (Key Exchange) algorithms.
 Multiple algorithms must be comma-separated.
@@ -868,10 +851,16 @@ Alternately if the specified value begins with a
 .Sq +
 character, then the specified methods will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified methods (including wildcards) will be removed
+from the default set instead of replacing them.
 The supported algorithms are:
 .Pp
 .Bl -item -compact -offset indent
 .It
+curve25519-sha256
+.It
 curve25519-sha256@libssh.org
 .It
 diffie-hellman-group1-sha1
@@ -891,27 +880,14 @@ ecdh-sha2-nistp521
 .Pp
 The default is:
 .Bd -literal -offset indent
-curve25519-sha256@libssh.org,
+curve25519-sha256,curve25519-sha256@libssh.org,
 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
 diffie-hellman-group-exchange-sha256,
 diffie-hellman-group14-sha1
 .Ed
 .Pp
-The list of available key exchange algorithms may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq kex .
-.It Cm KeyRegenerationInterval
-In protocol version 1, the ephemeral server key is automatically regenerated
-after this many seconds (if it has been used).
-The purpose of regeneration is to prevent
-decrypting captured sessions by later breaking into the machine and
-stealing the keys.
-The key is never stored anywhere.
-If the value is 0, the key is never regenerated.
-The default is 3600 (seconds).
+The list of available key exchange algorithms may also be obtained using
+.Qq ssh -Q kex .
 .It Cm ListenAddress
 Specifies the local addresses
 .Xr sshd 8
@@ -963,16 +939,19 @@ DEBUG2 and DEBUG3 each specify higher levels of debugging output.
 Logging with a DEBUG level violates the privacy of users and is not recommended.
 .It Cm MACs
 Specifies the available MAC (message authentication code) algorithms.
-The MAC algorithm is used in protocol version 2
-for data integrity protection.
+The MAC algorithm is used for data integrity protection.
 Multiple algorithms must be comma-separated.
 If the specified value begins with a
 .Sq +
 character, then the specified algorithms will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified algorithms (including wildcards) will be removed
+from the default set instead of replacing them.
 .Pp
 The algorithms that contain
-.Dq -etm
+.Qq -etm
 calculate the MAC after encryption (encrypt-then-mac).
 These are considered safer and their use recommended.
 The supported MACs are:
@@ -1020,16 +999,13 @@ The default is:
 .Bd -literal -offset indent
 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
+hmac-sha1-etm@openssh.com,
 umac-64@openssh.com,umac-128@openssh.com,
-hmac-sha2-256,hmac-sha2-512
+hmac-sha2-256,hmac-sha2-512,hmac-sha1
 .Ed
 .Pp
-The list of available MAC algorithms may also be obtained using the
-.Fl Q
-option of
-.Xr ssh 1
-with an argument of
-.Dq mac .
+The list of available MAC algorithms may also be obtained using
+.Qq ssh -Q mac .
 .It Cm Match
 Introduces a conditional block.
 If all of the criteria on the
@@ -1058,24 +1034,19 @@ and
 .Cm Address .
 The match patterns may consist of single entries or comma-separated
 lists and may use the wildcard and negation operators described in the
-PATTERNS section of
+.Sx PATTERNS
+section of
 .Xr ssh_config 5 .
 .Pp
 The patterns in an
 .Cm Address
 criteria may additionally contain addresses to match in CIDR
-address/masklen format, e.g.\&
-.Dq 192.0.2.0/24
-or
-.Dq 3ffe:ffff::/32 .
+address/masklen format,
+such as 192.0.2.0/24 or 2001:db8::/32.
 Note that the mask length provided must be consistent with the address -
 it is an error to specify a mask length that is too long for the address
 or one with bits set in this host portion of the address.
-For example,
-.Dq 192.0.2.0/33
-and
-.Dq 192.0.2.0/8
-respectively.
+For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
 .Pp
 Only a subset of keywords may be used on the lines following a
 .Cm Match
@@ -1091,9 +1062,13 @@ Available keywords are
 .Cm AuthorizedKeysCommand ,
 .Cm AuthorizedKeysCommandUser ,
 .Cm AuthorizedKeysFile ,
+.Cm AuthorizedPrincipalsCommand ,
+.Cm AuthorizedPrincipalsCommandUser ,
 .Cm AuthorizedPrincipalsFile ,
 .Cm Banner ,
 .Cm ChrootDirectory ,
+.Cm ClientAliveCountMax ,
+.Cm ClientAliveInterval ,
 .Cm DenyGroups ,
 .Cm DenyUsers ,
 .Cm ForceCommand ,
@@ -1118,8 +1093,6 @@ Available keywords are
 .Cm PubkeyAuthentication ,
 .Cm RekeyLimit ,
 .Cm RevokedKeys ,
-.Cm RhostsRSAAuthentication ,
-.Cm RSAAuthentication ,
 .Cm StreamLocalBindMask ,
 .Cm StreamLocalBindUnlink ,
 .Cm TrustedUserCAKeys ,
@@ -1134,7 +1107,15 @@ Once the number of failures reaches half this value,
 additional failures are logged.
 The default is 6.
 .It Cm MaxSessions
-Specifies the maximum number of open sessions permitted per network connection.
+Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
+sessions permitted per network connection.
+Multiple sessions may be established by clients that support connection
+multiplexing.
+Setting
+.Cm MaxSessions
+to 1 will effectively disable session multiplexing, whereas setting it to 0
+will prevent all shell, login and subsystem sessions while still permitting
+forwarding.
 The default is 10.
 .It Cm MaxStartups
 Specifies the maximum number of concurrent unauthenticated connections to the
@@ -1146,29 +1127,21 @@ The default is 10:30:100.
 .Pp
 Alternatively, random early drop can be enabled by specifying
 the three colon separated values
-.Dq start:rate:full
-(e.g. "10:30:60").
+start:rate:full (e.g. "10:30:60").
 .Xr sshd 8
-will refuse connection attempts with a probability of
-.Dq rate/100
-(30%)
-if there are currently
-.Dq start
-(10)
-unauthenticated connections.
+will refuse connection attempts with a probability of rate/100 (30%)
+if there are currently start (10) unauthenticated connections.
 The probability increases linearly and all connection attempts
-are refused if the number of unauthenticated connections reaches
-.Dq full
-(60).
+are refused if the number of unauthenticated connections reaches full (60).
 .It Cm PasswordAuthentication
 Specifies whether password authentication is allowed.
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm PermitEmptyPasswords
 When password authentication is allowed, it specifies whether the
 server allows login to accounts with empty password strings.
 The default is
-.Dq no .
+.Cm no .
 .It Cm PermitOpen
 Specifies the destinations to which TCP port forwarding is permitted.
 The forwarding specification must be one of the following forms:
@@ -1193,33 +1166,36 @@ The forwarding specification must be one of the following forms:
 .Pp
 Multiple forwards may be specified by separating them with whitespace.
 An argument of
-.Dq any
+.Cm any
 can be used to remove all restrictions and permit any forwarding requests.
 An argument of
-.Dq none
+.Cm none
 can be used to prohibit all forwarding requests.
+The wildcard
+.Sq *
+can be used for host or port to allow all hosts or ports, respectively.
 By default all port forwarding requests are permitted.
 .It Cm PermitRootLogin
 Specifies whether root can log in using
 .Xr ssh 1 .
 The argument must be
-.Dq yes ,
-.Dq prohibit-password ,
-.Dq without-password ,
-.Dq forced-commands-only ,
+.Cm yes ,
+.Cm prohibit-password ,
+.Cm without-password ,
+.Cm forced-commands-only ,
 or
-.Dq no .
+.Cm no .
 The default is
-.Dq prohibit-password .
+.Cm prohibit-password .
 .Pp
 If this option is set to
-.Dq prohibit-password
+.Cm prohibit-password
 or
-.Dq without-password ,
+.Cm without-password ,
 password and keyboard-interactive authentication are disabled for root.
 .Pp
 If this option is set to
-.Dq forced-commands-only ,
+.Cm forced-commands-only ,
 root login with public key authentication will be allowed,
 but only if the
 .Ar command
@@ -1229,37 +1205,37 @@ normally not allowed).
 All other authentication methods are disabled for root.
 .Pp
 If this option is set to
-.Dq no ,
+.Cm no ,
 root is not allowed to log in.
+.It Cm PermitTTY
+Specifies whether
+.Xr pty 4
+allocation is permitted.
+The default is
+.Cm yes .
 .It Cm PermitTunnel
 Specifies whether
 .Xr tun 4
 device forwarding is allowed.
 The argument must be
-.Dq yes ,
-.Dq point-to-point
+.Cm yes ,
+.Cm point-to-point
 (layer 3),
-.Dq ethernet
+.Cm ethernet
 (layer 2), or
-.Dq no .
+.Cm no .
 Specifying
-.Dq yes
+.Cm yes
 permits both
-.Dq point-to-point
+.Cm point-to-point
 and
-.Dq ethernet .
+.Cm ethernet .
 The default is
-.Dq no .
+.Cm no .
 .Pp
 Independent of this setting, the permissions of the selected
 .Xr tun 4
 device must allow access to the user.
-.It Cm PermitTTY
-Specifies whether
-.Xr pty 4
-allocation is permitted.
-The default is
-.Dq yes .
 .It Cm PermitUserEnvironment
 Specifies whether
 .Pa ~/.ssh/environment
@@ -1270,7 +1246,7 @@ options in
 are processed by
 .Xr sshd 8 .
 The default is
-.Dq no .
+.Cm no .
 Enabling environment processing may enable users to bypass access
 restrictions in some configurations using mechanisms such as
 .Ev LD_PRELOAD .
@@ -1279,11 +1255,11 @@ Specifies whether any
 .Pa ~/.ssh/rc
 file is executed.
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm PidFile
 Specifies the file that contains the process ID of the
 SSH daemon, or
-.Dq none
+.Cm none
 to not write one.
 The default is
 .Pa /var/run/sshd.pid .
@@ -1301,7 +1277,7 @@ Specifies whether
 should print the date and time of the last user login when a user logs
 in interactively.
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm PrintMotd
 Specifies whether
 .Xr sshd 8
@@ -1312,25 +1288,7 @@ when a user logs in interactively.
 .Pa /etc/profile ,
 or equivalent.)
 The default is
-.Dq yes .
-.It Cm Protocol
-Specifies the protocol versions
-.Xr sshd 8
-supports.
-The possible values are
-.Sq 1
-and
-.Sq 2 .
-Multiple versions must be comma-separated.
-The default is
-.Sq 2 .
-Note that the order of the protocol list does not indicate preference,
-because the client selects among multiple protocol versions offered
-by the server.
-Specifying
-.Dq 2,1
-is identical to
-.Dq 1,2 .
+.Cm yes .
 .It Cm PubkeyAcceptedKeyTypes
 Specifies the key types that will be accepted for public key authentication
 as a comma-separated pattern list.
@@ -1338,6 +1296,10 @@ Alternately if the specified value begins with a
 .Sq +
 character, then the specified key types will be appended to the default set
 instead of replacing them.
+If the specified value begins with a
+.Sq -
+character, then the specified key types (including wildcards) will be removed
+from the default set instead of replacing them.
 The default for this option is:
 .Bd -literal -offset 3n
 ecdsa-sha2-nistp256-cert-v01@openssh.com,
@@ -1349,16 +1311,12 @@ ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
 ssh-ed25519,ssh-rsa
 .Ed
 .Pp
-The
-.Fl Q
-option of
-.Xr ssh 1
-may be used to list supported key types.
+The list of available key types may also be obtained using
+.Qq ssh -Q key .
 .It Cm PubkeyAuthentication
 Specifies whether public key authentication is allowed.
 The default is
-.Dq yes .
-Note that this option applies to protocol version 2 only.
+.Cm yes .
 .It Cm RekeyLimit
 Specifies the maximum amount of data that may be transmitted before the
 session key is renegotiated, optionally followed a maximum amount of
@@ -1381,13 +1339,12 @@ section.
 The default value for
 .Cm RekeyLimit
 is
-.Dq default none ,
+.Cm default none ,
 which means that rekeying is performed after the cipher's default amount
 of data has been sent or received and no time based rekeying is done.
-This option applies to protocol version 2 only.
 .It Cm RevokedKeys
 Specifies revoked public keys file, or
-.Dq none
+.Cm none
 to not use one.
 Keys listed in this file will be refused for public key authentication.
 Note that if this file is not readable, then public key authentication will
@@ -1397,20 +1354,6 @@ an OpenSSH Key Revocation List (KRL) as generated by
 .Xr ssh-keygen 1 .
 For more information on KRLs, see the KEY REVOCATION LISTS section in
 .Xr ssh-keygen 1 .
-.It Cm RhostsRSAAuthentication
-Specifies whether rhosts or /etc/hosts.equiv authentication together
-with successful RSA host authentication is allowed.
-The default is
-.Dq no .
-This option applies to protocol version 1 only.
-.It Cm RSAAuthentication
-Specifies whether pure RSA authentication is allowed.
-The default is
-.Dq yes .
-This option applies to protocol version 1 only.
-.It Cm ServerKeyBits
-Defines the number of bits in the ephemeral protocol version 1 server key.
-The default and minimum value is 1024.
 .It Cm StreamLocalBindMask
 Sets the octal file creation mode mask
 .Pq umask
@@ -1433,11 +1376,11 @@ will be unable to forward the port to the Unix-domain socket file.
 This option is only used for port forwarding to a Unix-domain socket file.
 .Pp
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
+.Cm no .
 The default is
-.Dq no .
+.Cm no .
 .It Cm StrictModes
 Specifies whether
 .Xr sshd 8
@@ -1446,7 +1389,7 @@ user's files and home directory before accepting login.
 This is normally desirable because novices sometimes accidentally leave their
 directory or files world-writable.
 The default is
-.Dq yes .
+.Cm yes .
 Note that this does not apply to
 .Cm ChrootDirectory ,
 whose permissions and ownership are checked unconditionally.
@@ -1456,22 +1399,17 @@ Arguments should be a subsystem name and a command (with optional arguments)
 to execute upon subsystem request.
 .Pp
 The command
-.Xr sftp-server 8
-implements the
-.Dq sftp
-file transfer subsystem.
+.Cm sftp-server
+implements the SFTP file transfer subsystem.
 .Pp
 Alternately the name
-.Dq internal-sftp
-implements an in-process
-.Dq sftp
-server.
+.Cm internal-sftp
+implements an in-process SFTP server.
 This may simplify configurations using
 .Cm ChrootDirectory
 to force a different filesystem root on clients.
 .Pp
 By default no subsystems are defined.
-Note that this option applies to protocol version 2 only.
 .It Cm SyslogFacility
 Gives the facility code that is used when logging messages from
 .Xr sshd 8 .
@@ -1488,21 +1426,21 @@ connections will die if the route is down temporarily, and some people
 find it annoying.
 On the other hand, if TCP keepalives are not sent,
 sessions may hang indefinitely on the server, leaving
-.Dq ghost
+.Qq ghost
 users and consuming server resources.
 .Pp
 The default is
-.Dq yes
+.Cm yes
 (to send TCP keepalive messages), and the server will notice
 if the network goes down or the client host crashes.
 This avoids infinitely hanging sessions.
 .Pp
 To disable TCP keepalive messages, the value should be set to
-.Dq no .
+.Cm no .
 .It Cm TrustedUserCAKeys
 Specifies a file containing public keys of certificate authorities that are
 trusted to sign user certificates for authentication, or
-.Dq none
+.Cm none
 to not use one.
 Keys are listed one per line; empty lines and comments starting with
 .Ql #
@@ -1523,38 +1461,19 @@ the resolved host name for the remote IP address maps back to the
 very same IP address.
 .Pp
 If this option is set to
-.Dq no
+.Cm no
 (the default) then only addresses and not host names may be used in
-.Pa ~/.ssh/known_hosts
+.Pa ~/.ssh/authorized_keys
 .Cm from
 and
 .Nm
 .Cm Match
 .Cm Host
 directives.
-.It Cm UseLogin
-Specifies whether
-.Xr login 1
-is used for interactive login sessions.
-The default is
-.Dq no .
-Note that
-.Xr login 1
-is never used for remote command execution.
-Note also, that if this is enabled,
-.Cm X11Forwarding
-will be disabled because
-.Xr login 1
-does not know how to handle
-.Xr xauth 1
-cookies.
-If
-.Cm UsePrivilegeSeparation
-is specified, it will be disabled after authentication.
 .It Cm UsePAM
 Enables the Pluggable Authentication Module interface.
 If set to
-.Dq yes
+.Cm yes
 this will enable PAM authentication using
 .Cm ChallengeResponseAuthentication
 and
@@ -1574,29 +1493,12 @@ is enabled, you will not be able to run
 .Xr sshd 8
 as a non-root user.
 The default is
-.Dq no .
-.It Cm UsePrivilegeSeparation
-Specifies whether
-.Xr sshd 8
-separates privileges by creating an unprivileged child process
-to deal with incoming network traffic.
-After successful authentication, another process will be created that has
-the privilege of the authenticated user.
-The goal of privilege separation is to prevent privilege
-escalation by containing any corruption within the unprivileged processes.
-The default is
-.Dq yes .
-If
-.Cm UsePrivilegeSeparation
-is set to
-.Dq sandbox
-then the pre-authentication unprivileged process is subject to additional
-restrictions.
+.Cm no .
 .It Cm VersionAddendum
 Optionally specifies additional text to append to the SSH protocol banner
 sent by the server upon connection.
 The default is
-.Dq none .
+.Cm none .
 .It Cm X11DisplayOffset
 Specifies the first display number available for
 .Xr sshd 8 Ns 's
@@ -1606,18 +1508,18 @@ The default is 10.
 .It Cm X11Forwarding
 Specifies whether X11 forwarding is permitted.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
+.Cm no .
 The default is
-.Dq no .
+.Cm no .
 .Pp
 When X11 forwarding is enabled, there may be additional exposure to
 the server and to client displays if the
 .Xr sshd 8
 proxy display is configured to listen on the wildcard address (see
-.Cm X11UseLocalhost
-below), though this is not the default.
+.Cm X11UseLocalhost ) ,
+though this is not the default.
 Additionally, the authentication spoofing and authentication data
 verification and substitution occur on the client side.
 The security risk of using X11 forwarding is that the client's X11
@@ -1629,14 +1531,11 @@ in
 A system administrator may have a stance in which they want to
 protect clients that may expose themselves to attack by unwittingly
 requesting X11 forwarding, which can warrant a
-.Dq no
+.Cm no
 setting.
 .Pp
 Note that disabling X11 forwarding does not prevent users from
 forwarding X11 traffic, as users can always install their own forwarders.
-X11 forwarding is automatically disabled if
-.Cm UseLogin
-is enabled.
 .It Cm X11UseLocalhost
 Specifies whether
 .Xr sshd 8
@@ -1647,26 +1546,26 @@ sshd binds the forwarding server to the loopback address and sets the
 hostname part of the
 .Ev DISPLAY
 environment variable to
-.Dq localhost .
+.Cm localhost .
 This prevents remote hosts from connecting to the proxy display.
 However, some older X11 clients may not function with this
 configuration.
 .Cm X11UseLocalhost
 may be set to
-.Dq no
+.Cm no
 to specify that the forwarding server should be bound to the wildcard
 address.
 The argument must be
-.Dq yes
+.Cm yes
 or
-.Dq no .
+.Cm no .
 The default is
-.Dq yes .
+.Cm yes .
 .It Cm XAuthLocation
 Specifies the full pathname of the
 .Xr xauth 1
 program, or
-.Dq none
+.Cm none
 to not use one.
 The default is
 .Pa /usr/X11R6/bin/xauth .
@@ -1712,6 +1611,50 @@ Time format examples:
 .It 1h30m
 1 hour 30 minutes (90 minutes)
 .El
+.Sh TOKENS
+Arguments to some keywords can make use of tokens,
+which are expanded at runtime:
+.Pp
+.Bl -tag -width XXXX -offset indent -compact
+.It %%
+A literal
+.Sq % .
+.It %F
+The fingerprint of the CA key.
+.It %f
+The fingerprint of the key or certificate.
+.It %h
+The home directory of the user.
+.It %i
+The key ID in the certificate.
+.It %K
+The base64-encoded CA key.
+.It %k
+The base64-encoded key or certificate for authentication.
+.It %s
+The serial number of the certificate.
+.It \&%T
+The type of the CA key.
+.It %t
+The key or certificate type.
+.It %u
+The username.
+.El
+.Pp
+.Cm AuthorizedKeysCommand
+accepts the tokens %%, %f, %h, %k, %t, and %u.
+.Pp
+.Cm AuthorizedKeysFile
+accepts the tokens %%, %h, and %u.
+.Pp
+.Cm AuthorizedPrincipalsCommand
+accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, and %u.
+.Pp
+.Cm AuthorizedPrincipalsFile
+accepts the tokens %%, %h, and %u.
+.Pp
+.Cm ChrootDirectory
+accepts the tokens %%, %h, and %u.
 .Sh FILES
 .Bl -tag -width Ds
 .It Pa /etc/ssh/sshd_config
@@ -1721,15 +1664,22 @@ This file should be writable by root only, but it is recommended
 (though not necessary) that it be world-readable.
 .El
 .Sh SEE ALSO
+.Xr sftp-server 8 ,
 .Xr sshd 8
 .Sh AUTHORS
+.An -nosplit
 OpenSSH is a derivative of the original and free
-ssh 1.2.12 release by Tatu Ylonen.
-Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
-Theo de Raadt and Dug Song
+ssh 1.2.12 release by
+.An Tatu Ylonen .
+.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
+.An Theo de Raadt
+and
+.An Dug Song
 removed many bugs, re-added newer features and
 created OpenSSH.
-Markus Friedl contributed the support for SSH
-protocol versions 1.5 and 2.0.
-Niels Provos and Markus Friedl contributed support
-for privilege separation.
+.An Markus Friedl
+contributed the support for SSH protocol versions 1.5 and 2.0.
+.An Niels Provos
+and
+.An Markus Friedl
+contributed support for privilege separation.
index 4ca7939..6802070 100644 (file)
--- a/ssherr.c
+++ b/ssherr.c
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ssherr.c,v 1.4 2015/02/16 22:13:32 djm Exp $  */
+/*     $OpenBSD: ssherr.c,v 1.5 2015/09/13 14:39:16 tim Exp $  */
 /*
  * Copyright (c) 2011 Damien Miller
  *
@@ -104,7 +104,7 @@ ssh_err(int n)
        case SSH_ERR_NEED_REKEY:
                return "rekeying not supported by peer";
        case SSH_ERR_PASSPHRASE_TOO_SHORT:
-               return "passphrase is too short (minimum four characters)";
+               return "passphrase is too short (minimum five characters)";
        case SSH_ERR_FILE_CHANGED:
                return "file changed while reading";
        case SSH_ERR_KEY_UNKNOWN_CIPHER:
index 32dd8f2..ecee0b7 100644 (file)
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.21 2015/08/19 23:19:01 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.45 2017/03/10 04:07:20 djm Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Alexander von Gernler.  All rights reserved.
@@ -27,7 +27,6 @@
 
 #include "includes.h"
 
-#include <sys/param.h> /* MIN MAX */
 #include <sys/types.h>
 #include <netinet/in.h>
 
@@ -83,36 +82,41 @@ struct keytype {
        int type;
        int nid;
        int cert;
+       int sigonly;
 };
 static const struct keytype keytypes[] = {
-       { "ssh-ed25519", "ED25519", KEY_ED25519, 0, 0 },
+       { "ssh-ed25519", "ED25519", KEY_ED25519, 0, 0, 0 },
        { "ssh-ed25519-cert-v01@openssh.com", "ED25519-CERT",
-           KEY_ED25519_CERT, 0, 1 },
+           KEY_ED25519_CERT, 0, 1, 0 },
 #ifdef WITH_OPENSSL
-       { NULL, "RSA1", KEY_RSA1, 0, 0 },
-       { "ssh-rsa", "RSA", KEY_RSA, 0, 0 },
-       { "ssh-dss", "DSA", KEY_DSA, 0, 0 },
+# ifdef WITH_SSH1
+       { NULL, "RSA1", KEY_RSA1, 0, 0, 0 },
+# endif
+       { "ssh-rsa", "RSA", KEY_RSA, 0, 0, 0 },
+       { "rsa-sha2-256", "RSA", KEY_RSA, 0, 0, 1 },
+       { "rsa-sha2-512", "RSA", KEY_RSA, 0, 0, 1 },
+       { "ssh-dss", "DSA", KEY_DSA, 0, 0, 0 },
 # ifdef OPENSSL_HAS_ECC
-       { "ecdsa-sha2-nistp256", "ECDSA", KEY_ECDSA, NID_X9_62_prime256v1, 0 },
-       { "ecdsa-sha2-nistp384", "ECDSA", KEY_ECDSA, NID_secp384r1, 0 },
+       { "ecdsa-sha2-nistp256", "ECDSA", KEY_ECDSA, NID_X9_62_prime256v1, 0, 0 },
+       { "ecdsa-sha2-nistp384", "ECDSA", KEY_ECDSA, NID_secp384r1, 0, 0 },
 #  ifdef OPENSSL_HAS_NISTP521
-       { "ecdsa-sha2-nistp521", "ECDSA", KEY_ECDSA, NID_secp521r1, 0 },
+       { "ecdsa-sha2-nistp521", "ECDSA", KEY_ECDSA, NID_secp521r1, 0, 0 },
 #  endif /* OPENSSL_HAS_NISTP521 */
 # endif /* OPENSSL_HAS_ECC */
-       { "ssh-rsa-cert-v01@openssh.com", "RSA-CERT", KEY_RSA_CERT, 0, 1 },
-       { "ssh-dss-cert-v01@openssh.com", "DSA-CERT", KEY_DSA_CERT, 0, 1 },
+       { "ssh-rsa-cert-v01@openssh.com", "RSA-CERT", KEY_RSA_CERT, 0, 1, 0 },
+       { "ssh-dss-cert-v01@openssh.com", "DSA-CERT", KEY_DSA_CERT, 0, 1, 0 },
 # ifdef OPENSSL_HAS_ECC
        { "ecdsa-sha2-nistp256-cert-v01@openssh.com", "ECDSA-CERT",
-           KEY_ECDSA_CERT, NID_X9_62_prime256v1, 1 },
+           KEY_ECDSA_CERT, NID_X9_62_prime256v1, 1, 0 },
        { "ecdsa-sha2-nistp384-cert-v01@openssh.com", "ECDSA-CERT",
-           KEY_ECDSA_CERT, NID_secp384r1, 1 },
+           KEY_ECDSA_CERT, NID_secp384r1, 1, 0 },
 #  ifdef OPENSSL_HAS_NISTP521
        { "ecdsa-sha2-nistp521-cert-v01@openssh.com", "ECDSA-CERT",
-           KEY_ECDSA_CERT, NID_secp521r1, 1 },
+           KEY_ECDSA_CERT, NID_secp521r1, 1, 0 },
 #  endif /* OPENSSL_HAS_NISTP521 */
 # endif /* OPENSSL_HAS_ECC */
 #endif /* WITH_OPENSSL */
-       { NULL, NULL, -1, -1, 0 }
+       { NULL, NULL, -1, -1, 0, 0 }
 };
 
 const char *
@@ -193,7 +197,7 @@ sshkey_ecdsa_nid_from_name(const char *name)
 }
 
 char *
-key_alg_list(int certs_only, int plain_only)
+sshkey_alg_list(int certs_only, int plain_only, int include_sigonly, char sep)
 {
        char *tmp, *ret = NULL;
        size_t nlen, rlen = 0;
@@ -202,10 +206,12 @@ key_alg_list(int certs_only, int plain_only)
        for (kt = keytypes; kt->type != -1; kt++) {
                if (kt->name == NULL)
                        continue;
+               if (!include_sigonly && kt->sigonly)
+                       continue;
                if ((certs_only && !kt->cert) || (plain_only && kt->cert))
                        continue;
                if (ret != NULL)
-                       ret[rlen++] = '\n';
+                       ret[rlen++] = sep;
                nlen = strlen(kt->name);
                if ((tmp = realloc(ret, rlen + nlen + 2)) == NULL) {
                        free(ret);
@@ -417,20 +423,14 @@ cert_free(struct sshkey_cert *cert)
 
        if (cert == NULL)
                return;
-       if (cert->certblob != NULL)
-               sshbuf_free(cert->certblob);
-       if (cert->critical != NULL)
-               sshbuf_free(cert->critical);
-       if (cert->extensions != NULL)
-               sshbuf_free(cert->extensions);
-       if (cert->key_id != NULL)
-               free(cert->key_id);
+       sshbuf_free(cert->certblob);
+       sshbuf_free(cert->critical);
+       sshbuf_free(cert->extensions);
+       free(cert->key_id);
        for (i = 0; i < cert->nprincipals; i++)
                free(cert->principals[i]);
-       if (cert->principals != NULL)
-               free(cert->principals);
-       if (cert->signature_key != NULL)
-               sshkey_free(cert->signature_key);
+       free(cert->principals);
+       sshkey_free(cert->signature_key);
        explicit_bzero(cert, sizeof(*cert));
        free(cert);
 }
@@ -516,7 +516,6 @@ sshkey_new(int type)
        default:
                free(k);
                return NULL;
-               break;
        }
 
        if (sshkey_is_cert(k)) {
@@ -891,9 +890,12 @@ sshkey_fingerprint_raw(const struct sshkey *k, int dgst_alg,
                int nlen = BN_num_bytes(k->rsa->n);
                int elen = BN_num_bytes(k->rsa->e);
 
+               if (nlen < 0 || elen < 0 || nlen >= INT_MAX - elen) {
+                       r = SSH_ERR_INVALID_FORMAT;
+                       goto out;
+               }
                blob_len = nlen + elen;
-               if (nlen >= INT_MAX - elen ||
-                   (blob = malloc(blob_len)) == NULL) {
+               if ((blob = malloc(blob_len)) == NULL) {
                        r = SSH_ERR_ALLOC_FAIL;
                        goto out;
                }
@@ -1085,10 +1087,10 @@ fingerprint_randomart(const char *alg, u_char *dgst_raw, size_t dgst_raw_len,
                        y += (input & 0x2) ? 1 : -1;
 
                        /* assure we are still in bounds */
-                       x = MAX(x, 0);
-                       y = MAX(y, 0);
-                       x = MIN(x, FLDSIZE_X - 1);
-                       y = MIN(y, FLDSIZE_Y - 1);
+                       x = MAXIMUM(x, 0);
+                       y = MAXIMUM(y, 0);
+                       x = MINIMUM(x, FLDSIZE_X - 1);
+                       y = MINIMUM(y, FLDSIZE_Y - 1);
 
                        /* augment the field */
                        if (field[x][y] < len - 2)
@@ -1129,7 +1131,7 @@ fingerprint_randomart(const char *alg, u_char *dgst_raw, size_t dgst_raw_len,
        for (y = 0; y < FLDSIZE_Y; y++) {
                *p++ = '|';
                for (x = 0; x < FLDSIZE_X; x++)
-                       *p++ = augmentation_string[MIN(field[x][y], len)];
+                       *p++ = augmentation_string[MINIMUM(field[x][y], len)];
                *p++ = '|';
                *p++ = '\n';
        }
@@ -1216,7 +1218,7 @@ read_decimal_bignum(char **cpp, BIGNUM *v)
                return SSH_ERR_BIGNUM_TOO_LARGE;
        if (cp[e] == '\0')
                skip = 0;
-       else if (index(" \t\r\n", cp[e]) == NULL)
+       else if (strchr(" \t\r\n", cp[e]) == NULL)
                return SSH_ERR_INVALID_FORMAT;
        cp[e] = '\0';
        if (BN_dec2bn(&v, cp) <= 0)
@@ -1232,14 +1234,16 @@ sshkey_read(struct sshkey *ret, char **cpp)
 {
        struct sshkey *k;
        int retval = SSH_ERR_INVALID_FORMAT;
-       char *cp, *space;
+       char *ep, *cp, *space;
        int r, type, curve_nid = -1;
        struct sshbuf *blob;
 #ifdef WITH_SSH1
-       char *ep;
        u_long bits;
 #endif /* WITH_SSH1 */
 
+       if (ret == NULL)
+               return SSH_ERR_INVALID_ARGUMENT;
+
        cp = *cpp;
 
        switch (ret->type) {
@@ -1247,7 +1251,7 @@ sshkey_read(struct sshkey *ret, char **cpp)
 #ifdef WITH_SSH1
                /* Get number of bits. */
                bits = strtoul(cp, &ep, 10);
-               if (*cp == '\0' || index(" \t\r\n", *ep) == NULL ||
+               if (*cp == '\0' || strchr(" \t\r\n", *ep) == NULL ||
                    bits == 0 || bits > SSHBUF_MAX_BIGNUM * 8)
                        return SSH_ERR_INVALID_FORMAT;  /* Bad bit count... */
                /* Get public exponent, public modulus. */
@@ -1255,10 +1259,10 @@ sshkey_read(struct sshkey *ret, char **cpp)
                        return r;
                if ((r = read_decimal_bignum(&ep, ret->rsa->n)) < 0)
                        return r;
-               *cpp = ep;
                /* validate the claimed number of bits */
                if (BN_num_bits(ret->rsa->n) != (int)bits)
                        return SSH_ERR_KEY_BITS_MISMATCH;
+               *cpp = ep;
                retval = 0;
 #endif /* WITH_SSH1 */
                break;
@@ -1296,9 +1300,9 @@ sshkey_read(struct sshkey *ret, char **cpp)
                        *space++ = '\0';
                        while (*space == ' ' || *space == '\t')
                                space++;
-                       *cpp = space;
+                       ep = space;
                } else
-                       *cpp = cp + strlen(cp);
+                       ep = cp + strlen(cp);
                if ((r = sshbuf_b64tod(blob, cp)) != 0) {
                        sshbuf_free(blob);
                        return r;
@@ -1329,8 +1333,9 @@ sshkey_read(struct sshkey *ret, char **cpp)
                        ret->cert = k->cert;
                        k->cert = NULL;
                }
+               switch (sshkey_type_plain(ret->type)) {
 #ifdef WITH_OPENSSL
-               if (sshkey_type_plain(ret->type) == KEY_RSA) {
+               case KEY_RSA:
                        if (ret->rsa != NULL)
                                RSA_free(ret->rsa);
                        ret->rsa = k->rsa;
@@ -1338,8 +1343,8 @@ sshkey_read(struct sshkey *ret, char **cpp)
 #ifdef DEBUG_PK
                        RSA_print_fp(stderr, ret->rsa, 8);
 #endif
-               }
-               if (sshkey_type_plain(ret->type) == KEY_DSA) {
+                       break;
+               case KEY_DSA:
                        if (ret->dsa != NULL)
                                DSA_free(ret->dsa);
                        ret->dsa = k->dsa;
@@ -1347,9 +1352,9 @@ sshkey_read(struct sshkey *ret, char **cpp)
 #ifdef DEBUG_PK
                        DSA_print_fp(stderr, ret->dsa, 8);
 #endif
-               }
+                       break;
 # ifdef OPENSSL_HAS_ECC
-               if (sshkey_type_plain(ret->type) == KEY_ECDSA) {
+               case KEY_ECDSA:
                        if (ret->ecdsa != NULL)
                                EC_KEY_free(ret->ecdsa);
                        ret->ecdsa = k->ecdsa;
@@ -1359,17 +1364,19 @@ sshkey_read(struct sshkey *ret, char **cpp)
 #ifdef DEBUG_PK
                        sshkey_dump_ec_key(ret->ecdsa);
 #endif
-               }
+                       break;
 # endif /* OPENSSL_HAS_ECC */
 #endif /* WITH_OPENSSL */
-               if (sshkey_type_plain(ret->type) == KEY_ED25519) {
+               case KEY_ED25519:
                        free(ret->ed25519_pk);
                        ret->ed25519_pk = k->ed25519_pk;
                        k->ed25519_pk = NULL;
 #ifdef DEBUG_PK
                        /* XXX */
 #endif
+                       break;
                }
+               *cpp = ep;
                retval = 0;
 /*XXXX*/
                sshkey_free(k);
@@ -1717,7 +1724,7 @@ sshkey_cert_copy(const struct sshkey *from_key, struct sshkey *to_key)
 
        if ((ret = sshbuf_putb(to->certblob, from->certblob)) != 0 ||
            (ret = sshbuf_putb(to->critical, from->critical)) != 0 ||
-           (ret = sshbuf_putb(to->extensions, from->extensions) != 0))
+           (ret = sshbuf_putb(to->extensions, from->extensions)) != 0)
                return ret;
 
        to->serial = from->serial;
@@ -1758,9 +1765,7 @@ sshkey_from_private(const struct sshkey *k, struct sshkey **pkp)
        struct sshkey *n = NULL;
        int ret = SSH_ERR_INTERNAL_ERROR;
 
-       if (pkp != NULL)
-               *pkp = NULL;
-
+       *pkp = NULL;
        switch (k->type) {
 #ifdef WITH_OPENSSL
        case KEY_DSA:
@@ -1969,7 +1974,8 @@ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
 #ifdef DEBUG_PK /* XXX */
        sshbuf_dump(b, stderr);
 #endif
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
        if ((copy = sshbuf_fromb(b)) == NULL) {
                ret = SSH_ERR_ALLOC_FAIL;
                goto out;
@@ -2124,8 +2130,10 @@ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
                goto out;
        }
        ret = 0;
-       *keyp = key;
-       key = NULL;
+       if (keyp != NULL) {
+               *keyp = key;
+               key = NULL;
+       }
  out:
        sshbuf_free(copy);
        sshkey_free(key);
@@ -2174,7 +2182,7 @@ sshkey_froms(struct sshbuf *buf, struct sshkey **keyp)
 int
 sshkey_sign(const struct sshkey *key,
     u_char **sigp, size_t *lenp,
-    const u_char *data, size_t datalen, u_int compat)
+    const u_char *data, size_t datalen, const char *alg, u_int compat)
 {
        if (sigp != NULL)
                *sigp = NULL;
@@ -2194,7 +2202,7 @@ sshkey_sign(const struct sshkey *key,
 # endif /* OPENSSL_HAS_ECC */
        case KEY_RSA_CERT:
        case KEY_RSA:
-               return ssh_rsa_sign(key, sigp, lenp, data, datalen, compat);
+               return ssh_rsa_sign(key, sigp, lenp, data, datalen, alg);
 #endif /* WITH_OPENSSL */
        case KEY_ED25519:
        case KEY_ED25519_CERT:
@@ -2226,7 +2234,7 @@ sshkey_verify(const struct sshkey *key,
 # endif /* OPENSSL_HAS_ECC */
        case KEY_RSA_CERT:
        case KEY_RSA:
-               return ssh_rsa_verify(key, sig, siglen, data, dlen, compat);
+               return ssh_rsa_verify(key, sig, siglen, data, dlen);
 #endif /* WITH_OPENSSL */
        case KEY_ED25519:
        case KEY_ED25519_CERT:
@@ -2243,9 +2251,7 @@ sshkey_demote(const struct sshkey *k, struct sshkey **dkp)
        struct sshkey *pk;
        int ret = SSH_ERR_INTERNAL_ERROR;
 
-       if (dkp != NULL)
-               *dkp = NULL;
-
+       *dkp = NULL;
        if ((pk = calloc(1, sizeof(*pk))) == NULL)
                return SSH_ERR_ALLOC_FAIL;
        pk->type = k->type;
@@ -2372,7 +2378,7 @@ sshkey_drop_cert(struct sshkey *k)
 
 /* Sign a certified key, (re-)generating the signed certblob. */
 int
-sshkey_certify(struct sshkey *k, struct sshkey *ca)
+sshkey_certify(struct sshkey *k, struct sshkey *ca, const char *alg)
 {
        struct sshbuf *principals = NULL;
        u_char *ca_blob = NULL, *sig_blob = NULL, nonce[32];
@@ -2462,7 +2468,7 @@ sshkey_certify(struct sshkey *k, struct sshkey *ca)
 
        /* Sign the whole mess */
        if ((ret = sshkey_sign(ca, &sig_blob, &sig_len, sshbuf_ptr(cert),
-           sshbuf_len(cert), 0)) != 0)
+           sshbuf_len(cert), alg, 0)) != 0)
                goto out;
 
        /* Append signature and we are done */
@@ -2472,12 +2478,9 @@ sshkey_certify(struct sshkey *k, struct sshkey *ca)
  out:
        if (ret != 0)
                sshbuf_reset(cert);
-       if (sig_blob != NULL)
-               free(sig_blob);
-       if (ca_blob != NULL)
-               free(ca_blob);
-       if (principals != NULL)
-               sshbuf_free(principals);
+       free(sig_blob);
+       free(ca_blob);
+       sshbuf_free(principals);
        return ret;
 }
 
@@ -2538,6 +2541,43 @@ sshkey_cert_check_authority(const struct sshkey *k,
        return 0;
 }
 
+size_t
+sshkey_format_cert_validity(const struct sshkey_cert *cert, char *s, size_t l)
+{
+       char from[32], to[32], ret[64];
+       time_t tt;
+       struct tm *tm;
+
+       *from = *to = '\0';
+       if (cert->valid_after == 0 &&
+           cert->valid_before == 0xffffffffffffffffULL)
+               return strlcpy(s, "forever", l);
+
+       if (cert->valid_after != 0) {
+               /* XXX revisit INT_MAX in 2038 :) */
+               tt = cert->valid_after > INT_MAX ?
+                   INT_MAX : cert->valid_after;
+               tm = localtime(&tt);
+               strftime(from, sizeof(from), "%Y-%m-%dT%H:%M:%S", tm);
+       }
+       if (cert->valid_before != 0xffffffffffffffffULL) {
+               /* XXX revisit INT_MAX in 2038 :) */
+               tt = cert->valid_before > INT_MAX ?
+                   INT_MAX : cert->valid_before;
+               tm = localtime(&tt);
+               strftime(to, sizeof(to), "%Y-%m-%dT%H:%M:%S", tm);
+       }
+
+       if (cert->valid_after == 0)
+               snprintf(ret, sizeof(ret), "before %s", to);
+       else if (cert->valid_before == 0xffffffffffffffffULL)
+               snprintf(ret, sizeof(ret), "after %s", from);
+       else
+               snprintf(ret, sizeof(ret), "from %s to %s", from, to);
+
+       return strlcpy(s, ret, l);
+}
+
 int
 sshkey_private_serialize(const struct sshkey *key, struct sshbuf *b)
 {
@@ -2701,7 +2741,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
                        goto out;
                }
                if ((r = sshkey_ec_validate_public(EC_KEY_get0_group(k->ecdsa),
-                   EC_KEY_get0_public_key(k->ecdsa)) != 0) ||
+                   EC_KEY_get0_public_key(k->ecdsa))) != 0 ||
                    (r = sshkey_ec_validate_private(k->ecdsa)) != 0)
                        goto out;
                break;
@@ -2719,7 +2759,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
                        goto out;
                }
                if ((r = sshkey_ec_validate_public(EC_KEY_get0_group(k->ecdsa),
-                   EC_KEY_get0_public_key(k->ecdsa)) != 0) ||
+                   EC_KEY_get0_public_key(k->ecdsa))) != 0 ||
                    (r = sshkey_ec_validate_private(k->ecdsa)) != 0)
                        goto out;
                break;
@@ -2741,10 +2781,10 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
        case KEY_RSA_CERT:
                if ((r = sshkey_froms(buf, &k)) != 0 ||
                    (r = sshkey_add_private(k)) != 0 ||
-                   (r = sshbuf_get_bignum2(buf, k->rsa->d) != 0) ||
-                   (r = sshbuf_get_bignum2(buf, k->rsa->iqmp) != 0) ||
-                   (r = sshbuf_get_bignum2(buf, k->rsa->p) != 0) ||
-                   (r = sshbuf_get_bignum2(buf, k->rsa->q) != 0) ||
+                   (r = sshbuf_get_bignum2(buf, k->rsa->d)) != 0 ||
+                   (r = sshbuf_get_bignum2(buf, k->rsa->iqmp)) != 0 ||
+                   (r = sshbuf_get_bignum2(buf, k->rsa->p)) != 0 ||
+                   (r = sshbuf_get_bignum2(buf, k->rsa->q)) != 0 ||
                    (r = rsa_generate_additional_parameters(k->rsa)) != 0)
                        goto out;
                break;
@@ -2830,6 +2870,14 @@ sshkey_ec_validate_public(const EC_GROUP *group, const EC_POINT *public)
        BIGNUM *order, *x, *y, *tmp;
        int ret = SSH_ERR_KEY_INVALID_EC_VALUE;
 
+       /*
+        * NB. This assumes OpenSSL has already verified that the public
+        * point lies on the curve. This is done by EC_POINT_oct2point()
+        * implicitly calling EC_POINT_is_on_curve(). If this code is ever
+        * reachable with public points not unmarshalled using
+        * EC_POINT_oct2point then the caller will need to explicitly check.
+        */
+
        if ((bnctx = BN_CTX_new()) == NULL)
                return SSH_ERR_ALLOC_FAIL;
        BN_CTX_start(bnctx);
@@ -2997,13 +3045,11 @@ sshkey_private_to_blob2(const struct sshkey *prv, struct sshbuf *blob,
        size_t i, pubkeylen, keylen, ivlen, blocksize, authlen;
        u_int check;
        int r = SSH_ERR_INTERNAL_ERROR;
-       struct sshcipher_ctx ciphercontext;
+       struct sshcipher_ctx *ciphercontext = NULL;
        const struct sshcipher *cipher;
        const char *kdfname = KDFNAME;
        struct sshbuf *encoded = NULL, *encrypted = NULL, *kdf = NULL;
 
-       memset(&ciphercontext, 0, sizeof(ciphercontext));
-
        if (rounds <= 0)
                rounds = DEFAULT_ROUNDS;
        if (passphrase == NULL || !strlen(passphrase)) {
@@ -3090,7 +3136,7 @@ sshkey_private_to_blob2(const struct sshkey *prv, struct sshbuf *blob,
        if ((r = sshbuf_reserve(encoded,
            sshbuf_len(encrypted) + authlen, &cp)) != 0)
                goto out;
-       if ((r = cipher_crypt(&ciphercontext, 0, cp,
+       if ((r = cipher_crypt(ciphercontext, 0, cp,
            sshbuf_ptr(encrypted), sshbuf_len(encrypted), 0, authlen)) != 0)
                goto out;
 
@@ -3122,7 +3168,7 @@ sshkey_private_to_blob2(const struct sshkey *prv, struct sshbuf *blob,
        sshbuf_free(kdf);
        sshbuf_free(encoded);
        sshbuf_free(encrypted);
-       cipher_cleanup(&ciphercontext);
+       cipher_free(ciphercontext);
        explicit_bzero(salt, sizeof(salt));
        if (key != NULL) {
                explicit_bzero(key, keylen + ivlen);
@@ -3151,12 +3197,11 @@ sshkey_parse_private2(struct sshbuf *blob, int type, const char *passphrase,
        size_t i, keylen = 0, ivlen = 0, authlen = 0, slen = 0;
        struct sshbuf *encoded = NULL, *decoded = NULL;
        struct sshbuf *kdf = NULL, *decrypted = NULL;
-       struct sshcipher_ctx ciphercontext;
+       struct sshcipher_ctx *ciphercontext = NULL;
        struct sshkey *k = NULL;
        u_char *key = NULL, *salt = NULL, *dp, pad, last;
        u_int blocksize, rounds, nkeys, encrypted_len, check1, check2;
 
-       memset(&ciphercontext, 0, sizeof(ciphercontext));
        if (keyp != NULL)
                *keyp = NULL;
        if (commentp != NULL)
@@ -3285,7 +3330,7 @@ sshkey_parse_private2(struct sshbuf *blob, int type, const char *passphrase,
            (r = cipher_init(&ciphercontext, cipher, key, keylen,
            key + keylen, ivlen, 0)) != 0)
                goto out;
-       if ((r = cipher_crypt(&ciphercontext, 0, dp, sshbuf_ptr(decoded),
+       if ((r = cipher_crypt(ciphercontext, 0, dp, sshbuf_ptr(decoded),
            encrypted_len, 0, authlen)) != 0) {
                /* an integrity error here indicates an incorrect passphrase */
                if (r == SSH_ERR_MAC_INVALID)
@@ -3339,7 +3384,7 @@ sshkey_parse_private2(struct sshbuf *blob, int type, const char *passphrase,
        }
  out:
        pad = 0;
-       cipher_cleanup(&ciphercontext);
+       cipher_free(ciphercontext);
        free(ciphername);
        free(kdfname);
        free(comment);
@@ -3373,7 +3418,7 @@ sshkey_private_rsa1_to_blob(struct sshkey *key, struct sshbuf *blob,
        struct sshbuf *buffer = NULL, *encrypted = NULL;
        u_char buf[8];
        int r, cipher_num;
-       struct sshcipher_ctx ciphercontext;
+       struct sshcipher_ctx *ciphercontext = NULL;
        const struct sshcipher *cipher;
        u_char *cp;
 
@@ -3431,9 +3476,9 @@ sshkey_private_rsa1_to_blob(struct sshkey *key, struct sshbuf *blob,
 
        /* Store public key.  This will be in plain text. */
        if ((r = sshbuf_put_u32(encrypted, BN_num_bits(key->rsa->n))) != 0 ||
-           (r = sshbuf_put_bignum1(encrypted, key->rsa->n) != 0) ||
-           (r = sshbuf_put_bignum1(encrypted, key->rsa->e) != 0) ||
-           (r = sshbuf_put_cstring(encrypted, comment) != 0))
+           (r = sshbuf_put_bignum1(encrypted, key->rsa->n)) != 0 ||
+           (r = sshbuf_put_bignum1(encrypted, key->rsa->e)) != 0 ||
+           (r = sshbuf_put_cstring(encrypted, comment)) != 0)
                goto out;
 
        /* Allocate space for the private part of the key in the buffer. */
@@ -3443,21 +3488,17 @@ sshkey_private_rsa1_to_blob(struct sshkey *key, struct sshbuf *blob,
        if ((r = cipher_set_key_string(&ciphercontext, cipher, passphrase,
            CIPHER_ENCRYPT)) != 0)
                goto out;
-       if ((r = cipher_crypt(&ciphercontext, 0, cp,
+       if ((r = cipher_crypt(ciphercontext, 0, cp,
            sshbuf_ptr(buffer), sshbuf_len(buffer), 0, 0)) != 0)
                goto out;
-       if ((r = cipher_cleanup(&ciphercontext)) != 0)
-               goto out;
 
        r = sshbuf_putb(blob, encrypted);
 
  out:
-       explicit_bzero(&ciphercontext, sizeof(ciphercontext));
+       cipher_free(ciphercontext);
        explicit_bzero(buf, sizeof(buf));
-       if (buffer != NULL)
-               sshbuf_free(buffer);
-       if (encrypted != NULL)
-               sshbuf_free(encrypted);
+       sshbuf_free(buffer);
+       sshbuf_free(encrypted);
 
        return r;
 }
@@ -3604,17 +3645,13 @@ sshkey_parse_public_rsa1_fileblob(struct sshbuf *blob,
        /* The encrypted private part is not parsed by this function. */
 
        r = 0;
-       if (keyp != NULL)
+       if (keyp != NULL) {
                *keyp = pub;
-       else
-               sshkey_free(pub);
-       pub = NULL;
-
+               pub = NULL;
+       }
  out:
-       if (copy != NULL)
-               sshbuf_free(copy);
-       if (pub != NULL)
-               sshkey_free(pub);
+       sshbuf_free(copy);
+       sshkey_free(pub);
        return r;
 }
 
@@ -3628,11 +3665,12 @@ sshkey_parse_private_rsa1(struct sshbuf *blob, const char *passphrase,
        struct sshbuf *decrypted = NULL, *copy = NULL;
        u_char *cp;
        char *comment = NULL;
-       struct sshcipher_ctx ciphercontext;
+       struct sshcipher_ctx *ciphercontext = NULL;
        const struct sshcipher *cipher;
        struct sshkey *prv = NULL;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
        if (commentp != NULL)
                *commentp = NULL;
 
@@ -3685,12 +3723,8 @@ sshkey_parse_private_rsa1(struct sshbuf *blob, const char *passphrase,
        if ((r = cipher_set_key_string(&ciphercontext, cipher, passphrase,
            CIPHER_DECRYPT)) != 0)
                goto out;
-       if ((r = cipher_crypt(&ciphercontext, 0, cp,
-           sshbuf_ptr(copy), sshbuf_len(copy), 0, 0)) != 0) {
-               cipher_cleanup(&ciphercontext);
-               goto out;
-       }
-       if ((r = cipher_cleanup(&ciphercontext)) != 0)
+       if ((r = cipher_crypt(ciphercontext, 0, cp,
+           sshbuf_ptr(copy), sshbuf_len(copy), 0, 0)) != 0)
                goto out;
 
        if ((r = sshbuf_get_u16(decrypted, &check1)) != 0 ||
@@ -3718,22 +3752,20 @@ sshkey_parse_private_rsa1(struct sshbuf *blob, const char *passphrase,
                goto out;
        }
        r = 0;
-       *keyp = prv;
-       prv = NULL;
+       if (keyp != NULL) {
+               *keyp = prv;
+               prv = NULL;
+       }
        if (commentp != NULL) {
                *commentp = comment;
                comment = NULL;
        }
  out:
-       explicit_bzero(&ciphercontext, sizeof(ciphercontext));
-       if (comment != NULL)
-               free(comment);
-       if (prv != NULL)
-               sshkey_free(prv);
-       if (copy != NULL)
-               sshbuf_free(copy);
-       if (decrypted != NULL)
-               sshbuf_free(decrypted);
+       cipher_free(ciphercontext);
+       free(comment);
+       sshkey_free(prv);
+       sshbuf_free(copy);
+       sshbuf_free(decrypted);
        return r;
 }
 #endif /* WITH_SSH1 */
@@ -3748,7 +3780,8 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
        BIO *bio = NULL;
        int r;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
 
        if ((bio = BIO_new(BIO_s_mem())) == NULL || sshbuf_len(blob) > INT_MAX)
                return SSH_ERR_ALLOC_FAIL;
@@ -3760,7 +3793,52 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
 
        if ((pk = PEM_read_bio_PrivateKey(bio, NULL, NULL,
            (char *)passphrase)) == NULL) {
-               r = SSH_ERR_KEY_WRONG_PASSPHRASE;
+               unsigned long pem_err = ERR_peek_last_error();
+               int pem_reason = ERR_GET_REASON(pem_err);
+
+               /*
+                * Translate OpenSSL error codes to determine whether
+                * passphrase is required/incorrect.
+                */
+               switch (ERR_GET_LIB(pem_err)) {
+               case ERR_LIB_PEM:
+                       switch (pem_reason) {
+                       case PEM_R_BAD_PASSWORD_READ:
+#if !defined(ANDROID) || defined(PEM_R_PROBLEMS_GETTING_PASSWORD)
+                       case PEM_R_PROBLEMS_GETTING_PASSWORD:
+#endif
+                       case PEM_R_BAD_DECRYPT:
+                               r = SSH_ERR_KEY_WRONG_PASSPHRASE;
+                               goto out;
+                       default:
+                               r = SSH_ERR_INVALID_FORMAT;
+                               goto out;
+                       }
+               case ERR_LIB_EVP:
+                       switch (pem_reason) {
+#if !defined(ANDROID) || defined(EVP_R_BAD_DECRYPT)
+                       case EVP_R_BAD_DECRYPT:
+                               r = SSH_ERR_KEY_WRONG_PASSPHRASE;
+                               goto out;
+#endif
+#if !defined(ANDROID) || defined(EVP_R_BN_DECODE_ERROR)
+                       case EVP_R_BN_DECODE_ERROR:
+#endif
+                       case EVP_R_DECODE_ERROR:
+#ifdef EVP_R_PRIVATE_KEY_DECODE_ERROR
+                       case EVP_R_PRIVATE_KEY_DECODE_ERROR:
+#endif
+                               r = SSH_ERR_INVALID_FORMAT;
+                               goto out;
+                       default:
+                               r = SSH_ERR_LIBCRYPTO_ERROR;
+                               goto out;
+                       }
+               case ERR_LIB_ASN1:
+                       r = SSH_ERR_INVALID_FORMAT;
+                       goto out;
+               }
+               r = SSH_ERR_LIBCRYPTO_ERROR;
                goto out;
        }
        if (pk->type == EVP_PKEY_RSA &&
@@ -3817,14 +3895,15 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
                goto out;
        }
        r = 0;
-       *keyp = prv;
-       prv = NULL;
+       if (keyp != NULL) {
+               *keyp = prv;
+               prv = NULL;
+       }
  out:
        BIO_free(bio);
        if (pk != NULL)
                EVP_PKEY_free(pk);
-       if (prv != NULL)
-               sshkey_free(prv);
+       sshkey_free(prv);
        return r;
 }
 #endif /* WITH_OPENSSL */
@@ -3833,9 +3912,10 @@ int
 sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type,
     const char *passphrase, struct sshkey **keyp, char **commentp)
 {
-       int r;
+       int r = SSH_ERR_INTERNAL_ERROR;
 
-       *keyp = NULL;
+       if (keyp != NULL)
+               *keyp = NULL;
        if (commentp != NULL)
                *commentp = NULL;
 
@@ -3856,9 +3936,11 @@ sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type,
                return sshkey_parse_private2(blob, type, passphrase,
                    keyp, commentp);
        case KEY_UNSPEC:
-               if ((r = sshkey_parse_private2(blob, type, passphrase, keyp,
-                   commentp)) == 0)
-                       return 0;
+               r = sshkey_parse_private2(blob, type, passphrase, keyp,
+                   commentp);
+               /* Do not fallback to PEM parser if only passphrase is wrong. */
+               if (r == 0 || r == SSH_ERR_KEY_WRONG_PASSPHRASE)
+                       return r;
 #ifdef WITH_OPENSSL
                return sshkey_parse_private_pem_fileblob(blob, type,
                    passphrase, keyp);
@@ -3872,10 +3954,8 @@ sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type,
 
 int
 sshkey_parse_private_fileblob(struct sshbuf *buffer, const char *passphrase,
-    const char *filename, struct sshkey **keyp, char **commentp)
+    struct sshkey **keyp, char **commentp)
 {
-       int r;
-
        if (keyp != NULL)
                *keyp = NULL;
        if (commentp != NULL)
@@ -3883,13 +3963,11 @@ sshkey_parse_private_fileblob(struct sshbuf *buffer, const char *passphrase,
 
 #ifdef WITH_SSH1
        /* it's a SSH v1 key if the public key part is readable */
-       if ((r = sshkey_parse_public_rsa1_fileblob(buffer, NULL, NULL)) == 0) {
+       if (sshkey_parse_public_rsa1_fileblob(buffer, NULL, NULL) == 0) {
                return sshkey_parse_private_fileblob_type(buffer, KEY_RSA1,
                    passphrase, keyp, commentp);
        }
 #endif /* WITH_SSH1 */
-       if ((r = sshkey_parse_private_fileblob_type(buffer, KEY_UNSPEC,
-           passphrase, keyp, commentp)) == 0)
-               return 0;
-       return r;
+       return sshkey_parse_private_fileblob_type(buffer, KEY_UNSPEC,
+           passphrase, keyp, commentp);
 }
index c8d3cdd..1b9e42f 100644 (file)
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.h,v 1.9 2015/08/04 05:23:06 djm Exp $ */
+/* $OpenBSD: sshkey.h,v 1.15 2017/03/10 04:07:20 djm Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
@@ -137,10 +137,12 @@ int        sshkey_type_is_cert(int);
 int     sshkey_type_plain(int);
 int     sshkey_to_certified(struct sshkey *);
 int     sshkey_drop_cert(struct sshkey *);
-int     sshkey_certify(struct sshkey *, struct sshkey *);
+int     sshkey_certify(struct sshkey *, struct sshkey *, const char *);
 int     sshkey_cert_copy(const struct sshkey *, struct sshkey *);
 int     sshkey_cert_check_authority(const struct sshkey *, int, int,
     const char *, const char **);
+size_t  sshkey_format_cert_validity(const struct sshkey_cert *,
+    char *, size_t) __attribute__((__bounded__(__string__, 2, 3)));
 
 int             sshkey_ecdsa_nid_from_name(const char *);
 int             sshkey_curve_name_to_nid(const char *);
@@ -154,7 +156,7 @@ int          sshkey_ec_validate_private(const EC_KEY *);
 const char     *sshkey_ssh_name(const struct sshkey *);
 const char     *sshkey_ssh_name_plain(const struct sshkey *);
 int             sshkey_names_valid2(const char *, int);
-char           *key_alg_list(int, int);
+char           *sshkey_alg_list(int, int, int, char);
 
 int     sshkey_from_blob(const u_char *, size_t, struct sshkey **);
 int     sshkey_fromb(struct sshbuf *, struct sshkey **);
@@ -167,7 +169,7 @@ int  sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *);
 int     sshkey_putb_plain(const struct sshkey *, struct sshbuf *);
 
 int     sshkey_sign(const struct sshkey *, u_char **, size_t *,
-    const u_char *, size_t, u_int);
+    const u_char *, size_t, const char *, u_int);
 int     sshkey_verify(const struct sshkey *, const u_char *, size_t,
     const u_char *, size_t, u_int);
 
@@ -186,17 +188,16 @@ int       sshkey_private_to_fileblob(struct sshkey *key, struct sshbuf *blob,
 int    sshkey_parse_public_rsa1_fileblob(struct sshbuf *blob,
     struct sshkey **keyp, char **commentp);
 int    sshkey_parse_private_fileblob(struct sshbuf *buffer,
-    const char *passphrase, const char *filename, struct sshkey **keyp,
-    char **commentp);
+    const char *passphrase, struct sshkey **keyp, char **commentp);
 int    sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type,
     const char *passphrase, struct sshkey **keyp, char **commentp);
 
 #ifdef SSHKEY_INTERNAL
-int ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
-    const u_char *data, size_t datalen, u_int compat);
+int ssh_rsa_sign(const struct sshkey *key,
+    u_char **sigp, size_t *lenp, const u_char *data, size_t datalen,
+    const char *ident);
 int ssh_rsa_verify(const struct sshkey *key,
-    const u_char *signature, size_t signaturelen,
-    const u_char *data, size_t datalen, u_int compat);
+    const u_char *sig, size_t siglen, const u_char *data, size_t datalen);
 int ssh_dss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
     const u_char *data, size_t datalen, u_int compat);
 int ssh_dss_verify(const struct sshkey *key,
index 818312f..cea3e76 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshlogin.c,v 1.31 2015/01/20 23:14:00 deraadt Exp $ */
+/* $OpenBSD: sshlogin.c,v 1.32 2015/12/26 20:51:35 guenther Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
index 0ccf2a0..bcd7f71 100644 (file)
--- a/sshpty.c
+++ b/sshpty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshpty.c,v 1.30 2015/07/30 23:09:15 djm Exp $ */
+/* $OpenBSD: sshpty.c,v 1.31 2016/11/29 03:54:50 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -165,11 +165,11 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
                error("SETPGRP %s",strerror(errno));
 #endif /* NEED_SETPGRP */
        fd = open(tty, O_RDWR);
-       if (fd < 0) {
+       if (fd < 0)
                error("%.100s: %.100s", tty, strerror(errno));
-       } else {
+       else
                close(fd);
-       }
+
        /* Verify that we now have a controlling tty. */
        fd = open(_PATH_TTY, O_WRONLY);
        if (fd < 0)
@@ -248,3 +248,17 @@ pty_setowner(struct passwd *pw, const char *tty)
                }
        }
 }
+
+/* Disconnect from the controlling tty. */
+void
+disconnect_controlling_tty(void)
+{
+#ifdef TIOCNOTTY
+       int fd;
+
+       if ((fd = open(_PATH_TTY, O_RDWR | O_NOCTTY)) >= 0) {
+               (void) ioctl(fd, TIOCNOTTY, NULL);
+               close(fd);
+       }
+#endif /* TIOCNOTTY */
+}
index cfa3224..9ec7e9a 100644 (file)
--- a/sshpty.h
+++ b/sshpty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshpty.h,v 1.12 2010/01/09 05:04:24 djm Exp $ */
+/* $OpenBSD: sshpty.h,v 1.13 2016/11/29 03:54:50 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -25,3 +25,4 @@ void   pty_release(const char *);
 void    pty_make_controlling_tty(int *, const char *);
 void    pty_change_window_size(int, u_int, u_int, u_int, u_int);
 void    pty_setowner(struct passwd *, const char *);
+void    disconnect_controlling_tty(void);
index 6f51b8a..db772c3 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ttymodes.c,v 1.29 2008/11/02 00:16:16 stevesk Exp $ */
+/* $OpenBSD: ttymodes.c,v 1.30 2016/05/04 14:22:33 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -54,7 +54,6 @@
 
 #include "packet.h"
 #include "log.h"
-#include "ssh1.h"
 #include "compat.h"
 #include "buffer.h"
 
index 4d848fe..14e177c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ttymodes.h,v 1.14 2006/03/25 22:22:43 djm Exp $ */
+/* $OpenBSD: ttymodes.h,v 1.15 2016/05/03 09:03:49 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -127,6 +127,9 @@ TTYMODE(IXOFF,      c_iflag, 40)
 #ifdef IMAXBEL
 TTYMODE(IMAXBEL,c_iflag, 41)
 #endif /* IMAXBEL */
+#ifdef IUTF8
+TTYMODE(IUTF8,  c_iflag, 42)
+#endif /* IUTF8 */
 
 TTYMODE(ISIG,  c_lflag, 50)
 TTYMODE(ICANON,        c_lflag, 51)
index 54cfbd5..039b3e6 100644 (file)
--- a/uidswap.c
+++ b/uidswap.c
@@ -144,7 +144,7 @@ temporarily_use_uid(struct passwd *pw)
 void
 permanently_drop_suid(uid_t uid)
 {
-#ifndef HAVE_CYGWIN
+#ifndef NO_UID_RESTORATION_TEST
        uid_t old_uid = getuid();
 #endif
 
@@ -152,8 +152,14 @@ permanently_drop_suid(uid_t uid)
        if (setresuid(uid, uid, uid) < 0)
                fatal("setresuid %u: %.100s", (u_int)uid, strerror(errno));
 
-#ifndef HAVE_CYGWIN
-       /* Try restoration of UID if changed (test clearing of saved uid) */
+#ifndef NO_UID_RESTORATION_TEST
+       /*
+        * Try restoration of UID if changed (test clearing of saved uid).
+        *
+        * Note that we don't do this on Cygwin, or on Solaris-based platforms
+        * where fine-grained privileges are available (the user might be
+        * deliberately allowed the right to setuid back to root).
+        */
        if (old_uid != uid &&
            (setuid(old_uid) != -1 || seteuid(old_uid) != -1))
                fatal("%s: was able to restore old [e]uid", __func__);
@@ -209,7 +215,7 @@ restore_uid(void)
 void
 permanently_set_uid(struct passwd *pw)
 {
-#ifndef HAVE_CYGWIN
+#ifndef NO_UID_RESTORATION_TEST
        uid_t old_uid = getuid();
        gid_t old_gid = getgid();
 #endif
@@ -261,7 +267,7 @@ permanently_set_uid(struct passwd *pw)
        if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0)
                fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
 
-#ifndef HAVE_CYGWIN
+#ifndef NO_UID_RESTORATION_TEST
        /* Try restoration of GID if changed (test clearing of saved gid) */
        if (old_gid != pw->pw_gid && pw->pw_uid != 0 &&
            (setgid(old_gid) != -1 || setegid(old_gid) != -1))
@@ -275,7 +281,7 @@ permanently_set_uid(struct passwd *pw)
                    (u_int)pw->pw_gid);
        }
 
-#ifndef HAVE_CYGWIN
+#ifndef NO_UID_RESTORATION_TEST
        /* Try restoration of UID if changed (test clearing of saved uid) */
        if (old_uid != pw->pw_uid &&
            (setuid(old_uid) != -1 || seteuid(old_uid) != -1))
diff --git a/umac.c b/umac.c
index 4964457..6eb55b2 100644 (file)
--- a/umac.c
+++ b/umac.c
   * produced under gcc with optimizations set -O3 or higher. Dunno why.
   *
   /////////////////////////////////////////////////////////////////////// */
-
-/* In OpenSSH, this file is compiled twice, with different #defines set on the
- * command line. Since we don't want to stretch the Android build system, in
- * Android this file is duplicated as umac.c and umac128.c. The latter contains
- * the #defines (that were set in OpenSSH's Makefile) at the top of the
- * file. */
-
 /* ---------------------------------------------------------------------- */
 /* --- User Switches ---------------------------------------------------- */
 /* ---------------------------------------------------------------------- */
diff --git a/utf8.c b/utf8.c
new file mode 100644 (file)
index 0000000..dead79b
--- /dev/null
+++ b/utf8.c
@@ -0,0 +1,334 @@
+/* $OpenBSD: utf8.c,v 1.5 2017/02/19 00:10:57 djm Exp $ */
+/*
+ * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * Utility functions for multibyte-character handling,
+ * in particular to sanitize untrusted strings for terminal output.
+ */
+
+#include "includes.h"
+
+#include <sys/types.h>
+#ifdef HAVE_LANGINFO_H
+# include <langinfo.h>
+#endif
+#include <limits.h>
+#include <locale.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)
+# include <vis.h>
+#endif
+#ifdef HAVE_WCHAR_H
+# include <wchar.h>
+#endif
+
+#include "utf8.h"
+
+static int      dangerous_locale(void);
+static int      grow_dst(char **, size_t *, size_t, char **, size_t);
+static int      vasnmprintf(char **, size_t, int *, const char *, va_list);
+
+
+/*
+ * For US-ASCII and UTF-8 encodings, we can safely recover from
+ * encoding errors and from non-printable characters.  For any
+ * other encodings, err to the side of caution and abort parsing:
+ * For state-dependent encodings, recovery is impossible.
+ * For arbitrary encodings, replacement of non-printable
+ * characters would be non-trivial and too fragile.
+ */
+
+static int
+dangerous_locale(void) {
+       char    *loc;
+
+       loc = nl_langinfo(CODESET);
+       return strcmp(loc, "US-ASCII") != 0 && strcmp(loc, "UTF-8") != 0 &&
+           strcmp(loc, "ANSI_X3.4-1968") != 0 && strcmp(loc, "646") != 0;
+}
+
+static int
+grow_dst(char **dst, size_t *sz, size_t maxsz, char **dp, size_t need)
+{
+       char    *tp;
+       size_t   tsz;
+
+       if (*dp + need < *dst + *sz)
+               return 0;
+       tsz = *sz + 128;
+       if (tsz > maxsz)
+               tsz = maxsz;
+       if ((tp = realloc(*dst, tsz)) == NULL)
+               return -1;
+       *dp = tp + (*dp - *dst);
+       *dst = tp;
+       *sz = tsz;
+       return 0;
+}
+
+/*
+ * The following two functions limit the number of bytes written,
+ * including the terminating '\0', to sz.  Unless wp is NULL,
+ * they limit the number of display columns occupied to *wp.
+ * Whichever is reached first terminates the output string.
+ * To stay close to the standard interfaces, they return the number of
+ * non-NUL bytes that would have been written if both were unlimited.
+ * If wp is NULL, newline, carriage return, and tab are allowed;
+ * otherwise, the actual number of columns occupied by what was
+ * written is returned in *wp.
+ */
+
+static int
+vasnmprintf(char **str, size_t maxsz, int *wp, const char *fmt, va_list ap)
+{
+       char    *src;   /* Source string returned from vasprintf. */
+       char    *sp;    /* Pointer into src. */
+       char    *dst;   /* Destination string to be returned. */
+       char    *dp;    /* Pointer into dst. */
+       char    *tp;    /* Temporary pointer for dst. */
+       size_t   sz;    /* Number of bytes allocated for dst. */
+       wchar_t  wc;    /* Wide character at sp. */
+       int      len;   /* Number of bytes in the character at sp. */
+       int      ret;   /* Number of bytes needed to format src. */
+       int      width; /* Display width of the character wc. */
+       int      total_width, max_width, print;
+
+       src = NULL;
+       if ((ret = vasprintf(&src, fmt, ap)) <= 0)
+               goto fail;
+
+       sz = strlen(src) + 1;
+       if ((dst = malloc(sz)) == NULL) {
+               free(src);
+               ret = -1;
+               goto fail;
+       }
+
+       if (maxsz > INT_MAX)
+               maxsz = INT_MAX;
+
+       sp = src;
+       dp = dst;
+       ret = 0;
+       print = 1;
+       total_width = 0;
+       max_width = wp == NULL ? INT_MAX : *wp;
+       while (*sp != '\0') {
+               if ((len = mbtowc(&wc, sp, MB_CUR_MAX)) == -1) {
+                       (void)mbtowc(NULL, NULL, MB_CUR_MAX);
+                       if (dangerous_locale()) {
+                               ret = -1;
+                               break;
+                       }
+                       len = 1;
+                       width = -1;
+               } else if (wp == NULL &&
+                   (wc == L'\n' || wc == L'\r' || wc == L'\t')) {
+                       /*
+                        * Don't use width uninitialized; the actual
+                        * value doesn't matter because total_width
+                        * is only returned for wp != NULL.
+                        */
+                       width = 0;
+               } else if ((width = wcwidth(wc)) == -1 &&
+                   dangerous_locale()) {
+                       ret = -1;
+                       break;
+               }
+
+               /* Valid, printable character. */
+
+               if (width >= 0) {
+                       if (print && (dp - dst >= (int)maxsz - len ||
+                           total_width > max_width - width))
+                               print = 0;
+                       if (print) {
+                               if (grow_dst(&dst, &sz, maxsz,
+                                   &dp, len) == -1) {
+                                       ret = -1;
+                                       break;
+                               }
+                               total_width += width;
+                               memcpy(dp, sp, len);
+                               dp += len;
+                       }
+                       sp += len;
+                       if (ret >= 0)
+                               ret += len;
+                       continue;
+               }
+
+               /* Escaping required. */
+
+               while (len > 0) {
+                       if (print && (dp - dst >= (int)maxsz - 4 ||
+                           total_width > max_width - 4))
+                               print = 0;
+                       if (print) {
+                               if (grow_dst(&dst, &sz, maxsz,
+                                   &dp, 4) == -1) {
+                                       ret = -1;
+                                       break;
+                               }
+                               tp = vis(dp, *sp, VIS_OCTAL | VIS_ALL, 0);
+                               width = tp - dp;
+                               total_width += width;
+                               dp = tp;
+                       } else
+                               width = 4;
+                       len--;
+                       sp++;
+                       if (ret >= 0)
+                               ret += width;
+               }
+               if (len > 0)
+                       break;
+       }
+       free(src);
+       *dp = '\0';
+       *str = dst;
+       if (wp != NULL)
+               *wp = total_width;
+
+       /*
+        * If the string was truncated by the width limit but
+        * would have fit into the size limit, the only sane way
+        * to report the problem is using the return value, such
+        * that the usual idiom "if (ret < 0 || ret >= sz) error"
+        * works as expected.
+        */
+
+       if (ret < (int)maxsz && !print)
+               ret = -1;
+       return ret;
+
+fail:
+       if (wp != NULL)
+               *wp = 0;
+       if (ret == 0) {
+               *str = src;
+               return 0;
+       } else {
+               *str = NULL;
+               return -1;
+       }
+}
+
+int
+snmprintf(char *str, size_t sz, int *wp, const char *fmt, ...)
+{
+       va_list  ap;
+       char    *cp;
+       int      ret;
+
+       va_start(ap, fmt);
+       ret = vasnmprintf(&cp, sz, wp, fmt, ap);
+       va_end(ap);
+       if (cp != NULL) {
+               (void)strlcpy(str, cp, sz);
+               free(cp);
+       } else
+               *str = '\0';
+       return ret;
+}
+
+/*
+ * To stay close to the standard interfaces, the following functions
+ * return the number of non-NUL bytes written.
+ */
+
+int
+vfmprintf(FILE *stream, const char *fmt, va_list ap)
+{
+       char    *str;
+       int      ret;
+
+       if ((ret = vasnmprintf(&str, INT_MAX, NULL, fmt, ap)) < 0)
+               return -1;
+       if (fputs(str, stream) == EOF)
+               ret = -1;
+       free(str);
+       return ret;
+}
+
+int
+fmprintf(FILE *stream, const char *fmt, ...)
+{
+       va_list  ap;
+       int      ret;
+
+       va_start(ap, fmt);
+       ret = vfmprintf(stream, fmt, ap);
+       va_end(ap);
+       return ret;
+}
+
+int
+mprintf(const char *fmt, ...)
+{
+       va_list  ap;
+       int      ret;
+
+       va_start(ap, fmt);
+       ret = vfmprintf(stdout, fmt, ap);
+       va_end(ap);
+       return ret;
+}
+
+/*
+ * Set up libc for multibyte output in the user's chosen locale.
+ *
+ * XXX: we are known to have problems with Turkish (i/I confusion) so we
+ *      deliberately fall back to the C locale for now. Longer term we should
+ *      always prefer to select C.[encoding] if possible, but there's no
+ *      standardisation in locales between systems, so we'll need to survey
+ *      what's out there first.
+ */
+void
+msetlocale(void)
+{
+       const char *vars[] = { "LC_ALL", "LC_CTYPE", "LANG", NULL };
+       char *cp;
+       int i;
+
+       /*
+        * We can't yet cope with dotless/dotted I in Turkish locales,
+        * so fall back to the C locale for these.
+        */
+       for (i = 0; vars[i] != NULL; i++) {
+               if ((cp = getenv(vars[i])) == NULL)
+                       continue;
+               if (strncasecmp(cp, "TR", 2) != 0)
+                       break;
+               /*
+                * If we're in a UTF-8 locale then prefer to use
+                * the C.UTF-8 locale (or equivalent) if it exists.
+                */
+               if ((strcasestr(cp, "UTF-8") != NULL ||
+                   strcasestr(cp, "UTF8") != NULL) &&
+                   (setlocale(LC_CTYPE, "C.UTF-8") != NULL ||
+                   setlocale(LC_CTYPE, "POSIX.UTF-8") != NULL))
+                       return;
+               setlocale(LC_CTYPE, "C");
+               return;
+       }
+       /* We can handle this locale */
+       setlocale(LC_CTYPE, "");
+}
similarity index 61%
rename from roaming_serv.c
rename to utf8.h
index 511ca84..88c5a34 100644 (file)
+++ b/utf8.h
@@ -1,6 +1,6 @@
-/* $OpenBSD: roaming_serv.c,v 1.1 2009/10/24 11:18:23 andreas Exp $ */
+/* $OpenBSD: utf8.h,v 1.1 2016/05/25 23:48:45 schwarze Exp $ */
 /*
- * Copyright (c) 2004-2009 AppGate Network Security AB
+ * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include "includes.h"
-
-#include <sys/types.h>
-
-#include "roaming.h"
-
-/*
- * Wait for the roaming client to reconnect. Returns 0 if a connect ocurred.
- */
-int
-wait_for_roaming_reconnect(void)
-{
-       return 1;
-}
+int     mprintf(const char *, ...)
+            __attribute__((format(printf, 1, 2)));
+int     fmprintf(FILE *, const char *, ...)
+            __attribute__((format(printf, 2, 3)));
+int     vfmprintf(FILE *, const char *, va_list);
+int     snmprintf(char *, size_t, int *, const char *, ...)
+            __attribute__((format(printf, 4, 5)));
+void    msetlocale(void);
index 41e1ea9..c86e209 100644 (file)
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
-/* $OpenBSD: version.h,v 1.75 2015/08/21 03:45:26 djm Exp $ */
+/* $OpenBSD: version.h,v 1.79 2017/03/20 01:18:59 djm Exp $ */
 
-#define SSH_VERSION    "OpenSSH_7.1"
+#define SSH_VERSION    "OpenSSH_7.5"
 
-#define SSH_PORTABLE   "p2"
+#define SSH_PORTABLE   "p1"
 #define SSH_RELEASE    SSH_VERSION SSH_PORTABLE
index 98cbf87..b583236 100644 (file)
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xmalloc.c,v 1.32 2015/04/24 01:36:01 deraadt Exp $ */
+/* $OpenBSD: xmalloc.c,v 1.33 2016/02/15 09:47:49 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 #include "xmalloc.h"
 #include "log.h"
 
+void
+ssh_malloc_init(void)
+{
+#if defined(__OpenBSD__)
+       extern char *malloc_options;
+
+       malloc_options = "S";
+#endif /* __OpenBSD__ */
+}
+
 void *
 xmalloc(size_t size)
 {
index 2bec77b..e499289 100644 (file)
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xmalloc.h,v 1.15 2015/04/24 01:36:01 deraadt Exp $ */
+/* $OpenBSD: xmalloc.h,v 1.16 2016/02/15 09:47:49 dtucker Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,6 +16,7 @@
  * called by a name other than "ssh" or "Secure Shell".
  */
 
+void    ssh_malloc_init(void);
 void   *xmalloc(size_t);
 void   *xcalloc(size_t, size_t);
 void   *xreallocarray(void *, size_t, size_t);