Visual studio signtool error

Hello, i'm always encountering this error (as in the title) when sign an dll file. I have use 'mmc->certmgr.msc' to verify and confirm that i do have the required certificate... any idea why i'm still encountering this error?

RRS feed

  • Remove From My Forums
  • Question

  • Hello, i’m always encountering this error (as in the title) when sign an dll file. I have use ‘mmc->certmgr.msc’ to verify and confirm that i do have the required certificate… any idea why i’m still encountering this error?

    • Moved by
      lake Xiao
      Friday, August 5, 2016 5:57 AM

All replies

  • Hi Andes,

    There are few things that can go wrong here:

    1) Check if the Certificate you are using is not expired

    2) Check if you are running cmd prompt as Administrator whenever trying to invoke signtool.

    3) Check if the private keys for your certificate is set correctly and the permissions for same (via cert management console) are set appropriately.

    Please mark the post as Answered if this resolves the issue.

    Cheers !

    Chirag 

    • Proposed as answer by
      .ChiragDave
      Thursday, August 4, 2016 10:18 AM

  • Hi Chirag,

    Thank you for your reply.

    For 1 & 2, I’m pretty sure it is not expired and I’m using the cmd prompt with the administrator privilege.

    But for 3, I’m just not sure how to check the private key and permission of the certificate in certmgr.msc? i couldn’t find anything like mentioned in the property of the related
    certificate.. 

  • hmmm… i thought signtool.exe is part of visual studio, isn’t it?

    anyway, i hope somebody out there from microsoft can help me to resolve this issue…

  • any response from anybody from microsoft support?

  • quite disappointing…

    somebody already started to provide assistance to my issue..

    but then somebody just anyhow moved it to another forum…

    and then just nobody replies to the thread any more…

    disappointing support…

  • Hi Andes,

    Sorry for late reply.

    >>»I’m just not sure how to check the private key and permission of the certificate in certmgr.msc»

    Which certificate did you use to sign the dll? You could  press [Windows+R] to open Run window, then input certmgr.msc and press [Enter]. A Certificates window will popup. Please mark sure your certificate has been installed and has been trusted
    by current user. If the certificate has not been installed, you could use following steps to import the certificate.

    In Certificates Window -> Click [Action] menu -> [All Tasks] -> [Import]…

    Best Regards,
    Li Wang


    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.

  • Hi Li Wang,

    Yes, my certificate has been installed and has been trusted by current user.

  • Hi Andes,

    Thank you for your feedback.

    Please add a /debug option to signtool command. It will show the detail information of sign steps. We will see what filter is causing your certificate not work.

    signtool sign /debug

    Best Regards,
    Li Wang


    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.

  • Hi Li Wang,

    below is the outcome:

    The following certificates were considered:

    … <list of all the certificates> …

    After EKU filter, 0 certs were left.
    After expiry filter, 0 certs were left.
    After Subject Name filter, 0 certs were left.
    After Private Key filter, 0 certs were left.
    SignTool Error: No certificates were found that met all the given criteria.

    it’s a bit strange, in the output list of the certificates, i really cannot find the specific certificate (name AAA). but in «certmgr.msc»—>»Certificates
    — Current User»—>»Trusted Publishers»—>»Certificates», i do see the certificate (name AAA).

    I checked the command output listed certificates. only the ones under «certmgr.msc»—>»Certificates
    — Current User»—>»Personal»—>»Certificates» are listed. all certificates under other folders (seen in certmgr.msc) are not listed out in the command output. why is it like that?

    if i export the certificate from «Trusted Publishers» and import it into «Personal» folder, and try the command again, below is the output:

    After EKU filter, 1 certs were left.
    After expiry filter, 1 certs were left.
    After Subject Name filter, 1 certs were left.
    After Private Key filter, 0 certs were left.
    SignTool Error: No certificates were found that met all the given criteria.

    Could you please advise me how to troubleshoot further?

    Thanks.

    • Edited by
      Andes Law
      Thursday, August 11, 2016 3:22 AM

  • «After Subject Name filter, 1 certs were left.

    After Private Key filter, 0 certs were left.«

    This might mean there is a difference between Private Key  mentioned in query and the one on certificate. But unfortunately,  this is also one of the most commonly reported wrong message by SignTool.

    Can you try searching for other instances of SignTool.exe on your machine or try other steps mentioned as in below post :

    http://stackoverflow.com/questions/28690986/code-signing-with-signtool-fails-due-to-private-key-filter

    Let me know what you find.

    Cheers !

    Chirag Dave

  • I have searched a few instances of SignTool.exe on my machine. And I have tried to use each individual signtool.exe to do the code signing and the result is the same.

    I have also read the above mentioned thread. basically it says it was due to the path environment variable messed up. I have tried in the command prompt, to set the path variable to empty. but signtool still has the same error.

  • hmm…

    nobody is providing any help again…

    hmm…

  • Any solutions to this? Im having the same issue.

  • Thank you..It resloved my issue.

