Skip explanatory text at the start of cert byte blobs if we find a PEM header. (...
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Mon, 22 Mar 2021 20:16:47 +0000 (13:16 -0700)
committerGitHub <noreply@github.com>
Mon, 22 Mar 2021 20:16:47 +0000 (20:16 +0000)
commit61889c8e8926aed2a22000c312baa0a7969cc927
tree5c7d79f4963e0dc2b1c9dfffab778bac7f2cb844
parent727996e849c59f668208d74d5955a9200267011b
Skip explanatory text at the start of cert byte blobs if we find a PEM header. (#49920)

* Skip whitespace bytes at the start of cert byte blobs.

This enables support for PEM-formatted certs prepended with whitespace.

* Handle non-whitespace explanatory text.

* PR feedback.

* Bail early if we don't have enough space to find a header.

Run formatting.
src/libraries/Native/Unix/System.Security.Cryptography.Native.Android/pal_x509.c