diff --git a/dist/ACME-PS/ACME-PS.psd1 b/dist/ACME-PS/ACME-PS.psd1 index fc1004c..cd592a6 100644 --- a/dist/ACME-PS/ACME-PS.psd1 +++ b/dist/ACME-PS/ACME-PS.psd1 @@ -85,7 +85,7 @@ ReleaseNotes = 'Please see the release notes from the release distribution page: https://github.com/PKISharp/ACME-PS/releases' # Prerelase - Prerelease = 'beta2' + # Prerelease = 'beta4' } # End of PSData hashtable } # End of PrivateData hashtable diff --git a/dist/ACME-PS/ACME-PS.psm1 b/dist/ACME-PS/ACME-PS.psm1 index 1812e3c..d39b60d 100644 --- a/dist/ACME-PS/ACME-PS.psm1 +++ b/dist/ACME-PS/ACME-PS.psm1 @@ -1231,7 +1231,7 @@ function ConvertFrom-UrlBase64 { process { $base64 = $InputText.Replace('-','+'); - $base64 = $base64.Replace('/', '_'); + $base64 = $base64.Replace('_', '/'); while($base64.Length % 4 -ne 0) { $base64 += '=' @@ -1457,8 +1457,8 @@ function New-ExternalAccountPayload { "alg" = $ExternalAccountAlgorithm; "kid" = $ExternalAccountKID; "url" = $url; - } | ConvertTo-Json -Compress - $eaPayload = $State.GetAccountKey().ExportPublicJwk() | ConvertTo-Json -Compress; + } | ConvertTo-Json -Compress | ConvertTo-UrlBase64 + $eaPayload = $State.GetAccountKey().ExportPublicJwk() | ConvertTo-Json -Compress | ConvertTo-UrlBase64; $eaHashContent = [Text.Encoding]::ASCII.GetBytes("$($eaHeader).$($eaPayload)"); $eaSignature = (ConvertTo-UrlBase64 -InputBytes $macAlgorithm.ComputeHash($eaHashContent)); @@ -1671,7 +1671,7 @@ function New-Account { The algorithm to be used to hash the external account binding. .PARAMETER ExternalAccountMACKey - The key to hash the external account binding object. + The key to hash the external account binding object (needs to be base64 or base64url encoded) .EXAMPLE