Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-ece
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-ece
Commits
b49fa488
Commit
b49fa488
authored
Nov 13, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: encrypt VFP main loop flushes if the output stream is full.
parent
e942b008
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
vfp_encrypt.c
src/vfp_encrypt.c
+8
-2
No files found.
src/vfp_encrypt.c
View file @
b49fa488
...
...
@@ -82,11 +82,15 @@ encrypt(struct vfp_ctx *ctx, struct ece *ece, enum vfp_status vp)
record_len
=
stream
->
avail_in
+
TAG_LEN
+
1
;
}
assert
(
record_len
<=
ece
->
rs
);
if
(
record_len
>
stream
->
avail_out
)
if
(
record_len
>
stream
->
avail_out
)
{
assert
(
vp
!=
VFP_END
);
return
(
VFP_NULL
);
}
plaintext_len
=
record_len
-
(
TAG_LEN
+
1
);
if
(
plaintext_len
>
stream
->
avail_in
)
if
(
plaintext_len
>
stream
->
avail_in
)
{
assert
(
vp
!=
VFP_END
);
return
(
VFP_NULL
);
}
nonce_xor_seq
(
crypto
,
nonce
);
ciphertext_len
=
encrypt_record
(
ece
->
ectx
,
stream
->
next_in
,
...
...
@@ -238,6 +242,8 @@ vfp_encrypt_pull(struct vfp_ctx *ctx, struct vfp_entry *ent, void *ptr,
}
while
(
vp
==
VFP_OK
)
{
if
(
isOutputBufFull
(
stream
))
break
;
if
(
isInputBufEmpty
(
stream
))
{
size_t
len
=
ece
->
chunksz
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment