Lines Matching refs:end
178 const char *beg, const char *end)
182 const char *beg, const char *end) in getASN1Element() argument
192 if(!beg || !end || beg >= end || !*beg || in getASN1Element()
193 (size_t)(end - beg) > CURL_ASN1_MAX) in getASN1Element()
207 if(beg >= end) in getASN1Element()
218 while(beg < end && *beg) { in getASN1Element()
219 beg = getASN1Element(&lelem, beg, end); in getASN1Element()
223 if(beg >= end) in getASN1Element()
225 elem->end = beg; in getASN1Element()
228 else if((unsigned)b > (size_t)(end - beg)) in getASN1Element()
239 if(len > (size_t)(end - beg)) in getASN1Element()
242 elem->end = beg + len; in getASN1Element()
243 return elem->end; in getASN1Element()
269 const char *beg, const char *end) in bool2str() argument
271 if(end - beg != 1) in bool2str()
282 const char *beg, const char *end) in octet2str() argument
286 while(!result && beg < end) in octet2str()
293 const char *beg, const char *end) in bit2str() argument
297 if(++beg > end) in bit2str()
299 return octet2str(store, beg, end); in bit2str()
308 const char *beg, const char *end) in int2str() argument
311 size_t n = end - beg; in int2str()
317 return octet2str(store, beg, end); in int2str()
325 while(beg < end); in int2str()
338 utf8asn1str(struct dynbuf *to, int type, const char *from, const char *end) in utf8asn1str() argument
340 size_t inlength = end - from; in utf8asn1str()
372 while(!result && (from < end)) { in utf8asn1str()
420 const char *beg, const char *end) in encodeOID() argument
436 while(beg < end) { in encodeOID()
456 const char *beg, const char *end, bool symbolic) in OID2str() argument
459 if(beg < end) { in OID2str()
463 result = encodeOID(&buf, beg, end); in OID2str()
475 result = encodeOID(store, beg, end); in OID2str()
481 const char *beg, const char *end) in GTime2str() argument
493 for(fracp = beg; fracp < end && ISDIGIT(*fracp); fracp++) in GTime2str()
515 if(fracp < end && (*fracp == '.' || *fracp == ',')) { in GTime2str()
519 while(tzp < end && ISDIGIT(*tzp)) in GTime2str()
532 if(tzp >= end) { in GTime2str()
543 tzl = end - tzp; in GTime2str()
547 tzl = end - tzp; in GTime2str()
561 const char *beg, const char *end) in Curl_x509_GTime2str() argument
563 return GTime2str(store, beg, end); in Curl_x509_GTime2str()
573 const char *beg, const char *end) in UTime2str() argument
579 for(tzp = beg; tzp < end && *tzp >= '0' && *tzp <= '9'; tzp++) in UTime2str()
594 if(tzp >= end) in UTime2str()
598 end = tzp + 3; in UTime2str()
603 tzl = end - tzp; in UTime2str()
627 result = bool2str(store, elem->beg, elem->end); in ASN1tostr()
631 result = int2str(store, elem->beg, elem->end); in ASN1tostr()
634 result = bit2str(store, elem->beg, elem->end); in ASN1tostr()
637 result = octet2str(store, elem->beg, elem->end); in ASN1tostr()
643 result = OID2str(store, elem->beg, elem->end, TRUE); in ASN1tostr()
646 result = UTime2str(store, elem->beg, elem->end); in ASN1tostr()
649 result = GTime2str(store, elem->beg, elem->end); in ASN1tostr()
659 result = utf8asn1str(store, type, elem->beg, elem->end); in ASN1tostr()
686 for(p1 = dn->beg; p1 < dn->end;) { in encodeDN()
687 p1 = getASN1Element(&rdn, p1, dn->end); in encodeDN()
692 for(p2 = rdn.beg; p2 < rdn.end;) { in encodeDN()
693 p2 = getASN1Element(&atv, p2, rdn.end); in encodeDN()
698 p3 = getASN1Element(&oid, atv.beg, atv.end); in encodeDN()
703 if(!getASN1Element(&value, p3, atv.end)) { in encodeDN()
765 const char *beg, const char *end) in Curl_parseX509() argument
774 cert->certificate.end = end; in Curl_parseX509()
777 if(!getASN1Element(&elem, beg, end)) in Curl_parseX509()
780 end = elem.end; in Curl_parseX509()
783 beg = getASN1Element(&tbsCertificate, beg, end); in Curl_parseX509()
787 beg = getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
791 if(!getASN1Element(&cert->signature, beg, end)) in Curl_parseX509()
796 end = tbsCertificate.end; in Curl_parseX509()
800 cert->version.end = &defaultVersion + sizeof(defaultVersion); in Curl_parseX509()
801 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
805 if(!getASN1Element(&cert->version, elem.beg, elem.end)) in Curl_parseX509()
807 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
813 beg = getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
815 beg = getASN1Element(&cert->issuer, beg, end); in Curl_parseX509()
819 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
822 ccp = getASN1Element(&cert->notBefore, elem.beg, elem.end); in Curl_parseX509()
825 if(!getASN1Element(&cert->notAfter, ccp, elem.end)) in Curl_parseX509()
828 beg = getASN1Element(&cert->subject, beg, end); in Curl_parseX509()
832 beg = getASN1Element(&cert->subjectPublicKeyInfo, beg, end); in Curl_parseX509()
837 cert->subjectPublicKeyInfo.end); in Curl_parseX509()
841 cert->subjectPublicKeyInfo.end)) in Curl_parseX509()
847 cert->issuerUniqueID.beg = cert->issuerUniqueID.end = ""; in Curl_parseX509()
848 cert->subjectUniqueID.beg = cert->subjectUniqueID.end = ""; in Curl_parseX509()
850 cert->extensions.beg = cert->extensions.end = ""; in Curl_parseX509()
851 if(beg < end) { in Curl_parseX509()
852 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
858 if(beg < end) { in Curl_parseX509()
859 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
866 if(beg < end) { in Curl_parseX509()
867 beg = getASN1Element(&elem, beg, end); in Curl_parseX509()
873 if(!getASN1Element(&cert->extensions, elem.beg, elem.end)) in Curl_parseX509()
884 const char *beg, const char *end) in dumpAlgo() argument
890 beg = getASN1Element(&oid, beg, end); in dumpAlgo()
895 param->beg = param->end = end; in dumpAlgo()
896 if(beg < end) { in dumpAlgo()
897 const char *p = getASN1Element(param, beg, end); in dumpAlgo()
901 return OID2str(store, oid.beg, oid.end, TRUE); in dumpAlgo()
977 const size_t len = ((pubkey->end - pubkey->beg - 2) * 4); in do_pubkey()
991 if(!getASN1Element(&pk, pubkey->beg + 1, pubkey->end)) in do_pubkey()
998 p = getASN1Element(&elem, pk.beg, pk.end); in do_pubkey()
1003 for(q = elem.beg; !*q && q < elem.end; q++) in do_pubkey()
1005 len = ((elem.end - q) * 8); in do_pubkey()
1024 if(!getASN1Element(&elem, p, pk.end)) in do_pubkey()
1030 p = getASN1Element(&elem, param->beg, param->end); in do_pubkey()
1034 p = getASN1Element(&elem, p, param->end); in do_pubkey()
1038 if(getASN1Element(&elem, p, param->end)) { in do_pubkey()
1048 p = getASN1Element(&elem, param->beg, param->end); in do_pubkey()
1052 if(getASN1Element(&elem, param->beg, param->end)) { in do_pubkey()
1076 const char *end) in Curl_extract_certinfo() argument
1096 if(Curl_parseX509(&cert, beg, end)) in Curl_extract_certinfo()
1123 for(ptr = cert.version.beg; ptr < cert.version.end; ptr++) in Curl_extract_certinfo()
1148 cert.signatureAlgorithm.end); in Curl_extract_certinfo()
1183 cert.subjectPublicKeyAlgorithm.end); in Curl_extract_certinfo()
1214 cert.certificate.end - cert.certificate.beg, in Curl_extract_certinfo()