Commit 5d03478
committed
b64_decode_cacerts: accept non-wrapped input
`BIO_f_base64` either requires wrapped base64 with a short
initial line, or when `BIO_FLAGS_BASE64_NO_NL` is set, all data
must be on a single line (with or without trailing newline
character). See `BIO_f_base64(3ossl)` for more details.
RFC 8951 (an update to RFC 7030) clarifies that senders are
not required to insert white space (such as LF) in
base64-encoded payloads. Therefore libest must handle
wrapped or unwrapped base64 with lines of any length.
This leaves two options:
1. set `BIO_FLAGS_BASE64_NO_NL` and unwrap the input lines
2. leave the flag unset but split long lines and ensure the
input ends with a newline.
Option 1 is simpler so that's what this commit implements.
Signed-off-by: Fraser Tweedale <[email protected]>1 parent f8a6e5b commit 5d03478
1 file changed
+38
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
387 | 388 | | |
388 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
389 | 407 | | |
390 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
391 | 411 | | |
392 | 412 | | |
393 | 413 | | |
394 | 414 | | |
395 | 415 | | |
396 | 416 | | |
397 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
398 | 432 | | |
399 | 433 | | |
400 | 434 | | |
401 | 435 | | |
402 | 436 | | |
403 | 437 | | |
404 | 438 | | |
| 439 | + | |
405 | 440 | | |
406 | 441 | | |
407 | 442 | | |
| |||
0 commit comments