Skip to content

Commit

Permalink
[FAB-4765] Remove dead MSP config code
Browse files Browse the repository at this point in the history
The getMspConfig function loads the MSP signer certs from the signer
cert dir, error if the dir is not present, and then does nothing with
them.

This function is used to get the Verifying MSP definition to include in
a channel, so requiring that a signcerts directory be present is
non-sensical in this case, but still causes an error if not present.

Change-Id: Ic89709df51f768a06c08551563b1e00df05f7695
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Jun 15, 2017
1 parent 859fd8a commit 0728bd5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions msp/configbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ func GetVerifyingMspConfig(dir string, ID string) (*msp.MSPConfig, error) {

func getMspConfig(dir string, ID string, sigid *msp.SigningIdentityInfo) (*msp.MSPConfig, error) {
cacertDir := filepath.Join(dir, cacerts)
signcertDir := filepath.Join(dir, signcerts)
admincertDir := filepath.Join(dir, admincerts)
intermediatecertsDir := filepath.Join(dir, intermediatecerts)
crlsDir := filepath.Join(dir, crlsfolder)
Expand All @@ -173,11 +172,6 @@ func getMspConfig(dir string, ID string, sigid *msp.SigningIdentityInfo) (*msp.M
return nil, fmt.Errorf("Could not load a valid ca certificate from directory %s, err %s", cacertDir, err)
}

signcert, err := getPemMaterialFromDir(signcertDir)
if err != nil || len(signcert) == 0 {
return nil, fmt.Errorf("Could not load a valid signer certificate from directory %s, err %s", signcertDir, err)
}

admincert, err := getPemMaterialFromDir(admincertDir)
if err != nil || len(admincert) == 0 {
return nil, fmt.Errorf("Could not load a valid admin certificate from directory %s, err %s", admincertDir, err)
Expand Down

0 comments on commit 0728bd5

Please sign in to comment.