code: func (ccpack *SignedCDSPackage) ValidateCC(ccdata *ChaincodeData) error {
  	if ccpack.sDepSpec == nil {
  		return fmt.Errorf("uninitialized package")
  	}
  
  	if ccpack.sDepSpec.ChaincodeDeploymentSpec == nil {
  		return fmt.Errorf("signed chaincode deployment spec cannot be nil in a package")
  	}
  
  	if ccpack.depSpec == nil {
  		return fmt.Errorf("chaincode deployment spec cannot be nil in a package")
  	}
  
  	// This is a hack. LSCC expects a specific LSCC error when names are invalid so it
  	// has its own validation code. We can't use that error because of import cycles.
  	// Unfortunately, we also need to check if what have makes some sort of sense as
  	// protobuf will gladly deserialize garbage and there are paths where we assume that
  	// a successful unmarshal means everything works but, if it fails, we try to unmarshal
  	// into something different.
  	if !isPrintable(ccdata.Name) {
  		return fmt.Errorf("invalid chaincode name: %q", ccdata.Name)
  	}
  
  	if ccdata.Name != ccpack.depSpec.ChaincodeSpec.ChaincodeId.Name || ccdata.Version != ccpack.depSpec.ChaincodeSpec.ChaincodeId.Version {
  		return fmt.Errorf("invalid chaincode data %v (%v)", ccdata, ccpack.depSpec.ChaincodeSpec.ChaincodeId)
  	}
  
  	otherdata := &SignedCDSData{}
  	err := proto.Unmarshal(ccdata.Data, otherdata)
  	if err != nil {
  		return err
  	}
  
  	if !ccpack.data.Equals(otherdata) {
  		return fmt.Errorf("data mismatch")
  	}
  
  	return nil
  }
docs: // ValidateCC returns error if the chaincode is not found or if its not a
  // ChaincodeDeploymentSpec