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

Fix tls issue with time synchronization #145

Open
robinvanpoppel opened this issue Apr 27, 2020 · 1 comment
Open

Fix tls issue with time synchronization #145

robinvanpoppel opened this issue Apr 27, 2020 · 1 comment
Labels

Comments

@robinvanpoppel
Copy link
Collaborator

robinvanpoppel commented Apr 27, 2020

As noted in #110

Some https:// url's cannot be loaded, because they use Tls1.2 which is not always enabled.

This could be solved like this, but we need to make sure that the constant is always available as users compile the plugin themselves, and the Tls12 constant not being there would break that.

System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

Edit:
There seems to be some code in KeePass which enables tls1.1/tls1.2 on the ServicePointManager, but that code might not be hit at all times. It also depends under which version of the .NET framework Keepass runs.

@jon-f-novastor
Copy link

jon-f-novastor commented Aug 28, 2020

Related to this, out of my list of 9 or so time correction server URLs that are stored in the Clock Sync tab menu for my KeeTrayTOTP 0.107 (using Keepass 2.4.5), it is random but I will see usually one or two of the nine total Server URLs showing failure error state in the Clock Sync tab menu. If I manually click refresh in the Time Correction List area it normally clears those error states up. The settings are default in the Clock Sync tab menu, I have only had the plugin installed for 24 hours now. It does seem to be random as to which servers show the failure, they are all public servers and the connection should be good to them from this system I use (although it is often on a corporate VPN most of the day). It seems to clear up instantly when I click "Refresh Time Corrections" button manually in the Clock Sync tab in the plugin. I don't know if the time correction server is in the error state if it truly affects being able to utilize the current generated TOTP code on the website in question that I need to log in that matches the entry in KP. I have not seen that to be an issue yet, but definitely the error does occur randomly for some URLs, normally no more than two at a time and it seems quite random which will have the error state displayed:

image

My Time Correction Server list includes these URL entries and a couple others:

https://github.com/login
https://login.microsoftonline.com
https://login.teamviewer.com
https://accounts.google.com
https://amazon.com
https://app.hubspot.com
https://login.live.com

Today so far when going back in the Tray TOTP Plugin menu Settings > Clock Sync tab it has not shown any server URLs with error / failed state yet, but yesterday after installing the plugin for the first time and performing setup of it, adding clock sync URLs, creating TOTP entries, if I went back in to Clock Sync tab to see the list of servers it would show error failed state on 1 or 2 of the total amount of servers there (9 total servers maximum in the list) and clicking refresh would solve that temporarily, then 30 mins later I would go back in to look and it would show an error on another server different from the others, for error / failed state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants