FreeCalypso > hg > fc-sim-tools
changeset 36:38c14fa89937
fcsim1-mkprov: fix wrong length for Ki
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 17 Mar 2021 04:54:04 +0000 |
parents | 26d2ef843a99 |
children | 4e5586c7f275 |
files | utils/fcsim1-mkprov.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/utils/fcsim1-mkprov.c Wed Mar 17 04:51:53 2021 +0000 +++ b/utils/fcsim1-mkprov.c Wed Mar 17 04:54:04 2021 +0000 @@ -97,18 +97,18 @@ get_random_ki(strbuf) char *strbuf; { - u_char bin[8]; + u_char bin[16]; char *dp; unsigned n; int rc; - rc = read(random_fd, bin, 8); - if (rc != 8) { + rc = read(random_fd, bin, 16); + if (rc != 16) { fprintf(stderr, "error reading from %s\n", random_file); exit(1); } dp = strbuf; - for (n = 0; n < 8; n++) { + for (n = 0; n < 16; n++) { sprintf(dp, "%02X", bin[n]); dp += 2; }