Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Previous commit had a but that would output the wrong error (partial) error message, then send an unwanted string down the Output stream.
  • Loading branch information
dlwyatt committed Jul 25, 2014
1 parent 3bb9b27 commit 2bf6367
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ProtectedData-Child.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
}
}

Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion ProtectedData.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 2bf6367

Please sign in to comment.