Содержание

  1. Известные проблемы и устранение неполадок для SignTool
  2. Вопросы и ответы
  3. Visual studio signtool error
  4. Answered by:
  5. Question
  6. Answers
  7. Visual studio signtool error
  8. Answered by:
  9. Question
  10. Answers
  11. Visual studio signtool error
  12. Answered by:
  13. Question
  14. Answers
  15. Visual studio signtool error
  16. Лучший отвечающий
  17. Вопрос
  18. Ответы

Известные проблемы и устранение неполадок для SignTool

Наиболее распространенные типы ошибок при использовании SignTool являются внутренними и обычно выглядят примерно так:

Если код ошибки начинается с 0x8008, например 0x80080206 (APPX_E_CORRUPT_CONTENT), подписываемый пакет не является допустимым. При появлении такого типа ошибки, необходимо перестроить пакет и запустить SignTool еще раз.

В инструменте SignTool есть параметр отладки для показа ошибок с сертификатом и их фильтрации. Чтобы использовать функцию отладки, поместите параметр /debug сразу после sign , а затем полную команду SignTool.

Наиболее распространенная ошибка — 0x8007000B. О подобном типе ошибки можно найти дополнительные сведения в журнале событий.

Для получения дополнительных сведений в журнале событий:

  • Запустите Eventvwr.msc
  • Откройте журнал событий: Просмотр событий (локальный) —> журналы приложений и служб —> Microsoft —> Windows —> AppxPackagingOM —> Microsoft-Windows-AppxPackaging/Operational
  • Поиск последнего события об ошибке

Внутренняя ошибка 0x8007000B обычно соответствует одному из следующих значений:

Идентификатор события Пример строки события Предложение
150 ошибка 0x8007000B: имя издателя манифеста приложения (CN=Contoso) должно соответствовать имени субъекта сертификата подписи (CN=Contoso, C=US). Имя издателя манифеста приложения должно точно соответствовать имени субъекта подписи.
151 ошибка 0x8007000B: указанный хэш-метод подписи (SHA512) должен соответствовать хэш-методу, использованному в схеме блоков пакета приложения (SHA256). В параметре /fd указан неправильный HashAlgorithm. Повторно запустите SignTool, указав hashAlgorithm, совпадающий со схемой блоков пакета приложения (который использовался при создании пакета приложения)
152 Ошибка 0x8007000B: содержимого пакета приложения должно подходить под схему блоков. Пакет приложения поврежден и его необходимо перестроить для формирования новой схемы блока. Подробнее о ручном создании пакета приложения, см. Создания пакета приложения с помощью средства MakeAppx.exe.

Еще одна распространенная ошибка — 0x80080057. При попытке подписать переносимый исполняемый файл (PE) с помощью средства SignTool в Windows могут возникнуть следующие проблемы:

Не удается подписать PE-файл размером 4 гигабайта (ГБ) или больше. При попытке подписать вы получите сообщение об ошибке «Недопустимый параметр (0x80080057)».

Для файлов, размер которых превышает 4 ГБ, созданный хэш может быть не точным, даже если SignTool в противном случае может успешно подписать файл.

Это особенно верно для CAT-файлов.

