1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-04-03 18:00:08 +03:00

Fix typo in sock struct member: s/WaitToUseCipher/WantToUseCipher/

Pointed out by @YangShizhao. Fixes #1492.
This commit is contained in:
Koichiro IWAO 2021-10-08 18:40:37 +09:00
parent 9d4970841f
commit bc76dcb2b9
No known key found for this signature in database
GPG Key ID: 03993B4065E7193B
2 changed files with 7 additions and 7 deletions

View File

@ -11427,12 +11427,12 @@ void SetWantToUseCipher(SOCK *sock, char *name)
return; return;
} }
if (sock->WaitToUseCipher) if (sock->WantToUseCipher)
{ {
Free(sock->WaitToUseCipher); Free(sock->WantToUseCipher);
} }
sock->WaitToUseCipher = CopyStr(name); sock->WantToUseCipher = CopyStr(name);
} }
// Add all the chain certificates in the chain_certs directory // Add all the chain certificates in the chain_certs directory
@ -11701,12 +11701,12 @@ bool StartSSLEx(SOCK *sock, X *x, K *priv, UINT ssl_timeout, char *sni_hostname)
} }
} }
if (sock->WaitToUseCipher != NULL) if (sock->WantToUseCipher != NULL)
{ {
// Set the cipher algorithm name to want to use // Set the cipher algorithm name to want to use
Lock(openssl_lock); Lock(openssl_lock);
{ {
if (SSL_set_cipher_list(sock->ssl, sock->WaitToUseCipher) == 0) if (SSL_set_cipher_list(sock->ssl, sock->WantToUseCipher) == 0)
SSL_set_cipher_list(sock->ssl, DEFAULT_CIPHER_LIST); SSL_set_cipher_list(sock->ssl, DEFAULT_CIPHER_LIST);
} }
Unlock(openssl_lock); Unlock(openssl_lock);
@ -14758,7 +14758,7 @@ void CleanupSock(SOCK *s)
s->CipherName = NULL; s->CipherName = NULL;
} }
Free(s->WaitToUseCipher); Free(s->WantToUseCipher);
DeleteLock(s->lock); DeleteLock(s->lock);
DeleteLock(s->ssl_lock); DeleteLock(s->ssl_lock);
DeleteLock(s->disconnect_lock); DeleteLock(s->disconnect_lock);

View File

@ -178,7 +178,7 @@ struct SOCK
X *RemoteX; // Certificate of the remote host X *RemoteX; // Certificate of the remote host
X *LocalX; // Certificate of the local host X *LocalX; // Certificate of the local host
char *CipherName; // Cipher algorithm name char *CipherName; // Cipher algorithm name
char *WaitToUseCipher; // Set the algorithm name to want to use char *WantToUseCipher; // Set the algorithm name to want to use
bool IgnoreRecvErr; // Whether the RecvFrom error is ignorable bool IgnoreRecvErr; // Whether the RecvFrom error is ignorable
bool IgnoreSendErr; // Whether the SendTo error is ignorable bool IgnoreSendErr; // Whether the SendTo error is ignorable
UINT TimeOut; // Time-out value UINT TimeOut; // Time-out value