From 2bf6367e157ce3d9779d45a52ba59ea6b06ffee7 Mon Sep 17 00:00:00 2001 From: Dave Wyatt Date: Fri, 25 Jul 2014 11:05:16 -0400 Subject: [PATCH] Bug fix Previous commit had a but that would output the wrong error (partial) error message, then send an unwanted string down the Output stream. --- ProtectedData-Child.psm1 | 8 ++++---- ProtectedData.psd1 | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ProtectedData-Child.psm1 b/ProtectedData-Child.psm1 index 1a8d778..8d958f2 100644 --- a/ProtectedData-Child.psm1 +++ b/ProtectedData-Child.psm1 @@ -147,8 +147,8 @@ function Protect-Data if ($certs.Count -eq 0 -and $Password.Count -eq 0) { - throw 'None of the specified certificates could be used for encryption, and no passwords were specified.' + - ' Data protection cannot be performed.' + throw ('None of the specified certificates could be used for encryption, and no passwords were specified.' + + ' Data protection cannot be performed.') } } @@ -1050,8 +1050,8 @@ function ValidateKeyEncryptionCertificate if ($keyUsageFound -and ($keyUsageFlags -band $keyEncipherment) -ne $keyEncipherment) { - Write-Error "Certificate '$($Certificate.Thumbprint)' contains a Key Usage extension which does not " + - "allow Key Encipherment." + Write-Error ("Certificate '$($Certificate.Thumbprint)' contains a Key Usage extension which does not" + + "allow Key Encipherment.") return } diff --git a/ProtectedData.psd1 b/ProtectedData.psd1 index bff48a6..cdbf9f5 100644 --- a/ProtectedData.psd1 +++ b/ProtectedData.psd1 @@ -8,7 +8,7 @@ @{ ModuleToProcess = 'ProtectedData.psm1' - ModuleVersion = '0.0.0.1' + ModuleVersion = '1.0.0.1' GUID = 'fc6a2f6a-563d-422a-85b5-9638e45a370e' Author = 'Dave Wyatt' CompanyName = 'Home'