Lines Matching refs:end

108                                  const char * beg, const char * end)  in Curl_getASN1Element()  argument
119 if(beg >= end || !*beg) in Curl_getASN1Element()
133 if(beg >= end) in Curl_getASN1Element()
144 while(beg < end && *beg) { in Curl_getASN1Element()
145 beg = Curl_getASN1Element(&lelem, beg, end); in Curl_getASN1Element()
149 if(beg >= end) in Curl_getASN1Element()
151 elem->end = beg; in Curl_getASN1Element()
154 else if(beg + b > end) in Curl_getASN1Element()
165 if((unsigned long) (end - beg) < len) in Curl_getASN1Element()
168 elem->end = beg + len; in Curl_getASN1Element()
169 return elem->end; in Curl_getASN1Element()
186 static const char * bool2str(const char * beg, const char * end) in bool2str() argument
192 if(end - beg != 1) in bool2str()
197 static const char * octet2str(const char * beg, const char * end) in octet2str() argument
199 size_t n = end - beg; in octet2str()
207 for(n = 0; beg < end; n += 3) in octet2str()
212 static const char * bit2str(const char * beg, const char * end) in bit2str() argument
217 if(++beg > end) in bit2str()
219 return octet2str(beg, end); in bit2str()
222 static const char * int2str(const char * beg, const char * end) in int2str() argument
225 size_t n = end - beg; in int2str()
235 return octet2str(beg, end); in int2str()
243 while(beg < end); in int2str()
248 utf8asn1str(char * * to, int type, const char * from, const char * end) in utf8asn1str() argument
250 size_t inlength = end - from; in utf8asn1str()
295 for(outlength = 0; from < end;) { in utf8asn1str()
337 static const char * string2str(int type, const char * beg, const char * end) in string2str() argument
344 if(utf8asn1str(&buf, type, beg, end) < 0) in string2str()
369 static int encodeOID(char * buf, int n, const char * beg, const char * end) in encodeOID() argument
390 while(beg < end) { in encodeOID()
408 static const char * OID2str(const char * beg, const char * end, bool symbolic) in OID2str() argument
417 if(beg < end) { in OID2str()
418 n = encodeOID((char *) NULL, -1, beg, end); in OID2str()
422 encodeOID(buf, n, beg, end); in OID2str()
438 static const char * GTime2str(const char * beg, const char * end) in GTime2str() argument
450 for(fracp = beg; fracp < end && *fracp >= '0' && *fracp <= '9'; fracp++) in GTime2str()
471 if(fracp < end && (*fracp == '.' || *fracp == ',')) { in GTime2str()
475 while(tzp < end && *tzp >= '0' && *tzp <= '9'); in GTime2str()
482 if(tzp >= end) in GTime2str()
486 end = tzp + 4; in GTime2str()
493 tzl = end - tzp; in GTime2str()
501 static const char * UTime2str(const char * beg, const char * end) in UTime2str() argument
510 for(tzp = beg; tzp < end && *tzp >= '0' && *tzp <= '9'; tzp++) in UTime2str()
524 if(tzp >= end) in UTime2str()
528 end = tzp + 3; in UTime2str()
533 tzl = end - tzp; in UTime2str()
553 return bool2str(elem->beg, elem->end); in Curl_ASN1tostr()
556 return int2str(elem->beg, elem->end); in Curl_ASN1tostr()
558 return bit2str(elem->beg, elem->end); in Curl_ASN1tostr()
560 return octet2str(elem->beg, elem->end); in Curl_ASN1tostr()
564 return OID2str(elem->beg, elem->end, TRUE); in Curl_ASN1tostr()
566 return UTime2str(elem->beg, elem->end); in Curl_ASN1tostr()
568 return GTime2str(elem->beg, elem->end); in Curl_ASN1tostr()
577 return string2str(type, elem->beg, elem->end); in Curl_ASN1tostr()
598 for(p1 = dn->beg; p1 < dn->end;) { in encodeDN()
599 p1 = Curl_getASN1Element(&rdn, p1, dn->end); in encodeDN()
600 for(p2 = rdn.beg; p2 < rdn.end;) { in encodeDN()
601 p2 = Curl_getASN1Element(&atv, p2, rdn.end); in encodeDN()
602 p3 = Curl_getASN1Element(&oid, atv.beg, atv.end); in encodeDN()
603 Curl_getASN1Element(&value, p3, atv.end); in encodeDN()
672 const char * beg, const char * end) in Curl_parseX509() argument
685 cert->certificate.end = end; in Curl_parseX509()
688 Curl_getASN1Element(&elem, beg, end); in Curl_parseX509()
690 end = elem.end; in Curl_parseX509()
693 beg = Curl_getASN1Element(&tbsCertificate, beg, end); in Curl_parseX509()
695 beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
697 Curl_getASN1Element(&cert->signature, beg, end); in Curl_parseX509()
701 end = tbsCertificate.end; in Curl_parseX509()
705 cert->version.end = &defaultVersion + sizeof defaultVersion;; in Curl_parseX509()
706 beg = Curl_getASN1Element(&elem, beg, end); in Curl_parseX509()
708 Curl_getASN1Element(&cert->version, elem.beg, elem.end); in Curl_parseX509()
709 beg = Curl_getASN1Element(&elem, beg, end); in Curl_parseX509()
713 beg = Curl_getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
715 beg = Curl_getASN1Element(&cert->issuer, beg, end); in Curl_parseX509()
717 beg = Curl_getASN1Element(&elem, beg, end); in Curl_parseX509()
718 ccp = Curl_getASN1Element(&cert->notBefore, elem.beg, elem.end); in Curl_parseX509()
719 Curl_getASN1Element(&cert->notAfter, ccp, elem.end); in Curl_parseX509()
721 beg = Curl_getASN1Element(&cert->subject, beg, end); in Curl_parseX509()
723 beg = Curl_getASN1Element(&cert->subjectPublicKeyInfo, beg, end); in Curl_parseX509()
726 cert->subjectPublicKeyInfo.end); in Curl_parseX509()
728 cert->subjectPublicKeyInfo.end); in Curl_parseX509()
733 cert->issuerUniqueID.beg = cert->issuerUniqueID.end = ""; in Curl_parseX509()
734 cert->subjectUniqueID.beg = cert->subjectUniqueID.end = ""; in Curl_parseX509()
736 cert->extensions.beg = cert->extensions.end = ""; in Curl_parseX509()
737 if(beg < end) in Curl_parseX509()
738 beg = Curl_getASN1Element(&elem, beg, end); in Curl_parseX509()
741 if(beg < end) in Curl_parseX509()
742 beg = Curl_getASN1Element(&elem, beg, end); in Curl_parseX509()
746 if(beg < end) in Curl_parseX509()
747 beg = Curl_getASN1Element(&elem, beg, end); in Curl_parseX509()
750 Curl_getASN1Element(&cert->extensions, elem.beg, elem.end); in Curl_parseX509()
771 const char * beg, const char * end) in dumpAlgo() argument
777 beg = Curl_getASN1Element(&oid, beg, end); in dumpAlgo()
780 param->beg = param->end = end; in dumpAlgo()
781 if(beg < end) in dumpAlgo()
782 Curl_getASN1Element(param, beg, end); in dumpAlgo()
783 return OID2str(oid.beg, oid.end, TRUE); in dumpAlgo()
817 Curl_getASN1Element(&pk, pubkey->beg + 1, pubkey->end); in do_pubkey()
820 p = Curl_getASN1Element(&elem, pk.beg, pk.end); in do_pubkey()
822 for(q = elem.beg; !*q && q < elem.end; q++) in do_pubkey()
824 len = (unsigned long)((elem.end - q) * 8); in do_pubkey()
841 Curl_getASN1Element(&elem, p, pk.end); in do_pubkey()
845 p = Curl_getASN1Element(&elem, param->beg, param->end); in do_pubkey()
847 p = Curl_getASN1Element(&elem, p, param->end); in do_pubkey()
849 Curl_getASN1Element(&elem, p, param->end); in do_pubkey()
854 p = Curl_getASN1Element(&elem, param->beg, param->end); in do_pubkey()
856 Curl_getASN1Element(&elem, param->beg, param->end); in do_pubkey()
870 const char * end) in Curl_extract_certinfo() argument
891 Curl_parseX509(&cert, beg, end); in Curl_extract_certinfo()
915 for(ccp = cert.version.beg; ccp < cert.version.end; ccp++) in Curl_extract_certinfo()
939 cert.signatureAlgorithm.end); in Curl_extract_certinfo()
970 cert.subjectPublicKeyAlgorithm.end); in Curl_extract_certinfo()
994 cert.certificate.end - cert.certificate.beg, in Curl_extract_certinfo()
1031 static const char * checkOID(const char * beg, const char * end, in checkOID() argument
1042 ccp = Curl_getASN1Element(&e, beg, end); in checkOID()
1046 p = OID2str(e.beg, e.end, FALSE); in checkOID()
1056 const char * beg, const char * end) in Curl_verifyhost() argument
1085 Curl_parseX509(&cert, beg, end); in Curl_verifyhost()
1097 for(p = cert.extensions.beg; p < cert.extensions.end && matched != 1;) { in Curl_verifyhost()
1098 p = Curl_getASN1Element(&ext, p, cert.extensions.end); in Curl_verifyhost()
1100 ext.beg = checkOID(ext.beg, ext.end, sanOID); in Curl_verifyhost()
1102 ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end); in Curl_verifyhost()
1105 ext.beg = Curl_getASN1Element(&elem, ext.beg, ext.end); in Curl_verifyhost()
1107 Curl_getASN1Element(&elem, elem.beg, elem.end); in Curl_verifyhost()
1109 for(q = elem.beg; matched != 1 && q < elem.end;) { in Curl_verifyhost()
1110 q = Curl_getASN1Element(&name, q, elem.end); in Curl_verifyhost()
1115 name.beg, name.end); in Curl_verifyhost()
1126 matched = (size_t) (name.end - q) == addrlen && in Curl_verifyhost()
1148 name.beg = name.end = ""; in Curl_verifyhost()
1152 while(q < cert.subject.end) { in Curl_verifyhost()
1153 q = Curl_getASN1Element(&dn, q, cert.subject.end); in Curl_verifyhost()
1154 for(p = dn.beg; p < dn.end;) { in Curl_verifyhost()
1155 p = Curl_getASN1Element(&elem, p, dn.end); in Curl_verifyhost()
1157 elem.beg = checkOID(elem.beg, elem.end, cnOID); in Curl_verifyhost()
1164 if(!Curl_getASN1Element(&elem, name.beg, name.end)) in Curl_verifyhost()
1167 len = utf8asn1str(&dnsname, elem.tag, elem.beg, elem.end); in Curl_verifyhost()