You need to put the ARCHIVE= attribute in a SCRIPT tag preceding the BODY tag.
the script tag can be otherwise empty. Leave the ID attribute in the BODY tag.
Make sure you're giving the right options to signtool (-J, I think). Finally,
are you using a certificate you purchased from a CA, or one you generated with
signtool? If the latter, no one else will be able to use it, it will only work
on your machine.
    -Mitch

Maik Wiege wrote:

> Hello,
> I'm having a problem with my signed Javascript in NN4. My Scripts are
> working fine, while they are on my disk (the URL starts with file://), but
> putting it on my server no grant/deny-dialog pops up and I get an Exception
> in the Javascript-console.
> Now I deleted nearly everything out of my HTML-page, but the same happens.
> Here is, what I exactly dit:
>
> This is my index.html:
> <html><head></head>
> <body
> onload="netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowser
> Read');" id=1
> archive="test.jar">
> a</body>
> </html>
>
> ----------------------------------------------------------------------------
> -------------
>
> I downloaded signtool from netscape and created a test certificate using
> this command:
> > signtool -G test -d c:\netscape\users\mswiege
> This displays this:
> Enter certificate information.  All fields are optional. Acceptable
> characters are numbers, letters, spaces, and apostrophes.
> certificate common name: test
> organization: test
> organization unit: test
> state or province: test
> country (must be exactly 2 characters): ge
> username: test
> email address: [EMAIL PROTECTED]
> Enter Password or Pin for "Communicator Certificate DB":
> Enter Password or Pin for "Communicator Certificate DB":
> Enter Password or Pin for "Communicator Certificate DB":
> generated public/private key pair
> certificate request generated
> certificate has been signed
> certificate "test" added to database
> Exported certificate to x509.raw and
> x509.cacert.
>
> ----------------------------------------------------------------------------
> -------------
> Now I signed my script:
> > signtool -k test -J -j test -d c:\netscape\mswiege test
> The result:
> using certificate directory: e:\netscape\users\mswiege
>
> Generating inline signatures from HTML files in: test
> Processing HTML file: index.html
>
> signing: test/test.jar
> Generating test/test.arc/META-INF/manifest.mf file..
> --> inlineScripts/1
> Generating zigbert.sf file..
> Enter Password or Pin for "Communicator Certificate DB":
> adding test/test.arc/META-INF/manifest.mf to test/test.jar...(deflated 34%)
> adding test/test.arc/META-INF/zigbert.sf to test/test.jar...(deflated 27%)
> adding test/test.arc/META-INF/zigbert.rsa to test/test.jar...(deflated 22%)
> jarfile "test/test.jar" signed successfully
> removing: test/test.arc
> Directory test signed
> successfully.
>
> ----------------------------------------------------------------------------
> -------------
> Here is what I get in my test.jar:
>  manifest.mf:
> Manifest-Version: 1.0
> Created-By: Signtool (signtool 1.3)
> Comments: PLEASE DO NOT EDIT THIS FILE. YOU WILL BREAK IT.
> Comments: --
> Comments: --
> Comments: -- This archive signs Javascripts which may not necessarily
> Comments: -- be included in the physical jar file.
> Comments: --
> Comments: --
>
> Name: 1
> Magic: javascript
> javascript.id: 1
> Digest-Algorithms: MD5 SHA1
> MD5-Digest: 5DyCpEfPn42Ioz1VhW4kew==
> SHA1-Digest:
> co7k7chgc3NPmsHcX+xHDpB6WP0=
>
> ----------------------------------------------------------------------------
> -------------
>
>  zigbert.sf:
> Signature-Version: 1.0
> Created-By: Signtool (signtool 1.3)
> Comments: PLEASE DO NOT EDIT THIS FILE. YOU WILL BREAK IT.
> Digest-Algorithms: MD5 SHA1
> MD5-Digest: rSuvNkfy0JOST9cbnToqDg==
> SHA1-Digest: 4ZOTS2GkVJan013V0kgvaTIcZgs=
>
> Name: 1
> Digest-Algorithms: MD5 SHA1
> MD5-Digest: 1IMki3rx6oRhcBTTvwn+vg==
> SHA1-Digest:
> 2hyWMHqysmr2WQt3VfBpE3uT7P0=
>
> ----------------------------------------------------------------------------
> -------------
>
> After coping it on my server and opening the page I get the following
> message in the Javascript-console:
> JavaScript Error: uncaught Java exception
> netscape/security/ForbiddenTargetException ("User didn't grant the
> UniversalBrowserRead privilege.")
>
> Please help me
> Thank you
>   Maik

--
-------------------------------------------
"I need your help to get back to the year Nineteen Eighty-Five."  --Marty McFly




Reply via email to