Uploaded image for project: 'Fabric SDK Go'
  1. Fabric SDK Go
  2. FABG-903

Fabric sdk go build error with fabric-ca

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Unverified
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: v1.0.0
    • Fix Version/s: None
    • Labels:
      None
    • Steps to Reproduce:
      (Please add steps to reproduce)

      Description

      A project using fabric-sdk-go, it output errors when build it. 

      ➜ fabric-sdk-go-sample git:(master) ✗ go build main.go
      # github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util
      ../../../../go/pkg/mod/github.com/hyperledger/fabric-sdk-go@v1.0.0-alpha5.0.20190411180201-5a9a0e749e4f/internal/github.com/hyperledger/fabric-ca/util/csp.go:47:8: cannot convert nil to type csr.KeyRequest
      

      Comparing nil with a struct leads to this error. The code in fabric-sdk-go and fabric-ca is the same in every release version:

      https://github.com/hyperledger/fabric-ca/blob/v2.0.0-alpha/util/csp.go#L119

      func getBCCSPKeyOpts(kr csr.KeyRequest, ephemeral bool) (opts core.KeyGenOpts, err error) {
         if kr == nil {
            return factory.GetECDSAKeyGenOpts(ephemeral), nil
         }
      

      So, is it a bug to fix it?

        Attachments

          Activity

            People

            Assignee:
            shitaibin Taibin Shi
            Reporter:
            shitaibin Taibin Shi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: