Bug 564094 - mac os: SWT browser & http: disable app transport security documentation
Summary: mac os: SWT browser & http: disable app transport security documentation
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Website (show other bugs)
Version: 4.17   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Doc-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-08 13:39 EDT by Wolfgang Löffler CLA
Modified: 2020-06-08 13:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Löffler CLA 2020-06-08 13:39:16 EDT
Hi, I proposed to add it to the wiki but I was told to make a bug report: where could this go, FAQ or wiki, or possibly even into the browser source code as an option to disable ATS?

Mac OS has "App Transport Security" that prevents opening http pages, and this happens with the swt browser even on the local network if server names are used (ip works). During development there is no Info.plist where this can be disabled in principle, but also this didn't work here, possibly an issue with java launcher scripts. In any case, one might want to disable ATS dynamically, this works but it was a bit hard to figure out, possibly it's useful for SWT FAQ or wiki? Note that this issue might only appear if building standalong maven/gradle projects, I guess that eclipse disables ATS at another place, otherwise many more would report this.

The code below is in kotlin:

<code>
    val ats = org.eclipse.swt.internal.cocoa.NSDictionary.dictionaryWithObject(
            org.eclipse.swt.internal.cocoa.NSNumber.numberWithBool(true),
            org.eclipse.swt.internal.cocoa.NSString.stringWith("NSAllowsArbitraryLoads"))
    org.eclipse.swt.internal.cocoa.NSBundle.mainBundle().infoDictionary().setValue(
            ats, org.eclipse.swt.internal.cocoa.NSString.stringWith("NSAppTransportSecurity"))
</code>