Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Created March 14, 2024 17:23
Show Gist options
  • Select an option

  • Save unitycoder/3e61459c367d0273b49b83fcf49c17e2 to your computer and use it in GitHub Desktop.

Select an option

Save unitycoder/3e61459c367d0273b49b83fcf49c17e2 to your computer and use it in GitHub Desktop.

Revisions

  1. unitycoder revised this gist Mar 14, 2024. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion uwp-cloudbuild.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    ```
    // https://forum.unity.com/threads/codesign-a-windows-build.1558505/
    $password = ConvertTo-SecureString -String \"#{password}\" -Force -AsPlainText
     
    @@ -6,4 +7,5 @@ $subject_name = (Get-PfxData -FilePath "$filePath" -Password $password | Select-
    $subject_name = $subject_name -replace 'CN=', ''
    Import-PfxCertificate -FilePath $filePath -CertStoreLocation Cert:\\LocalMachine\\My -Password $password
     
    & signtool.exe sign /a /sm /n $subject_name /fd SHA256 "$fileToSign"
    & signtool.exe sign /a /sm /n $subject_name /fd SHA256 "$fileToSign"
    ```
  2. unitycoder created this gist Mar 14, 2024.
    9 changes: 9 additions & 0 deletions uwp-cloudbuild.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    // https://forum.unity.com/threads/codesign-a-windows-build.1558505/
    $password = ConvertTo-SecureString -String \"#{password}\" -Force -AsPlainText

    $subject_name = (Get-PfxData -FilePath "$filePath" -Password $password | Select-Object -ExpandProperty EndEntityCertificates | Select-Object -ExpandProperty SubjectName).Name

    $subject_name = $subject_name -replace 'CN=', ''
    Import-PfxCertificate -FilePath $filePath -CertStoreLocation Cert:\\LocalMachine\\My -Password $password

    & signtool.exe sign /a /sm /n $subject_name /fd SHA256 "$fileToSign"