FreeBSD 10 SSL for usage report

I just check my logs an saw that:

INFO: Usage report: Post https://data.syncthing.net/newdata: x509: failed to load system roots and no roots provided

does anyone with a stock FreeBSD 10 the same problem?

# fetch https://data.syncthing.net
Certificate verification failed for /C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority
34380826280:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed:/usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/s3_clnt.c:1179:
fetch: https://data.syncthing.net: Authentication error

The Go runtime looks for certificate roots in certain places: http://golang.org/src/pkg/crypto/x509/root_unix.go. For FreeBSD that seems to be /usr/local/share/certs/ca-root-nss.crt (well, it looks in the other places too, but that’s the expected location). Are you missing a package perhaps, or is the Go runtime out of date with current FreeBSD?

Sorry that it took so long to answer. (Holidays & stuff)

But I found today a bit time to play around. So I build a small test to run

package main

import (
    "fmt"
    "log"
    "net/http"
)

func main() {
      _, err := http.Get("https://data.syncthing.net/")
      if err != nil {
          log.Fatal(err)
      }
      fmt.Printf("No SSL error\n")
}

If you run this with go run or build it with go build everthing works as expectet and it print “No SSL error”

But if I move this binary to a other host where no GO is installed, then you got

2014/10/07 11:07:55 Get https://data.syncthing.net/: x509: failed to load system roots and no roots provided

So this problem should be probably solved by the GO or FreeBSD peoples.

Update This happens because there is no root ca by default.