|
302 | 302 | -> sub_string(PubKeyString, PadStart, PadWidth, _, SubString),
|
303 | 303 | format(string(NewAcc), "~s~s~n", [Acc, SubString]),
|
304 | 304 | wrap_key(PubKeyString, NewPadStart, PadWidth, StrLength, NewAcc, Output)
|
305 |
| - ; Output = Acc |
| 305 | + ; sub_string(PubKeyString, PadStart, _, 0, SubString), |
| 306 | + string_concat(Acc, SubString, Output) |
306 | 307 | ).
|
307 | 308 |
|
308 | 309 | /* convert_jwt_to_key(+Key, -SettingsKey) is semidet.
|
|
316 | 317 | string_length(PubKeyString, StrLength),
|
317 | 318 | wrap_key(PubKeyString, 0, 64, StrLength, "", WrappedKey),
|
318 | 319 | format(string(PubKeyFormatted),
|
319 |
| - "-----BEGIN PUBLIC KEY-----~n~s-----END PUBLIC KEY-----", |
| 320 | + "-----BEGIN PUBLIC KEY-----~n~s~n-----END PUBLIC KEY-----", |
320 | 321 | [WrappedKey]),
|
321 | 322 | tmp_file_stream(text, File, Stream),
|
322 | 323 | write(Stream, PubKeyFormatted),
|
|
0 commit comments