Skip to content

Commit

Permalink
otp: ignore license text when encoding file
Browse files Browse the repository at this point in the history
  • Loading branch information
kikofernandez committed Nov 20, 2024
1 parent b33de9d commit 7a9d4dc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/public_key/test/public_key_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,18 @@ check_encapsulated_header([]) ->

strip_superfluous_newlines(Bin) ->
Str = string:strip(binary_to_list(Bin), right, 10),
re:replace(Str,"\n\n","\n", [{return,list}, global]).
Str1 = remove_license_header(Str),
re:replace(Str1,"\n\n","\n", [{return,list}, global]).

remove_license_header("##" ++ _=String) ->
case string:split(String, "\n") of
[_, Tail] ->
remove_license_header(Tail);
[Other] ->
Other
end;
remove_license_header(Code) ->
Code.

do_gen_ec_param(File) ->
{ok, KeyPem} = file:read_file(File),
Expand Down

0 comments on commit 7a9d4dc

Please sign in to comment.