-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-7452] Allow embedding cryptoconfig in the Config
This change makes it possible to embed the crypto material from the cryptoconfig and cryptoPaths for the users of an organization into the SDK's config.yaml. The apiconfig.OrganizationConfig was updated with a the new field `Users map[string]UserConfig`, which contains a map of the embedded users, where `UserConfig` is: type UserConfig struct { Key string Cert string } Additionally, the default CredentialManager's constructor and its method `GetSigningIdentity` were updated to make use of the embedded users. `GetSigningIdentity` first checks if an embedded user exists and if not, looks in the supplied cryptoPath. Lastly, some logic was extracted from the `util.ImportBCCSPKeyFromPEM` method into the `util.ImportBCCSPKeyFromPEMBytes` method in order to allow importing of keys directly from a byte array rather than a file path. Change-Id: I0333637ca03be5243d298158d128eb1fa8e399e0 Signed-off-by: Emil Nikolov <[email protected]>
- Loading branch information
Showing
7 changed files
with
642 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.