ChangeLog.2 86.5 KB
Newer Older
Niels Möller's avatar
Niels Möller committed
1
2000-11-20  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
2 3 4 5 6 7 8 9 10 11

	* src/unix_interact.c (make_unix_interact): Install signal handler
	only if backend is non-NULL.

	* src/srp-gen.c: New tty attribute.
	(main_argp_parser): Use new interact class.

	* src/spki_commands.c: Updated pkcs#5v2 sexp representation to
	include the iteration count.
	(do_spki_encrypt): Removed the dummy noiv string. Use NULL
12 13
	instead.
	(do_spki_encrypt): Include iteration count, using sexp_uint32().
Niels Möller's avatar
Niels Möller committed
14 15 16 17 18 19 20 21 22 23 24 25
	(spki_password_decrypt): New class.
	(do_spki_decrypt): New function.
	(make_pkcs5_decrypt): New function.

	* src/sexp.c (sexp_uint32): New function.
	(sexp2uint32): New function.

	* src/password.h: Marked as obsolete.

	* src/lsh_types.h (READ_UINT24): New macro.

	* src/lsh.c: Pass tty object to make_client_password_auth and
26
	make_srp_client.
Niels Möller's avatar
Niels Möller committed
27 28

	* src/lsh-writekey.c (lsh_writekey_options): New attribute tty.
29
	(main_argp_parser): Use interact class to ask for the password.
Niels Möller's avatar
Niels Möller committed
30 31

	* src/client_userauth.c: New attribute tty.
32
	(send_password): Use interact class to ask for the password.
Niels Möller's avatar
Niels Möller committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
	(make_client_password_state): New argument tty.
	(client_password_method): New class.
	(make_client_password_auth): New argument tty.

	* src/client_password.c: Marked as obsolete.

	* src/client_keyexchange.c (srp_client_instance,
	srp_client_exchange): New attribute tty.
	(do_handle_srp_reply): Use new interact class for asking for the
	password.
	(make_srp_client): New argument tty.

	* src/atoms.in: Added keyword "iterations".

	* src/Makefile.am.in (liblsh_a_SOURCES): Removed client_password.c.

Niels Möller's avatar
Niels Möller committed
49
2000-11-16  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
50

51
	* src/unix_user.c (do_read_file): Use lsh_copy_file().
Niels Möller's avatar
Niels Möller committed
52 53 54 55 56 57 58 59 60 61

	* src/lsh.c (fork_input): New function.
	(fork_output): New function.
	(make_lsh_session): Optionally fork processes for handling stdio,
	to avoid setting the fd:s, that are potentially shared with other
	processes, in non-blocking mode.
	New option --cvs-workaround.

	* src/io.c (lsh_copy_file): New function.

Niels Möller's avatar
Niels Möller committed
62
2000-11-15  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
63 64 65 66

	* src/tty.c (tty_makeraw): #if:ed out this function.

	* src/server.c (format_service_accept): Moved function here, from
67
	service.c.
Niels Möller's avatar
Niels Möller committed
68

69
	* src/lshg.c: Preparations for supporting more actions.
Niels Möller's avatar
Niels Möller committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87

	* src/lsh.c: Use the new interact class.

	* src/interact.h (terminal_attributes): New class.
	(interact): Renamed the class abstract_interact. Added methods
	get_attributes and set_attributes.

	* src/client_pty.c: Adapted to the new interact class.
	(client_winch_handler): New class implementing sending of
	window-change messages.
	(client_tty_resource): New class.
	(do_pty_continuation): Hook in window-change handler, and a
	resource for resetting the tty attributes when the channel is
	closed.
	(make_pty_request): Take a struct interact argument, rather than a
	tty file desciptor.

	* src/client.c (format_service_request): Moved function here, from
88
	service.c.
Niels Möller's avatar
Niels Möller committed
89 90 91 92 93 94 95
	(client_session): Moved this class to client_session.c.

	* src/service.c, src/service.h: Marked as obsolete. Moved its two
	functions, format_service_request() and format_service_accept() to
	the files that use them.

	* src/client_session.c: Moved channel related code here, from
96
	client.c.
Niels Möller's avatar
Niels Möller committed
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123

	* src/Makefile.am.in (liblsh_a_SOURCES): Added client_session.c.

	* src/unix_interact.c: New file.

	* src/unix_user.c (make_process_resource): Use resource_init().

	* src/server_session.c (make_pty): assert that the pty is alive.
	(do_alloc_pty): Likewise.

	* src/server_pty.c (do_kill_pty_info): Check that fd:s are >=
	before closing them.
	(make_pty_info): Use resource_init(). Bugfix: Don't initialize
	alive to 0; that would cause the pty to be dropped from resource
	lists where it is inserted. Instead, set the fd:s to -1 to
	indicate that no pty has been allocated yet.
	(pty_allocate): Set fd:s to -1 if they are closed.

	* src/resource.c (do_resource_kill): New function.
	(resource_init): New function.
	(empty_resource_list): Use resource_init().

	* src/reaper.c (reaper_callback): New class.
	(do_reaper_callback): Moved the waitpid() logic into a callback,
	that is used as an lsh signal handler.
	(reaper_install_handler): New function.
	(make_reaper): Install lsh signal handler (by calling
124
	reaper_install_handler).
Niels Möller's avatar
Niels Möller committed
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
	(reaper_run): Obsoleted, #if:ed out.

	* src/lshg.c: New file (actually introduced already in 1.1.1).

	* src/lsh.h: Forward declare struct io_backend.

	* src/lsh_proxy.c (main): Use make_io_backend(). Pass backend to
	make_reaper(). Use io_run rather than reaper_run.
	* src/lshd.c (make_lshd_options): Likewise.

	* src/lsh-decode-key.c (main): Use make_io_backend().
	* src/lsh.c (main): Likewise.
	* src/lsh-writekey.c (main): Likewise.
	* src/lsh-export-key.c (main): Likewise.
	* src/sexp-conv.c (main): Likewise.
	* src/srp-gen.c (main): Likewise.

	* src/io.h (close_callback): Deleted old close_callback code.
	Moved classes io_backend and callout to io.c.

145
	* src/io.c (lsh_signal_handler): New class.
Niels Möller's avatar
Niels Möller committed
146
	(lsh_callout): Renamed the callout class, and made it inherit
147
	resource.
Niels Möller's avatar
Niels Möller committed
148 149 150 151 152 153 154 155 156 157 158 159 160 161
	(io_iter): Call signal handlers.
	(make_io_backend): New function.
	(init_backend): Deleted function.
	(io_signal_handler): New function.
	(io_callout): New function.
	(init_file): Use resource_init().

	* src/interact.h (window_change_callback): New class.
	(abstract_interact): Replaced the window_change method with to
	methods, window_size and window_change_subscribe.

	* src/interact.c: Moved unix_interact class to unix_interact.c.

	* src/gateway_commands.c (do_gateway_accept): Use
162
	connection_command.
Niels Möller's avatar
Niels Möller committed
163 164 165 166 167

	* src/connection_commands.h (connection_command): New class, for
	simple connection related commands.
	Moved a lot of code to handshake.h.

168
	* src/connection_commands.c: Moved a lot of code to handshake.c.
Niels Möller's avatar
Niels Möller committed
169 170 171 172 173 174 175 176 177 178 179 180 181 182

	* src/connection.c (connection_close_handler): Moved from
	connection_commands.c
	(make_connection_close_handler): Likewise.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added handshake.c.
	(lshg_LDADD): Don't link lshg with symmetric/libsymmetric.a.

	* src/handshake.c: New file, with ssh handshake logic extracted
	from connection_commands.c. This way, it is possible to link lshg
	without dragging in the keyexchange and crypto code.

	* configure.in: Bumped version to 1.1.2.

Niels Möller's avatar
Niels Möller committed
183
2000-11-14  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
184 185

	* Released lsh-1.1.1.
186 187

	* src/testsuite/macros.m4(TS_TEST_VERIFY): Use make_bad_random().
Niels Möller's avatar
Niels Möller committed
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
	Use SIGNER_GET_PUBLIC().

	* src/unix_random.c (do_unix_random_background): Check status
	before starting background poll.

	* src/srp-gen.c (make_srp_gen_options): Use make_bad_random().

	* src/randomness.h (randomness_with_poll): New class.

	* src/randomness.c (make_reasonably_random): #if:ed out.
	(make_default_random): New function.

	* src/lsh.c: Use make_default_random().
	* src/lsh_proxy.c: Likewise.
	* src/lshd.c: Likewise.

	* src/lsh-writekey.c (make_lsh_writekey_options): Use
205
	make_bad_random().
Niels Möller's avatar
Niels Möller committed
206 207 208 209

	* src/lsh-keygen.c: Use make_default_random().

	* src/gateway_commands.c (gateway_make_connection): Fixed call to
210
	make_packet_unpad().
Niels Möller's avatar
Niels Möller committed
211 212 213 214 215 216 217

	* src/randomness.c: Reintroduced make_poor_random, for programs
	that only need salt, iv:s etc.

	* src/symmetric/arcfour.c (arcfour_update_key): #if:ed out this
	nostandard function.
	(arcfour_set_key): Use arcfour_init(). Made keyset loop less
218
	obscure.
Niels Möller's avatar
Niels Möller committed
219 220 221 222 223 224 225 226

	* src/unix_user.c (check_user_permissions): New function (moved
	from io.c).
	(do_read_file): fork() and change uid before opening the file.

	* src/tcpforward_commands.c (make_forward_local_port): Changed
	debug() to trace().

227
	* src/lsh_proxy.c: Use the DEFINE_COMMAND_SIMPLE macro.
Niels Möller's avatar
Niels Möller committed
228 229 230 231 232 233 234
	* src/lshd.c: Likewise.
	* src/proxy.c: Likewise.
	* src/sexp_commands.c: Likewise.
	* src/spki_commands.c: Likewise.

	* src/lsh.c (lsh_options): New attribute local_user.
	New option -G to enable the gateway feature.
