Like in transform-eax. We are going to want to share this with eac
and extend it.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
/* Required key length in bytes */
#define REQUIRED_KEYLEN ((512+64+32)/8)
/* Required key length in bytes */
#define REQUIRED_KEYLEN ((512+64+32)/8)
+struct transform_params {
+ uint32_t max_seq_skew;
+};
+
struct transform {
closure_t cl;
struct transform_if ops;
struct transform {
closure_t cl;
struct transform_if ops;
+ struct transform_params p;
};
struct transform_inst {
struct transform_inst_if ops;
};
struct transform_inst {
struct transform_inst_if ops;
+ struct transform_params p;
struct keyInstance cryptkey;
struct keyInstance mackey;
uint32_t cryptiv;
uint32_t maciv;
uint32_t sendseq;
uint32_t lastrecvseq;
struct keyInstance cryptkey;
struct keyInstance mackey;
uint32_t cryptiv;
uint32_t maciv;
uint32_t sendseq;
uint32_t lastrecvseq;
/* Sequence number must be within max_skew of lastrecvseq; lastrecvseq
is only allowed to increase. */
seqnum=buf_unprepend_uint32(buf);
/* Sequence number must be within max_skew of lastrecvseq; lastrecvseq
is only allowed to increase. */
seqnum=buf_unprepend_uint32(buf);
- SEQNUM_CHECK(seqnum, ti->max_skew);
+ SEQNUM_CHECK(seqnum, ti->p.max_seq_skew);
- ti->max_skew=st->max_seq_skew;
cfgfatal(loc,"userv-ipif","parameter must be a dictionary\n");
dict=item->data.dict;
cfgfatal(loc,"userv-ipif","parameter must be a dictionary\n");
dict=item->data.dict;
- st->max_seq_skew=dict_read_number(dict, "max-sequence-skew",
- False, "serpent-cbc256", loc, 10);
+ st->p.max_seq_skew=dict_read_number(dict, "max-sequence-skew",
+ False, "serpent-cbc256", loc, 10);
SET_CAPAB_TRANSFORMNUM(CAPAB_TRANSFORMNUM_SERPENT256CBC);
SET_CAPAB_TRANSFORMNUM(CAPAB_TRANSFORMNUM_SERPENT256CBC);