madcowfred / GoPostStuff

Multiple connection USENET binary poster written in Go
MIT License
32 stars 24 forks source link

TLS certificate check fails #13

Open twiddern opened 9 years ago

twiddern commented 9 years ago

Hi,

the check for a valid TLS certificate fails

2014/11/30 16:18:59 INFO [FARMAMS] Starting 20 connections 2014/11/30 16:18:59 CRITICAL [FARMAMS] Error while connecting: tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config 2014/11/30 16:18:59 CRITICAL [FARMAMS] Error while connecting: tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config

So I had a look into the https://github.com/madcowfred/GoPostStuff/blob/master/simplenntp/simplenntp.go but there's only the InsecureSkipVerify mentioned. ServerName is never mentioned to test. http://golang.org/pkg/crypto/tls/#Conn

madcowfred commented 9 years ago

Add 'InsecureSSL=on' to the [server] block in your config?

twiddern commented 9 years ago

Yup, but this should be only a workaround. It would be much better to validate the certificate

madcowfred commented 9 years ago

Is the certificate actually valid? I didn't run into any issues testing with errrr Newshosting whenever I was testing TLS.

tYGjQCsvVI commented 9 years ago

@madcowfred Yes, it fails, yes the SSL cert is valid.

EDIT:- For reference, here's my configuration:- https://paste.debian.net/plainh/5a5c0c19

You don't need valid credentials to hit the error (As obviously authentication is done above the encryption layer, which is never established).

twiddern commented 9 years ago

Yup I totally forgot this issue