New NSS Samples

New NSS Sample Code

This collection of sample code demonstrates how NSS can be used for cryptographic operations, certificate handling, SSL, etc. It also demonstrates some best practices in the application of cryptography.


These new examples are a work in progress. See https://bugzilla.mozilla.org/show_bug.cgi?id=490238

How to download the samples:

hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH

Samples list:

  1. Hashing - sample 1

  2. Initialize NSS database - sample 2

  3. Encrypt and decrypt MAC using token

  4. Encrypt Decrypt MAC Keys As Session Objects

  5. Enc Dec MAC Output Public Key as CSR

  6. Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR

Common code used by these samples:

  1. Utilities for nss samples

Thanks are due to Shailendra Jain, Mozilla Community member, who is the principal author of these samples.