Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Knot projects
Knot DNS
Commits
f184e00d
Commit
f184e00d
authored
Aug 19, 2016
by
Jan Včelák
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TSIG: add context reset function
parent
da492263
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
src/knot/nameserver/tsig_ctx.c
src/knot/nameserver/tsig_ctx.c
+10
-0
src/knot/nameserver/tsig_ctx.h
src/knot/nameserver/tsig_ctx.h
+5
-0
No files found.
src/knot/nameserver/tsig_ctx.c
View file @
f184e00d
...
...
@@ -44,6 +44,16 @@ void tsig_cleanup(tsig_ctx_t *ctx)
memset
(
ctx
,
0
,
sizeof
(
*
ctx
));
}
void
tsig_reset
(
tsig_ctx_t
*
ctx
)
{
if
(
!
ctx
)
{
return
;
}
const
knot_tsig_key_t
*
backup
=
ctx
->
key
;
tsig_init
(
ctx
,
backup
);
}
int
tsig_sign_packet
(
tsig_ctx_t
*
ctx
,
knot_pkt_t
*
packet
)
{
if
(
!
ctx
||
!
packet
)
{
...
...
src/knot/nameserver/tsig_ctx.h
View file @
f184e00d
...
...
@@ -56,6 +56,11 @@ void tsig_init(tsig_ctx_t *ctx, const knot_tsig_key_t *key);
*/
void
tsig_cleanup
(
tsig_ctx_t
*
ctx
);
/*!
* \brief Reset TSIG context for new message exchange.
*/
void
tsig_reset
(
tsig_ctx_t
*
ctx
);
/*!
* \brief Sign outgoing packet.
*
...
...
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