SSL not working if vhui.ini in executable path

16 posts / 0 new
Last post
Nano
SSL not working if vhui.ini in executable path

Hi,

client log:
21:15:04 INFO :VirtualHere Client 2.8.5 starting (Compiled: Apr 1 2015 22:13:21)
21:15:04 INFO :Found in executable path, using \Tools\virtualusb\client\gui\windows\vhui.ini
21:15:04 INFO :IPC available at \\.\pipe\vhclient
21:15:04 INFO :Auto-find (Bonjour) on

vhui.ini:
SSLClientCert=./vusb-client2.pem

What is strange is that although auto-find is used, no server is found.
The same vhui.ini file in the user default path works with the SSLClientCert setting from above. The file vusb-client2.pem is placed in the executable path (in both cases) that is mentioned above in the client log.

Any idea what is wrong?

Michael
I think you should put the

I think you should put the full path to the pem file in the SSLClientCert entry to make sure its alway knows the path rather than relying on the current directory by default. And i assume you are running the windows client the . does not mean anything in windows in the path.

Nano
Hi!

Hi!

IMHO hardcoding absolute paths is not the optimal solution if you want to use the clients in a portable fashion.
The good thing about the client is that it does not require any installation which makes it optimal for using it as a portable app on a USB stick.
Another argument would be that it is much easier to hand out the client to a friend with a ready-to-use ZIP-package which only needs unzipping and starting the client. Making non-expert-users editing config files and modifiying paths of certificates is not optimal.

Starting the client on Windows with a shortcut offers the option to specify the current working directory too.

My wish would be that if the Widnows client finds the config file in the executable path, then assume this path as the base path for all other files too. Maybe this could be extended to a more general way: the path of the config file should alway be the base path for other files too if no absolute path is specified for other files.

Michael
Actually it will take it from

Actually it will take it from the current directory by default already. i was just suggesting to you to put the full paths as you were using ./ which is a linux command in the path so i figured you were confused about what to specify and putting the full path avoids any confusion

Nano
Import thing to mention which

Import thing to mention which I have forgotten:

The problem "SSL not working if vhui.ini in executable path" still exists even if the option "SSLClientCert" uses an absolute path!

Nano
This is the content of the

This is the content of the config file:


AutoRefreshLookupPeriod=30
[General]
AdminMode=0
MainFrameWidth=400
MainFrameHeight=250
EnableSSL=1
SSLClientCert=D:/Tools/virtualusb/client/gui/windows/vusb-client2.pem
sslPort=17574
AutoFind=1
ReverseLookup=0
AutoMinimize=0
AutoRefreshLookupPeriod=30
HideMenuItems=
ReverseLookupPort=7573
[Settings]
ManualHubs=
[Transport]
CompressionLimit=384
PingInterval=3
PingTimeout=10
[AutoShare]
All=0

The system messages windows says:

10:33:51 INFO :VirtualHere Client 2.8.6 starting (Compiled: Apr 4 2015 20:21:00)
10:33:51 INFO :Found in executable path, using \Tools\virtualusb\client\gui\windows\vhui.ini
10:33:51 INFO :IPC available at \\.\pipe\vhclient
10:33:51 INFO :Auto-find (Bonjour) on

Nano
I have tested a different

I have tested a different scenario using a batch file:
The %cd% make sure that the current working dir of the batch file is used.


@echo off
vhui64.exe -c "%cd%\vhui.ini"

With this the system messages window says:

10:34:42 INFO :VirtualHere Client 2.8.6 starting (Compiled: Apr 4 2015 20:21:00)
10:34:42 INFO :Using config at D:\Tools\virtualusb\client\gui\windows\vhui.ini
10:34:42 INFO :IPC available at \\.\pipe\vhclient
10:34:42 INFO :Auto-find (Bonjour) on
10:34:42 INFO :Auto-find (Bonjour SSL) on

