Lines Matching refs:cert
341 Certificate cert(0, Certificate::KEY_TYPE_RSA, nullptr, nullptr); in IterateZipEntriesAndSearchForKeys() local
343 if (!LoadCertificateFromBuffer(pem_content, &cert)) { in IterateZipEntriesAndSearchForKeys()
348 result.emplace_back(std::move(cert)); in IterateZipEntriesAndSearchForKeys()
413 bool LoadCertificateFromBuffer(const std::vector<uint8_t>& pem_content, Certificate* cert) { in LoadCertificateFromBuffer() argument
432 cert->hash_len = SHA_DIGEST_LENGTH; in LoadCertificateFromBuffer()
436 cert->hash_len = SHA256_DIGEST_LENGTH; in LoadCertificateFromBuffer()
452 cert->key_type = Certificate::KEY_TYPE_RSA; in LoadCertificateFromBuffer()
453 cert->ec.reset(); in LoadCertificateFromBuffer()
454 cert->rsa.reset(EVP_PKEY_get1_RSA(public_key.get())); in LoadCertificateFromBuffer()
455 if (!cert->rsa || !CheckRSAKey(cert->rsa)) { in LoadCertificateFromBuffer()
460 cert->key_type = Certificate::KEY_TYPE_EC; in LoadCertificateFromBuffer()
461 cert->rsa.reset(); in LoadCertificateFromBuffer()
462 cert->ec.reset(EVP_PKEY_get1_EC_KEY(public_key.get())); in LoadCertificateFromBuffer()
463 if (!cert->ec || !CheckECKey(cert->ec)) { in LoadCertificateFromBuffer()