This fixes the private key decoding error in NETCONF-521.
Change-Id: Iddcd29ea8ce513068e49071c0bdabbb788c11064
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
try {
this.keyPair = Optional.of(
new PKIUtil().decodePrivateKey(
- new StringReader(encryptionService.decrypt(dsKeypair.getPrivateKey())),
+ new StringReader(encryptionService.decrypt(
+ dsKeypair.getPrivateKey()).replaceAll("\\\\n", "\n")),
encryptionService.decrypt(passPhrase)));
} catch (IOException exception) {
LOG.warn("Unable to decode private key, id={}", pairId, exception);