You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2020/05/21 15:04:12 UTC

[couchdb] 01/01: make jwtf_keystore compatible with erlang 19

This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch jwtf-erlang-19
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 850cc1268574c24520111cd9b7e1d896b2474c6e
Author: Robert Newson <rn...@apache.org>
AuthorDate: Thu May 21 16:03:50 2020 +0100

    make jwtf_keystore compatible with erlang 19
---
 src/jwtf/src/jwtf_keystore.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/jwtf/src/jwtf_keystore.erl b/src/jwtf/src/jwtf_keystore.erl
index be261e6..3f7d2dc 100644
--- a/src/jwtf/src/jwtf_keystore.erl
+++ b/src/jwtf/src/jwtf_keystore.erl
@@ -140,7 +140,7 @@ get_from_config(Kty, KID) ->
     end.
 
 pem_decode(PEM) ->
-    BinPEM = iolist_to_binary(string:replace(PEM, "\\n", "\n", all)),
+    BinPEM = iolist_to_binary(lists:join("\n", string:split(PEM, "\\n", all))),
     case public_key:pem_decode(BinPEM) of
         [PEMEntry] ->
             public_key:pem_entry_decode(PEMEntry);