235
	Use the DEFINE_COMMAND_SIMPLE macro.
Niels Möller's avatar
Niels Möller committed
236

237
	* src/lsh-writekey.c: Use the DEFINE_COMMAND_SIMPLE macro.
Niels Möller's avatar
Niels Möller committed
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253

	* src/io_commands.c (io_write_file_command): Use
	the DEFINE_COMMAND_SIMPLE macro.
	(io_log_peer_command): Likewise.
	(listen_with_connection): #if:ed out this class.
	(listen_local): New class.
	(make_listen_local): New function.
	(connect_local): New class.
	(make_connect_local): New function.
	(connect_local_command): New command.

	* src/io.h (local_info): New class.

	* src/io.c (sockaddr2info): Return NULL for address families other
	than AF_INET and AF_INET6.
	(make_local_info): New function.
254
	(io_listen_local): Take a local_info as argument. Fixed umask.
Niels Möller's avatar
Niels Möller committed
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
	(io_connect_local): Take a local_info as argument.
	(check_user_permissions): #if:ed out (replaced by code in
	unix_user.c).
	(io_read_user_file): Likewise.

	* src/gateway_commands.c (do_gateway_pad): New function.
	(make_gateway_pad): New function.
	(gateway_make_connection): New function (extracted from
	do_gateway_accept). Set up connection->write and connection->raw
	properly, fix padding, anpadding and debug output.
	(gateway_init): New command.
	(make_gateway_setup): New function.
	(gateway_setup_command): New command.

	* src/gateway.c (check_string_l): New function.
	(check_string): New function.
	(make_gateway_address): New function.

	* src/disconnect.c (do_disconnect): Print message on a single
274
	line.
Niels Möller's avatar
Niels Möller committed
275 276

	* src/command.h (DEFINE_COMMAND_SIMPLE): New macro, that replaces
277
	COMMAND_SIMPLE.
Niels Möller's avatar
Niels Möller committed
278 279 280 281 282
	(DEFINE_COMMAND): New macro, that replaces COMMAND_STATIC.

	* src/client.c: Removed obsolete class request_info.

	* src/channel.c (connection_service_command): Use
283
	the DEFINE_COMMAND_SIMPLE macro.
Niels Möller's avatar
Niels Möller committed
284 285
	* src/combinators.c (command_K): Likewise.
	(command_I): Likewise.
286
	* src/command.c (progn_command): Likewise.
Niels Möller's avatar
Niels Möller committed
287 288
	* src/keyexchange.c (kexinit_filter): Likewise.
	* src/connection_commands.c (connection_remember): Likewise.
289
	(connection_require_userauth): Use the DEFINE_COMMAND macro.
Niels Möller's avatar
Niels Möller committed
290 291 292

	* src/Makefile.am.in (bin_PROGRAMS): Added lshg program.
	(ETAGS_ARGS): Added two regexps, to match DEFINE_* and
293
	GABA-definitions.
Niels Möller's avatar
Niels Möller committed
294 295 296

	* doc/lsh.texinfo (Action options): Added a note on -G option.

Niels Möller's avatar
Niels Möller committed
297
2000-10-31  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
298 299 300 301 302 303 304 305 306 307 308 309 310

	* src/sexp_streamed_parser.c: Less trace messages.

	* src/unix_random.c: Hacked and debugged. Seems to work now.

	* src/randomness.h (RANDOM_POLL_BACKGROUND): New method.

	* src/randomness.c (make_poor_random): #if:ed out.
	Improved arcfour_random.

	* src/packet_ignore.h: Marked as obsolete.

	* src/lshd.c (do_exc_lshd_handler): Handle
311 312
	EXC_RANDOMNESS_LOW_ENTROPY.
	(make_lshd_options): Use make_arcfour_random and make_unix_random.
Niels Möller's avatar
Niels Möller committed
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330
	(main): Call RANDOM_POLL_BACKGROUND.

	* src/gc.c (gc_kill): Less debug output.

	* src/gateway_commands.c: Hacked some more. Compiles now.

	* src/exception.h (EXC_RANDOMNESS, EXC_RANDOMNESS_LOW_ENTROPY):
	New exception types.

	* src/debug.c (do_rec_debug): Replace with a definition that uses
	DEFINE_PACKET_HANDLER.

	* src/connection.h (DEFINE_PACKET_HANDLER): New macro.
	(ssh_connection): Deleted the "share handler" attributes ignore,
	unimplemented, fail.
	Declare corresponding static handlers.

	* src/client.c: Refer to the static packet handlers instead of
331
	connection->fail and friends.
Niels Möller's avatar
Niels Möller committed
332 333 334 335 336 337 338
	* src/client_userauth.c: Likewise
	* src/client_keyexchange.c: Likewise.
	* src/proxy.c: Likewise.
	* src/proxy_userauth.c: Likewise.
	* src/server_userauth.c: Likewise.
	* src/server_keyexchange.c: Likewise.
	* src/server.c: Likewise.
339

Niels Möller's avatar
Niels Möller committed
340 341
	* src/connection.c (connection_init_io): Don't initialize the
	encryption state here, that is already done by
342
	make_ssh_connection.
Niels Möller's avatar
Niels Möller committed
343 344 345 346 347 348 349
	(do_fail): Replace with a definition that uses
	DEFINE_PACKET_HANDLER.
	(do_unimplemented): Likewise.
	(connection_ignore_handler): Moved handler from packet_ignore.c,
	and made it static.
	(connection_forward_handler): New handler.
	(make_ssh_connection): Updated initialization to use static
350
	handlers.
Niels Möller's avatar
Niels Möller committed
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375

	* src/channel.c (do_exc_finish_channel_handler): Renamed
	do_finish_channel_handler.
	(do_exc_channel_request_handler): Renamed
	do_channel_request_handler.
	(do_global_request_success): Replace with a definition that uses
	DEFINE_PACKET_HANDLER.
	(do_global_request_failure): Likewise.
	(do_channel_request): Likewise.
	(do_channel_open): Likewise.
	(do_window_adjust): Likewise.
	(do_channel_data): Likewise.
	(do_channel_extended_data): Likewise.
	(do_channel_eof): Likewise.
	(do_channel_close): Likewise.
	(do_channel_open_confirm): Likewise.
	(do_channel_open_failure): Likewise.
	(do_channel_success): Likewise.
	(do_channel_failure): Likewise.
	(init_connection_service): New function. Most of the code in
	connection_service_command moved here.

	* src/Makefile.am.in (liblsh_a_SOURCES): Added gateway.c,
	gateway_commands.c and unix_random.c. Removed packet_ignore.c.

Niels Möller's avatar
Niels Möller committed
376
2000-10-22  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
377 378 379 380 381

	* src/exception.h (EXC_IO_BLOCKING_READ): New exception type.

	* src/io.c (read_raw): New function.

382
	* src/randomness.c (arcfour_random): New class.
Niels Möller's avatar
Niels Möller committed
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
	(do_arcfour_random): New function.
	(do_arcfour_random_slow): New function.
	(make_arcfour_random): New function.

	* src/randomness.h (random_poll): New class.

	* src/symmetric/arcfour.c (arcfour_crypt): Changed argument order.
	(arcfour_set_key): Likewise.
	(arcfour_stream): New function.
	(arcfour_update_key): New function.
	(arcfour_init): New function.

	* src/testsuite/Makefile.am (TS_PROGS): Added arcfour-test.

	* configure.in: Bumped version to 1.1.1. Check for getrusage and
398
	gettimeofday.
Niels Möller's avatar
Niels Möller committed
399 400 401 402

	* src/reaper.c (do_reap): Removed assert(), to allow replacement
	of registered callbacks.

Niels Möller's avatar
Niels Möller committed
403
2000-10-20  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
404 405 406 407 408 409

	* src/sexp.c (encode_base64): Added argument break_lines.

	* src/lsh-export-key.c (do_ssh2_print): Simplified.
	(make_header): New function.

410
	* src/connection.h: Added comments for the various PEER_* flags.
Niels Möller's avatar
Niels Möller committed
411

Niels Möller's avatar
Niels Möller committed
412
2000-10-19  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
413 414 415 416

	* src/Makefile.am.in: Don't prepend $(srcdir) to $@, as it seems
	not to do the right thing.

Niels Möller's avatar
Niels Möller committed
417
2000-10-18  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
418 419 420

	* configure.in: Check for endianness (needed by memcmp.c).

Niels Möller's avatar
Niels Möller committed
421
2000-10-18  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
422

423
	* src/abstract_crypto.h, src/dsa.c, src/dsa.h, src/rsa.c: Cleanup.
Niels Möller's avatar
Niels Möller committed
424 425 426 427 428

	* src/sexp-conv.c: #include spki_commands.h

	* src/spki_commands.c (spki_signer2verifier,
	spki_verifier2public):  New commands, that replace the old
429
	spki_signer2public.
Niels Möller's avatar
Niels Möller committed
430 431

	* src/lsh-writekey.c (make_writekey): Use verifier2public and
432
	signer2verifier.
Niels Möller's avatar
Niels Möller committed
433 434 435 436

	* src/spki.c, src/spki_commands.c: Moved definitions of commands
	out of spki.c.

Niels Möller's avatar
Niels Möller committed
437
2000-10-17  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
438 439 440 441 442 443 444

	* src/spki.c (spki_make_public_key): Take a verifier as argument.
	(dsa_to_spki_public_key): #if:ed out.
	(parse_private_key): Use new publickey-related functions and
	methods.

	* src/rsa.c (rsa_public): Deleted this struct; use rsa_verifier
445
	instead.
