Lines Matching refs:cert
340 Certificate cert(0, Certificate::KEY_TYPE_RSA, nullptr, nullptr); in IterateZipEntriesAndSearchForKeys() local
342 if (!LoadCertificateFromBuffer(pem_content, &cert)) { in IterateZipEntriesAndSearchForKeys()
347 result.emplace_back(std::move(cert)); in IterateZipEntriesAndSearchForKeys()
412 bool LoadCertificateFromBuffer(const std::vector<uint8_t>& pem_content, Certificate* cert) { in LoadCertificateFromBuffer() argument
431 cert->hash_len = SHA_DIGEST_LENGTH; in LoadCertificateFromBuffer()
435 cert->hash_len = SHA256_DIGEST_LENGTH; in LoadCertificateFromBuffer()
451 cert->key_type = Certificate::KEY_TYPE_RSA; in LoadCertificateFromBuffer()
452 cert->ec.reset(); in LoadCertificateFromBuffer()
453 cert->rsa.reset(EVP_PKEY_get1_RSA(public_key.get())); in LoadCertificateFromBuffer()
454 if (!cert->rsa || !CheckRSAKey(cert->rsa)) { in LoadCertificateFromBuffer()
459 cert->key_type = Certificate::KEY_TYPE_EC; in LoadCertificateFromBuffer()
460 cert->rsa.reset(); in LoadCertificateFromBuffer()
461 cert->ec.reset(EVP_PKEY_get1_EC_KEY(public_key.get())); in LoadCertificateFromBuffer()
462 if (!cert->ec || !CheckECKey(cert->ec)) { in LoadCertificateFromBuffer()