How to use the fabric-ca-client/lib/FabricCAServices.addConfigFile function in fabric-ca-client

To help you get started, we’ve selected a few fabric-ca-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hyperledger / fabric-sdk-node / test / integration / fabric-ca-services-tests.js View on Github external
function getFabricCAService() {
	FabricCAServices.addConfigFile(path.join(__dirname, 'e2e', 'config.json'));
	ORGS = FabricCAServices.getConfigSetting('test-network');
	fabricCAEndpoint = ORGS[userOrg].ca.url;

	FabricCAServices.getConfigSetting('crypto-keysize', '256');// force for npm test
	FabricCAServices.setConfigSetting('crypto-hash-algo', 'SHA2');// force for npm test

	return new FabricCAServices(fabricCAEndpoint, tlsOptions, ORGS[userOrg].ca.name);
}