Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenVPN TLS Crypt V2 Plugins
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emily Ehlert
OpenVPN TLS Crypt V2 Plugins
Commits
60733e21
Commit
60733e21
authored
2 years ago
by
Emily Ehlert
Browse files
Options
Downloads
Patches
Plain Diff
Fix slot mod for YubiKey
parent
f0e98854
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
+8
-10
8 additions, 10 deletions
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
with
8 additions
and
10 deletions
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
+
8
−
10
View file @
60733e21
...
...
@@ -485,8 +485,14 @@ yubikey_import_server_key(struct plugin_context *context, const char **argv) {
ERROR_CHECK
(
ovpn_base64_decode
(
argv
[
3
],
hmac_keybuf
,
TLS_CRYPT_V2_SERVER_KEY_LEN
)
<=
0
,
"ovpn_base64_decode() failed"
);
ret_code
|=
import_server_key
(
context
->
yk
,
context
->
st
,
aes_keybuf
,
context
->
acc_code
,
context
->
verb
,
AES_SLOT
);
ret_code
|=
import_server_key
(
context
->
yk
,
context
->
st
,
hmac_keybuf
,
context
->
acc_code
,
context
->
verb
,
HMAC_SLOT
);
if
(
context
->
slot
[
0
]
==
context
->
slot
[
1
])
{
ret_code
|=
import_server_key
(
context
->
yk
,
context
->
st
,
aes_keybuf
,
context
->
acc_code
,
context
->
verb
,
context
->
slot
[
AES_SLOT
]);}
else
{
ret_code
|=
import_server_key
(
context
->
yk
,
context
->
st
,
aes_keybuf
,
context
->
acc_code
,
context
->
verb
,
context
->
slot
[
AES_SLOT
]);
ret_code
|=
import_server_key
(
context
->
yk
,
context
->
st
,
hmac_keybuf
,
context
->
acc_code
,
context
->
verb
,
context
->
slot
[
HMAC_SLOT
]);
}
ovpn_secure_memzero
(
aes_keybuf
,
sizeof
(
aes_keybuf
));
ovpn_secure_memzero
(
hmac_keybuf
,
sizeof
(
hmac_keybuf
));
return
ret_code
;
...
...
@@ -691,10 +697,6 @@ openvpn_plugin_func_v3(const int v3structver,
struct
openvpn_plugin_args_func_in
const
*
args
,
struct
openvpn_plugin_args_func_return
*
ret
)
{
#
clock_t
start
,
end
;
start
=
clock
();
if
(
v3structver
<
OPENVPN_PLUGIN_STRUCTVER_MIN
)
{
fprintf
(
stderr
,
"%s: this plugin is incompatible with the running version of OpenVPN
\n
"
,
MODULE
);
...
...
@@ -754,10 +756,6 @@ openvpn_plugin_func_v3(const int v3structver,
}
end:
end
=
clock
();
double
time_taken
=
(
double
)(
end
-
start
)
/
((
double
)
CLOCKS_PER_SEC
);
plog
(
PLOG_DEBUG
,
"Operation took %f
\n
"
,
time_taken
);
return
exit_code
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment