Lines Matching defs:certificate
222 const std::string& certificate) {
322 if (!certificate.empty()) {
326 if (!GetCertificateFields(certificate, &subject, &issuer, &serial_number)) {
327 LOG(WARNING) << "Pkcs11KeyStore: Failed to find certificate fields.";
329 // Construct a PKCS #11 template for a certificate object.
330 std::string mutable_certificate = certificate;
350 LOG(ERROR) << "Pkcs11KeyStore: Failed to create certificate object.";
363 const std::string& certificate) {
375 if (DoesCertificateExist(session.handle(), certificate)) {
382 if (!GetCertificateFields(certificate, &subject, &issuer, &serial_number)) {
383 LOG(WARNING) << "Pkcs11KeyStore: Failed to find certificate fields.";
385 // Construct a PKCS #11 template for a certificate object.
386 std::string mutable_certificate = certificate;
406 LOG(ERROR) << "Pkcs11KeyStore: Failed to create certificate object.";
560 bool Pkcs11KeyStore::GetCertificateFields(const std::string& certificate,
565 reinterpret_cast<const unsigned char*>(certificate.data());
566 ScopedX509 x509(d2i_X509(nullptr, &asn1_ptr, certificate.size()));
568 LOG(WARNING) << "Pkcs11KeyStore: Failed to decode certificate.";
575 LOG(WARNING) << "Pkcs11KeyStore: Failed to encode certificate subject.";
584 LOG(WARNING) << "Pkcs11KeyStore: Failed to encode certificate issuer.";
594 LOG(WARNING) << "Pkcs11KeyStore: Failed to encode certificate serial "
603 const std::string& certificate) {
607 std::string mutable_certificate = certificate;