How to sign a script or web page that requires UniversalXPConnect rights

I have a website that uses some of the features implemented in the Firefox extension that I developed. The JavaScript script on one of my web pages requires UniversalXPConnect privilege to communicate with the XPCOM component implemented in my Firefox extension.

By default, when my script tries to enable this privilege to access the XPCOM component:

netscape.security.PrivilegeManager.enablePrivilege ("UniversalXPConnect");

... the following error occurs:

Error: A script from " http://example.com " has been denied UniversalXPConnect privileges.

To enable this privilege, users currently need to manually edit the signed.applets.codebase_principal_support parameter on the about: config page of Firefox.

On this page: http://www.mozilla.org/projects/security/components/signed-scripts.html I found out that you can explicitly sign my webpage containing a script that requires this privilege. After I sign up, my script users will not manually edit the above setting.

The site is hosted on the Linux platform under Drupal CMS.

I would really appreciate it if you could give detailed step-by-step instructions on how to sign my script (what tools should be downloaded, how to create a certificate, etc.) so that after editing the commands: configuration is not required.

+3
2

Firefox, 16 script , XPconnect, , , , , . https://bugzilla.mozilla.org/show_bug.cgi?id=546848

+1

Source: https://habr.com/ru/post/1763602/


All Articles