* @param cakey CA certificate chain file.
* @returns An SSL context.
*/
-shared_ptr<SSL_CTX> Utility::MakeSSLContext(String pubkey, String privkey, String cakey)
+shared_ptr<SSL_CTX> Utility::MakeSSLContext(const String& pubkey, const String& privkey, const String& cakey)
{
InitializeOpenSSL();
* @param pemfile The filename.
* @returns An X509 certificate.
*/
-shared_ptr<X509> Utility::GetX509Certificate(String pemfile)
+shared_ptr<X509> Utility::GetX509Certificate(const String& pemfile)
{
X509 *cert;
BIO *fpcert = BIO_new(BIO_s_file());
* @param text The String that should be checked.
* @returns true if the wildcard pattern matches, false otherwise.
*/
-bool Utility::Match(String pattern, String text)
+bool Utility::Match(const String& pattern, const String& text)
{
return (match(pattern.CStr(), text.CStr()) == 0);
}
static void Daemonize(void);
- static shared_ptr<SSL_CTX> MakeSSLContext(String pubkey, String privkey, String cakey);
+ static shared_ptr<SSL_CTX> MakeSSLContext(const String& pubkey, const String& privkey, const String& cakey);
static String GetCertificateCN(const shared_ptr<X509>& certificate);
- static shared_ptr<X509> GetX509Certificate(String pemfile);
+ static shared_ptr<X509> GetX509Certificate(const String& pemfile);
- static bool Match(String pattern, String text);
+ static bool Match(const String& pattern, const String& text);
static String DirName(const String& path);
static String BaseName(const String& path);