123456module juptune.data.x509.store;
Result validateChainFromPem(
const char[] pem,
X509CertificateStore.SecurityPolicy policy
);
A helper function that combines PemParserand validateChainFromCopyingDerBytestogether. Please refer to each of their documentation for any real details.
Certificates in PEM may not actually be DER encoded (but instead BER). Currently this code hard assumes that the certificate is DER encoded.
Anything that PemParser.parseNextcan throw.
Anything that validateChainFromCopyingDerBytescan throw.
X509StoreError.wrongPemLabelif any item within the PEM data is not a "CERTIFICATE".
A Resultindicating if an error occurred or not.
PemParser.parseNext, validateChainFromCopyingDerBytes.