Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A disabled key is not detected when no sub-key is used in easytls-cryptv2-verify.sh #128

Closed
jivco opened this issue Jan 11, 2021 · 6 comments
Assignees
Labels
bug Something isn't working Solution applied This issue has been solved

Comments

@jivco
Copy link

jivco commented Jan 11, 2021

Hi,

The check if a key is in disabled list is not working if there is no subkey:

266 # Search disabled list for client serial number
267 fn_search_disabled_list ()
268 {
269         grep -c "^${md_serial}[[:blank:]]${md_name}[[:blank:]]${md_subkey}$" \
270                 "$disabled_list"
271 }

If ${md_subkey} is empty the blank match before it should not be present.

Maybe the function has to be something like that:

266 # Search disabled list for client serial number
267 fn_search_disabled_list ()
268 {
269         if [ "${md_subkey}" = "000000000000" ]; then
270             grep -c "^${md_serial}[[:blank:]]${md_name}$" \
271                 "$disabled_list"
272         else
273             grep -c "^${md_serial}[[:blank:]]${md_name}[[:blank:]]${md_subkey}$" \
274                 "$disabled_list"
275         fi
276 }

@TinCanTech
Copy link
Owner

HI, thanks for reporting this.

sub-key-name was complicated to integrate and so I do expect there to be some problems.

What you describe certainly makes sense and I'll take a close look soon.

@TinCanTech TinCanTech self-assigned this Jan 11, 2021
@TinCanTech TinCanTech added the bug Something isn't working label Jan 11, 2021
@TinCanTech
Copy link
Owner

#104

@TinCanTech
Copy link
Owner

Please let me know if this works for you. It passed my tests.

@TinCanTech TinCanTech added the Solution applied This issue has been solved label Jan 12, 2021
@TinCanTech
Copy link
Owner

TinCanTech commented Jan 12, 2021

I don't know when you created your keys, so this may not work for you as-is.

If you have time, please try again with git/master/easy-tls and easytls-crypt-v2-verify.sh and new keys.

Tip:

  • Do not change Easy-RSA
  • Use ./easytls init-tls to start Easy-TLS again, this will not effect Easy-RSA.

@jivco
Copy link
Author

jivco commented Jan 12, 2021

I have tested with the new versions of easy-tls and easytls-crypt-v2-verify.sh and new keys and it is working OK.
Thank you.

@jivco jivco closed this as completed Jan 12, 2021
@TinCanTech
Copy link
Owner

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Solution applied This issue has been solved
Projects
None yet
Development

No branches or pull requests

2 participants