X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/a4c6c9bad5c2965cf970071de0cb2f3179c22b50..refs/heads/mdw/xdh:/crypto-test.h diff --git a/crypto-test.h b/crypto-test.h index e7ca777..807ae07 100644 --- a/crypto-test.h +++ b/crypto-test.h @@ -4,7 +4,7 @@ /* * This file is Free Software. It was originally written for secnet. * - * Copyright 2017 Mark Wooding + * Copyright 2017, 2019 Mark Wooding * * You may redistribute secnet as a whole and/or modify it under the * terms of the GNU General Public License as published by the Free @@ -66,7 +66,8 @@ union regval { long i; /* signed integer */ unsigned long u; /* unsigned integer */ - struct { void *p; size_t sz; } bytes; /* buffer of bytes */ + struct { unsigned char *p; size_t sz; } bytes; /* buffer of bytes */ + struct { char *p; size_t sz; } str; /* text string */ #ifdef REG_MEMBERS REG_MEMBERS /* your members here */ #endif @@ -120,12 +121,14 @@ extern void dump_hex(FILE *fp, const uint8_t *b, size_t sz); extern void trivial_regty_init(union regval *v); extern void trivial_regty_release(union regval *v); extern void allocate_bytes(union regval *v, size_t sz); +extern void allocate_string(union regval *v, size_t sz); /* Built-in register types. */ extern const struct regty regty_int, regty_uint, - regty_bytes; + regty_bytes, + regty_string; /* Running tests. */ extern void check_test_output(struct test_state *state,