diff options
author | Greg Hudson <ghudson@mit.edu> | 2019-02-19 01:30:41 -0500 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2019-05-31 11:45:05 -0400 |
commit | f8bd89e4a87a758d74897e483cdc3049b5564240 (patch) | |
tree | c57ccfcb3aa866d2a77a08005a6ae5bdc97404a2 /src/tests/threads/t_rcache.c | |
parent | 4662f94c7d51e3d262381c142eccd55759a89e46 (diff) | |
download | krb5-f8bd89e4a87a758d74897e483cdc3049b5564240.zip krb5-f8bd89e4a87a758d74897e483cdc3049b5564240.tar.gz krb5-f8bd89e4a87a758d74897e483cdc3049b5564240.tar.bz2 |
Add tag to krb5_donot_replay
For each use of replay caches, supply a tag based on a ciphertext or
checksum associated with the use. Stop creating or checking replay
records for unencrypted KRB-CRED messages.
ticket: 8786
Diffstat (limited to 'src/tests/threads/t_rcache.c')
-rw-r--r-- | src/tests/threads/t_rcache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tests/threads/t_rcache.c b/src/tests/threads/t_rcache.c index 9d9b1ac..6aa773a 100644 --- a/src/tests/threads/t_rcache.c +++ b/src/tests/threads/t_rcache.c @@ -64,7 +64,7 @@ static void try_one (struct tinfo *t) { krb5_donot_replay r; krb5_error_code err; - char buf[100], buf2[100]; + char buf[100], buf2[100], tag[8]; krb5_rcache my_rcache; snprintf(buf, sizeof(buf), "host/all-in-one.mit.edu/%p@ATHENA.MIT.EDU", @@ -72,6 +72,7 @@ static void try_one (struct tinfo *t) r.server = buf; r.client = (t->my_cusec & 7) + "abcdefgh@ATHENA.MIT.EDU"; r.msghash = NULL; + r.tag = empty_data(); if (t->now != t->my_ctime) { if (t->my_ctime != 0) { snprintf(buf2, sizeof(buf2), "%3d: %ld %5d\n", t->idx, @@ -84,6 +85,9 @@ static void try_one (struct tinfo *t) t->my_cusec++; r.ctime = t->my_ctime; r.cusec = t->my_cusec; + store_32_be(r.ctime, tag); + store_32_be(r.cusec, tag + 4); + r.tag = make_data(tag, 8); if (!init_once) { err = krb5_get_server_rcache(ctx, &piece, &my_rcache); if (err) { |