Lines Matching refs:cert

764 int Curl_parseX509(struct Curl_X509certificate *cert,  in Curl_parseX509()  argument
772 cert->certificate.header = NULL; in Curl_parseX509()
773 cert->certificate.beg = beg; in Curl_parseX509()
774 cert->certificate.end = end; in Curl_parseX509()
787 beg = getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
791 if(!getASN1Element(&cert->signature, beg, end)) in Curl_parseX509()
798 cert->version.header = NULL; in Curl_parseX509()
799 cert->version.beg = &defaultVersion; in Curl_parseX509()
800 cert->version.end = &defaultVersion + sizeof(defaultVersion); in Curl_parseX509()
805 if(!getASN1Element(&cert->version, elem.beg, elem.end)) in Curl_parseX509()
811 cert->serialNumber = elem; in Curl_parseX509()
813 beg = getASN1Element(&cert->signatureAlgorithm, beg, end); in Curl_parseX509()
815 beg = getASN1Element(&cert->issuer, 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()
835 ccp = getASN1Element(&cert->subjectPublicKeyAlgorithm, in Curl_parseX509()
836 cert->subjectPublicKeyInfo.beg, in Curl_parseX509()
837 cert->subjectPublicKeyInfo.end); in Curl_parseX509()
840 if(!getASN1Element(&cert->subjectPublicKey, ccp, in Curl_parseX509()
841 cert->subjectPublicKeyInfo.end)) in Curl_parseX509()
844 cert->issuerUniqueID.tag = cert->subjectUniqueID.tag = 0; in Curl_parseX509()
845 cert->extensions.tag = elem.tag = 0; in Curl_parseX509()
846 cert->issuerUniqueID.header = cert->subjectUniqueID.header = NULL; in Curl_parseX509()
847 cert->issuerUniqueID.beg = cert->issuerUniqueID.end = ""; in Curl_parseX509()
848 cert->subjectUniqueID.beg = cert->subjectUniqueID.end = ""; in Curl_parseX509()
849 cert->extensions.header = NULL; in Curl_parseX509()
850 cert->extensions.beg = cert->extensions.end = ""; in Curl_parseX509()
857 cert->issuerUniqueID = elem; in Curl_parseX509()
865 cert->subjectUniqueID = elem; in Curl_parseX509()
873 if(!getASN1Element(&cert->extensions, elem.beg, elem.end)) in Curl_parseX509()
1078 struct Curl_X509certificate cert; in Curl_extract_certinfo() local
1096 if(Curl_parseX509(&cert, beg, end)) in Curl_extract_certinfo()
1100 result = DNtostr(&out, &cert.subject); in Curl_extract_certinfo()
1111 result = DNtostr(&out, &cert.issuer); in Curl_extract_certinfo()
1123 for(ptr = cert.version.beg; ptr < cert.version.end; ptr++) in Curl_extract_certinfo()
1136 result = ASN1tostr(&out, &cert.serialNumber, 0); in Curl_extract_certinfo()
1147 result = dumpAlgo(&out, &param, cert.signatureAlgorithm.beg, in Curl_extract_certinfo()
1148 cert.signatureAlgorithm.end); in Curl_extract_certinfo()
1160 result = ASN1tostr(&out, &cert.notBefore, 0); in Curl_extract_certinfo()
1171 result = ASN1tostr(&out, &cert.notAfter, 0); in Curl_extract_certinfo()
1182 result = dumpAlgo(&out, &param, cert.subjectPublicKeyAlgorithm.beg, in Curl_extract_certinfo()
1183 cert.subjectPublicKeyAlgorithm.end); in Curl_extract_certinfo()
1194 &param, &cert.subjectPublicKey); in Curl_extract_certinfo()
1202 result = ASN1tostr(&out, &cert.signature, 0); in Curl_extract_certinfo()
1213 result = Curl_base64_encode(cert.certificate.beg, in Curl_extract_certinfo()
1214 cert.certificate.end - cert.certificate.beg, in Curl_extract_certinfo()