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:
+2
-1
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user