File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -36,3 +36,9 @@ func UninstallCertificates() error {
36
36
log .Warn ("platform not supported for the certificates uninstall" )
37
37
return errors .New ("platform not supported for the certificates uninstall" )
38
38
}
39
+
40
+ // EvaluateCertificates won't do anything on unsupported Operative Systems
41
+ func EvaluateCertificates () error {
42
+ log .Warn ("platform not supported for the certificates evaluation" )
43
+ return errors .New ("platform not supported for the certificates evaluation" )
44
+ }
Original file line number Diff line number Diff line change @@ -65,11 +65,13 @@ func (s *Systray) start() {
65
65
66
66
mGenCerts := systray .AddMenuItem ("Generate and Install HTTPS certificates" , "HTTPS Certs" )
67
67
mRemoveCerts := systray .AddMenuItem ("Remove HTTPS certificates" , "" )
68
+ mEvaluateCerts := systray .AddMenuItem ("Evaluate HTTPS certificates validity" , "" )
68
69
// On linux/windows chrome/firefox/edge(chromium) the agent works without problems on plain HTTP,
69
70
// so we disable the menuItem to generate/install the certificates
70
71
if runtime .GOOS != "darwin" {
71
72
s .updateMenuItem (mGenCerts , true )
72
73
s .updateMenuItem (mRemoveCerts , true )
74
+ s .updateMenuItem (mEvaluateCerts , true )
73
75
} else {
74
76
s .updateMenuItem (mGenCerts , config .CertsExist ())
75
77
s .updateMenuItem (mRemoveCerts , ! config .CertsExist ())
@@ -115,6 +117,12 @@ func (s *Systray) start() {
115
117
cert .DeleteCertificates (certDir )
116
118
}
117
119
s .Restart ()
120
+ case <- mEvaluateCerts .ClickedCh :
121
+ err := cert .EvaluateCertificates ()
122
+ if err != nil {
123
+ log .Errorf ("cannot evaluate certificates something went wrong: %s" , err )
124
+ }
125
+ s .Restart ()
118
126
case <- mPause .ClickedCh :
119
127
s .Pause ()
120
128
case <- mQuit .ClickedCh :
You can’t perform that action at this time.
0 commit comments