Эта проблема возникает для таких файлов PE, как .exe, .sys и т. д. Эта проблема возникает из-за переменной ULONG в заголовке PE, указывающей размер изображения. (Размер образа составляет 2 ГБ для операционных систем нижнего уровня, таких как Vista и более ранние версии.) Это ограничение проектирования с 1996 года. Максимальное ограничение для этого значения составляет 4 ГБ для pe-файлов, таких как .exe и .sys. Хотя CAT-файлы обычно являются знаками, внутренний хэш, созданный, может быть не точным.

Чтобы обойти эту проблему, убедитесь, что любой PE-файл, который вы пытаетесь подписать, составляет менее 4 ГБ. Из-за рисков обратной совместимости в настоящее время возможны не резервные порты и постоянное исправление. Однако эта проблема расследуется.

Эта проблема не связана с SignTool. Конструкция заголовка PE ограничена 4 ГБ для Windows 7 и более поздних версий Windows, независимо от того, какое средство используется.

Вопросы и ответы

Вопрос 1. Какое текущее, официальное ограничение размера файла для цифровой подписи (и подписи счетчика меток времени) в Windows?

A1. Для файлов PE, таких как .exe и .sys, максимальный размер файла для подписывания составляет 4 ГБ.

Вопрос 2. Существует ли определенная версия Windows, например Windows Server 2016, которая имеет большую возможность подписывать большие файлы?

Ответ 2. Нет, проблема влияет на все версии Windows.

Вопрос 3. Имеет ли 64-разрядная версия Signtool лучшую поддержку этой функции, чем 32-разрядная версия?

Ответ. Нет, 64-разрядная версия SignTool использует те же значения, что и 32-разрядная версия. Поэтому проблема остается в 64-разрядной версии.

Вопрос 4. Могут ли клиенты, использующие 32-разрядную версию Windows, столкнуться с проблемами при попытке использовать файлы, подписанные с помощью 64-разрядной версии SignTool?

Ответ. Нет. Однако ограничения будут оставаться независимо от используемой версии SignTool.

Вопрос 5. Следует ли использовать другое средство подписывания или метод?

Ответ. В настоящее время у нас нет альтернативного метода цифровой подписи.

Источник

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I am moving from Visual Studio 2013 to Visual Studio 2017 (community). I have a couple of programs I developed in 2013 and have tried compile them in 2017 and get the following error:

SignTool Error: No certificates were found that met all the given criteria.

These would compile no problem in 2013 so what am I doing wrong?

Answers

Hi and thanks for the reply. I kind of resolved the issue on my own. Here is what I did to transfer over to 2017 and what I did to resolve the issue.

The type of project was a Visual Basic — Windows Forms Application. This was built using Visual Studio Express 2013.

I use cloud storage to hold my projects so that I can work on them from my desktop or my laptop and have the current version to work on. I installed Visual Studio 2017 community on my Laptop (keeping Visual Studio 2013 Express on my desktop).

In order to make sure that I don’t screw-up this project I made a complete copy of the project folder under a Visual Studio 2017 folder and started to work in that folder. This also copied the Certificate as that is in the project folder.

I then started to work on VS 2017 on my laptop.

When I got that error I went to the folder that held the certificate and double clicked it but for some reason it would not install (it actually opened in a notepad type of window). I know that sounds weird but that is what happened.

So what I did was I moved the certificate to the desktop (for safe keeping). I then opened the project in VS 2017 and deleted the certificate from the Solution Explorer Window. I then went to the Project > Properties > Signing window and checked the «Sign the Assembly» checkbox and signed it. I left the «Sign the ClickOnce Manifests» checkbox checked.

This installed a new temp certificate and I can now work on this project in 2017 on my laptop. I can now start testing to see how 2017 works and see if I want to move to this version.

Источник

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I’m using signtool to sign an exe file as following commands:

application.pfx is official file from Veri Sign organization, and I imported it into Persional Certificates as well as Trusted Root Certification Authorities of Local Computer and Current User.

I also tried to sign by using signwizard, it’s success but after verify the error occured

How to solve this error?

I also referenced to other link but still cannot solve.

Answers

Yep, the links you’ve provided is not clear on how to use the SignTool.exe.

