Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

[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.

share|improve this question
    
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 blackducksoftware.com/media/_wp/SEEC-Guide.pdf –  sam Dec 6 '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 6 '11 at 11:43
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.