How to Authenticode sign ClickOnce deployment with an EV SHA2 cert and avoid "Unknown Publisher" -


when signing clickonce deployment via visual studio's project "signing" settings page specified our sha2 (sha256) ev authenticode certificate , publish.

enter image description here

after publishing , attempting run bootstrapper (setup.exe) i'm presented "unknown publisher" in clickonce dialog.

enter image description here

the ev certificate in question valid , running on etoken hardware token safenet client tools communicating token. signing regular pe files (exe , dll) signtool produces valid assemblies , publisher known. this issue clickonce deployments. in addition, individual files of clickonce deployment valid because digital signatures tab of file properties dialog listed correctly bootstrapper (setup.exe) , assembly files suffixed ".deploy".

enter image description here

also, ".application" , ".manifest" files appropriately mutated (probably via mage visual studio) contain <publisheridentity> element along algorithm set correctly.

enter image description here

the signing machine running win10 , i've tried every permutation imagine:

  • with , without timestamp
  • with , without strong name signing
  • with , without online publishing
  • with , without https online publishing
  • with , without specific "update location" via publish page
  • with , without "publisher name" set via description in publish page
  • with every combination of manifest options:
    • exclude deployment provider url
    • block application being activated via url
    • use application manifest trust information
  • multiple machines on various versions of windows
  • manual manifest signing , assembly signing via mage , signtool (yes mageui well)
  • ensure cert not revoked certificate provider

there appears someone else experiencing this.

the reason occurs due a couple of factors:

  1. clickonce displays "unknown publisher" when using sha2 authenticode certificate.
  2. on january 1st 2016 windows deprecated sha1 authenticode signing /code signing. windows smartscreen technology displays "unknown publisher" when using sha1 authenticode certificate.

this in effect catch-22, need sha1 clickonce publisher verification , sha2 smartscreen. nice.

work certificate provider (hopefully true ca) sha1 and sha2 certificate. folks @ digicert great. must work ca in cases because if have own sha2 cert , work them sha1 cert (or vica-versa), auto-revoke existing certificates have them. in case of digicert able prevent automatic revocation when explained wanted try (dual signing).

after you've installed on ev token, configure visual studio sign clickonce manifests sha1 certificate. ideally you'll supply timestamp server in same dialog eventual expiration of certificate.

enter image description here

after publishing clickonce deployment locally , before distributing, dual sign clickonce bootstrapper (setup.exe) appending sha2 certificate.

signtool.exe sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /as /sha1 yourcertthumbprinthash "x:\deployment\clickoncecert\setup.exe" 

note, 1 way find cert thumbprint via certificates mmc snap-in. , yes, thumbprints supposed sha1 sha2 certs.

enter image description here

now, bootstapper shows both of certificates in digital signatures tab of file properties dialog.

enter image description here

when run setup.exe location specified "installation folder url" of publish page in visual studio, should see publisher trusted. it's important understand installation folder because if run app location should expect not trusted because bootstrapper make calls known installation folder retrieve application files.

enter image description here


Comments

Popular posts from this blog

php - isset function not working properly -

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -