You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ECERT_AUTO, the default, sniffs DER from PEM out of the data itself, which is what to pass for a file whose format is not known up front. It is an import-only value: exportAs() has nothing to detect from and reports ERET_NOTSUP, so an export must name ECERT_DER or ECERT_PEM.
// given: const SReadOnlyByteSpan& fileContents
CCert cert;
if (cert.importFrom(fileContents, ECERT_AUTO) != ERET_OK) {
return;
}
COctet pem;
if (cert.exportAs(pem, false, ECERT_PEM) != ERET_OK) {
return;
}
// pem holds a "-----BEGIN CERTIFICATE-----" block; ECERT_AUTO here would have been ERET_NOTSUP
Reference generated from certpp/x509/cert.hpp at commit 0834b29 (v1.0.1). The header is authoritative --- if this page disagrees with it, the header is right and this page needs regenerating.