I'm trying to sign my MSI file using the following PowerShell command:
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /v /fd SHA256 /tr "; /td SHA256 /dlib "C:\Users\DELL\AppData\Local\Microsoft\MicrosoftTrustedSigningClientTools\Azure.CodeSigning.Dlib.dll" /dmdf "D:\APPSign\metadata.json" "D:\Projects\App\APPWPF\Debug\APPWPF.msi"
However, I am encountering the following error:
Trusted Signing
Version: 1.0.68
"Metadata": { "Endpoint": "", // here I have added URL for my selected region "CodeSigningAccountName": "myapp",
"ExcludeCredentials": [] }Submitting digest for signing... Unhandled managed exception System.ArgumentNullException: Value cannot be null. (Parameter 'certificateProfileName') at Azure.CodeSigning.CertificateProfileClient.StartSignAsync(String codeSigningAccountName, String certificateProfileName, SignRequest body, String xCorrelationId, String clientVersion, CancellationToken cancellationToken) at Azure.CodeSigning.Dlib.Core.DigestSigner.SignAsync(UInt32 algorithm, Byte[] digest, SafeFileHandle safeFileHandle, CancellationToken cancellationToken) at Azure.CodeSigning.Dlib.Core.DigestSigner.Sign(UInt32 algorithm, Byte[] digest, SafeFileHandle safeFileHandle) at AuthenticodeDigestSignExWithFileHandleManaged(_CRYPTOAPI_BLOB* pMetadataBlob, UInt32 digestAlgId, Byte* pbToBeSignedDigest, UInt32 cbToBeSignedDigest, Void* hFile, _CRYPTOAPI_BLOB* pSignedDigest, _CERT_CONTEXT** ppSignerCert, Void* hCertChainStore)
SignTool Error: An unexpected internal error has occurred. Error information: "Error: SignerSign() failed." (-2147467259/0x80004005)
Currently, my metadata.json file contains the following:
{
"Endpoint": "", // here I have added URL for my selected region
"CodeSigningAccountName": "myapp",
"SigningProfileName": "myapp", // account and certificate name is same
}
Are there any other required fields that I might be missing in the JSON file? Or I am filling wrong value here? What could be causing the System.ArgumentNullException related to certificateProfileName?
I'm trying to sign my MSI file using the following PowerShell command:
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" sign /v /fd SHA256 /tr "http://tsa.msign.microsoft" /td SHA256 /dlib "C:\Users\DELL\AppData\Local\Microsoft\MicrosoftTrustedSigningClientTools\Azure.CodeSigning.Dlib.dll" /dmdf "D:\APPSign\metadata.json" "D:\Projects\App\APPWPF\Debug\APPWPF.msi"
However, I am encountering the following error:
Trusted Signing
Version: 1.0.68
"Metadata": { "Endpoint": "", // here I have added URL for my selected region "CodeSigningAccountName": "myapp",
"ExcludeCredentials": [] }Submitting digest for signing... Unhandled managed exception System.ArgumentNullException: Value cannot be null. (Parameter 'certificateProfileName') at Azure.CodeSigning.CertificateProfileClient.StartSignAsync(String codeSigningAccountName, String certificateProfileName, SignRequest body, String xCorrelationId, String clientVersion, CancellationToken cancellationToken) at Azure.CodeSigning.Dlib.Core.DigestSigner.SignAsync(UInt32 algorithm, Byte[] digest, SafeFileHandle safeFileHandle, CancellationToken cancellationToken) at Azure.CodeSigning.Dlib.Core.DigestSigner.Sign(UInt32 algorithm, Byte[] digest, SafeFileHandle safeFileHandle) at AuthenticodeDigestSignExWithFileHandleManaged(_CRYPTOAPI_BLOB* pMetadataBlob, UInt32 digestAlgId, Byte* pbToBeSignedDigest, UInt32 cbToBeSignedDigest, Void* hFile, _CRYPTOAPI_BLOB* pSignedDigest, _CERT_CONTEXT** ppSignerCert, Void* hCertChainStore)
SignTool Error: An unexpected internal error has occurred. Error information: "Error: SignerSign() failed." (-2147467259/0x80004005)
Currently, my metadata.json file contains the following:
{
"Endpoint": "", // here I have added URL for my selected region
"CodeSigningAccountName": "myapp",
"SigningProfileName": "myapp", // account and certificate name is same
}
Are there any other required fields that I might be missing in the JSON file? Or I am filling wrong value here? What could be causing the System.ArgumentNullException related to certificateProfileName?
Share Improve this question asked Mar 21 at 9:13 MANSIMANSI 593 silver badges8 bronze badges 1- Maybe an authentication issue? Is the Azure CLI installed and configured for your account? – Emmanuel Bourg Commented Mar 21 at 15:51
1 Answer
Reset to default 0The issue resolved when i made changes in metadata.josn file:
{
"Endpoint": "",
"CodeSigningAccountName": "myapp",
"CertificateProfileName": "myapp"
}
Here i replace SigningProfileName with CertificateProfileName and it worked
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744364119a4570613.html
评论列表(0条)