gwsocket icon indicating copy to clipboard operation
gwsocket copied to clipboard

" unrecognized option `--ssl-cert' "

Open crotel opened this issue 4 years ago • 4 comments

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

crotel avatar Oct 08 '20 04:10 crotel

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

./configure --with-openssl

allinurl avatar Oct 09 '20 14:10 allinurl

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

imatasic avatar Oct 13 '20 17:10 imatasic

Referencing #36

allinurl avatar Oct 13 '20 18:10 allinurl

Any updates? Thanks

allinurl avatar Jun 11 '21 01:06 allinurl

What is the fix for this?

guest271314 avatar Feb 05 '23 17:02 guest271314

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

guest271314 avatar Feb 05 '23 18:02 guest271314

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

allinurl avatar Feb 06 '23 02:02 allinurl

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

allinurl avatar Feb 06 '23 02:02 allinurl

Closing this. Feel free to reopen it if needed.

allinurl avatar Feb 06 '23 02:02 allinurl

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.

guest271314 avatar Feb 06 '23 03:02 guest271314

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 avatar Feb 06 '23 03:02 allinurl

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

allinurl avatar Feb 07 '23 03:02 allinurl

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

guest271314 avatar Feb 07 '23 04:02 guest271314