Niels Möller's avatar
Niels Möller committed
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
	(make_rsa_verifier_internal): New function, used by
	make_rsa_verifier and make_rsa_signer.
	Added new methods.
	(rsa_signer): Added pointer to a corresponding verifier object.
	Replaces the rsa_public struct.

	* src/lsh_proxy.c (do_host_lookup): Adapt to the changed
	make_ssh_dss_verifier function.

	* src/lsh-decode-key.c (do_decode_key): Use new publickey-related
	functions and methods.
	* src/lsh.c (do_lsh_lookup): Likewise.
	* src/server_authorization.c (do_key_lookup): Likewise.

	* src/dsa.c (make_ssh_dss_verifier): Changed return type.
	(ssh_dss_public_key): Obsoleted by the SIGNER_GET_VERIFIER and
	PUBLIC_KEY methods.
	(parse_ssh_dss_public): Renamed (was parse_dsa_public), and
	changed the return type.
	(make_dsa_verifier_internal): New method used by make_dsa_verifier
	and make_dsa_signer.
	(dsa_signer): Added pointer to a corresponding verifier object.
	Replaces the dsa_public struct.
469
	Also deleted some old code.
Niels Möller's avatar
Niels Möller committed
470 471 472 473 474 475 476 477 478 479

	* src/dsa.h: Moved definitions of the dsa_verifier and dsa_signer
	classes to dsa.c, and deleted the struct dsa_public.

	* src/atoms.in (ssh-rsa-pkcs1@lysator.liu.se): New atom.

	* src/abstract_crypto.h (signer): Added method SIGNER_GET_VERIFIER, and
	removed the SIGNER_PUBLIC_KEY method.
	(verifier): Added methods PUBLIC_KEY and PUBLIC_SPKI_KEY.

Niels Möller's avatar
Niels Möller committed
480
2000-10-16  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
481 482 483 484 485

	* src/Makefile.am.in (bin_PROGRAMS): Added lsh-export-key.

	* src/lsh-export-key.c: New program (contributed by jps).

Niels Möller's avatar
Niels Möller committed
486
2000-10-15  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519

	* src/server_session.c: Don't need to know about any reaper
	anymore (as that is handled by the unix_user object).

	* src/unix_user.c (unix_user): Replaced backend and pw_helper
	attributes with a pointer to the unix_user_db object.
	(pwhelper_callback): New class.
	(do_pwhelper_callback): New function.
	(make_pwhelper_callback): Likewise.
	(kerberos_check_pw): Made non-blocking.
	(do_verify_password): Try ordinary unix passwords first, and use
	pw_helper only if ordinary password fails.
	(unix_user_db): Added reaper attribute.

	* src/userauth.h (lsh_user): Changed arguments for
	password_verify, now take a continuation and an exception handler.
	Removed reaper argument from fork_process.

	* configure.in: Bumped version to 1.1.0.

	* src/server_password.c (do_authenticate): Pass continuation and
	exception handler to USER_VERIFY_PASSWORD.

	* src/lshd.c: New option --password-helper. Changed
	--kerberos-passwords to not take any argument. Updated handling of
	reaper; pass it to make_unix_user_db() but not to
	make_shell_handler() and make_exec_handler().

	* src/sexp-conv.c (main_argp): Changed usage message to mention
	fingerprinting. Still not very good.

	* src/rsa.c: Include <string.h>.

Niels Möller's avatar
Niels Möller committed
520
2000-10-13  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
521

522
	* README: Fixed references to lsh-writekey and lsh-keygen.
Niels Möller's avatar
Niels Möller committed
523

Niels Möller's avatar
Niels Möller committed
524
2000-10-11  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
525 526 527 528 529

	* src/Makefile.am.in: Try to create all machine independent files
	in $(srcdir).
	* src/testsuite/Makefile.am: Likewise.

Niels Möller's avatar
Niels Möller committed
530
2000-10-11  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
531 532 533 534 535 536 537

	* configure.in: Bumped version to 1.0.7.

	* src/unix_user.c: Don't make use kerberos_check_pw conditional on
	WITH_KERBEROS, as it really isn't very kerberos specific.
	* src/lshd.c (main_options): Likewise.

Niels Möller's avatar
Niels Möller committed
538
2000-10-10  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
539

540
	* src/unix_user.c (kerberos_check_pw): Fixed call to execl().
Niels Möller's avatar
Niels Möller committed
541 542 543 544 545 546 547 548 549 550 551

	* Released lsh-1.0.6.

	* src/symmetric/serpent.c (serpent_setup): Reworked key padding.

	* src/unix_user.c (make_unix_user_db): Added pw_helper argument.
	(make_unix_user): Likewise.
	(kerberos_check_pw): New function.
	(do_verify_password): Kerberos support.

	* src/lshd.c: New options --kerberos-passwords and
552
	--no-kerberos-passwords.
Niels Möller's avatar
Niels Möller committed
553 554 555 556 557 558 559 560 561 562 563 564 565

	* src/io.c (io_iter): Fixed format string (should use %z, not %s).
	(address_info2sockaddr): Likewise.
	(lsh_make_pipe): Moved the make_pipe() function from
	server_session.c, made it public and renamed it to
	lsh_make_pipe().

	* src/Makefile.am.in (EXTRA_PROGRAMS): Uses for lsh-krb-checkpw.
	Added rules using @KRB_PROGRAM@ and @KRB_LIBS@.

	* configure.in: New option --disable-kerberos.
	Check for kerberos libraries (currently for heimdal).
	(PREFIX): New define.
566
	(KRB_LIBS, KRB_PROGRAM): New substitutions.
Niels Möller's avatar
Niels Möller committed
567 568

	* acinclude.m4 (AC_CHECK_KRB_LIB): New macro to add libraries to
569
	KRB_LIBS.
