alias: Enable self signed TLS prompt in darwin platforms (#4094)

Not trusted TLS error message has another string representation in
Darwin platform. Since there is no another way to test for this specific
error with Golang API, we will need to support this alternate error message.
This commit is contained in:
Anis Elleuch
2022-05-23 06:36:11 -07:00
committed by GitHub
parent 83d81ea590
commit 6c0d5e4b65
+2 -1
View File
@@ -102,7 +102,8 @@ func promptTrustSelfSignedCert(ctx context.Context, endpoint, alias string) (*x5
return nil, nil
}
if te != nil && !strings.Contains(te.Error(), "certificate signed by unknown authority") {
if te != nil && !strings.Contains(te.Error(), "certificate signed by unknown authority") &&
!strings.Contains(te.Error(), "certificate is not trusted") /* darwin specific error message */ {
return nil, probe.NewError(te)
}