Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Products
/
VSTT-Plugins
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
2
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
7bef458b
...
7bef458b0ca5b0be6eabb5615cd180ab5cb6dabf
authored
2016-10-19 18:45:30 +0200
by
Christian Gerdes
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added a warning message for certificates about to expire within 14 days.
1 parent
4b3a68b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
LIL_VSTT_Plugins.sln
LIL_VSTT_Plugins/WebTestPlugins.cs
LIL_VSTT_Plugins.sln
View file @
7bef458
...
...
@@ -5,8 +5,10 @@ VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8ADAFB91-C10D-42C8-8499-30B3692C27F3}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
LIL_VSTT_Plugins.vsmdi = LIL_VSTT_Plugins.vsmdi
Local.testsettings = Local.testsettings
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LIL_VSTT_Plugins", "LIL_VSTT_Plugins\LIL_VSTT_Plugins.csproj", "{06A22593-601E-4386-917A-9835DE30E14E}"
...
...
LIL_VSTT_Plugins/WebTestPlugins.cs
View file @
7bef458
...
...
@@ -654,9 +654,15 @@ namespace LIL_VSTT_Plugins
myCertTrusted
=
false
;
}
if
(
cer
.
NotAfter
<
DateTime
.
Now
||
cer
.
NotBefore
>
DateTime
.
Now
)
if
(
cer
.
NotAfter
<
DateTime
.
Now
)
{
e
.
WebTest
.
AddCommentToResult
(
"Warning: Client Certificate has expired. Might not be trusted on server."
);
e
.
WebTest
.
AddCommentToResult
(
"Warning: Client Certificate has expired. Might not be trusted on server. Expired "
+
cer
.
NotAfter
.
ToString
());
}
else
if
(
cer
.
NotBefore
>
DateTime
.
Now
)
{
e
.
WebTest
.
AddCommentToResult
(
"Warning: Client Certificate is not valid yet. Might not be trusted on server. Valid "
+
cer
.
NotBefore
.
ToString
());
}
else
if
(
cer
.
NotAfter
<
DateTime
.
Now
.
AddDays
(
14
))
{
e
.
WebTest
.
AddCommentToResult
(
"Warning: Client Certificate will expire in less than 14 days. Better renew it soon. Expires "
+
cer
.
NotAfter
.
ToString
());
}
// Check if we have a private key
...
...
Please
register
or
sign in
to post a comment