MCPcopy Create free account
hub / github.com/apache/impala / LoadCertificateAndPasswordProtectedKey

Method LoadCertificateAndPasswordProtectedKey

be/src/kudu/security/tls_context.cc:599–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599Status TlsContext::LoadCertificateAndPasswordProtectedKey(const string& certificate_path,
600 const string& key_path,
601 const PasswordCallback& password_cb) {
602 SCOPED_OPENSSL_NO_PENDING_ERRORS;
603 Cert c;
604 RETURN_NOT_OK_PREPEND(c.FromFile(certificate_path, DataFormat::PEM),
605 "failed to load certificate");
606 PrivateKey k;
607 RETURN_NOT_OK_PREPEND(k.FromFile(key_path, DataFormat::PEM, password_cb),
608 "failed to load private key file");
609 RETURN_NOT_OK(UseCertificateAndKey(c, k));
610 is_external_cert_ = true;
611 return Status::OK();
612}
613
614Status TlsContext::LoadCertificateAuthority(const string& certificate_path) {
615 SCOPED_OPENSSL_NO_PENDING_ERRORS;

Callers 1

BuildMethod · 0.80

Calls 2

OKFunction · 0.85
FromFileMethod · 0.45

Tested by

no test coverage detected