1

[Update] A solution has been found: https://github.com/robhawkes/node-extension/issues/1

I'm embedding Node within a browser extension and don't want the user to manually install openssl or even know what it is, I'd rather it was bundled into the Node build or statically linked to files held within the browser extension.

I already know how to disable openssl completely in Node and that solution works, however I'd like to have openssl enabled incase my users require it at some point.

I'm also aware of the --openssl-includes and --openssl-libpath ./configure flags, however they didn't seem to do what I wanted when I pointed them to a directory containing a static build of libssl and crypto – the build failed because it couldn't find the "SSL_library_init" function.

Any ideas how I can do this? If it help, I'm happy with a solution just for OS X for now. I can work out the rest later.

I appreciate the help.

Robin Hawkes
  • 151
  • 1
  • 6
  • It's worth noting the export/import restrictions on SSL/cryptography software. If you bundle OpenSSL with your software you may run into legal issues http://www.blackducksoftware.com/media/_wp/SEEC-Guide.pdf –  Dec 06 '11 at 11:37
  • Thanks Sam, I'll make sure to look into that once I've found out if this is even possible. – Robin Hawkes Dec 06 '11 at 11:43

1 Answers1

4

A solution has been found via. Ryan Dahl, creator of Node. Basically I just needed to use the new gyp build process that seems to have arrived with the 0.6 versions of Node. Within the options.gypi file that is generated during build you can set the node_use_system_openssl to false and it will use a static library for openssl.

More details: https://github.com/robhawkes/node-extension/issues/1

Robin Hawkes
  • 151
  • 1
  • 6