clang format, based on cpprest

This commit is contained in:
Benjamin Sergeant
2019-05-30 08:46:50 -07:00
parent 879a4b38aa
commit c65fec7271
47 changed files with 426 additions and 414 deletions

View File

@ -6,17 +6,15 @@
#pragma once
#include "IXSocket.h"
#include "IXCancellationRequest.h"
#include "IXSocket.h"
#include <mutex>
#include <openssl/bio.h>
#include <openssl/hmac.h>
#include <openssl/conf.h>
#include <openssl/err.h>
#include <openssl/hmac.h>
#include <openssl/ssl.h>
#include <mutex>
namespace ix
{
class SocketOpenSSL final : public Socket
@ -40,18 +38,16 @@ namespace ix
std::string getSSLError(int ret);
SSL_CTX* openSSLCreateContext(std::string& errMsg);
bool openSSLHandshake(const std::string& hostname, std::string& errMsg);
bool openSSLCheckServerCert(SSL *ssl,
const std::string& hostname,
std::string& errMsg);
bool checkHost(const std::string& host, const char *pattern);
bool openSSLCheckServerCert(SSL* ssl, const std::string& hostname, std::string& errMsg);
bool checkHost(const std::string& host, const char* pattern);
SSL* _ssl_connection;
SSL_CTX* _ssl_context;
const SSL_METHOD* _ssl_method;
mutable std::mutex _mutex; // OpenSSL routines are not thread-safe
mutable std::mutex _mutex; // OpenSSL routines are not thread-safe
static std::once_flag _openSSLInitFlag;
static std::atomic<bool> _openSSLInitializationSuccessful;
};
}
} // namespace ix