Add missing ssl_sha1_clear()/ssl_md5_clear() calls

This commit is contained in:
matt335672
2022-01-20 16:43:00 +00:00
parent d853228c19
commit d02059d967
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -55,6 +55,7 @@ env_check_password_file(const char *filename, const char *passwd)
/* create password hash from password */
passwd_bytes = g_strlen(passwd);
sha1 = ssl_sha1_info_create();
ssl_sha1_clear(sha1);
ssl_sha1_transform(sha1, "xrdp_vnc", 8);
ssl_sha1_transform(sha1, passwd, passwd_bytes);
ssl_sha1_transform(sha1, passwd, passwd_bytes);
+1
View File
@@ -94,6 +94,7 @@ rfbHashEncryptBytes(char *bytes, const char *passwd)
/* create password hash from password */
passwd_bytes = g_strlen(passwd);
sha1 = ssl_sha1_info_create();
ssl_sha1_clear(sha1);
ssl_sha1_transform(sha1, "xrdp_vnc", 8);
ssl_sha1_transform(sha1, passwd, passwd_bytes);
ssl_sha1_transform(sha1, passwd, passwd_bytes);
+1
View File
@@ -174,6 +174,7 @@ xrdp_bitmap_hash_crc(struct xrdp_bitmap *self)
return 1;
}
hash = ssl_md5_info_create();
ssl_md5_clear(hash);
ssl_md5_transform(hash, self->data, bytes);
ssl_md5_complete(hash, hash_data);
ssl_md5_info_delete(hash);