Niels Möller's avatar
Niels Möller committed
570 571 572 573 574 575 576 577 578 579 580

	* acconfig.h (PREFIX): New define.
	(WITH_KERBEROS): Likewise.

	* src/gateway_commands.c: New file.

	* src/lsh-krb-checkpw.c: New program.

	* src/testsuite/Makefile.am (TS_PROGS): Added rijndael tests.
	Removed serpent tests (they don't work yet).

Niels Möller's avatar
Niels Möller committed
581
2000-10-09  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
582 583 584

	* configure.in: Bumped version to 1.0.6.

Niels Möller's avatar
Niels Möller committed
585
2000-10-07  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
586 587

	* src/symmetric/serpent.c (serpent_setup): Added key_size
588
	argument, and added key padding (appearantly not yet working).
Niels Möller's avatar
Niels Möller committed
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607

	* src/testsuite/Makefile.am (CFLAGS): Disable optimization.
	(TS_PROGS): Added serpent-test.

	* src/exception.h (EXC_IO_CLOSE): New exception type.
	(EXC_PAUSE_READ): Likewise.
	(EXC_PAUSE_START_READ): Likewise.
	(EXC_PAUSE_CONNECTION): Likewise.
	(EXC_PAUSE_START_CONNECTION): Likewise.

	* src/connection.h (ssh_connection): Renamed attribute busy to
	paused. New attribute pending.

	* src/connection.c (connection_handle_packet): New function, doing
	the work of the previous handle_connectino function().
	(connection_handle_pending): New function.
	(do_handle_connection): New function.
	(do_exc_connection_handler): Renamed (was
	do_exc_protocol_exception), and handle EXC_PAUSE_CONNECTION and
608
	EXC_PAUSE_START_CONNECTION.
Niels Möller's avatar
Niels Möller committed
609 610 611 612 613 614 615 616
	(make_exc_connection_handler): Renamed as well.
	(connection_lock): Raise EXC_PAUSE_CONNECTION.
	(connection_unlock): Raise EXC_PAUSE_START_CONNECTION.

	* src/channel.c: Changed close_callback -> lsh_callback.

	* src/io.c (io_iter): Some support for callouts.
	(do_exc_finish_read_handler): Handle EXC_PAUSE_READ and
617
	EXC_PAUSE_START_READ.
Niels Möller's avatar
Niels Möller committed
618 619 620 621 622 623 624 625 626
	(do_buffered_read): Allow handlers to set want_read == 0.

	* src/io.h: Renamed close_callback to lsh_callback, and removed
	the "reason" argument.

	* src/write_buffer.c (write_buffer_pre_write): Use string_queue.
	(do_write): Likewise.

	* src/queue.c: New struct-type string_queue, and corresponding
627
	functions.
Niels Möller's avatar
Niels Möller committed
628 629 630 631 632 633 634 635 636 637

	* src/algorithms.c: Use static algorithm objects.
	* src/blowfish.c: Likewise.
	* src/rijndael.c: Likewise.
	* src/crypto.h: Likewise.
	* src/twofish.c: Likewise.
	* src/cast.c: Likewise.

	* src/serpent.c (make_serpent_instance): Pass key size to serpent_setup().

Niels Möller's avatar
Niels Möller committed
638
2000-10-06  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
639 640 641 642

	* src/dsa.c (do_dsa_verify): Fixed bug in ssh-dss bugcompatibility
	signature verification.

Niels Möller's avatar
Niels Möller committed
643
2000-10-03  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
644 645 646 647 648 649 650

	* src/spki.c (spki_make_signer): New function. Used in
	do_spki_sexp2signer() and parse_private_key().
	(spki_make_public_key): New function. Used in spki_signer2public()
	and parse_private_key().

	* src/lsh-decode-key.c (do_decode_key): Build
651
	<public-key>-expression.
Niels Möller's avatar
Niels Möller committed
652

653
	* src/interact.h: New class abstract_interact (not yet used).
Niels Möller's avatar
Niels Möller committed
654 655 656 657
	* src/interact.c: New class interact_unix, still #if:ed out.

	* src/abstract_crypto.h (signer): Changed the conventions for
	SIGNER_PUBLIC(). Now returns ( <pub-sig-alg-id> <s-expr>* ), not
658 659
	<public-key>.
	* src/dsa.c (make_dsa_public_key): Updated for the new convention.
Niels Möller's avatar
Niels Möller committed
660 661 662
	* src/rsa.c (do_rsa_public_key): Likewise.

	* src/testsuite/Makefile.am (TS_PROGS): Added tests for rsa and
663
	dsa.
Niels Möller's avatar
Niels Möller committed
664

665
	* src/sexp-conv.c (do_sexp_select): Bugfix in OP_CAR.
Niels Möller's avatar
Niels Möller committed
666

Niels Möller's avatar
Niels Möller committed
667
2000-10-01  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
668 669 670 671 672 673 674 675 676 677 678 679 680

	* src/sexp-conv.c: New option --select.
	(do_sexp_select): New function.
	(make_sexp_select_command): New function.

	* src/testsuite/macros.m4 (TS_TEST_SIGN): Bug fixes.
	(main): Recognize options -v, --debug etc.

	* src/rsa.c (rsa_compute_root): Fixed bug in CRT calculation.

	* src/keyexchange.c (select_algorithm): Reversed order of
	arguments. (Fixes a bug reported by jps).
	(do_handle_kexinit): Use symbolic constants when indexing
681
	connection->kexinits.
Niels Möller's avatar
Niels Möller committed
682

Niels Möller's avatar
Niels Möller committed
683
2000-09-26  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
684 685 686 687

	* src/dsa_keygen.c (dsa_generate_key): Added lost
	dsa_find_generator() call, spotted by jps.

Niels Möller's avatar
Niels Möller committed
688
2000-09-24  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
689 690

	* contrib/lsh.spec.in (%post): Fixed references to lsh-keygen and
691
	lsh-writekey.
Niels Möller's avatar
Niels Möller committed
692

Niels Möller's avatar
Niels Möller committed
693
2000-09-25  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
694

695
	* src/ssh-conv: Fixed typo (reported by Timshel Knoll).
Niels Möller's avatar
Niels Möller committed
696

Niels Möller's avatar
Niels Möller committed
697
2000-09-19  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
698 699 700 701

	* src/rsa.c (SA): New macro.
	Added debug() calls.
	(RSA_CRT): Disabled the crt optimixation, as that code seems
702
	broken.
Niels Möller's avatar
Niels Möller committed
703 704 705 706 707 708

	* src/dsa.c (SA): New macro.
	(encode_dsa_sig_val): Fixed type error.

	* src/server_publickey.c (do_authenticate): Pass algorithm
	name to VERIFY() method. make_dsa_verifier_kludge() no longer
709
	needed.
Niels Möller's avatar
Niels Möller committed
710 711

	* src/server_keyexchange.c (dh_server): New attribute
712 713
	hostkey_algorithm.
	(do_handle_dh_init): Pass algorithm name dto dh_make_server_msg().
Niels Möller's avatar
Niels Möller committed
714 715 716 717 718 719 720
	(do_init_server_dh): Initialize hostkey_algorithm.
	make_dsa_signer_kludge() no longer needed.

	* src/rsa.c (encode_rsa_sig_val): New function.
	(decode_rsa_sig_val): New function.
	(do_rsa_sign): New algorithm argument.
	(do_rsa_sign_spki): Deleted hash and principal arguments. Return a
721
	<sig-val>.
Niels Möller's avatar
Niels Möller committed
722 723 724 725 726
	(do_rsa_verify): Added algorithm argument.
	(do_rsa_verify_spki): Take an sexp rather than an sexp_itterator
	as argument. Expect a <sig-val>.

	* src/publickey_crypto.h (dh_make_server_msg): Added argument
727
	hostkey_algorithm.
Niels Möller's avatar
Niels Möller committed
728 729

	* src/dsa.c (dsa_signer_variant, dsa_verifier_variant): Commented
730
	out.
Niels Möller's avatar
Niels Möller committed
731 732 733
	(encode_dsa_sig_val): New function.
	(decode_dsa_sig_val): New function.
	(do_dsa_sign): New argument algorithm. Handle plain ssh-dss,
734
	ssh-dss-kludge and spki.
Niels Möller's avatar
Niels Möller committed
735
	(do_dsa_sign_spki): Deleted hash and principal arguments. Return a
736
	<sig-val>.
Niels Möller's avatar
Niels Möller committed
737
	(do_dsa_verify): New argument algorithm. Handle plain ssh-dss,
738
	ssh-dss-kludge and spki.
Niels Möller's avatar
Niels Möller committed
739 740 741 742 743 744 745 746 747 748 749 750
	(do_dsa_verify_spki): Take an sexp rather than an sexp_itterator
	as argument. Expect a <sig-val>.
	(do_dsa_sign_kludge): #if:ed out.
	(make_dsa_signer_kludge): Likewise.
	(do_dsa_verify_kludge): Likewise.
	(make_dsa_verifier_kludge): Likewise.

	* src/dh_exchange.c (dh_make_server_msg): New argument
	hostkey_algorithm, which is passed on to SIGN().

	* src/client_keyexchange.c (do_handle_dh_reply): Pass algorithm
	name to VERIFY() method. make_dsa_verifier_kludge() no longer
751
	needed.
Niels Möller's avatar
Niels Möller committed
752 753 754 755 756 757 758 759 760 761 762 763 764 765

	* src/client_userauth.c (do_userauth_pk_ok): Pass algorithm name
	to the SIGN() method.

	* src/atoms.in: New algorithm name "ssh-dss-kludge@lysator.liu.se"
	for internal use.

	* src/abstract_crypto.h (verifier): Added algorithm argument to
	the verify() method. Removed hash and principal arguments from the
	verify_spki() method.
	* src/abstract_crypto.h (signer): Similar changes.

	* configure.in: Bumped version to 1.0.5.

Niels Möller's avatar
Niels Möller committed
766
2000-09-18  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
767 768

	* src/spki.c (spki_hash_data): New function.
769
	(do_spki_hash): Use spki_hash_data().
Niels Möller's avatar
Niels Möller committed
770

Niels Möller's avatar
Niels Möller committed
771
2000-09-15  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
772 773 774 775 776 777 778

	* src/parse.c (parse_next_atom): Updated comment. Return error for
	empty atoms.
	(parse_atoms): Handle the empty list case better.
	(parse_atom_list): Simplified.

	* src/keyexchange.c (do_handle_kexinit): Check kex_state.
779
	(do_handle_kexinit): Check length of received kex_algorithms list.
Niels Möller's avatar
Niels Möller committed
780 781 782
	(do_handle_kexinit): Set kex_state to KEX_STATE_IGNORE or
	KEX_STATE_IN_PROGRESS as appropriate.
	(do_handle_newkeys): Clear kexinits and literal_kexinits when
783
	resetting kex_state (fixes key renegotiation bug reported by jps).
Niels Möller's avatar
Niels Möller committed
784 785 786
	(kexinit_filter): New command.

	* src/dh_exchange.c (init_dh_instance): Don't clear
787
	connection->kexinits and connection->literal_kexinits here.
Niels Möller's avatar
Niels Möller committed
788 789 790 791 792 793 794 795

	* src/connection_commands.c (handshake_command): Added
	make_kexinit argument (and deleted the corresponding field from
	handshake_info). Updated all callers.

	* src/client_keyexchange.c (do_init_client_dh): Don't touch connection->kex_state.
	(do_init_client_srp): Likewise.
	* src/server_keyexchange.c: Likewise.
796

Niels Möller's avatar
Niels Möller committed
797 798 799 800 801 802 803 804 805
	* src/algorithms.c (list_hostkey_algorithms): New function.
	(lookup_hostkey_algorithm): New function.
	(algorithms_options): New option --hostkey-algorithm.
	(filter_algorithms): New function.
	(filter_algorithms_l): New function.

	* src/lshd.c: Renamed lshd_listen to make_lshd_listen and
	lshd_connection_service to make_lshd_connection_service.
	(make_lshd_listen): Use kexinit_filter to restrict announced
806
	hostkey algorithms to those that we actually have keys for.
Niels Möller's avatar
Niels Möller committed
807 808 809
	(make_lshd_listen): Use listen_callback, in order to get the right
	evaluation order.

Niels Möller's avatar
Niels Möller committed
810
2000-09-14  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
811 812 813 814 815 816 817

	* src/algorithms.c (default_crypto_algorithms): Make the default
	list more restrictive.
	(all_crypto_algorithms): New function, returning a less
	conservative algorithm list.

	* src/connection.h (ssh_connection): Deleted obsolete newkeys
818
	attribute.
Niels Möller's avatar
Niels Möller committed
819 820 821 822 823

	* src/process_atoms (atom2define): Replace @domain suffix with
	"_LOCAL".

	* src/lsh-writekey.c (make_lsh_writekey_options): Use
824
	all_symmetric_algorithms() and all_symmetric_algorithms().
Niels Möller's avatar
Niels Möller committed
825 826 827 828 829
	* src/lsh.c (make_options): Likewise.
	* src/lsh_proxy.c (main): Likewise.
	* src/lshd.c (make_lshd_options): Likewise.

	* src/atoms.in: Added @lysator.liu.se suffix to non-standard
830
	algorithms.
Niels Möller's avatar
Niels Möller committed
831

Niels Möller's avatar
Niels Möller committed
832
2000-09-14  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
833 834 835 836

	* src/keyexchange.c (do_handle_newkeys): Clear
	connection->kexinits.

Niels Möller's avatar
Niels Möller committed
837
2000-09-11  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
838 839

	* src/symmetric/rijndael.c: Use static const for all lookup
840
	tables.
Niels Möller's avatar
Niels Möller committed
841 842 843 844 845 846 847 848

	* src/parse.c (parse_bignum): Fixed off-by-one error when sanity
	checking string length.

	* src/symmetric/serpent.c: Replaced the AES "All rights reserved"
	copyright blurb with the vanilla GPL blurb, after confirming with
	the authors that the code really is GPL:ed.
	* src/symmetric/serpentsboxes.h: Likewise.
849

Niels Möller's avatar
Niels Möller committed
850 851 852 853 854
	* src/symmetric/serpentsboxes.h: Replaced unsigned long with
	UINT32.

	* src/symmetric/serpent.c (serpent_setup): Don't use array syntax
	for function argument types.
855

Niels Möller's avatar
Niels Möller committed
856
2000-09-10  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
857 858 859 860 861 862

	* doc/lsh.texinfo (Algorithm options): Updated the default
	algorithm list.

2000-09-05  Rafael R. Sevilla  <dido@pacific.net.ph>

863
	* src/symmetric/rijndael.c, src/symmetric/include/rijndael.h: New.
Niels Möller's avatar
Niels Möller committed
864 865 866 867 868 869 870 871 872
	LGPLed Rijndael implementation by me.
	* src/rijndael.c: New.  Adds support for Rijndael.
	* src/symmetric/serpent.c, src/symmetric/serpentsboxes.h,
	src/symmetric/include/serpent.h: New.  LGPLed Serpent implementation
	by Ross Anderson, Eli Biham, and Lars Knudsen.
	* src/serpent.c: New.  Adds support for Serpent.
	* src/symmetric/Makefile.am.in, src/atoms_in, src/Makefile.am.in,
	src/algorithms.c, src/crypto.h: updated for Rijndael and Serpent.

Niels Möller's avatar
Niels Möller committed
873
000-09-10  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
874 875 876

	* FAQ: Added a question on anonymous cvs access.

Niels Möller's avatar
Niels Möller committed
877
2000-09-04  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
878 879

	* doc/lsh.texinfo: Updated references to lsh-keygen and
880
	lsh-writekey.
Niels Möller's avatar
Niels Möller committed
881 882 883

	* Released 1.0.4.

Niels Möller's avatar
Niels Möller committed
884
2000-09-03  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
885 886 887 888 889 890 891 892 893 894 895

	* src/rsa_keygen.c (rsa_generate_key): Can't compute a and b
	before d.

	* src/testsuite/keygen-2-test: Use lsh-writekey.
	* src/testsuite/keygen-test: Likewise.

	* src/rsa.c (make_rsa_algorithm): New argument NAME.
	* src/rsa.h (rsa_algorithm): New attribute NAME.

	* src/lsh-writekey.c (make_lsh_writekey_options): Added rsa
896
	support.
Niels Möller's avatar
Niels Möller committed
897 898 899 900

	* src/dsa.h: New file, all dsa-related declarations moved here
	from dsa_keygen.h (which is obsoleted) and publickey_crypto.h.

901
	* configure.in: Bumped version to 1.0.4.
Niels Möller's avatar
Niels Möller committed
902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922

	* src/testsuite/macros.m4 (TS_SEXP): Use transport format.

	* src/publickey_crypto.h (DSA_MAX_SIZE): New constant.

	* src/parse.c (parse_bignum): New argument LIMIT.
	* src/sexp.c (sexp2bignum_u): Likewise.
	(sexp_get_un): Likewise.

	* src/dsa_keygen.c (dsa_generate_key): New function (extracted
	from lsh_keygen.c).

	* src/dsa.c (do_dsa_verify): Check signature size.
	(do_dsa_verify_spki): Likewise.
	(do_dsa_verify_kludge): Likewise.
	(spki_init_dsa_public): Check size of public key.

	* src/bignum.c (bignum_random_size): Strip extra high order bits.
	(bignum_next_prime): Minor cleanup.
	(bignum_random_prime): New function.

Niels Möller's avatar
Niels Möller committed
923
2000-09-02  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
924 925 926 927

	* src/atoms.in: Added more rsa-related atoms.

	* src/Makefile.am.in: Renamed lsh_keygen and lsh_writekey. Added
928
	rsa_keygen.c.
Niels Möller's avatar
Niels Möller committed
929 930 931 932 933

	* src/lsh-keygen.c: Renamed lsh_keygen.c.

	* src/lsh-writekey.c: Renamed lsh_writekey.c.

Niels Möller's avatar
Niels Möller committed
934
2000-09-01  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
935 936 937 938 939 940 941 942

	* src/lsh_keygen.c: Moved most dsa-specific code to dsa_keygen.
	Added support for rsa keys.

	* src/rsa.c (compute_rsa_root): Implemented CRT optimization.
	Constness fixes.

	* src/sexp_parser.c (sexp_parse_transport): New function.
943
	(string_to_sexp): Added style argument. Updated all callers.
Niels Möller's avatar
Niels Möller committed
944 945 946 947

	* src/digits.c (decode_base64): New function.
	(simple_decode_base64): New function.

Niels Möller's avatar
Niels Möller committed
948
2000-08-29  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
949 950 951 952 953

	* src/Makefile.am.in (liblsh_a_SOURCES): Added rsa.c.

	* misc/make-dist: Keep rsa files.

Niels Möller's avatar
Niels Möller committed
954
2000-08-29  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
955 956 957

	* configure.in: Improved message about upgrading m4.

Niels Möller's avatar
Niels Möller committed
958
2000-08-24  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
959 960 961 962

	* src/client_userauth.c (do_exc_client_userauth): Update current
	index before using it (bugfix contributed by jps).

Niels Möller's avatar
Niels Möller committed
963
2000-08-04  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993

	* src/client_userauth.c (client_userauth_failure): Added again
	argument to the CLIENT_USERAUTH_FAILURE method.
	(client_userauth_state): Added attribute next.
	(userauth_method_is_useful): New function.
	(do_userauth_failure): Don't modify current. Instead, increment
	next as appropriate, and pass the new again argument to
	CLIENT_USERAUTH_FAILURE
	(do_exc_client_userauth): Update current correctly, unsing the new
	next attribute.
	(exc_userauth_disconnect): New class.
	(make_exc_userauth_disconnect): New function.
	(do_client_userauth): Use make_exc_userauth_disconnect().
	(send_password): Simplified tried_empty_passwd handling; just
	increment it.
	(do_password_failure): Use again and tried_empty_passwd to figure
	out what to do.

	* src/client_userauth.c (exc_client_userauth): Renamed (was
	client_exc_userauth). Updated all uses.

	* src/command.h: Made declaration of command_die_on_null extern.

	* src/client_userauth.c: Added trace output.

	* src/channel_commands.c, src/channel_commands.h: Use ints to represent atoms.
	* src/gateway_channel.c (make_gateway_channel_open_command): Likewise.
	* src/lsh_writekey.c: Likewise.
	* src/proxy.c: Likewise.
	* src/server_publickey.c: Likewise.
994 995
	* src/spki.c (spki_get_type):
	* src/spki_commands.c (make_pkcs5_encrypt):
Niels Möller's avatar
Niels Möller committed
996 997 998 999 1000

	* configure.in: Put -L flags in LDFLAGS, not LIBS.

	* acinclude.m4: Put all -R flags in LDFLAGS, not LIBS.

Niels Möller's avatar
Niels Möller committed
1001
2000-08-03  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012

	* configure.in: Bumped version to 1.0.3.

	* src/spki.c (spki_get_type): Use int to represent an atom.

	* src/atoms.h: Added a comment saying that atoms are represented
	as ints.

	* src/atoms.c (lookup_atom): Return int.

	* src/parse.c (parse_next_atom): Made static. Use int to represent
1013
	atoms.
Niels Möller's avatar
Niels Möller committed
1014 1015
	(parse_atom): Use int to represent atoms.

Niels Möller's avatar
Niels Möller committed
1016
2000-07-31  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1017 1018 1019 1020

	* src/server_publickey.c (do_authenticate): Fail nicely if key is
	not authorized.

1021
	* src/lsh-authorize: Fixed broken references to sexp_conv.
Niels Möller's avatar
Niels Möller committed
1022

Niels Möller's avatar
Niels Möller committed
1023
2000-07-28  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1024 1025 1026 1027 1028

	* configure.in: Bumped version to 1.0.2.

	* src/format.h, src/format.h: Replaced macros with functions
	again, to get better typechecking.
1029

Niels Möller's avatar
Niels Möller committed
1030
	* src/format.h (make_cstring): Fixed macro.
1031

Niels Möller's avatar
Niels Möller committed
1032 1033 1034 1035 1036
	* src/list.h (LIST_LENGTH): Avoid casting.

	* src/jpoll.c (poll): Pass a correct timeout argument to select
	(reported by Jean-Pierre Stierlin).

Niels Möller's avatar
Niels Möller committed
1037
2000-07-27  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061

	* src/werror.c (write_syslog): Avoid using snprintf.

	* src/server_pty.c (CONST_STRLEN): New macro. Used instead of
	sizeof() to get the length of constant strings.

	* src/io.c (address_info2sockaddr): Use ssh_cformat().
	* src/lsh.c (do_options2known_hosts): Likewise.
	(do_options2identities): Likewise.
	(main_argp_parser): Likewise.
	* src/lsh_writekey.c (main_argp_parser): Likewise.
	(lsh_writekey_options2public_file): Likewise.
	* src/unix_user.c (do_file_exists): Likewise.
	(do_read_file): Likewise.
	(format_env_pair): Likewise.
	(format_env_pair_c): Likewise.
	* src/server_authorization.c (do_key_lookup): Likewise.
	* src/server_session.c (do_spawn_exec): Likewise.

	* src/lsh_writekey.c (do_lsh_writekey_handler): Display a
	friendlier message for EEXIST errors.

	* src/connection_commands.h: Added missing extern declarations (reported
	by Jean-Pierre Stierlin).
1062
	* src/exception.h: Likewise.
Niels Möller's avatar
Niels Möller committed
1063 1064 1065 1066 1067 1068

	* src/client_userauth.c (do_client_exc_userauth): Bugfix (reported
	by Jean-Pierre Stierlin).

	* src/format.c (ssh_cformat): New function.
	* src/format.c (format_cstring, make_cstring_l, make_cstring):
1069
	Replaced with macros.
Niels Möller's avatar
Niels Möller committed
1070 1071


Niels Möller's avatar
Niels Möller committed
1072
2000-07-14  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1073 1074 1075 1076

	* lsh-1.0.1 release.

	* doc/lsh.texinfo: Spelling and grammar fixes by Johan
1077
	Myreen.
Niels Möller's avatar
Niels Möller committed
1078 1079 1080

	* configure.in: IPv6 fixes by Johan Myreen.

Niels Möller's avatar
Niels Möller committed
1081
2000-07-09  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100

	* configure.in (SCHEME_PROGRAM): Edited warning message displayed
	if no scheme is found.

	* doc/lsh.texinfo (Algorithm options): Note that any argument to
	the -z option must follow directly, with no spaces.

	* src/jpoll.c (poll): Use trace(), not printf, for debug messages.

	* configure.in: Bumped version to 1.0.1.

	* src/client_userauth.c (send_password): Check for empty password,
	and stop asking if the empty password is entered twice.
	(client_password_state): New attribute tried_empty_passwd.
	(send_password): Take a single client_password_state * argument.
	Updated callers.
	(make_client_password_state): Changed return type.

	* src/unix_user.c (do_logout_cleanup): Fixed HAVE_LOGWTMP
1101
	conditional.
Niels Möller's avatar
Niels Möller committed
1102 1103
	(do_fork_process): Likewise.

Niels Möller's avatar
Niels Möller committed
1104
2000-07-04  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1105 1106 1107 1108 1109

	* ANNOUNCE: Updated for 1.0.

	* configure.in: Bumped version to 1.0.

Niels Möller's avatar
Niels Möller committed
1110
2000-06-30  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1111 1112

	* doc/lsh.texinfo: Added @anchor markup for lsh-usage and
1113
	lshd-usage.
Niels Möller's avatar
Niels Möller committed
1114 1115 1116

	* src/symmetric/sha.c: Made the compression function sha_transform
	non-static. Use the READ_UINT32 and WRITE_UINT32 macros from
1117
	lsh_types.h.
Niels Möller's avatar
Niels Möller committed
1118

Niels Möller's avatar
Niels Möller committed
1119
2000-06-28  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1120 1121 1122 1123

	* contrib/lsh.spec.in: Update by Thayne.

	* src/symmetric/Makefile.am.in (BUILT_SOURCES): Don't include
1124
	$(des_headers) here.
Niels Möller's avatar
Niels Möller committed
1125 1126 1127 1128 1129
	(EXTRA_DIST): Added $(des_headers) here.

	* doc/Makefile.am.in: Create lsh.html in the source directory.

	* Makefile.am.in (MAKEFILESAM): cd to $(srcdir) before running
1130
	./make_am.
Niels Möller's avatar
Niels Möller committed
1131 1132 1133 1134 1135 1136 1137

	* doc/Makefile.am.in: Commented out dvi and ps rules.

	* src/xalloc.c (UNIT): Use unsigned long.
	(debug_malloc): Address memory using UNIT *.
	(debug_free): Likewise.

Niels Möller's avatar
Niels Möller committed
1138
2000-06-27  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1139 1140 1141 1142 1143 1144 1145

	* doc/lsh.texinfo: Bumped "updated-for" to 1.0.

	* configure.in: Bumped version to 0.9.15.

	* src/server_session.c (do_spawn_exec): Fixed declaration order.

Niels Möller's avatar
Niels Möller committed
1146
2000-06-27  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1147 1148 1149 1150 1151 1152 1153

	* src/server_session.c (do_spawn_exec): Avoid array
	initialization, as the HPUX compiler doesn't like that.

	* src/algorithms.h, src/channel.c, src/debug.h,
	src/parse_macros.h, src/server.c, src/erver_pty.c,
	src/server_session.c, xalloc.c: Minor bugfixes, reported by David
Niels Möller's avatar
Niels Möller committed
1154
	Kågedal.
Niels Möller's avatar
Niels Möller committed
1155

Niels Möller's avatar
Niels Möller committed
1156
2000-06-26  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1157 1158 1159 1160 1161

	* src/io.c (address_info2sockaddr): Look at HAVE_GAI_STRERROR and
	HAVE_AI_NUMERICHOST. Use #error rather than #warning

	* Include string.h in all files that use memcpy() or strlen().
1162

Niels Möller's avatar
Niels Möller committed
1163 1164 1165 1166 1167 1168 1169 1170
	* configure.in: New option --with-include path.
	Fixed test of am_cv_prog_cc_stdc.
	Check for gai_strerror and AI_NUMERICHOST.
	Disable ipv6 and display a warning if gai_strerror and
	AI_NUMERICHOST are not found.

	* acconfig.h (HAVE_AI_NUMERICHOST): New define.

1171
	* README: Updated, and added a reference to the manual.
Niels Möller's avatar
Niels Möller committed
1172

Niels Möller's avatar
Niels Möller committed
1173
2000-06-21  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1174

1175
	* src/lsh.c (do_lsh_default_handler): Handle EXC_GLOBAL_REQUEST.
Niels Möller's avatar
Niels Möller committed
1176 1177 1178 1179 1180
	Added --stdin, --stdout and --stderr options.
	(CASE_ARG): New macro.

	* doc/Makefile.am.in (man_MANS): Use automake's man_MANS.
	(EXTRA_DIST): Added gateway-mode.txt and lsh.html to the
1181
	distribution.
Niels Möller's avatar
Niels Möller committed
1182 1183 1184 1185
	Added rule to build html version of the manual.

	* doc/lsh.texinfo (Getting started): New chapter.

1186
	* src/sexp_commands.c (do_print_raw_hash_to): Write newline.
Niels Möller's avatar
Niels Möller committed
1187

Niels Möller's avatar
Niels Möller committed
1188
2000-06-20  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1189 1190 1191 1192 1193 1194

	* configure.in: Bumped version to 0.9.14.

	* src/tcpforward_commands.c (new_tcpip_channel): Leave the
	REMEMBER_RESOURCE call for make_tcpip_channel().

1195
	* src/tcpforward.c (make_tcpip_channel): Call REMEMBER_RESOURCE().
Niels Möller's avatar
Niels Möller committed
1196

Niels Möller's avatar
Niels Möller committed
1197
2000-06-14  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1198 1199 1200 1201

	* src/sexp-conv.c: Renamed from sexp_conv.c.

	* src/sexp.c (do_format_sexp_string): Removed redundant call to
1202
	ssh_format.
Niels Möller's avatar
Niels Möller committed
1203 1204 1205 1206 1207 1208
	(is_short): New function (removed #if 0).
	(do_format_sexp_tail): Implemented pretty printing.
	(do_format_sexp_cons): Enabled pretty printing.
	(do_format_sexp_vector): Implemented pretty printing.
	(encode_base64): Implemented line folding.

Niels Möller's avatar
Niels Möller committed
1209
2000-06-12  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1210 1211 1212

	* src/ssh-conv: Handle a different, one-line, key format.

Niels Möller's avatar
Niels Möller committed
1213
2000-06-10  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240

	* src/ssh-conv: New script.

	* src/sexp_streamed_parser.c (string_handler): Deleted this class,
	after I noticed that it was equivalent to abstract_write.

	* src/read_file.c (make_read_file): New function, for reading an
	entire file.

	* src/read_base64.c (make_read_base64): New function, for reading
	an entire base64-encoded file.

	* src/exception.h (EXC_APP): New constant.

	* src/io.c (finish_io_exception): New static object.

	* src/dsa.c (make_dsa_public_key): New function.
	(do_dsa_public_key): Use make_dsa_public_key().

	* src/Makefile.am.in (bin_PROGRAMS): Added lsh-decode-key.
	(bin_SCRIPTS): Added ssh-conv.
	(liblsh_a_SOURCES): Added read_file.c and read_base64.c.

	* configure.in: Bumped version to 0.9.13.

	* src/lsh-decode-key.c: New program.

Niels Möller's avatar
Niels Möller committed
1241
2000-06-04  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258

	* src/srp_exchange.c (srp_format_proofs): New function. Replaces
	srp_format_m2().
	(srp_make_reply_msg): Convert secret to string.
	(srp_make_client_proof): Compute m2, and return it through an
	extra argument..
	(srp_process_client_proof): Use srp_format_proofs().
	(srp_process_server_proof): Added argument m2. Deleted argument dh.

	* src/keyexchange.c (kex_build_secret): Add length header for
	secret key.

	* src/client_keyexchange.c: Adapted to changes in dh_exchange.c
	and srp_exchange.c.
	* src/server_keyexchange.c: Likewise.

	* src/dh_exchange.c (dh_process_client_msg): Convert secret to
1259
	string.
Niels Möller's avatar
Niels Möller committed
1260 1261
	(dh_make_server_msg): Added server_key argument.
	(dh_process_server_msg): Return server_key and signatur. Call
1262
	dh_digest().
Niels Möller's avatar
Niels Möller committed
1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274
	(dh_verify_server_msg): #if:ed out function.

	* src/publickey_crypto.h: Changed typeof K attribute to string.
	Removed the server_key and signature attributes.

	* configure.in: Bumped version to 0.9.12.

	* src/client_userauth.c (do_client_exc_userauth): Use equality
	comparison when checking for EXC_USERAUTH.

	* src/lsh.c (do_lsh_default_handler): Check for EXC_USERAUTH.

Niels Möller's avatar
Niels Möller committed
1275
2000-06-02  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1276 1277 1278 1279 1280 1281 1282 1283

	* src/unix_user.c (do_lookup_user): Let $HOME override the
	passwd->pw_dir, if (i) the server is not running as root, and (ii)
	the user logging in is the same user running the server.

	* src/lsh.c: Bugfixes in the userauth configuration.

	* src/lsh-authorize: Updated to use sexp_conv -f rather than
1284
	sexp_conv -o.
Niels Möller's avatar
Niels Möller committed
1285

Niels Möller's avatar
Niels Möller committed
1286
2000-06-01  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298

	* src/unix_user.c (do_lookup_user): When running as non-root, let
	$HOME override pw_dir from the passwd-database.

	* src/srp-gen.c (main_argp_parser): By default, use transport
	syntax when writing to stdout, and canonical syntax when writing
	to a file.

	* src/server_session.c (do_open_session): assert() that
	connection->user is non-NULL.

	* src/lshd.c (lshd_connection_service): Use
1299
	connection_require_userauth.
Niels Möller's avatar
Niels Möller committed
1300 1301 1302 1303
	(main): Allow user's to request ssh-connection service without
	first executing the ssh-userauth protocol. This makes sense if SRP
	was used for key exchange. lshd_connection_service checks that the
	user is properly authenticated before actually starting the
1304
	service.
Niels Möller's avatar
Niels Möller committed
1305

1306
	* src/lsh.c (lsh_options): New attributes with_userauth and service.
Niels Möller's avatar
Niels Möller committed
1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317
	(options2service): New command.
	(make_lsh_userauth): New expression.
	(make_lsh_connect): Use options2service.
	(main_options): New flags --publickey, --userauth, --no-userauth.
	(CASE_FLAG): New macro.
	(main_argp_parser): Implemented --userauth and --no-userauth
	options, with defaults depending on whether or not SRP is being
	used.
	Use the CASE_FLAG macro.
	(request_userauth_service): New global command object.
	(request_connection_service): New global command object.
1318

Niels Möller's avatar
Niels Möller committed
1319 1320 1321 1322 1323 1324 1325 1326
	* src/connection_commands.c (connection_require_userauth): New command.
	(make_connection_if_srp): New function.

	* src/connection.h (CONNECTION_SRP): New constant.

	* src/client_keyexchange.c (do_srp_client_proof_handler): Set
	CONNECTION_SRP flag.
	* src/server_keyexchange.c (do_srp_server_proof_handler):
1327
	Likewise.
Niels Möller's avatar
Niels Möller committed
1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341

	* src/client.h (request_service): Moved class declaration here.
	(do_request_service): Added prototype and made non-static.
	(STATIC_REQUEST_SERVICE): New macro.

	* src/command, src/connection.c, src/exception.c, src/io.c,
	src/keyexchange.c, src/keyexchange.h, src/lsh_keygen.c,
	src/lshd.c, src/publickey_crypto.h, src/server_session.c,
	src/server_userauth.c, src/server_userauth.h, src/sexp.c,
	src/sexp_parser.c, src/spki.c, src/spki_commands.c,
	src/srp_exchange.c, src/tcpforward.c, src/werror.c: Removed old
	dead code.

	* src/srp_exchange.c (srp_make_reply_msg): Check return value of
1342
	GROUP_ADD.
Niels Möller's avatar
Niels Möller committed
1343 1344 1345 1346
	Use new SRP-related atoms. More debug output.

	* src/srp-gen.c (make_srp_gen_options): Use make_ssh_ring_srp_1().
	Use the sexp_format() function.
1347

Niels Möller's avatar
Niels Möller committed
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383
	* src/sexp_commands.c (do_print_raw_hash_to): Use the sexp_format
	function, rather than invoking the SSH_FORMAT method directly.
	* src/spki_commands.c (do_spki_encrypt): Likewise.

	* src/server_userauth.c (userauth_handler): New attributes
	service_e and auth_e. WE use different exception handlers when
	invoking the AUTHENTICATE method and when invoking the service.
	(do_userauth_continuation): Simplified this continuation. It is
	passed a user, and returns the connection.
	(do_handle_userauth): When a service is eventually invoked, it is
	passed a single argument: the connection. Previously, the user
	object was passed as argument to the service.
	(do_userauth): Clear the user attribute of the connection, and
	display a warning message if the connection was already
	authenticated.
	(do_userauth): Don't call make_userauth_continuation() here.

	* src/server_session.c: Deleted user attribute.
	(make_server_session): Deleted user argument.
	(open_session): Deleted user attribute.
	(make_open_session): Deleted user argument.
	(server_connection_service): #if:ed out
	(spawn_process): Added user argument.
	(do_alloc_pty): Use CAST macro. Get the user from the connection
	object.
	(pty_request_handler): Statically allocated object, replaces the
	make_pty_handler function.

	* src/server_keyexchange.c (do_srp_server_proof_handler): Store
	the authenticated user in the connection object.

	* src/publickey_crypto.c (make_ssh_ring_srp_1): Use the generator
	5. Unlike 7, 5 is a primitive root.

	* src/lshd.c: Adapted to the simplified userauth-service
	framework. Deleted lshd_services and calls to
1384
	make_server_connection_service.
Niels Möller's avatar
Niels Möller committed
1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395

	* src/lsh.c (main_argp_parser): Use new srp-related atoms.

	* src/dh_exchange.c (dh_hash_digest): Added debug-message.

	* src/client_keyexchange.c (do_handle_srp_reply): Check return
	value from srp_make_client_proof().

	* src/atoms.in: Renamed srp-group1-sha1 -> srp-ring1-sha1,
	ssh-group1 -> ssh-ring1.

Niels Möller's avatar
Niels Möller committed
1396
2000-05-31  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1397 1398 1399

	* src/lsh.c (main_argp_parser): Use make_srp1().
	Changed behaviour of srp-keyexchange and dh-exchange. If only
1400
	--srp-keyexchange is given, dh keyexchange is disabled.
Niels Möller's avatar
Niels Möller committed
1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433

	* src/lshd.c (main_argp_parser): Use make_srp1().

	* src/srp_exchange.c (make_srp1): New function.
	(srp_make_reply_msg): Use GROUP_ADD.
	(srp_make_client_proof): Use GROUP_SUBTRACT.

	* src/srp.h (make_srp1): Added prototype.

	* src/server_keyexchange.c: Adapted to changes in keyexchange.c.
	Don't use make_install_new_keys().
	* src/client_keyexchange.c: Likewise.

	* src/publickey_crypto.h (abstract_group): Added methods GROUP_ADD
	and GROUP_SUBTRACT, that are defined only for groups that happens
	to have some extra structure.

	* src/publickey_crypto.c (make_group_zn): Renamed from make_zn.
	(make_ring_zn): New function.
	(make_ssh_ring_srp_1): New function.

	* src/connection_commands.c: Adapted to the changes to
	ssh_connection and keyexchange.c.

	* src/connection_commands.h (handshake_info): Replaced mode
	attribute with flags.

	* src/keyexchange.c (kexinit_handler): Deleted type attribute.
	(initiate_keyexchange): Deleted mode argument, use
	connection->flags instead.
	(do_handle_kexinit): Use connection->flags.
	(make_kexinit_handler): Deleted type argument.
	(install_keys, install_new_keys): Deleted classes.
1434
	(install_keys): Made the INSTALL_KEYS method an ordinary function.
Niels Möller's avatar
Niels Möller committed
1435 1436 1437 1438 1439 1440 1441 1442
	(keyexchange_finish): Use install_keys().

	* src/connection.c (make_ssh_connection): Added flags argument.
	Initialize flags and user.

	* src/connection.h (ssh_connection): Added flags attribute, and
	switched the values of CONNECTION_CLIENT and CONNECTION_SERVER.
	Added user attribute.
1443

Niels Möller's avatar
Niels Möller committed
1444 1445
	* configure.in: Bumped version to 0.9.11.

Niels Möller's avatar
Niels Möller committed
1446
2000-05-30  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1447 1448 1449 1450

	* src/invert-defs: Improved awk-code to deal with repeated message
	numbers. Thanks to bellman.

Niels Möller's avatar
Niels Möller committed
1451
2000-05-29  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1452 1453

	* src/testsuite/macros.m4 (TS_STRING): Ignore newlines in hex
1454
	literals.
Niels Möller's avatar
Niels Möller committed
1455 1456 1457 1458
	(TS_TEST_STRING_EQ): Construct values only once.
	(TS_TEST_HMAC): New macro.

	* src/testsuite/Makefile.am (TS_PROGS): Added sha1-test and
1459
	m5-test.
Niels Möller's avatar
Niels Möller committed
1460 1461 1462 1463 1464

	* src/testsuite/sha1-test.m4: New file.
	* src/testsuite/md5-test.m4: New file.

	* src/digit_table.c (main): There's no hex digit with the value
1465
	16.
Niels Möller's avatar
Niels Möller committed
1466 1467 1468

	* src/abstract_crypto.c (mac_string): New function.

Niels Möller's avatar
Niels Möller committed
1469
2000-05-28  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1470 1471

	* src/werror.c (werror_hexdump): Include an ascii column in the
1472
	output.
Niels Möller's avatar
Niels Möller committed
1473 1474 1475 1476 1477

	* src/unix_user.c (do_read_file): Fixed call to ssh_format.

	* src/publickey_crypto.h (make_dh): Added prototype.

1478
	* src/dh_exchange.c (init_dh_instance): Use hex in debug output.
Niels Möller's avatar
Niels Möller committed
1479 1480

	* src/client_keyexchange.c (srp_client_instance): Removed salt
1481
	attribute.
Niels Möller's avatar
Niels Möller committed
1482 1483 1484
	(do_handle_srp_reply): Bug fixes.

	* doc/Makefile.am.in: Added pattern rule for RFC-like nroff
1485
	formatting.
Niels Möller's avatar
Niels Möller committed
1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508

	* src/srp_exchange.c (srp_make_verifier): New function.
	(srp_hash_password): Fixed call to ssh_format.
	(srp_make_init_msg): Likewise.
	(srp_make_reply_msg): Likewise.

	* src/publickey_crypto.c (make_ssh_group1): New funcction.

	* src/lshd.c: Added SRP support. New options --srp-keyexchange,
	--no-srp-keyexchange, --dh-keyexchange, --no-dh-keyexchange.
	* src/lsh.c: Likewise.

	* src/dh_exchange.c (make_dh): New function.
	(make_dh1): Use make_dh() and make_ssh_group1().

	* src/command.h (COMMAND_STATIC): New macro.

	* src/Makefile.am.in (bin_PROGRAMS): Added srp-gen.

	* src/unix_user.c (do_read_file): Changed USER_READ_FILE to use
	exceptions and continuations.

	* src/ssh.h: Added message numbers for SRP key exchange and dh
1509
	group negotiation.
Niels Möller's avatar
Niels Möller committed
1510 1511 1512 1513

	* src/srp_exchange.c: Various bugfixes. At least compiles now.

	* src/sexp.c (sexp_check_type_l): Renamed tthe sexp_check_type
1514
	function.
Niels Möller's avatar
Niels Möller committed
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536
	(sexp_check_type): Moved and renamed the spki_check_type function.
	(sexp2bignum_u): New function.
	(sexp_atom_eq): New function.
	(sexp_atoms_eq): Renamed the previos sexp_atom_eq function.
	(sexp_get_un): Use sexp2bignum_u.

	* src/publickey_crypto.h: Renamed all occurences of
	"diffie_hellman" do "dh".

	* src/publickey_crypto.c (zn_ring_add): New function.
	(zn_ring_subtract): New function.

	* src/keyexchange.c (kex_build_secret): Use a string rather than a
	bignum for the third argument.
	(keyexchange_finish): New function.

	* src/io.c (check_user_permissions): Made fname argument const.
	(io_read_user_file): Fixed call to fstat().

	* src/invert-defs: Use -u flag to sort (is that a GNU:ism?)

	* src/exception.c (make_protocol_exception): Updated with new
1537
	messages.
Niels Möller's avatar
Niels Möller committed
1538 1539

	* src/dh_exchange.c (dh_hash_update): New (or ersurrected)
1540
	function.
Niels Möller's avatar
Niels Möller committed
1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556
	(dh_hash_digest): Don't hash the host key here.
	(dh_make_server_msg): Hash host key.
	(dh_process_server_msg): Likewise.

	* src/client_keyexchange.h (make_srp_client): New prototype.

	* acconfig.h: Added WITH_SRP.

	* configure.in: Include sys/types.h when checking for utmp
	members.
	Added --disable-srp option.

	* src/client_keyexchange.c (do_handle_dh_reply): Use
	keyexchange_finish().
	First attempt at SRP support.
	* src/server_keyexchange.c: Likewise
1557

Niels Möller's avatar
Niels Möller committed
1558 1559
	* src/atoms.in: Added srp-group1-sha1, srp-verifier and ssh-group1.

Niels Möller's avatar
Niels Möller committed
1560
2000-05-27  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572

	* src/testsuite/Makefile.am (TS_MORE_SH): Added lsh-4-test.

	* src/publickey_crypto.h: Renamed the class group to abstract_group.
	(GROUP_RANGE): Renamed from GROUP_MEMBER, as it actually doesn't
	check membership.
	(GROUP_SMALL_POWER): New method, for raising a group element to a
	power that fits in an UINT32.
	(abstract_group): Added generator attribute.

	* src/publickey_crypto.c: Moved most dh-related code to
	dh_exchange.c. Moved the definition of the group_zn class to
1573
	publickey_crypto.h.
Niels Möller's avatar
Niels Möller committed
1574 1575

	* src/Makefile.am.in (liblsh_a_SOURCES): Added dh_Exchange.c and
1576
	srp_exchange.c.
Niels Möller's avatar
Niels Möller committed
1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587

	* src/userauth.h (lsh_user): Added read_file method.

	* src/unix_user.c (do_read_file): New function.
	(make_unix_user_db): Added backend argument.

	* src/io.c (check_user_permissions): New function.
	(io_read_user_file): New function.

	* src/io.h (io_read_user_file): Added prototype.

Niels Möller's avatar
Niels Möller committed
1588
2000-05-24  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1589 1590 1591

	* contrib/lsh.spec.in: Use -o flag for lsh_writekey (Thayne).

Niels Möller's avatar
Niels Möller committed
1592
2000-05-22  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606

	* src/io.c (do_kill_fd): Call close_fd_nicely(). This fixes a
	problem, where output from for instance "lsh host echo foo" loses
	output because the channel is closed before the output is flushed
	from the write buffer.

	* src/channel.c (adjust_rec_window): Check the state of the
	channel, and send the SSH_MSG_CHANNEL_WINDOW_ADJUST message only
	if it makes sense.

	* src/dsa.c (do_dsa_verify): Removed the extra length field, as it
	seems it will disappear in the next draft.
	(do_dsa_sign): Likewise.

Niels Möller's avatar
Niels Möller committed
1607
2000-05-21  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1608 1609 1610 1611

	* configure.in: Bumped version to 0.9.10.

	* acinclude.m4 (AC_SEARCH_LIBGMP): Use HAVE_GMP_H and
1612
	HAVE_GMP2_GMP_H.
Niels Möller's avatar
Niels Möller committed
1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629

	* configure.in (gmp_header_found): Changed "no gmp" error message
	not to refer to a particular version.

	* src/dsa.c (do_dsa_verify): Require outer length field.
	(do_dsa_sign): Add outer length field.

	* src/ssh.h (SSH_DISCONNECT_TOO_MANY_CONNECTIONS): Updated for
	draft-ietf-secsh-transport-07.txt.
	(SSH_DISCONNECT_AUTH_CANCELLED_BY_USER): Likewise.
	(SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE): Likewise.
	(SSH_DISCONNECT_ILLEGAL_USER_NAME): Likewise.
	(SSH_DISCONNECT_RESERVED): Likewise.

	* src/client.c (do_exit_signal): Use control character filtering
	on the message.

Niels Möller's avatar
Niels Möller committed
1630
2000-05-19  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1631 1632 1633

	* src/client_userauth.c (do_userauth_pk_ok): Moved else across
	"#endif /* DATAFELLOWS_WORKAROUNDS */" (reported by Sami
1634
	Lehtinen).
Niels Möller's avatar
Niels Möller committed
1635

Niels Möller's avatar
Niels Möller committed
1636
2000-05-09  Niels Möller  <nisse@lysator.liu.se>
Niels Möller's avatar
Niels Möller committed
1637 1638

	* src/unix_user.c (do_fork_process): Check HAVE_UT_NAME and
1639
	HAVE_UT_USER.
Niels Möller's avatar
Niels Möller committed
1640

Niels Möller's avatar
Niels Möller committed
1641
2000-05-08  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1642 1643 1644 1645 1646 1647 1648

	* acconfig.h (HAVE_UT_NAME): Added.
	(HAVE_UT_USER) Added.

	* configure.in: Bumped version to 0.9.9.
	Added --with-lib-path option, RPATH handling, and checks for
	libutil.h, ut_name and ut_user. Fixed gmp check to recognize
1649
	gmp-3.x.
Niels Möller's avatar
Niels Möller committed
1650 1651 1652 1653 1654 1655 1656

	* src/unix_user.c: Include libutil.h if available (reported by
	Jonathan McDowell).
	(lsh_make_utmp): Use ut_user if ut_name is not available.
	(reported by Jonathan McDowell).

	* src/server_session.c: Include signal.h (reported by Jonathan
1657
	McDowell).
Niels Möller's avatar
Niels Möller committed
1658 1659 1660 1661 1662 1663 1664 1665 1666 1667

	* src/symmetric/desTest.c: Eliminate warnings.

	* src/io.c (address_info2sockaddr) [!HAVE_GETADDRINFO]: Initialize
	addr->sin_family properly (reported by Jonathan McDowell).

	* acinclude.m4 (LSH_RPATH_INIT): New macro.
	(LSH_RPATH_FIX): Likewise.
	(AC_SEARCH_LIBGMP): Likewise.

Niels Möller's avatar
Niels Möller committed
1668
2000-05-07  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1669 1670 1671 1672 1673 1674 1675 1676 1677

	* src/lsh_types.h: Include stddef.h.

	* configure.in: Fixes for recognizing gmp-3.x.

	* acinclude.m4 (AC_CHECK_LIBGMP): New macro.

	* acconfig.h: Added HAVE_LIBGMP

Niels Möller's avatar
Niels Möller committed
1678
2000-05-06  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1679 1680 1681 1682 1683 1684 1685 1686 1687

	* configure.in: Bumped version to 0.9.8.

	* src/sexp.c (sexp_argp_parser): Renamed output-format option from
	-o to -f.

	* src/lsh_writekey.c (main_options): #if:ed out the -f alias.

	* doc/lsh.texinfo (Getting started): Updated example on using
1688
	lsh_writekey.
Niels Möller's avatar
Niels Möller committed
1689 1690 1691 1692 1693 1694 1695 1696 1697 1698

	* src/tcpforward_commands.c (do_remote_port_install_continuation):
	Handle only the successful case here.

	* src/connection.c (make_ssh_connection): Bugfix: Don't apply
	SSH_CHANNEL_MAX_PACKET_FUZZ here.

	* src/client_userauth.c (client_publickey_next): Fixes for the
	case where we send complete signatures for several keys.

Niels Möller's avatar
Niels Möller committed
1699
2000-05-01  Niels Möller  <nisse@cuckoo.localdomain>
Niels Möller's avatar
Niels Möller committed
1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713

	* src/testsuite/keygen-test: Use -o flag to lsh_writekey.

	* src/spki_commands.c (make_pkcs5_encrypt): New function.

	* src/spki.c: Deleted old #if'ed out code.

	* src/sexp.c (sexp_s): Renamed from make_sexp_string(). Updated
	all callers.

	* src/pkcs5.c (pkcs5_derive_key): Renamed pkcs5_key_derivation().
	Added comments trying to analyze the choice of iteration count.

	* src/lsh_writekey.c: Major reorganization. Use argp, and support