Problem with CaCert

Hello Orne,
I’ve updated the loraserver and lora app server t the latest release.
I’ve generated certificates using loraserver-certificates.
The issue is :
as soon as I receive an uplink the loraserver crash with segmentatio fault.
I’ve discovered the erorr is in internal/cliet/pool.go function Get after calling the clientCreate :
if !caCertPool.AppendCertsFromPEM(caCert) {
return nil, nil, errors.Wrap(err, “append ca cert to pool error”)
}

Actually .AppendCertsFromPEM(caCert) , clientCreate returns a nil asClient and an Error but the get function doesn’t return error and the exception is thrown by internal/uplink/data.publishDataUp because it receives an asClient=nil

First issue: why AppendCertsFromPEM(caCert) fails? the caCert exists and seems to be valid. I put as CN : loraserver and HOSTS : localhost

Second issue: I wonder why the Get function in internal/client/asclient/pool.go doesn’t returns erroreven if it receive an asCleint=nil and an error!= nil

Solved!

loraserver-certificates/ Makefile:
removed:
cfssl gencert -initca config/ca-csr.json | cfssljson -bare certs/ca/ca

added:
cfssl genkey -initca config/ca-csr.json | cfssljson -bare certs/ca/ca
cfssl gencert -ca certs/ca/ca.pem -ca-key certs/ca/ca-key.pem config/ca-csr.json