Skip to content

Commit

Permalink
Removing the trailing space from the password
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Mar 14, 2014
1 parent 2df3499 commit af14a63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions templates/import.ps1.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ $cert = gi <%= @location %>/<%= @name %>

switch -regex ($cert.Extension.ToUpper()) {
".CER|.DER" {
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %> ","Exportable,PersistKeySet")
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %>","Exportable,PersistKeySet")
}
".P7B|.SST" {
$pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
$pfx.Import([System.IO.File]::ReadAllBytes("<%= @location %>\\<%= @name %>"))
}
".PFX" {
$pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %> ","Exportable,PersistKeySet")
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %>","Exportable,PersistKeySet")
}
}

Expand Down
4 changes: 2 additions & 2 deletions templates/inspect.ps1.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ $pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2
$certificate = gi <%= @location %>\<%= @name %>
switch -regex ($certificate.Extension.ToUpper()) {
".CER|.DER" {
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %> ","Exportable,PersistKeySet")
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %>","Exportable,PersistKeySet")
}
".P7B|.SST" {
$pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
$pfx.Import([System.IO.File]::ReadAllBytes("<%= @location %>\\<%= @name %>"))
}
".PFX" {
$pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %> ","Exportable,PersistKeySet")
$pfx.import("<%= @location %>\\<%= @name %>","<%= @password %>","Exportable,PersistKeySet")
}
}

Expand Down

0 comments on commit af14a63

Please sign in to comment.