# NSS Library?

**URL:** <https://rubytalk.org/t/nss-library/74030>\
**Category:** ruby-talk\
**Created:** [27 January 2017 17:39 UTC](https://rubytalk.org/t/nss-library/74030 "2017-01-27T17:39:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Berger2](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/daniel_berger2/32/2243_2.png) [@Daniel\_Berger2](https://rubytalk.org/u/Daniel_Berger2)\
**Post date:** [27 January 2017 17:39 UTC](https://rubytalk.org/t/nss-library/74030/1 "2017-01-27T17:39:11Z")

</div>

Are there any Ruby libraries for NSS out there that I've missed?

> **[Network Security Services](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS)**
>
> Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and server applications. Applications built with NSS can support SSL v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12,...

I poked around a bit, but perhaps my google-fu was weak.

Thanks,

Dan

---

<div class="post-metadata">

**Author:** ![Tony\_Arcieri1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/tony_arcieri1/32/1864_2.png) [@Tony\_Arcieri1](https://rubytalk.org/u/Tony_Arcieri1)\
**Post date:** [27 January 2017 19:08 UTC](https://rubytalk.org/t/nss-library/74030/2 "2017-01-27T19:08:59Z")

</div>

Is there a specific reason you want NSS, as opposed to e.g.:

> **[GitHub - ruby/openssl: Provides SSL, TLS and general purpose cryptography.](https://github.com/ruby/openssl)**
>
> Provides SSL, TLS and general purpose cryptography. - GitHub - ruby/openssl: Provides SSL, TLS and general purpose cryptography.

> **···**
>
> On Fri, Jan 27, 2017 at 9:39 AM, Daniel Berger \<djberg96@gmail.com\> wrote:
> 
> > Are there any Ruby libraries for NSS out there that I've missed?
> > 
> > [Network Security Services (NSS) — Firefox Source Docs documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS)
> > 
> > I poked around a bit, but perhaps my google-fu was weak.
> > 
> > Thanks,
> > 
> > Dan
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
> 
> --  
> Tony Arcieri

---

<div class="post-metadata">

**Author:** ![Daniel\_Berger2](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/daniel_berger2/32/2243_2.png) [@Daniel\_Berger2](https://rubytalk.org/u/Daniel_Berger2)\
**Post date:** [27 January 2017 20:11 UTC](https://rubytalk.org/t/nss-library/74030/3 "2017-01-27T20:11:26Z")

</div>

Because choice is good. 🙂

> **···**
>
> On Fri, Jan 27, 2017 at 12:08 PM, Tony Arcieri \<bascule@gmail.com\> wrote:
> 
> > Is there a specific reason you want NSS, as opposed to e.g.:
> > 
> > [GitHub - ruby/openssl: Provides SSL, TLS and general purpose cryptography.](https://github.com/ruby/openssl)
> > 
> > On Fri, Jan 27, 2017 at 9:39 AM, Daniel Berger \<djberg96@gmail.com\> wrote:
> > 
> > > Are there any Ruby libraries for NSS out there that I've missed?
> > > 
> > > [Network Security Services (NSS) — Firefox Source Docs documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS)
> > > 
> > > I poked around a bit, but perhaps my google-fu was weak.
> > > 
> > > Thanks,
> > > 
> > > Dan
> > > 
> > > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
> > 
> > --  
> > Tony Arcieri
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);

---

<div class="post-metadata">

**Author:** ![Tony\_Arcieri1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/tony_arcieri1/32/1864_2.png) [@Tony\_Arcieri1](https://rubytalk.org/u/Tony_Arcieri1)\
**Post date:** [27 January 2017 20:41 UTC](https://rubytalk.org/t/nss-library/74030/4 "2017-01-27T20:41:39Z")

</div>

Choice is generally bad in cryptography.

The OpenSSL gem has been receiving considerable attention and maintenance  
lately.

NSS, though the de-facto library for browser-based SSL/TLS until recently  
(Chrome has switched to BoringSSL), has an ugly reputation. It's built on  
code which underwent mechanical translation from Java to C, and is  
generally considered to be extremely byzantine. Some of its past  
maintainers have been able to rewrite whole swaths of code faster than they  
were able to locate and fix use-after-free bugs.

I strongly suggest using the OpenSSL extension/gem over trying to consume  
NSS from Ruby.

Or you could use my libsodium binding if it meets your needs:

> **[GitHub - RubyCrypto/rbnacl: Ruby FFI binding to the Networking and...](https://github.com/RubyCrypto/rbnacl)**
>
> Ruby FFI binding to the Networking and Cryptography (NaCl) library (a.k.a. libsodium) - GitHub - RubyCrypto/rbnacl: Ruby FFI binding to the Networking and Cryptography (NaCl) library (a.k.a. libsod...

> **···**
>
> On Fri, Jan 27, 2017 at 12:11 PM Daniel Berger \<djberg96@gmail.com\> wrote:
> 
> > Because choice is good. 🙂
> > 
> > On Fri, Jan 27, 2017 at 12:08 PM, Tony Arcieri \<bascule@gmail.com\> wrote:
> > 
> > Is there a specific reason you want NSS, as opposed to e.g.:
> > 
> > [GitHub - ruby/openssl: Provides SSL, TLS and general purpose cryptography.](https://github.com/ruby/openssl)
> > 
> > On Fri, Jan 27, 2017 at 9:39 AM, Daniel Berger \<djberg96@gmail.com\> wrote:
> > 
> > Are there any Ruby libraries for NSS out there that I've missed?
> > 
> > [Network Security Services (NSS) — Firefox Source Docs documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS)
> > 
> > I poked around a bit, but perhaps my google-fu was weak.
> > 
> > Thanks,
> > 
> > Dan
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
> > 
> > --  
> > Tony Arcieri
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
> 
> --  
> Tony Arcieri
