VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-11-25 01:41:37 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-11-26 01:44:52 +0100
commit90bd57fe40e66fc829ecb01482d32d604b0df19c (patch)
tree6d6de0d9a31c82d0598f68c2d160cb9e565bd5ea /src/Driver
parentec7d96fcb733021c214b414a1ba2841039733dd2 (diff)
downloadVeraCrypt-90bd57fe40e66fc829ecb01482d32d604b0df19c.tar.gz
VeraCrypt-90bd57fe40e66fc829ecb01482d32d604b0df19c.zip
Windows: Full UNICODE rewrite and implement support for UNICODE passwords.
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/DriveFilter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index 9fcf3078..d5daf89f 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -13,6 +13,7 @@
#include "TCdefs.h"
#include <ntddk.h>
#include <ntddvol.h>
+#include <Ntstrsafe.h>
#include "Cache.h"
#include "Crc.h"
#include "Crypto.h"
@@ -1812,9 +1813,14 @@ void GetBootEncryptionAlgorithmName (PIRP irp, PIO_STACK_LOCATION irpSp)
{
if (BootDriveFilterExtension && BootDriveFilterExtension->DriveMounted)
{
+ wchar_t BootEncryptionAlgorithmNameW[256];
+ wchar_t BootPrfAlgorithmNameW[256];
GetBootEncryptionAlgorithmNameRequest *request = (GetBootEncryptionAlgorithmNameRequest *) irp->AssociatedIrp.SystemBuffer;
- EAGetName (request->BootEncryptionAlgorithmName, BootDriveFilterExtension->Queue.CryptoInfo->ea, 0);
- HashGetName2 (request->BootPrfAlgorithmName, BootDriveFilterExtension->Queue.CryptoInfo->pkcs5);
+ EAGetName (BootEncryptionAlgorithmNameW, BootDriveFilterExtension->Queue.CryptoInfo->ea, 0);
+ HashGetName2 (BootPrfAlgorithmNameW, BootDriveFilterExtension->Queue.CryptoInfo->pkcs5);
+
+ RtlStringCbPrintfA (request->BootEncryptionAlgorithmName, sizeof (request->BootEncryptionAlgorithmName), "%S", BootEncryptionAlgorithmNameW);
+ RtlStringCbPrintfA (request->BootPrfAlgorithmName, sizeof (request->BootPrfAlgorithmName), "%S", BootPrfAlgorithmNameW);
irp->IoStatus.Information = sizeof (GetBootEncryptionAlgorithmNameRequest);
irp->IoStatus.Status = STATUS_SUCCESS;