Lines Matching refs:cert
168 PrintErrorNumberMsg("VERIFY_ERROR", VERIFY_ERROR, "cert Chain verify failed");
169 PrintCertChainSub(m_p7->d.sign->cert);
205 X509* cert = NULL;
230 cert = sk_X509_delete(certs, 0);
231 m_p7 = Pkcs7Sign(cert, certs, md, content, m_flags, attrs);
241 X509_free(cert);
287 bool PKCS7Data::X509NameCompare(const X509* cert, const X509* issuerCert)
289 if (cert == nullptr || issuerCert == nullptr) {
291 "input cert is NULL");
294 X509_NAME* aName = X509_get_issuer_name(cert);
298 "cert issuer name is not equal to its issuer\'s name");
331 static X509* FindSubCertThenEraseItFromSets(X509* cert, std::unordered_set<X509*>& x509Sets)
335 X509_NAME* name1 = X509_get_subject_name(cert);
354 PrintErrorNumberMsg("CERTIFICATE_ERROR", CERTIFICATE_ERROR, "cert of certchain count less than two!");
364 for (X509* cert : x509Sets) {
365 if (X509_name_cmp(X509_get_subject_name(cert), X509_get_issuer_name(cert)) == 0) {
366 tmp = cert;
367 x509Sets.erase(cert);
373 "can't find root cert from certchain ,sort x509 certchain failed!");
382 "certchain contain invalid cert, sort x509 certchain failed!");
388 for (X509* cert : certChain) {
389 sk_X509_push(certs, cert);
426 STACK_OF(X509)* certChain = m_p7->d.sign->cert;
459 X509* cert = sk_X509_value(certs, i);
460 const ASN1_TIME* notBefore = X509_get0_notBefore(cert);
461 const ASN1_TIME* notAfter = X509_get0_notAfter(cert);
482 SIGNATURE_TOOLS_LOGE("entity cert signature verify failed");
487 SIGNATURE_TOOLS_LOGE("sub cert name compare not equal, verify failed");
492 SIGNATURE_TOOLS_LOGE("sub cert signature verify failed");
497 SIGNATURE_TOOLS_LOGE("root cert name compare not equal, verify failed");
502 SIGNATURE_TOOLS_LOGE("root cert signature verify failed");
734 static int Pkcs7SetSignerInfo(PKCS7_SIGNER_INFO* info, X509* cert, const EVP_MD* hash)
737 !X509_NAME_set(&info->issuer_and_serial->issuer, X509_get_issuer_name(cert))) {
743 ASN1_INTEGER_dup(X509_get_serialNumber(cert)))) {
756 static PKCS7_SIGNER_INFO* Pkcs7AddSignature(PKCS7* pkcs7, X509* cert, const EVP_MD* hash)
761 !Pkcs7SetSignerInfo(info, cert, hash) ||