allinurl / gwsocket

fast, standalone, language-agnostic WebSocket server RFC6455 compliant
http://gwsocket.io
MIT License
745 stars 67 forks source link

" unrecognized option `--ssl-cert' " #35

Closed crotel closed 1 year ago

crotel commented 3 years ago

sys: macOS Catalina[10.15.6]

openssl version: LibreSSL 2.8.3

follow =>

$ wget http://tar.gwsocket.io/gwsocket-0.3.tar.gz
$ tar -xzvf gwsocket-0.3.tar.gz
$ cd gwsocket-0.3/
$ ./configure --with-openssl=/usr/bin/openssl/
$ make
# make install

command ' gwsocket --ssl-cert=/path/to/my/ssl/cert --ssl-key=/path/to/my/ssl/key ' or ' gwsocket --ssl-cert /path/to/my/ssl/cert --ssl-key /path/to/my/ssl/key '

then failed with " unrecognized option `--ssl-cert' "

any thing wrong?

PS: here is my config.log config.log

allinurl commented 3 years ago

Does it work without specifying the path? e.g.,

./configure --with-openssl
imatasic commented 3 years ago

I have replicated this on Ubuntu 20,

when not using the path, the configure returns:

  Linker flags   : -lssl
  TLS/SSL        : yes

when not using the path (or using --with-openssl=yes ), the configure returns:

...
  Linker flags   : -lssl
  TLS/SSL        : yes
...

When using the path, it returns:

...
  Linker flags   :
  TLS/SSL        : /usr/bin/openssl
...

So I guess using the path is the wrong argument for that flag.


I stumbled here hopping that using the path would solve my issue, as I get the OpenSSL error when running make (#36).

allinurl commented 3 years ago

Referencing #36

allinurl commented 3 years ago

Any updates? Thanks

guest271314 commented 1 year ago

What is the fix for this?

guest271314 commented 1 year ago

I think one issue is libssl-dev is a dependency. Installing openssl alone does not achieve the expected result.

allinurl commented 1 year ago

That's correct, since you are building from source, you need libssl-dev.

allinurl commented 1 year ago

Also, make sure to run make distclean + autoreconf -fiv and then ./configure --with-openssl + make after installing libssl-dev.

allinurl commented 1 year ago

Closing this. Feel free to reopen it if needed.

guest271314 commented 1 year ago

That's correct, since you are building from source, you need libssl-dev

It would be helpful if that information was in the README. Installing openssl alone still results in errors.

Also, make sure to run make distclean

What does distclean do?

BTW, thanks for this library. Finally got it working with https://github.com/ratboy666/qjs-ws.

allinurl commented 1 year ago

distclean will clean files that configure generated.

Glad it's working. Stay tuned as there are some fixes that I need to merge from goaccess' branch into gwsocket.

allinurl commented 1 year ago

@guest271314 Take a look at what goaccess does here, may help with the ping.

guest271314 commented 1 year ago

@allinurl I deleted my comment re PING after re-reading this

Non-goals in the first version Exposing WebSocket pings and pongs to JavaScript.

Right now I am still working on using gwsocket in QuickJS. Unfortunately the machine froze yesterday streaming real-time audio.