Here is the detailed specifications on how to use the SignTool.exe:

You can’t verify the application since you failed to sign the application.

The examples in the link above will show you the way to sign your application. And you should make sure that whether the signatures has paswords or not. And whether the time-stamps files is correct or not.

If you have any questions, please feel free to tell us.

Neddy Ren [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Источник

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I’m using signtool to sign an exe file as following commands:

application.pfx is official file from Veri Sign organization, and I imported it into Persional Certificates as well as Trusted Root Certification Authorities of Local Computer and Current User.

I also tried to sign by using signwizard, it’s success but after verify the error occured

How to solve this error?

I also referenced to other link but still cannot solve.

Answers

Yep, the links you’ve provided is not clear on how to use the SignTool.exe.

Here is the detailed specifications on how to use the SignTool.exe:

You can’t verify the application since you failed to sign the application.

The examples in the link above will show you the way to sign your application. And you should make sure that whether the signatures has paswords or not. And whether the time-stamps files is correct or not.

If you have any questions, please feel free to tell us.

Neddy Ren [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Источник

Лучший отвечающий

Вопрос

I get the following error message when attempting to Publish my Visual Studio VB application:

Failed to sign binDebugapp.publish\setup.exe. SignTool Error: No certificates were found that met all of the given criteria.

Cannot publish because the project failed to build.

I’ve attempted signing the certificate for the setup.exe and building the project and rebuilding the project. All say they are successful, but the error persists.

Any help would be greatly appreciated.

Ответы

I think this issue is related to your *.pfx file , I suggest you to remove it from project ,and re-create it in project property ->Signing tab.

And you can also try to use Sign Tool sign project manually, here is the detailed specifications on how to use the SignTool.exe:

SignTool.exe (Sign Tool):

You can’t verify the application since you failed to sign the application.

The examples in the link above will show you the way to sign your application. And you should make sure that whether the signatures has paswords or not. And whether the time-stamps files is correct or not.

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.

Источник

12 / 12 / 0

Регистрация: 04.07.2011

Сообщений: 287

1

14.08.2015, 10:47. Показов 17792. Ответов 12


Добрый вечер!

Не удается скомпилировать проект:
C#, WPF
.net framework 4
В подписывании выбраны и подпись манифеста click once и подпись сборки

При попытке скомпилировать вылезает следующая ошибка:
При подписи произошла ошибка: Файл SignTool.exe не найден

Система:
Windows 10 (лицензия, с последними обновлениями)
Visual Studio Community 2015 (тоже последняя)

Что делать?

И другой вопрос:
Как убрать сообщение о неизвестном издателе при установке через Click Once (а так же при запуске программы) ?

Добавлено через 13 часов 50 минут
Ребят, мне это срочно надо

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Ушел с форума

Эксперт С++

16454 / 7418 / 1186

Регистрация: 02.05.2013

Сообщений: 11,617

Записей в блоге: 1

14.08.2015, 13:37

2

Цитата
Сообщение от robertono
Посмотреть сообщение

Как убрать сообщение о неизвестном издателе

Купить себе Authenticode-сертификат у одного из удостоверяющих центров —
Symantec, DigiCert, GlobalSign, Thawte, COMODO, StartSsl, GoDaddy…

Если развертывание выполняется в закрытой среде, можно сделать самопальный
сертификат (makecert.exe) и установить его в хранилище системы, тогда
тоже будет «доверенный издатель».



1



12 / 12 / 0

Регистрация: 04.07.2011

Сообщений: 287

14.08.2015, 14:58

 [ТС]

3

Убежденный, а сертификат созданный в makecert будет работать на других компьютерах? Или сертификат будет работать (доверенный издатель) только на моем пк ?



0



Ушел с форума

Эксперт С++

16454 / 7418 / 1186

Регистрация: 02.05.2013

Сообщений: 11,617

Записей в блоге: 1

14.08.2015, 14:59

4

Будет работать на всех компьютерах, где вы его предварительно установите.
В этом и смысл покупки сертификата у одного из центров — их корневые
сертификаты уже предустановлены в Windows.



1



12 / 12 / 0

Регистрация: 04.07.2011

Сообщений: 287

14.08.2015, 15:08

 [ТС]

5

Убежденный, т.е. если кто то запустит установщик Click Once, то я не смогу убрать слово неизвестный издатель ? (ведь мне нужно каким то образом перед этим установить сертификат)



0



Ушел с форума

Эксперт С++

16454 / 7418 / 1186

Регистрация: 02.05.2013

Сообщений: 11,617

Записей в блоге: 1

14.08.2015, 15:13

6

Да, именно так.
Если файл не подписан сертификатом (купленным у какого-нибудь Symantec или
самопальным, но предварительно установленным в хранилище системы), то
будет «неизвестный издатель».



0



12 / 12 / 0

Регистрация: 04.07.2011

Сообщений: 287

14.08.2015, 16:19

 [ТС]

7

Убежденный, Значит бесплатно неизвестного издателя никак не убрать?



0



Ушел с форума

Эксперт С++

16454 / 7418 / 1186

Регистрация: 02.05.2013

Сообщений: 11,617

Записей в блоге: 1

14.08.2015, 18:35

8

Никак.



0



50 / 49 / 13

Регистрация: 23.11.2015

Сообщений: 401

24.07.2016, 16:01

9

Извиняюсь за подъем старой темы. Столкнулся с этой же проблемой. А что делать, если я не фирма, а частный разработчик и только учусь вообще что-либо делать.. хотел изучить VB .Net, после опыта работы с VBA в Excel. Мне тоже надо покупать сертификат, что бы кому то показать мои «хэллоу ворлды» ? Студия комьюнти 2015 не публикует.. про подписи произошла ошибка…



0



Ушел с форума

Эксперт С++

16454 / 7418 / 1186

Регистрация: 02.05.2013

Сообщений: 11,617

Записей в блоге: 1

24.07.2016, 16:11

10

Цитата
Сообщение от TurboDuck
Посмотреть сообщение

Мне тоже надо покупать сертификат, что бы кому то показать мои «хэллоу ворлды» ?

Нет.
Сертификат нужен для того, чтобы конечный пользователь мог убедиться в
целостности файла, а также в том, что именно ты являешься издателем этого
файла, а не кто-то другой. Ну и еще сертификаты позволяют смягчать некоторые
проблемы с антивирусами, SmartScreen и т.п.



1



50 / 49 / 13

Регистрация: 23.11.2015

Сообщений: 401

24.07.2016, 17:13

11

Тогда как мне собрать программу из Visual Studio Community 2015? Пишет во время публикации signtool.exe не найден в папке с VB..

Добавлено через 31 минуту
Ни собирает, ни строит… конфигурация release … «Ошибка сборки… при подписи произошла ошибка. Не удалось найти SignTool.exe… »



0



Ушел с форума

Эксперт С++

16454 / 7418 / 1186

Регистрация: 02.05.2013

Сообщений: 11,617

Записей в блоге: 1

24.07.2016, 22:22

12

Скорее всего, это проблема неправильно настроенной (или неправильно
установленной) среды. Решения см. здесь, например:

[VS2015] “An error occurred while signing: SignTool.exe not found”
http://blog.repsaj.nl/index.ph… not-found/



2



50 / 49 / 13

Регистрация: 23.11.2015

Сообщений: 401

25.07.2016, 07:05

13

Спасибо!

Добавлено через 30 минут
Спасибо! Только причем тут веб, если я Windows Form Project делаю..
Самое главное, что скинутое решение для студии Enterprise, все настройки в Community излазил, не могу найти где залить расширение «Click Once Publishing Tools» — если я правильно понял в нем проблема?

Добавлено через 11 минут
Вот решение подробно расписано:

http://stackoverflow.com/quest… -not-found



0



Понравилась статья? Поделить с друзьями:
  • Vipnet csp при подготовке к установке возникла ошибка возможно выполняется другая установка
  • Visual studio runtime library error
  • Vipnet csp ошибка неверный сертификат
  • Vipnet csp гост 2012 256 ошибка при получении контекста модуля криптографии
  • Vipnet csp гост 2001 не установлена на компьютере ошибка при получении контекста модуля криптографии