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 17:34:29 UTC
[couchdb] 01/01: make jwtf_keystore compatible with erlang 19 for
real this time
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch jwtf-erlang-19-2
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit e245aa017015291c3e8e83f418c513c75372c3c5
Author: Robert Newson <rn...@apache.org>
AuthorDate: Thu May 21 18:34:02 2020 +0100
make jwtf_keystore compatible with erlang 19 for real this time
---
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 3f7d2dc..c2d80b9 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(lists:join("\n", string:split(PEM, "\\n", all))),
+ BinPEM = re:replace(PEM, "\\\\n", "\n", [global, {return, binary}]),
case public_key:pem_decode(BinPEM) of
[PEMEntry] ->
public_key:pem_entry_decode(PEMEntry);