diff options
Diffstat (limited to 'src/modules/netlib/netlibssl.cpp')
-rw-r--r-- | src/modules/netlib/netlibssl.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/netlib/netlibssl.cpp b/src/modules/netlib/netlibssl.cpp index 7f952b3ab6..eaf961912b 100644 --- a/src/modules/netlib/netlibssl.cpp +++ b/src/modules/netlib/netlibssl.cpp @@ -147,7 +147,7 @@ static bool SSL_library_init(void) WaitForSingleObject(g_hSslMutex, INFINITE);
- if ( !bSslInitDone)
+ if (!bSslInitDone)
{
g_hSchannel = LoadLibraryA("schannel.dll");
if (g_hSchannel)
@@ -203,7 +203,7 @@ BOOL NetlibSslPending(SslHandle *ssl) static bool VerifyCertificate(SslHandle *ssl, PCSTR pszServerName, DWORD dwCertFlags)
{
- if ( !fnCertGetCertificateChain)
+ if (!fnCertGetCertificateChain)
return true;
static LPSTR rgszUsages[] =
@@ -239,7 +239,7 @@ static bool VerifyCertificate(SslHandle *ssl, PCSTR pszServerName, DWORD dwCertF ChainPara.RequestedUsage.Usage.cUsageIdentifier = SIZEOF(rgszUsages);
ChainPara.RequestedUsage.Usage.rgpszUsageIdentifier = rgszUsages;
- if ( !fnCertGetCertificateChain(NULL, pServerCert, NULL, pServerCert->hCertStore,
+ if (!fnCertGetCertificateChain(NULL, pServerCert, NULL, pServerCert->hCertStore,
&ChainPara, 0, NULL, &pChainContext))
{
scRet = GetLastError();
@@ -256,7 +256,7 @@ static bool VerifyCertificate(SslHandle *ssl, PCSTR pszServerName, DWORD dwCertF PolicyStatus.cbSize = sizeof(PolicyStatus);
- if ( !fnCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_SSL, pChainContext,
+ if (!fnCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_SSL, pChainContext,
&PolicyPara, &PolicyStatus))
{
scRet = GetLastError();
@@ -566,7 +566,7 @@ SslHandle *NetlibSslConnect(SOCKET s, const char* host, int verify) DWORD dwFlags = 0;
- if ( !host || inet_addr(host) != INADDR_NONE)
+ if (!host || inet_addr(host) != INADDR_NONE)
dwFlags |= 0x00001000;
bool res = SSL_library_init();
@@ -574,7 +574,7 @@ SslHandle *NetlibSslConnect(SOCKET s, const char* host, int verify) if (res) res = ClientConnect(ssl, host);
if (res && verify) res = VerifyCertificate(ssl, host, dwFlags);
- if ( !res)
+ if (!res)
{
NetlibSslFree(ssl);
ssl = NULL;
@@ -664,7 +664,7 @@ static int NetlibSslReadSetResult(SslHandle *ssl, char *buf, int num, int peek) int rbytes = ssl->cbRecDataBuf - bytes;
memcpy(buf, ssl->pbRecDataBuf, bytes);
- if ( !peek)
+ if (!peek)
{
memmove(ssl->pbRecDataBuf, ssl->pbRecDataBuf + bytes, rbytes);
ssl->cbRecDataBuf = rbytes;
@@ -689,7 +689,7 @@ int NetlibSslRead(SslHandle *ssl, char *buf, int num, int peek) if (num <= 0) return 0;
- if (ssl->state != sockOpen || (ssl->cbRecDataBuf != 0 && ( !peek || ssl->cbRecDataBuf >= num)))
+ if (ssl->state != sockOpen || (ssl->cbRecDataBuf != 0 && (!peek || ssl->cbRecDataBuf >= num)))
{
return NetlibSslReadSetResult(ssl, buf, num, peek);
}
|