mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Merge PR #962: Fix several compile warnings on MS VC++ 2008.
This commit is contained in:
commit
d10f83417f
@ -195,13 +195,13 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (base64_enc_len(strlen(name)) < sizeof(buffer)-1 &&
|
if (base64_enc_len((unsigned int)strlen(name)) < sizeof(buffer)-1 &&
|
||||||
base64_enc_len(strlen(password)) < sizeof(buffer)-1 &&
|
base64_enc_len((unsigned int)strlen(password)) < sizeof(buffer)-1 &&
|
||||||
base64_enc_len(strlen(domainname)) < sizeof(buffer)-1)
|
base64_enc_len((unsigned int)strlen(domainname)) < sizeof(buffer)-1)
|
||||||
{
|
{
|
||||||
char answer[300];
|
char answer[300];
|
||||||
|
|
||||||
unsigned int end = B64_Encode(buffer, name, strlen(name));
|
unsigned int end = B64_Encode(buffer, name, (int)strlen(name));
|
||||||
buffer[end] = '\0';
|
buffer[end] = '\0';
|
||||||
fputs("Username:: ", out);
|
fputs("Username:: ", out);
|
||||||
fputs(buffer, out);
|
fputs(buffer, out);
|
||||||
@ -209,7 +209,7 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna
|
|||||||
Debug("Username: %s\n", buffer);
|
Debug("Username: %s\n", buffer);
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
|
|
||||||
end = B64_Encode(buffer, domainname, strlen(domainname));
|
end = B64_Encode(buffer, domainname, (int)strlen(domainname));
|
||||||
buffer[end] = '\0';
|
buffer[end] = '\0';
|
||||||
fputs("NT-Domain:: ", out);
|
fputs("NT-Domain:: ", out);
|
||||||
fputs(buffer, out);
|
fputs(buffer, out);
|
||||||
@ -220,7 +220,7 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna
|
|||||||
if (password[0] != '\0')
|
if (password[0] != '\0')
|
||||||
{
|
{
|
||||||
Debug("Password authentication\n");
|
Debug("Password authentication\n");
|
||||||
end = B64_Encode(buffer, password, strlen(password));
|
end = B64_Encode(buffer, password, (int)strlen(password));
|
||||||
buffer[end] = '\0';
|
buffer[end] = '\0';
|
||||||
fputs("Password:: ", out);
|
fputs("Password:: ", out);
|
||||||
fputs(buffer, out);
|
fputs(buffer, out);
|
||||||
|
@ -1650,12 +1650,12 @@ X509 *NewX509(K *pub, K *priv, X *ca, NAME *name, UINT days, X_SERIAL *serial)
|
|||||||
// Set the Expiration
|
// Set the Expiration
|
||||||
t1 = X509_get0_notBefore(x509);
|
t1 = X509_get0_notBefore(x509);
|
||||||
t2 = X509_get0_notAfter(x509);
|
t2 = X509_get0_notAfter(x509);
|
||||||
if (!UINT64ToAsn1Time(t1, notBefore))
|
if (!UINT64ToAsn1Time((void *)t1, notBefore))
|
||||||
{
|
{
|
||||||
FreeX509(x509);
|
FreeX509(x509);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!UINT64ToAsn1Time(t2, notAfter))
|
if (!UINT64ToAsn1Time((void *)t2, notAfter))
|
||||||
{
|
{
|
||||||
FreeX509(x509);
|
FreeX509(x509);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1792,12 +1792,12 @@ X509 *NewRootX509(K *pub, K *priv, NAME *name, UINT days, X_SERIAL *serial)
|
|||||||
// Set the Expiration
|
// Set the Expiration
|
||||||
t1 = X509_get0_notBefore(x509);
|
t1 = X509_get0_notBefore(x509);
|
||||||
t2 = X509_get0_notAfter(x509);
|
t2 = X509_get0_notAfter(x509);
|
||||||
if (!UINT64ToAsn1Time(t1, notBefore))
|
if (!UINT64ToAsn1Time((void *)t1, notBefore))
|
||||||
{
|
{
|
||||||
FreeX509(x509);
|
FreeX509(x509);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!UINT64ToAsn1Time(t2, notAfter))
|
if (!UINT64ToAsn1Time((void *)t2, notAfter))
|
||||||
{
|
{
|
||||||
FreeX509(x509);
|
FreeX509(x509);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -4432,7 +4432,7 @@ static UINT Internal_HMac(const EVP_MD *md, void *dest, void *key, UINT key_size
|
|||||||
goto final;
|
goto final;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = MdProcess(m, dest, src, src_size);
|
len = MdProcess(m, dest, (void *)src, src_size);
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
{
|
{
|
||||||
Debug("Internal_HMac(): MdProcess() returned 0!\n");
|
Debug("Internal_HMac(): MdProcess() returned 0!\n");
|
||||||
|
@ -5563,7 +5563,7 @@ int SslCertVerifyCallback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||||||
if (!preverify_ok)
|
if (!preverify_ok)
|
||||||
{
|
{
|
||||||
const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr);
|
const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr);
|
||||||
StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, msg);
|
StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, (char *)msg);
|
||||||
Debug("SslCertVerifyCallback preverify error: '%s'\n", msg);
|
Debug("SslCertVerifyCallback preverify error: '%s'\n", msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -16532,12 +16532,12 @@ TOKEN_LIST *GetCipherList()
|
|||||||
sk = SSL_get_ciphers(ssl);
|
sk = SSL_get_ciphers(ssl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < sk_SSL_CIPHER_num(sk); i++)
|
for (i = 0; i < (UINT)sk_SSL_CIPHER_num(sk); i++)
|
||||||
{
|
{
|
||||||
const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);
|
const SSL_CIPHER *c = sk_SSL_CIPHER_value(sk, i);
|
||||||
|
|
||||||
name = SSL_CIPHER_get_name(c);
|
name = SSL_CIPHER_get_name(c);
|
||||||
if (IsEmptyStr(name))
|
if (IsEmptyStr((char *)name))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -16553,7 +16553,7 @@ TOKEN_LIST *GetCipherList()
|
|||||||
ciphers->Token = Malloc(sizeof(char *));
|
ciphers->Token = Malloc(sizeof(char *));
|
||||||
}
|
}
|
||||||
|
|
||||||
ciphers->Token[i] = CopyStr(name);
|
ciphers->Token[i] = CopyStr((char *)name);
|
||||||
}
|
}
|
||||||
|
|
||||||
sk_SSL_CIPHER_free(sk);
|
sk_SSL_CIPHER_free(sk);
|
||||||
|
Loading…
Reference in New Issue
Block a user