MCPcopy Create free account
hub / github.com/apple/foundationdb / getKeyPathSync

Method getKeyPathSync

flow/TLSConfig.actor.cpp:193–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193std::string TLSConfig::getKeyPathSync() const {
194 if (tlsKeyPath.size()) {
195 return tlsKeyPath;
196 }
197
198 std::string envKeyPath;
199 if (platform::getEnvironmentVar("FDB_TLS_KEY_FILE", envKeyPath)) {
200 return envKeyPath;
201 }
202
203 const char* defaultCertFileName = "fdb.pem";
204 if (fileExists(defaultCertFileName)) {
205 return defaultCertFileName;
206 }
207
208 if (fileExists(joinPath(platform::getDefaultConfigPath(), defaultCertFileName))) {
209 return joinPath(platform::getDefaultConfigPath(), defaultCertFileName);
210 }
211
212 return std::string();
213}
214
215std::string TLSConfig::getCAPathSync() const {
216 if (tlsCAPath.size()) {

Callers 4

loadAsyncMethod · 0.80
Net2.actor.cppFile · 0.80
initTLSMethod · 0.80
mainFunction · 0.80

Calls 5

getEnvironmentVarFunction · 0.85
fileExistsFunction · 0.85
getDefaultConfigPathFunction · 0.85
joinPathFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected