From 51489a954463567f8dd50854826c03ce51c45cb3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 5 Sep 2018 22:49:46 +0300 Subject: KeystoreManager: fix public key string serialization --- juick-server/src/main/java/com/juick/server/KeystoreManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server/src/main/java') diff --git a/juick-server/src/main/java/com/juick/server/KeystoreManager.java b/juick-server/src/main/java/com/juick/server/KeystoreManager.java index bb0de79d..4edc6664 100644 --- a/juick-server/src/main/java/com/juick/server/KeystoreManager.java +++ b/juick-server/src/main/java/com/juick/server/KeystoreManager.java @@ -77,7 +77,7 @@ public class KeystoreManager { return null; } public String getPublicKey() { - return String.format("-----BEGIN RSA PUBLIC KEY-----\n%s\\n-----END RSA PUBLIC KEY-----\\n", + return String.format("-----BEGIN RSA PUBLIC KEY-----\n%s\n-----END RSA PUBLIC KEY-----\n", new String(Base64Utils.encode(getKeyPair().getPublic().getEncoded()))); } private X509Certificate generateCertificate(String dn, KeyPair keyPair, int validity, String sigAlgName) throws GeneralSecurityException, IOException { -- cgit v1.2.3