| 297 | } |
| 298 | |
| 299 | Status Cert::GetPublicKey(PublicKey* key) const { |
| 300 | SCOPED_OPENSSL_NO_PENDING_ERRORS; |
| 301 | EVP_PKEY* raw_key = X509_get_pubkey(GetTopOfChainX509()); |
| 302 | OPENSSL_RET_IF_NULL(raw_key, "unable to get certificate public key"); |
| 303 | key->AdoptRawData(raw_key); |
| 304 | return Status::OK(); |
| 305 | } |
| 306 | |
| 307 | Status CertSignRequest::FromString(const std::string& data, DataFormat format) { |
| 308 | return ::kudu::security::FromString(data, format, &data_); |