/* Provenance: openssl/openssl i2r_pci (fixed). * repo: openssl/openssl * commit: 918430ba80d94ec8f05383b43b1872b1ebb13e1a * parent: b2b3b9c9936b91315adc0f3254879cb2fd5ca2bd * commit_url: https://github.com/openssl/openssl/commit/918430ba80d94ec8f05383b43b1872b1ebb13e1a * cve: CVE-2021-3712 * license: OpenSSL License * function: i2r_pci * relpath: crypto/x509/v3_pci.c */ static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci, BIO *out, int indent) { BIO_printf(out, "%*sPath Length Constraint: ", indent, ""); if (pci->pcPathLengthConstraint) i2a_ASN1_INTEGER(out, pci->pcPathLengthConstraint); else BIO_printf(out, "infinite"); BIO_puts(out, "\n"); BIO_printf(out, "%*sPolicy Language: ", indent, ""); i2a_ASN1_OBJECT(out, pci->proxyPolicy->policyLanguage); if (pci->proxyPolicy->policy && pci->proxyPolicy->policy->data) BIO_printf(out, "\n%*sPolicy Text: %.*s", indent, "", pci->proxyPolicy->policy->length, pci->proxyPolicy->policy->data); return 1; }