Update libcomm_client_ssl.cpp

This commit is contained in:
Eao3piq4e 2022-08-12 11:56:28 +08:00
parent 22b3c75a36
commit 3c0a229006
1 changed files with 3 additions and 5 deletions

View File

@ -236,8 +236,6 @@ char* LibCommErrMessage(void) {
return errBuf;
}
int LibCommClientSSLPasswd(SSL* pstContext, const char * path, const char * userName, LibCommConn * conn) {
char* CertFilesDir = NULL;
char CertFilesPath[MAXPATH] = {0};
@ -259,10 +257,10 @@ int LibCommClientSSLPasswd(SSL* pstContext, const char * path, const char * user
CertFilesDir = CertFilesPath;
get_parent_directory(CertFilesDir);
/*check whether the cipher and rand files begins with userName exist.
/*check whether the cipher and rand files beginning with userName exist.
if exist, decrypt it.
if not,decrypt the default cipher and rand files begins with client%.
Because,for every client user mayown certification and private key*/
if not,decrypt the default cipher and rand files begins with client.
Because,for every client user may own certification and private key*/
if (NULL == userName) {
retval = LibCommClientCheckPermissionCipherFile(CertFilesDir, conn, NULL);
if (retval != 1)