Commit 1f862443 authored by Niels Möller's avatar Niels Möller

*** empty log message ***

Rev: ChangeLog:1.11
Rev: src/.cvsignore:1.9
Rev: src/lsh.c:1.31
Rev: src/lshd.c:1.26
Rev: src/sexp.h:1.1
parent dac4fbd5
Sun Dec 20 20:11:02 1998 <nisse@puck>
* server.c (do_line): Accept client version 1.99, if
DATAFELLOWS_SSH2_GREETING_WORKAROUND is defined.
* randomness.c (make_poor_random): Allow NULL init string. Use pid
for seeding.
(make_device_random): New function.
(make_reasonably_random): New function.
* bignum.c (bignum_write): New function.
(bignum_random_size): New function.
(bignum_small_factor): New function.
(bignum_next_prime): New function.
* Makefile.am.in (noinst_LIBRARIES): Collect most object files
into liblsh.a.
Fri Dec 18 01:53:22 1998 <nisse@puck> Fri Dec 18 01:53:22 1998 <nisse@puck>
* server.c (do_eof): Consider closing (if CHANNEL_SENT_EOF and * server.c (do_eof): Consider closing (if CHANNEL_SENT_EOF and
......
...@@ -17,6 +17,9 @@ config.status ...@@ -17,6 +17,9 @@ config.status
configure configure
configure.scan configure.scan
lsh lsh
lsh_keygen
lshd lshd
prime_table
prime_table.h
stamp-h stamp-h
stamp-h.in stamp-h.in
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
/configure /configure
/configure.scan /configure.scan
/lsh /lsh
/lsh_keygen
/lshd /lshd
/prime_table
/prime_table.h
/stamp-h /stamp-h
/stamp-h.in /stamp-h.in
...@@ -102,7 +102,6 @@ int main(int argc, char **argv) ...@@ -102,7 +102,6 @@ int main(int argc, char **argv)
NEW(io_backend, backend); NEW(io_backend, backend);
struct lsh_string *random_seed;
struct randomness *r; struct randomness *r;
struct diffie_hellman_method *dh; struct diffie_hellman_method *dh;
struct keyexchange_algorithm *kex; struct keyexchange_algorithm *kex;
...@@ -164,8 +163,7 @@ int main(int argc, char **argv) ...@@ -164,8 +163,7 @@ int main(int argc, char **argv)
init_backend(backend); init_backend(backend);
random_seed = ssh_format("%z", "gazonk"); r = make_reasonably_random();
r = make_poor_random(&sha_algorithm, random_seed);
dh = make_dh1(r); dh = make_dh1(r);
/* No randomness is needed for verifying signatures */ /* No randomness is needed for verifying signatures */
lookup = make_fake_host_db(make_dss_algorithm(NULL)); lookup = make_fake_host_db(make_dss_algorithm(NULL));
...@@ -229,8 +227,6 @@ int main(int argc, char **argv) ...@@ -229,8 +227,6 @@ int main(int argc, char **argv)
return 1; return 1;
} }
lsh_string_free(random_seed);
/* Exit code if no session is established */ /* Exit code if no session is established */
lsh_exit_code = 17; lsh_exit_code = 17;
......
...@@ -131,7 +131,6 @@ int main(int argc, char **argv) ...@@ -131,7 +131,6 @@ int main(int argc, char **argv)
struct reap *reaper; struct reap *reaper;
struct lsh_string *random_seed;
struct randomness *r; struct randomness *r;
struct diffie_hellman_method *dh; struct diffie_hellman_method *dh;
struct keyexchange_algorithm *kex; struct keyexchange_algorithm *kex;
...@@ -178,9 +177,8 @@ int main(int argc, char **argv) ...@@ -178,9 +177,8 @@ int main(int argc, char **argv)
init_backend(backend); init_backend(backend);
reaper = make_reaper(); reaper = make_reaper();
random_seed = ssh_format("%z", "foobar");
r = make_poor_random(&sha_algorithm, random_seed); r = make_reasonably_random();
dh = make_dh1(r); dh = make_dh1(r);
init_host_key(r); /* Initializes public_key and secret_key */ init_host_key(r); /* Initializes public_key and secret_key */
kex = make_dh_server(dh, public_key, secret_key); kex = make_dh_server(dh, public_key, secret_key);
......
/* sexp.h
*
* An implementation of Ron Rivest's S-expressions, used in spki.
*
* $Id$ */
/* lsh, an implementation of the ssh protocol
*
* Copyright (C) 1998 Niels Mller
*
* This program 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 (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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef LSH_SEXP_H_INCLUDED
#define LSH_SEXP_H_INCLUDED
#include "abstract_io.h"
/* CLASS:
(class
(name sexp)
(vars
(output method int "int style" "struct abstract_write output")))
*/
/* CLASS:
(class
(name sexp_string)
(super sexp)
(vars
(display string)
(contents string)))
*/
/* CLASS:
(class
(name sexp_atom)
(super sexp)
(vars
(atom . int)))
*/
/* CLASS:
(class
(name "sexp_cons")
(super sexp)
(vars
(car object sexp)
(cdr object sex_cons)))
*/
/* Creating sexps */
/* atom->sexp */
struct sexp *sexp_a(int a);
/* cstring->sexp */
struct sexp *sexp_z(char *s);
/* mpz->atom */
struct sexp *sexp_n(mpz_t n);
struct sexp *sexp_sn(mpz_t n);
/* cons */
struct sexp *sexp_c(struct sexp *car, struct sexp_cons *cdr);
/* list */
struct sexp *sexp_l(unsigned n, ...);
/* Extracting information from sexp. These functions accept NULL
* arguments, and return NULL if the conversion is not possible */
int *sexp_consp(struct sexp *e);
/* For lists */
struct sexp *sexp_car(struct sexp *e);
struct sexp *sexp_cdr(struct sexp *e);
int sexp *sexp_null_cdr(struct sexp *e);
struct lsh_string *sexp_contents(struct sexp *e);
struct lsh_string *sexp_display(struct sexp *e);
int sexp_atom(struct sexp *e);
int sexp_bignum_u(struct sexp *e, mpz_t n);
int sexp_bignum_s(struct sexp *e, mpz_t n);
/* Parsing sexp */
/* CLASS:
(class
(name sexp_handler)
(vars
(method int "struct sexp *e")))
*/
struct read_handler make_read_sexp(struct sexp_handler *h)
#endif /* LSH_SEXP_H_INCLUDED */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment