layeh / barnard

barnard is a terminal-based client for the Mumble voice chat software
GNU General Public License v2.0
150 stars 46 forks source link

certificate problem - doesn't contain any IP SANs exit status 1 #22

Closed danpowpow closed 7 years ago

danpowpow commented 7 years ago

can anyone offer insight to my problem here?

barnard installed, attempting to connect to a win7 murmur server. plumble (android mumble client app) connects successfully

i've generated a certificate on the plumble android app, and transferred it to the barnard install dir on my pi. i then ran the following command to convert the .p12 cert to a .pem:

openssl pkcs12 -in plumble-2017-04-26_22-36-48.p12 -out certificate.pem -nodes

the conversion seems to work, but when trying to connect:

go run cmd/barnard/main.go -server=192.168.1.123:64738 -username=”front_door” -insecure=true -certificate=/home/pi/.go/src/layeh.com/barnard/certificate.pem

i get the following error:

x509: cannot validate certificate for 192.168.1.123 because it doesn't contain any IP SANs exit status 1

the murmur server log shows this:

2017-05-13 11:55:32.583 1 => <1:(-1)> New connection: 192.168.1.169:57870 2017-05-13 11:55:32.875 1 => <1:(-1)> Connection closed: The remote host closed the connection [1] does anyone know what's going on here?? I'm so close! thanks in advance, Dan
ghost commented 7 years ago

What is the output of go version?

I just tested the command that you ran. I can only reproduce the issue when -insecure argument is not present. Please verify that cmd/barnard/main.go handles the -insecure flag by setting b.TLSConfig.InsecureSkipVerify = true.

danpowpow commented 7 years ago

pi@doorbell:~ $ go version go version go1.4.3 linux/arm

i just tried: go run cmd/barnard/main.go -server=192.168.1.123:64378 -insecure=true -username=testpi

and it worked! thanks so much.