Lines Matching refs:cert
334 Certificate cert(0, Certificate::KEY_TYPE_RSA, nullptr, nullptr); in IterateZipEntriesAndSearchForKeys() local
336 if (!LoadCertificateFromBuffer(pem_content, &cert)) { in IterateZipEntriesAndSearchForKeys()
341 result.emplace_back(std::move(cert)); in IterateZipEntriesAndSearchForKeys()
406 bool LoadCertificateFromBuffer(const std::vector<uint8_t>& pem_content, Certificate* cert) { in LoadCertificateFromBuffer() argument
425 cert->hash_len = SHA_DIGEST_LENGTH; in LoadCertificateFromBuffer()
429 cert->hash_len = SHA256_DIGEST_LENGTH; in LoadCertificateFromBuffer()
445 cert->key_type = Certificate::KEY_TYPE_RSA; in LoadCertificateFromBuffer()
446 cert->ec.reset(); in LoadCertificateFromBuffer()
447 cert->rsa.reset(EVP_PKEY_get1_RSA(public_key.get())); in LoadCertificateFromBuffer()
448 if (!cert->rsa || !CheckRSAKey(cert->rsa)) { in LoadCertificateFromBuffer()
453 cert->key_type = Certificate::KEY_TYPE_EC; in LoadCertificateFromBuffer()
454 cert->rsa.reset(); in LoadCertificateFromBuffer()
455 cert->ec.reset(EVP_PKEY_get1_EC_KEY(public_key.get())); in LoadCertificateFromBuffer()
456 if (!cert->ec || !CheckECKey(cert->ec)) { in LoadCertificateFromBuffer()