Skip to content
This repository has been archived by the owner on Oct 6, 2018. It is now read-only.

Commit

Permalink
Visualize attempts remaining on inserted keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-csis committed May 8, 2017
1 parent ec86922 commit 50d0a9d
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 60 deletions.
82 changes: 53 additions & 29 deletions EnrollmentStation/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions EnrollmentStation/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ private void RefreshInsertedKey()

lblInsertedHasBeenEnrolled.Text = _dataStore.Search(serialNumber).Any().ToString();
}

using (var piv = YubikeyPivManager.Instance.OpenDevice(devName))
{
int remainingPin = piv.GetPinTriesLeft();

lblInsertedTries.Text = $"{remainingPin:N0} remaining";
}
}

if (listDevices.Count > 1)
Expand Down
51 changes: 26 additions & 25 deletions EnrollmentStation/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -152,31 +152,32 @@
<data name="tsbSettings.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAWtSURBVEhLlZYJUJNXEIBppx07DGU8KmPHqtAWi6AiI4Xi
QQRHsdaLOlO1OhZFC9JCCQUEUkWOgBE0CAynTOJEvDjlCDchJuQAkhgSDrkkIKAgVge16ijbfclvOyii
fDM7/5/d/d97+3b3vRhNF3sHp0R6cPDDXw55Na6huRxG1UcGyzQxMTGZa7V8+WLq5wS8/ej9z1+8hK7e
PohixV9ClbHBMg0sLC0d/INC+KGhESOfL1iwllK/wpqVkAQtNztBrlRBJIt1DnXTjsQ6nMls7urVwejf
D+FUYmL3zDlz9tqudPh9t4cnx8PHV56UdR5SuRfgbHoW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M1QnmDBCr0Zao7u0hiRYpW3RZJ1R0gwnxsd3FRUEO+Cd6E
n/kHh+SLcVVkq8hZRXfeIk3Ivf6MTFLZ2IRV0wKkRMngJMFkaxoxUglKhVgCGVezAHvl8axZszZSw77J
lxYWy8OiTjf6HmNU4s/VRIc5+jUkgqVOKyp5IqipgwqMRoj3CBm0sEoI2aUV92NTU+9lC0pAicUi6+yC
mHMJpCJJLt7KYpTXr9OFWC1Vl/IKIEdQBlcLisDvWHCpp68/Z7m19U8mJiY7kjMyOtW9Wmhq64D4lNRa
/Ob12/KdGGGOrrzKATOCNYG6SZeRo6OjQzSH03ciKirdzMxsyj8g78I4KT0jj6yytacPAhl/qSi9DgD4
gDw3b9/+taWlpW5y1P1ftu/Jx3SnTXvdPDwqAxnHh+zs7VmU/j0xMPgXpGp6BH1KVagAAAAASUVORK5C
YII=
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
Loading

0 comments on commit 50d0a9d

Please sign in to comment.