Add error info to certificate create problem info 75/6975/1
authorelinuxhenrik <henrik.b.andersson@est.tech>
Tue, 2 Nov 2021 08:19:26 +0000 (09:19 +0100)
committerelinuxhenrik <henrik.b.andersson@est.tech>
Tue, 2 Nov 2021 08:19:32 +0000 (09:19 +0100)
Issue-ID: NONRTRIC-601
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
Change-Id: I90f71faeac7749c4b6a1674011ce8e1dfc51e663

dmaap-mediator-producer/main.go

index cdfde57..e8689bd 100644 (file)
@@ -88,7 +88,7 @@ func createClientCertificate() (*tls.Certificate, error) {
        if cert, err := tls.LoadX509KeyPair(configuration.ProducerCertPath, configuration.ProducerKeyPath); err == nil {
                return &cert, nil
        } else {
-               return nil, fmt.Errorf("cannot create x509 keypair from cert file %s and key file %s", configuration.ProducerCertPath, configuration.ProducerKeyPath)
+               return nil, fmt.Errorf("cannot create x509 keypair from cert file %s and key file %s due to: %v", configuration.ProducerCertPath, configuration.ProducerKeyPath, err)
        }
 }