Commit 2cbe258c authored by Niels Möller's avatar Niels Möller

*** empty log message ***

Rev: ChangeLog:1.129
Rev: doc/TODO:1.65
Rev: src/client_userauth.c:1.25
Rev: src/testsuite/.cvsignore:1.1
Rev: src/testsuite/Makefile.am:1.1
Rev: src/testsuite/des-test.m4:1.1
Rev: src/testsuite/macros.m4:1.1
parent 9734e836
1999-12-07 Niels Mller <nisse@cuckoo.localdomain>
* configure.in: Generate src/testsuite/Makefile.
Bumped version to 0.1.18.
* src/Makefile.am.in (SUBDIRS): Added testsuite.
(liblsh_a_SOURCES): Added spki_commands.c.
(liblsh_a_LIBADD): Add @LIBOBJS@ here.
(LDADD): Removed @LIBOBJS@.
* src/client_keyexchange.c (do_init_client_dh): Use EXTRA argument
as a hostkey lookup_verifier. Deleted the association
algorithm->lookup_verifier.
(make_dh_client): Deleted VERIFIERS argument.
* src/spki_commands.h: Added extern keyword to declarations of
commands.
* src/spki_commands.c: Use three arguments with for_sexp. Better
tracing.
* src/spki.h (spki_context): New method add_tuple.
* src/spki.c (spki_private2public): New command, that replaces the
private2public command.
(parse_private_key): Use continuations and exceptions.
(do_spki_parse_key): Parse c and e on to parse_private_key.
(spki_parse_private_key_command): New command.
(spki_add_acl): New function. Replaces spki_read_acls.
(do_spki_add_tuple): New function.
* src/sexp_commands.c (for_sexp_command): New command.
Better trace output.
* src/server_keyexchange.c (do_init_server_dh): Use the EXTRA
argument as an alist algorithm->hostkey.
(make_dh_server): Deleted the KEYS argument.
* src/lshd.c: Adapted to new functions for reading keys and acls.
* src/lsh_proxy.c: Some (possible broken) changes to get it to
compile.
* src/lsh.c: Various bugfixes. Seems to work again now.
* src/keyexchange.c (do_handle_kexinit): Disconnect if there is no
common host key algorithm. Pass on "extra" to KEYEXCHANGE_INIT().
* src/keyexchange.h: Added argument "extra" to init-method.
(make_kexinit_handler): Added "extra" argument.
* src/io_commands.h (LOG_PEER): New macro.
* src/exception.h (EXC_ALL): New macro.
* src/dsa.c (do_dsa_public_key): New function.
* src/connection_commands.c (do_handshake): Pass "extra" argument
to make_kexinit_handler.
(handshake_info): New class.
(handshake_command): New static command.
* src/command.c (do_catch_apply): Bugfix for the ignore_value
feature.
(do_catch_simple): Initialize the ignore_value flag properly.
(do_trace_continuation): Better tracing.
* src/scm/gaba.scm (process-class): Fixed output of meta classes;
mode #define to the declaration part of the output file.
......
......@@ -289,3 +289,7 @@ Consider moving SPKI tuple-related functions to a separate file.
With SPKI, consider whether or not we should require any specific
order of subexpressions. The most central function for this is
sexp_get_un.
Extend the GABA: (expr ...) constructions with a single parameter
could be used directly as a command_simple. Extend gaba.scm to do that
automatically.
......@@ -437,9 +437,10 @@ do_client_userauth(struct command *s,
}
struct command *make_client_userauth(struct lsh_string *username,
int service_name,
struct object_list *methods)
struct command *
make_client_userauth(struct lsh_string *username,
int service_name,
struct object_list *methods)
{
NEW(client_userauth, self);
......@@ -451,7 +452,7 @@ struct command *make_client_userauth(struct lsh_string *username,
return &self->super;
}
/* Password authentication */
#define MAX_PASSWD 100
......
.deps
Makefile
Makefile.in
des-test
des-test.c
/.deps
/Makefile
/Makefile.in
/des-test
/des-test.c
# Testsuite
TESTS = des-test
# SUFFIXES = .c .o
noinst_PROGRAMS = $(TESTS)
LDADD = ../liblsh.a ../symmetric/libsymmetric.a
all:
@echo make check to build testprograms.
%.c: macros.m4 %.m4
m4 -s -P $^ > $@
TS_TEST_CRYPTO(»DES 1«, »&crypto_des_algorithm«,
#01010101 01010180#,
#00000000 00000000#,
#5799F72A D23FAE4C#)
TS_TEST_CRYPTO(»DES 2«, »&crypto_des_algorithm«,
#80010101 01010101#,
#00000000 00000000#,
#90E696A2 AD56500D#)
TS_TEST_CRYPTO(»DES 3«, »&crypto_des_algorithm«,
#08192A3B 4C5D6E7F#,
#00000000 00000000#,
#435CFFC5 68B3701D#)
TS_TEST_CRYPTO(»DES 4«, »&crypto_des_algorithm«,
#01234567 89ABCDEF#,
"Now is t",
#80B507E1 E6A7473D#)
m4_dnl LSH testsuite driver
m4_dnl (progn (modify-syntax-entry ? "(") (modify-syntax-entry ? ")"))
m4_dnl (progn (modify-syntax-entry 187 "(") (modify-syntax-entry 170 ")"))
m4_dnl (progn (modify-syntax-entry ?{ "(}") (modify-syntax-entry ?} "){"))
m4_changequote(, )
m4_changecom(/*, */)
m4_define(TS_DEFINE, m4_defn(m4_define))
TS_DEFINE(TS_WRITE, fputs("$1", stderr);)
TS_DEFINE(TS_MESSAGE, TS_WRITE($1... ))
TS_DEFINE(TS_OK, TS_MESSAGE(ok.\n))
TS_DEFINE(TS_FAIL, { TS_MESSAGE(failed.\n); exit(1); })
TS_DEFINE(TS_TEST_STRING_EQ,
{
struct lsh_string *a, *b;
TS_MESSAGE($1)
a = $2;
b = $3;
if (!lsh_string_eq(a, b))
TS_FAIL
TS_OK
lsh_string_free(a);
lsh_string_free(b);
}
)
TS_DEFINE(TS_STRING,
m4_ifelse(m4_index($1, "), 0,
ssh_format("%lz", $1), simple_decode_hex("m4_translit($1, 0-9a-zA-Z #, 0-9a-zA-Z)")) )
m4_dnl TS_TEST_HASH(name, algorithm, data, digest)
TS_DEFINE(TS_TEST_HASH,
TS_TEST_STRING_EQ($1, hash_string($2, TS_STRING($3)), TS_STRING($4)))
m4_dnl TS_TEST_CRYPTO(name, algorithm, key, clear, cipher)
TS_DEFINE(TS_TEST_CRYPTO,
{
struct crypto_algorithm *algorithm = $2;
struct lsh_string *key = TS_STRING($3);
assert(key->length == algorithm->key_size);
assert(!algorithm->iv_size);
TS_TEST_STRING_EQ(Encrypting with $1,
crypt_string(MAKE_ENCRYPT(algorithm, key->data, NULL),
TS_STRING($4), 0),
TS_STRING($5));
TS_TEST_STRING_EQ(Decrypting with $1,
crypt_string(MAKE_DECRYPT(algorithm, key->data, NULL),
TS_STRING($5), 0),
TS_STRING($4));
lsh_string_free(key);
}
)
m4_divert(1)
return 0;
} m4_divert
m4_dnl C code
#include "lsh.h"
#include "crypto.h"
#include "digits.h"
#include "format.h"
#include "xalloc.h"
#include <assert.h>
#include <stdio.h>
int main(int argc UNUSED, char **argv UNUSED)
{
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