• Home
  • Raw
  • Download

Lines Matching refs:end

107                                   const char *beg, const char *end)
111 const char *beg, const char *end) in getASN1Element() argument
121 if(!beg || !end || beg >= end || !*beg || in getASN1Element()
122 (size_t)(end - beg) > CURL_ASN1_MAX) in getASN1Element()
136 if(beg >= end) in getASN1Element()
147 while(beg < end && *beg) { in getASN1Element()
148 beg = getASN1Element(&lelem, beg, end); in getASN1Element()
152 if(beg >= end) in getASN1Element()
154 elem->end = beg; in getASN1Element()
157 else if((unsigned)b > (size_t)(end - beg)) in getASN1Element()
168 if(len > (size_t)(end - beg)) in getASN1Element()
171 elem->end = beg + len; in getASN1Element()
172 return elem->end; in getASN1Element()
195 static const char *bool2str(const char *beg, const char *end) in bool2str() argument
197 if(end - beg != 1) in bool2str()
206 static const char *octet2str(const char *beg, const char *end) in octet2str() argument
208 size_t n = end - beg; in octet2str()
214 for(n = 0; beg < end; n += 3) in octet2str()
220 static const char *bit2str(const char *beg, const char *end) in bit2str() argument
225 if(++beg > end) in bit2str()
227 return octet2str(beg, end); in bit2str()
235 static const char *int2str(const char *beg, const char *end) in int2str() argument
238 size_t n = end - beg; in int2str()
244 return octet2str(beg, end); in int2str()
252 while(beg < end); in int2str()
264 utf8asn1str(char **to, int type, const char *from, const char *end) in utf8asn1str() argument
266 size_t inlength = end - from; in utf8asn1str()
305 for(outlength = 0; from < end;) { in utf8asn1str()
354 static const char *string2str(int type, const char *beg, const char *end) in string2str() argument
357 if(utf8asn1str(&buf, type, beg, end) < 0) in string2str()
390 const char *beg, const char *end) in encodeOID() argument
410 while(beg < end) { in encodeOID()
436 static const char *OID2str(const char *beg, const char *end, bool symbolic) in OID2str() argument
439 if(beg < end) { in OID2str()
440 size_t buflen = encodeOID(NULL, 0, beg, end); in OID2str()
444 encodeOID(buf, buflen, beg, end); in OID2str()
460 static const char *GTime2str(const char *beg, const char *end) in GTime2str() argument
472 for(fracp = beg; fracp < end && *fracp >= '0' && *fracp <= '9'; fracp++) in GTime2str()
494 if(fracp < end && (*fracp == '.' || *fracp == ',')) { in GTime2str()
498 while(tzp < end && *tzp >= '0' && *tzp <= '9'); in GTime2str()
505 if(tzp >= end) in GTime2str()
509 end = tzp + 4; in GTime2str()
516 tzl = end - tzp; in GTime2str()
528 static const char *UTime2str(const char *beg, const char *end) in UTime2str() argument
534 for(tzp = beg; tzp < end && *tzp >= '0' && *tzp <= '9'; tzp++) in UTime2str()
548 if(tzp >= end) in UTime2str()
552 end = tzp + 3; in UTime2str()
557 tzl = end - tzp; in UTime2str()
578 return bool2str(elem->beg, elem->end); in ASN1tostr()
581 return int2str(elem->beg, elem->end); in ASN1tostr()
583 return bit2str(elem->beg, elem->end); in ASN1tostr()
585 return octet2str(elem->beg, elem->end); in ASN1tostr()
589 return OID2str(elem->beg, elem->end, TRUE); in ASN1tostr()
591 return UTime2str(elem->beg, elem->end); in ASN1tostr()
593 return GTime2str(elem->beg, elem->end); in ASN1tostr()
602 return string2str(type, elem->beg, elem->end); in ASN1tostr()
624 for(p1 = dn->beg; p1 < dn->end;) { in encodeDN()
625 p1 = getASN1Element(&rdn, p1, dn->end); in encodeDN()
628 for(p2 = rdn.beg; p2 < rdn.end;) { in encodeDN()
629 p2 = getASN1Element(&atv, p2, rdn.end); in encodeDN()
632 p3 = getASN1Element(&oid, atv.beg, atv.end); in encodeDN()
635 if(!getASN1Element(&value, p3, atv.end)) in encodeDN()
707 const char *beg, const char *end) in Curl_parseX509() argument
716 cert->certificate.end = end; in Curl_parseX509()
719 if(!getASN1Element(&elem, beg, end)) in Curl_parseX509()
722 end = elem.end; in Curl_parseX509()
725 beg = getASN1Element(&tbsCertificate, beg, end); in Curl_parseX509()
729 beg = getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
733 if(!getASN1Element(&cert->signature, beg, end)) in Curl_parseX509()
738 end = tbsCertificate.end; in Curl_parseX509()
742 cert->version.end = &defaultVersion + sizeof(defaultVersion); in Curl_parseX509()
743 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
747 if(!getASN1Element(&cert->version, elem.beg, elem.end)) in Curl_parseX509()
749 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
755 beg = getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
757 beg = getASN1Element(&cert->issuer, beg, end); in Curl_parseX509()
761 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
764 ccp = getASN1Element(&cert->notBefore, elem.beg, elem.end); in Curl_parseX509()
767 if(!getASN1Element(&cert->notAfter, ccp, elem.end)) in Curl_parseX509()
770 beg = getASN1Element(&cert->subject, beg, end); in Curl_parseX509()
774 beg = getASN1Element(&cert->subjectPublicKeyInfo, beg, end); in Curl_parseX509()
779 cert->subjectPublicKeyInfo.end); in Curl_parseX509()
783 cert->subjectPublicKeyInfo.end)) in Curl_parseX509()
789 cert->issuerUniqueID.beg = cert->issuerUniqueID.end = ""; in Curl_parseX509()
790 cert->subjectUniqueID.beg = cert->subjectUniqueID.end = ""; in Curl_parseX509()
792 cert->extensions.beg = cert->extensions.end = ""; in Curl_parseX509()
793 if(beg < end) { in Curl_parseX509()
794 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
800 if(beg < end) { in Curl_parseX509()
801 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
808 if(beg < end) { in Curl_parseX509()
809 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
815 if(!getASN1Element(&cert->extensions, elem.beg, elem.end)) in Curl_parseX509()
839 const char *beg, const char *end) in dumpAlgo() argument
845 beg = getASN1Element(&oid, beg, end); in dumpAlgo()
850 param->beg = param->end = end; in dumpAlgo()
851 if(beg < end) in dumpAlgo()
852 if(!getASN1Element(param, beg, end)) in dumpAlgo()
854 return OID2str(oid.beg, oid.end, TRUE); in dumpAlgo()
885 if(!getASN1Element(&pk, pubkey->beg + 1, pubkey->end)) in do_pubkey()
892 p = getASN1Element(&elem, pk.beg, pk.end); in do_pubkey()
897 for(q = elem.beg; !*q && q < elem.end; q++) in do_pubkey()
899 len = (unsigned long)((elem.end - q) * 8); in do_pubkey()
918 if(!getASN1Element(&elem, p, pk.end)) in do_pubkey()
923 p = getASN1Element(&elem, param->beg, param->end); in do_pubkey()
926 p = getASN1Element(&elem, p, param->end); in do_pubkey()
929 if(getASN1Element(&elem, p, param->end)) { in do_pubkey()
937 p = getASN1Element(&elem, param->beg, param->end); in do_pubkey()
940 if(getASN1Element(&elem, param->beg, param->end)) { in do_pubkey()
951 const char *end) in Curl_extract_certinfo() argument
972 if(Curl_parseX509(&cert, beg, end)) in Curl_extract_certinfo()
997 for(ccp = cert.version.beg; ccp < cert.version.end; ccp++) in Curl_extract_certinfo()
1021 cert.signatureAlgorithm.end); in Curl_extract_certinfo()
1052 cert.subjectPublicKeyAlgorithm.end); in Curl_extract_certinfo()
1074 cert.certificate.end - cert.certificate.beg, in Curl_extract_certinfo()
1111 static const char *checkOID(const char *beg, const char *end, in checkOID() argument
1122 ccp = getASN1Element(&e, beg, end); in checkOID()
1126 p = OID2str(e.beg, e.end, FALSE); in checkOID()
1136 const char *beg, const char *end) in Curl_verifyhost() argument
1166 if(Curl_parseX509(&cert, beg, end)) in Curl_verifyhost()
1179 for(p = cert.extensions.beg; p < cert.extensions.end && matched != 1;) { in Curl_verifyhost()
1180 p = getASN1Element(&ext, p, cert.extensions.end); in Curl_verifyhost()
1185 ext.beg = checkOID(ext.beg, ext.end, sanOID); in Curl_verifyhost()
1187 ext.beg = getASN1Element(&elem, ext.beg, ext.end); in Curl_verifyhost()
1192 ext.beg = getASN1Element(&elem, ext.beg, ext.end); in Curl_verifyhost()
1197 if(!getASN1Element(&elem, elem.beg, elem.end)) in Curl_verifyhost()
1200 for(q = elem.beg; matched != 1 && q < elem.end;) { in Curl_verifyhost()
1201 q = getASN1Element(&name, q, elem.end); in Curl_verifyhost()
1207 name.beg, name.end); in Curl_verifyhost()
1216 matched = (size_t) (name.end - name.beg) == addrlen && in Curl_verifyhost()
1238 name.beg = name.end = ""; in Curl_verifyhost()
1242 while(q < cert.subject.end) { in Curl_verifyhost()
1243 q = getASN1Element(&dn, q, cert.subject.end); in Curl_verifyhost()
1246 for(p = dn.beg; p < dn.end;) { in Curl_verifyhost()
1247 p = getASN1Element(&elem, p, dn.end); in Curl_verifyhost()
1251 elem.beg = checkOID(elem.beg, elem.end, cnOID); in Curl_verifyhost()
1258 if(!getASN1Element(&elem, name.beg, name.end)) in Curl_verifyhost()
1261 len = utf8asn1str(&dnsname, elem.tag, elem.beg, elem.end); in Curl_verifyhost()