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
ae93b4c7
Commit
ae93b4c7
authored
2 years ago
by
Emily Ehlert
Browse files
Options
Downloads
Patches
Plain Diff
Fix to YubiKey Plugin bugs
parent
a42fd0ce
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
+3
-3
3 additions, 3 deletions
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
YubikeyKeyDerivationLibrary/yubikey_handler.c
+1
-0
1 addition, 0 deletions
YubikeyKeyDerivationLibrary/yubikey_handler.c
with
4 additions
and
3 deletions
YubikeyKeyDerivationLibrary/openvpn_yubikey_key_management.c
+
3
−
3
View file @
ae93b4c7
...
...
@@ -280,7 +280,7 @@ calculate_cipher(struct plugin_context *context,
const
unsigned
char
*
tag
,
unsigned
char
*
output
)
{
unsigned
char
aes_client_key
[
RESPONSE_LENGTH
]
=
{
0
};
unsigned
char
aes_client_key
[
REQ_
RESPONSE_LENGTH
]
=
{
0
};
int
return_code
=
false
;
// Calculate AES Key with Yubikey
...
...
@@ -422,12 +422,12 @@ yubikey_wrap(struct plugin_context *context, const char **argv,
CRYPTO_ECHECK
(
kc_len
<
0
,
"ovpn_base64_decode() failed"
);
// Calculate tag
CRYPTO_ECHECK
(
!
calculate_tag
(
context
,
kc
,
kc_len
,
tag
),
CRYPTO_ECHECK
(
!
calculate_tag
(
context
,
kc
,
kc_len
,
wkc
),
"Couldn't calculate tag"
);
CRYPTO_ECHECK
(
!
calculate_cipher
(
context
,
kc
,
kc_len
,
tag
,
wkc
+
TLS_CRYPT_V2_TAG_LEN
),
wkc
,
wkc
+
TLS_CRYPT_V2_TAG_LEN
),
"Couldn't encrypt client key"
);
uint16_t
wkc_len
=
kc_len
+
TLS_CRYPT_V2_TAG_LEN
+
TLS_CRYPT_V2_LEN_LEN
;
...
...
This diff is collapsed.
Click to expand it.
YubikeyKeyDerivationLibrary/yubikey_handler.c
+
1
−
0
View file @
ae93b4c7
...
...
@@ -84,6 +84,7 @@ key_init(YK_KEY **yk, YK_STATUS *st)
return
false
;
}
if
(
!
(
*
yk
=
yk_open_first_key
()))
{
printf
(
"Could not open YubiKey. Is the YubiKey connected to the computer?"
);
return
false
;
}
...
...
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