HSM in a wallet of GO application #hsm #fabric-sdk-go


agustincharry@...
 

Hello.
I have a question about consuming an HSM from GO SDK to use in a wallet.
The project is a GO application which connects to the Blockchain using a wallet to invoke chaincode functions. Today, this wallet stores the public certificate and private key, but the idea is that the HSM stores the private key of the wallet.
 
In resume, the project has the next structure:
 

wallet, err = gateway.NewFileSystemWallet(walletPath)
err = PopulateWallet(wallet, orgMSPId, walletIdentityLabel, userCertPath, privateKeyPath)
gw, err = gateway.Connect(
    gateway.WithConfig(config.FromFile(filepath.Clean(conectionProfileFilePath))),
    gateway.WithIdentity(wallet, walletIdentityLabel),
)
network, err := gw.GetNetwork(channelName)
contract = network.GetContract(contractName)
result, err := contract.EvaluateTransaction("")
 
 
But this uses the Fabric-CA, in my project we are using ACM PCA to manage public certificates and CloudHSM to manage private keys, both services are of AWS.
 
Are there any examples available that use an HSM without Fabric-ca, please? Or can you guide me on how to implement this, please?