Skip to content

Commit

Permalink
fix: veracode log issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-vavdiya committed Jul 14, 2023
1 parent 2fcbce9 commit 69cd4d8
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.text.StringEscapeUtils;
import org.bouncycastle.util.io.pem.PemObject;
import org.bouncycastle.util.io.pem.PemWriter;
import org.eclipse.tractusx.managedidentitywallets.config.MIWSettings;
Expand Down Expand Up @@ -233,7 +234,7 @@ private Wallet createWallet(CreateWalletRequest request, boolean authority) {
});
didDocument.put("@context", mutableContext);
didDocument = DidDocument.fromJson(didDocument.toJson());
log.debug("did document created for bpn ->{}", request.getBpn());
log.debug("did document created for bpn ->{}", StringEscapeUtils.escapeJava(request.getBpn()));

//Save wallet
Wallet wallet = create(Wallet.builder()
Expand All @@ -253,7 +254,7 @@ private Wallet createWallet(CreateWalletRequest request, boolean authority) {
.privateKey(encryptionUtils.encrypt(getPrivateKeyString(keyPair.getPrivateKey().asByte())))
.publicKey(encryptionUtils.encrypt(getPublicKeyString(keyPair.getPublicKey().asByte())))
.build());
log.debug("Wallet created for bpn ->{}", request.getBpn());
log.debug("Wallet created for bpn ->{}", StringEscapeUtils.escapeJava(request.getBpn()));

Wallet issuerWallet = walletRepository.getByBpn(miwSettings.authorityWalletBpn());

Expand All @@ -275,9 +276,9 @@ public void createAuthorityWallet() {
.bpn(miwSettings.authorityWalletBpn())
.build();
createWallet(request, true);
log.info("Authority wallet created with bpn {}", miwSettings.authorityWalletBpn());
log.info("Authority wallet created with bpn {}", StringEscapeUtils.escapeJava(miwSettings.authorityWalletBpn()));
} else {
log.info("Authority wallet exists with bpn {}", miwSettings.authorityWalletBpn());
log.info("Authority wallet exists with bpn {}", StringEscapeUtils.escapeJava(miwSettings.authorityWalletBpn()));
}
}

Expand Down

0 comments on commit 69cd4d8

Please sign in to comment.