The option now also works when it is used like this: SSLClientCert=vusb-client2.pem
So both are working with this setup: absolute path and no path

Nano
This looks strange:

This looks strange:
If the config file is found in the executable path, then there is no message "Auto-find (Bonjour SSL) on"!
However, if the same config file in the same location is used with the second scenario which I have described, then the message "Auto-find (Bonjour SSL) on" is there and it is working.

Could you pleae check why "Auto-find (Bonjour SSL) on" is not enabled if the config file is found in the executabel path?

Michael
Thats right, i forgot i made

Thats right, i forgot i made a change a few years ago for a customer so that if the vhui.ini is in the executable directory it will use that instead by default if -c is not specified. It makes it much easier to deploy on an enterprise network so i left the functionality in. If there is no vhui.ini in the exe directory it will create one by default in the c:\users\user\AppData\Roaming\vhui.ini directory or wherever the -c is specified.

Can you post the vhui in the exepath and the one in the path you specify where the SSLcert works.

Nano
Hi!

Hi!
Ok, the content is the one I have already posted.
The vhui.ini is placed in the exepath "D:/Tools/virtualusb/client/gui/windows".
There is no vhui.ini in c:\users\user\AppData\Roaming.

I have tested two setups as described above:
1) let vhui64.exe detect that a vhui.ini is in the exepath -> "Auto-find (Bonjour SSL) on" not working
2) specify path for vhui.ini by using the "-c" option. -> "Auto-find (Bonjour SSL) on" is working.

In case 2) SSLcert works in both cases: absolute path [D:/Tools/virtualusb/client/gui/windows/vusb-client2.pem] and no path (only filename vusb-client2.pem) for SSLcert.

It seems that in case 1) the "Auto-find (Bonjour SSL) on" is not enabled which I would consider a bug.

Michael
Actually looking at the ini

Actually looking at the ini in your exe path again, that "AutoRefreshLookupPeriod" should not be in a section by itself, could you remove that. I dont know why its in its own section it should not be. Can you remove that from the ini in your exe path and try running the client again with that ini perhaps that is the problem.

Nano
Sorry, missed that one.

Sorry, missed that one.
However, deleting the line above the [General] section does not help.


[General]
AdminMode=0
MainFrameWidth=400
MainFrameHeight=250
EnableSSL=1
SSLClientCert=vusb-client1.pem
sslPort=17574
AutoFind=1
ReverseLookup=0
AutoMinimize=0
AutoRefreshLookupPeriod=30
HideMenuItems=
ReverseLookupPort=7573
[Settings]
ManualHubs=
[Transport]
CompressionLimit=384
PingInterval=3
PingTimeout=10
[AutoShare]
All=0

@echo off
vhui64.exe -c "%cd%\vhui.ini"

This tells the client the complete path to the config file.

Not nice though, as a command-line windows is kept open all the time when the client is running.

Nano
Sorry, accidently forgot a

Sorry, accidently forgot a line of text in my last comment:

This is the content of a batch file which I am currently using as a workaround:
@echo off
vhui64.exe -c "%cd%\vhui.ini"

Nano
After starting vhui64.exe

After starting vhui64.exe (without batch file and no command-line option) the system messages window says:


09:30:43 INFO :VirtualHere Client 2.8.6 starting (Compiled: Apr 4 2015 20:21:00)
09:30:43 INFO :Found in executable path, using \Tools\virtualusb\client\gui\windows\vhui.ini
09:30:43 INFO :IPC available at \\.\pipe\vhclient
09:30:43 INFO :Auto-find (Bonjour) on

Michael
OK i found the bug and fixed

OK i found the bug and fixed it in 2.8.7 of the client

Nano
It is working now as expected

It is working now as expected without any workaround.
Even the SSLClientCert=vusb-client1.pem without absolute path is recognized in the executable directory.
This make it easy to deploy it for multiple users now!

Great! Thanks!

Log in or register to post comments