Lines Matching refs:certificate

73 inline keymaster_blob_t certBlobifier(X509* certificate, bool* fail){  in certBlobifier()  argument
74 int len = i2d_X509(certificate, nullptr); in certBlobifier()
87 i2d_X509(certificate, &p); in certBlobifier()
202 X509* certificate) { in add_key_usage_extension() argument
262 if (!X509_add_ext(certificate, key_usage_extension.get() /* Don't release; copied */, in add_key_usage_extension()
270 bool add_public_key(const EVP_PKEY* key, X509* certificate, keymaster_error_t* error) { in add_public_key() argument
271 if (!X509_set_pubkey(certificate, (EVP_PKEY*)key)) { in add_public_key()
282 const uint keymaster_version, X509* certificate, in add_attestation_extension() argument
290 if (!X509_add_ext(certificate, attest_extension.get() /* Don't release; copied */, in add_attestation_extension()
320 X509_Ptr certificate(X509_new()); in generate_attestation_common() local
321 if (!certificate.get()) { in generate_attestation_common()
325 if (!X509_set_version(certificate.get(), 2 /* version 3, but zero-based */)) in generate_attestation_common()
330 !X509_set_serialNumber(certificate.get(), serialNumber.get() /* Don't release; copied */)) in generate_attestation_common()
342 !X509_set_subject_name(certificate.get(), subjectName.get() /* Don't release; copied */)) in generate_attestation_common()
348 !X509_set_notBefore(certificate.get(), notBefore.get() /* Don't release; copied */)) in generate_attestation_common()
361 !X509_set_notAfter(certificate.get(), notAfter.get() /* Don't release; copied */)) in generate_attestation_common()
364 keymaster_error_t error = add_key_usage_extension(hw_enforced, sw_enforced, certificate.get()); in generate_attestation_common()
379 if (!add_public_key(evp_key, certificate.get(), &error) || in generate_attestation_common()
381 keymaster_version, certificate.get(), &error)) in generate_attestation_common()
402 if (!X509_set_issuer_name(certificate.get(), issuerSubject)) { in generate_attestation_common()
414 certificate.get(), // in generate_attestation_common()
419 if (!X509_sign(certificate.get(), sign_key.get(), EVP_sha256())) in generate_attestation_common()
425 *cert_chain_out = makeCertChain(certificate.get()); in generate_attestation_common()
427 *cert_chain_out = makeCertChain(certificate.get(), attestation_chain); in generate_attestation_common()