none
How do I verify that an assembly has an Enhanced Strong Name? RRS feed

  • Question

  • "sn -v myAssembly.dll" tells me if it has a strong name, but I don't know how to find out if it has an Enhanced Strong Name. A command-line solution is very much preferred, since that's easier to incorporate into our build system.

    Thanks,

    John


    John Dallman

    Wednesday, June 10, 2015 9:13 AM

Answers

  • Hello John,

    >> A command-line solution is very much preferred, since that's easier to incorporate into our build system.

    You could use the –Tp command which could display the public key in addition to the token. If the AssemblySignatureKeyAttribute attribute has been applied to the assembly, the token is for the identity key, and the name of the hash algorithm and the identity key is displayed.

    If the assembly is signed with the SAH1, it would show the algorithm is SAH1 as below:

    If the assembly is signed with SHA256, it would show the algorithm is SAH256.

    If the assembly is migrated from SHA1 to SHA256, it would show both the hash algorithm for both identity key and signature key:

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by John Dallman Thursday, June 11, 2015 9:41 AM
    Thursday, June 11, 2015 2:31 AM
    Moderator

All replies

  • Hello John,

    >> A command-line solution is very much preferred, since that's easier to incorporate into our build system.

    You could use the –Tp command which could display the public key in addition to the token. If the AssemblySignatureKeyAttribute attribute has been applied to the assembly, the token is for the identity key, and the name of the hash algorithm and the identity key is displayed.

    If the assembly is signed with the SAH1, it would show the algorithm is SAH1 as below:

    If the assembly is signed with SHA256, it would show the algorithm is SAH256.

    If the assembly is migrated from SHA1 to SHA256, it would show both the hash algorithm for both identity key and signature key:

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by John Dallman Thursday, June 11, 2015 9:41 AM
    Thursday, June 11, 2015 2:31 AM
    Moderator
  • Thanks, that will do nicely.

    John Dallman

    Thursday, June 11, 2015 9:41 AM