chiark / gitweb /
comm: Provide udp_socks_deregister
[secnet.git] / transform-eax.c
index 89c46c87b17cf0d78655ea550cc4223f820dc70c..46dc879c69ffcb1c6f21c71aea28424cc28322c5 100644 (file)
@@ -179,7 +179,7 @@ static uint32_t transform_forward(void *sst, struct buffer_if *buf,
 
     TEAX_DEBUG(buf->start,buf->size);
 
-    memcpy(buf_append(buf,SEQLEN), nonce, SEQLEN);
+    BUF_ADD_BYTES(append,buf,nonce,SEQLEN);
 
     TEAX_DEBUG(nonce,SEQLEN);
 
@@ -273,6 +273,8 @@ static list_t *transform_apply(closure_t *self, struct cloc loc,
        cfgfatal(loc,"eax-serpent","parameter must be a dictionary\n");
     dict=item->data.dict;
 
+    SET_CAPAB_TRANSFORMNUM(CAPAB_TRANSFORMNUM_EAXSERPENT);
+
     st->p.max_seq_skew=dict_read_number(dict, "max-sequence-skew",
                                        False, "eax-serpent", loc, 10);
 
@@ -292,7 +294,7 @@ static list_t *transform_apply(closure_t *self, struct cloc loc,
        padding_round = 1;
     st->p.padding_mask = padding_round-1;
 
-    st->ops.max_start_pad=0;
+    update_max_start_pad(&transform_max_start_pad, 0);
 
     st->ops.keylen=0;
     st->ops.create=transform_create;