MCPcopy Create free account
hub / github.com/chris2511/xca / parse_bitstring

Method parse_bitstring

lib/x509v3ext.cpp:768–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766};
767
768bool x509v3ext::parse_bitstring(QString *single, QString *adv) const
769{
770 ASN1_BIT_STRING *bs;
771 const BIT_STRING_BITNAME *bnames;
772 int n = nid();
773
774 switch (n) {
775 case NID_key_usage: bnames = key_usage_type_table; break;
776 case NID_netscape_cert_type: bnames = ns_cert_type_table; break;
777 default: return false;
778 }
779 bs = (ASN1_BIT_STRING *)d2i();
780
781 if (!bs)
782 return false;
783
784 QString ret = parse_critical() + parse_bits(bnames, bs);
785 if (single)
786 *single = ret;
787 else if (adv)
788 *adv = QString("%1=%2\n").arg(OBJ_nid2sn(nid())).arg(ret) +*adv;
789 ASN1_BIT_STRING_free(bs);
790 return true;
791}
792
793bool x509v3ext::parse_sKeyId(QString *, QString *adv) const
794{

Callers

nothing calls this directly

Calls 2

parse_bitsFunction · 0.85
QStringClass · 0.70

Tested by

no test coverage detected