Github user alopresto commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2684#discussion_r186503676
--- Diff:
nifi-toolkit/nifi-toolkit-tls/src/main/java/org/apache/nifi/toolkit/tls/standalone/TlsToolkitStandalone.java
---
@@ -236,6 +236,6 @@ public void
createNifiKeystoresAndTrustStores(StandaloneConfig standaloneConfig)
}
protected static String getClientDnFile(String clientDn) {
- return clientDn.replace(',', '_').replace(' ', '_');
+ return clientDn.replace(',', '_').replace(' ',
'_').replaceAll("[^\\w&&[^\\.]&&[^=]]", "_");
--- End diff --
This is also performing 3 different String replacement actions, which hurts
performance. We should replace this with a single compiled `Pattern` using
regex and perform the replacements at once.
---