Skip to content

Commit

Permalink
Update RegisterUser.java (hyperledger#428)
Browse files Browse the repository at this point in the history
Use correct identity for the appUser (Not the same admin user certificates)

Signed-off-by: dvrajitha <[email protected]>
  • Loading branch information
dvrajitha authored Mar 21, 2021
1 parent cbf263d commit 2b662e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fabcar/java/src/main/java/org/example/RegisterUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public String getMspId() {
registrationRequest.setEnrollmentID("appUser");
String enrollmentSecret = caClient.register(registrationRequest, admin);
Enrollment enrollment = caClient.enroll("appUser", enrollmentSecret);
Identity user = Identities.newX509Identity("Org1MSP", adminIdentity.getCertificate(), adminIdentity.getPrivateKey());
Identity user = Identities.newX509Identity("Org1MSP", enrollment);
wallet.put("appUser", user);
System.out.println("Successfully enrolled user \"appUser\" and imported it into the wallet");
}
Expand Down

0 comments on commit 2b662e0

Please sign in to comment.