Skip to content

Commit

Permalink
Update SSLContext API to have loadTrustedCertificates support lists o…
Browse files Browse the repository at this point in the history
…f strings

Summary: Adding ability to load a whole vector of certs at once.

Reviewed By: xybu

Differential Revision: D38057061

fbshipit-source-id: a8415176522595cb2db9c935cf5fda40cf33c459
  • Loading branch information
kylemirz authored and facebook-github-bot committed Aug 22, 2022
1 parent 7c471c7 commit 0a84f93
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions folly/io/async/SSLContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,17 @@ class SSLContext {
* @param path Path to trusted certificate file
*/
virtual void loadTrustedCertificates(const char* path);
/**
* Load trusted certificates from a vector of file paths
*
* @param paths container of file paths to trusted certificate files
*/
template <typename StringList>
void loadTrustedCertificates(const StringList& paths) {
for (const auto& path : paths) {
loadTrustedCertificates(path.c_str());
}
}
/**
* Load trusted certificates from specified X509 certificate store.
*
Expand Down

0 comments on commit 0a84f93

Please sign in to comment.