Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3216150
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:15:39+00:00 2026-05-17T15:15:39+00:00

Abstract : Is there a way, either via Firefox plugin or other means to

  • 0

Abstract: Is there a way, either via Firefox plugin or other means to emulate javascript crypto.signText using an opaque algorithm instead of detached (what it currently does?) to sign arbitrary data. This includes the dialog box and access to the Firefox cert store. Also, the signText documentation doesn’t seem to have been updated since 1998, is it possible my needs have been met since then and I’m missing them?

Any links, tips, etc. would be greatly appreciated.


I’m working on a project where I need to be able to sign data using PKCS7 (CMS) within firefox using a cert from the browsers store.

My first attempt, and what I thought was my savior was window.crypto.signText(), which does exactly what I want (displays the text to sign, prompts to select a cert and signs the text), except that it’s detached and not opaque (meaning the signed text isn’t included in the message).

I’ve been looking around for alternatives and documentation seems to be rather light. I only need to use firefox and so there’s the possibility of using a plugin for this.

If I understand what I’m reading correctly NSS (Firefox’s underlying security service) has support for pkcs7, but it’s just not exposed to Javascript, correct? Is there a way to do it via XPCom? From what I read it seems you could access function like what I needed (PKCS11), but that the stuff I needed wasn’t available.

I’ve also just discovered that js c-types is supported, so I could use the nss lib directly (or maybe openssl) to handle signing.

Either of these options seem fine, but then I lose out on the interface. I had a hard time finding any documentation on accessing the cert store, or duplicating the signText window.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:15:39+00:00Added an answer on May 17, 2026 at 3:15 pm

    For any future searchers, here’s my current (seemingly working) solution.

    First, obviously crypto.signText doesn’t work, it’s detached (hence the question), on top of that it’s not great at signing binary data (also a requirement for me).

    The next thought was to use the extension XPCOM api provided by firefox. There’s a good deal of nice crypto stuff available for use there. Unfortunately I couldn’t find any evidence in the source or documentation that signing using the XPCOM interface would provide me with an opaque signature.

    So we seem to have to expand passed javascript, into java. Originally I was going to try JSS, however it became apparent that JSS actually wasn’t needed, the built in crypto functionality would be enough.

    So I wrote an applet that builds on java.security and sun.security (proprietary). There’s a small bit of javascript that passes the users profile directory into the applet (so I can locate the certificate database in the users profile), then I grab the private key. the data and sign a pkcs7 attached(opaque) message.

    There’s some fantastic documention located Here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a runtime performance penalty when using interfaces (abstract base classes) in C++?
Is there a way to require that a class have a particular abstract member?
Is there a way to convert a given Python abstract syntax tree (AST) to
Are there some practical programming situations for someone to declare a class abstract when
On a more abstract level then a previous question , in my experience there
In java, is there ever a case for allowing a non-abstract class to be
I'm looking for a way to create a data access layer that can either
Hi out there in Stackland. I was wondering if there was either a function
Is there a way to get a validator to fire even if the form
I would like to write an abstract class (or interface) which either Forces all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.