Skip to content

Commit

Permalink
feat(iprod-189): added currency_code to populateDFSPClientCertBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
geka-evk committed Oct 24, 2023
1 parent 40b9136 commit 1457dc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/pki_engine/VaultPKIEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class VaultPKIEngine extends PKIEngine {
}
// endregion

async populateDFSPClientCertBundle (dfspId, dfspName) {
async populateDFSPClientCertBundle (dfspId, dfspName, dfspMonetaryZoneId) {
this.validateId(dfspId, 'dfspId');
const dfspCA = await this.getDFSPCA(dfspId);
const enrollments = await this.getDFSPOutboundEnrollments(dfspId);
Expand All @@ -308,6 +308,7 @@ class VaultPKIEngine extends PKIEngine {
client_cert_chain: `${dfspClientCert.certificate}\n${dfspCA.intermediateChain}\n${dfspCA.rootCertificate}`,
fqdn: cert.subject.CN,
host: dfspName,
currency_code: dfspMonetaryZoneId,
};
await this.client.write(`${this.mounts.dfspClientCertBundle}/${dfspName}`, bundle);
}
Expand Down
4 changes: 2 additions & 2 deletions src/service/DfspOnboardService.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const getIPsBundle = async () => {
exports.onboardDFSP = async (ctx, dfspId) => {
await PkiService.validateDfsp(ctx, dfspId);
const { pkiEngine } = ctx;
const id = await DFSPModel.findIdByDfspId(dfspId);
await pkiEngine.populateDFSPClientCertBundle(id, dfspId);
const { id, monetaryZoneId } = await DFSPModel.findByDfspId(dfspId);
await pkiEngine.populateDFSPClientCertBundle(id, dfspId, monetaryZoneId);

const ipsBundle = await getIPsBundle();
await pkiEngine.populateDFSPInternalIPWhitelistBundle(ipsBundle);
Expand Down

0 comments on commit 1457dc6

Please sign in to comment.