@@ -237,14 +237,7 @@ func loop() {
237
237
if err != nil {
238
238
log .Panicf ("config.ini cannot be parsed: %s" , err )
239
239
}
240
- certDir := config .GetCertificatesDir ()
241
- cert .GenerateCertificates (certDir )
242
- err := cert .InstallCertificate (certDir .Join ("ca.cert.cer" ))
243
- // if something goes wrong during the cert install we remove them, so the user is able to retry
244
- if err != nil {
245
- log .Errorf ("cannot install certificates something went wrong: %s" , err )
246
- cert .DeleteCertificates (certDir )
247
- }
240
+ cert .GenerateAndInstallCertificates (config .GetCertificatesDir ())
248
241
} else {
249
242
err = config .SetInstallCertsIni (configPath .String (), "false" )
250
243
if err != nil {
@@ -384,14 +377,7 @@ func loop() {
384
377
} else if cert .PromptInstallCertsSafari () {
385
378
// installing the certificates from scratch at this point should only happen if
386
379
// something went wrong during previous installation attempts
387
- certDir := config .GetCertificatesDir ()
388
- cert .GenerateCertificates (certDir )
389
- err := cert .InstallCertificate (certDir .Join ("ca.cert.cer" ))
390
- // if something goes wrong during the cert install we remove them, so the user is able to retry
391
- if err != nil {
392
- log .Errorf ("cannot install certificates something went wrong: %s" , err )
393
- cert .DeleteCertificates (certDir )
394
- }
380
+ cert .GenerateAndInstallCertificates (config .GetCertificatesDir ())
395
381
} else {
396
382
err = config .SetInstallCertsIni (configPath .String (), "false" )
397
383
if err != nil {
0 commit comments