66 * LICENSE file in the root directory of this source tree.
77 */
88
9- #include < fizz/server/CertManager .h>
9+ #include < fizz/server/DefaultCertManager .h>
1010
1111#include < folly/String.h>
1212
@@ -16,7 +16,7 @@ namespace fizz {
1616namespace server {
1717
1818// Find a matching cert given a key.
19- CertMatch CertManager ::findCert (
19+ CertMatch DefaultCertManager ::findCert (
2020 const std::string& key,
2121 const std::vector<SignatureScheme>& supportedSigSchemes,
2222 const std::vector<SignatureScheme>& peerSigSchemes) const {
@@ -37,7 +37,7 @@ CertMatch CertManager::findCert(
3737 return none;
3838}
3939
40- CertMatch CertManager ::getCert (
40+ CertMatch DefaultCertManager ::getCert (
4141 const Optional<std::string>& sni,
4242 const std::vector<SignatureScheme>& supportedSigSchemes,
4343 const std::vector<SignatureScheme>& peerSigSchemes,
@@ -75,7 +75,7 @@ CertMatch CertManager::getCert(
7575 return folly::none;
7676}
7777
78- std::shared_ptr<SelfCert> CertManager ::getCert (
78+ std::shared_ptr<SelfCert> DefaultCertManager ::getCert (
7979 const std::string& identity) const {
8080 auto it = identMap_.find (identity);
8181 if (it == identMap_.end ()) {
@@ -84,7 +84,7 @@ std::shared_ptr<SelfCert> CertManager::getCert(
8484 return it->second ;
8585}
8686
87- std::string CertManager ::getKeyFromIdent (const std::string& ident) {
87+ std::string DefaultCertManager ::getKeyFromIdent (const std::string& ident) {
8888 if (ident.empty ()) {
8989 throw std::runtime_error (" empty identity" );
9090 }
@@ -100,7 +100,7 @@ std::string CertManager::getKeyFromIdent(const std::string& ident) {
100100 return key;
101101}
102102
103- void CertManager ::addCertIdentity (
103+ void DefaultCertManager ::addCertIdentity (
104104 std::shared_ptr<SelfCert> cert,
105105 const std::string& ident) {
106106 auto key = getKeyFromIdent (ident);
@@ -120,15 +120,17 @@ void CertManager::addCertIdentity(
120120 }
121121}
122122
123- void CertManager ::addCert (std::shared_ptr<SelfCert> cert) {
123+ void DefaultCertManager ::addCert (std::shared_ptr<SelfCert> cert) {
124124 addCert (std::move (cert), false );
125125}
126126
127- void CertManager ::addCertAndSetDefault (std::shared_ptr<SelfCert> cert) {
127+ void DefaultCertManager ::addCertAndSetDefault (std::shared_ptr<SelfCert> cert) {
128128 addCert (std::move (cert), true );
129129}
130130
131- void CertManager::addCert (std::shared_ptr<SelfCert> cert, bool defaultCert) {
131+ void DefaultCertManager::addCert (
132+ std::shared_ptr<SelfCert> cert,
133+ bool defaultCert) {
132134 auto primaryIdent = cert->getIdentity ();
133135 addCertIdentity (cert, primaryIdent);
134136
@@ -148,12 +150,12 @@ void CertManager::addCert(std::shared_ptr<SelfCert> cert, bool defaultCert) {
148150 }
149151}
150152
151- bool CertManager ::hasCerts () const {
153+ bool DefaultCertManager ::hasCerts () const {
152154 return !certs_.empty ();
153155}
154156
155- const std::unordered_map<std::string, CertManager ::SigSchemeMap>&
156- CertManager ::getCertificatesByIdentity () const {
157+ const std::unordered_map<std::string, DefaultCertManager ::SigSchemeMap>&
158+ DefaultCertManager ::getCertificatesByIdentity () const {
157159 return certs_;
158160}
159161} // namespace server
0 commit comments