

Mark-
Members-
Content Count
313 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Mark-
-
I changed them for the post. The actual ones are correct, as far as I know. The "CodeSigningAccountName" from here: "CertificateProfileName" from here:
-
Thank you. I recreated the client secret and the error changed. 🙂 Not sure what it means. Perhaps Azure is having a problem at the moment? Trusted Signing Version: 1.0.59 "Metadata": { "Endpoint": "https://eus.codesigning.azure.net/", "CodeSigningAccountName": "NameZ", "CertificateProfileName": "ProfileZ", "ExcludeCredentials": [] } Submitting digest for signing... Unhandled managed exception Azure.RequestFailedException: Service request failed. Status: 403 (Forbidden) Headers: Date: Fri, 31 May 2024 12:15:50 GMT Connection: keep-alive Strict-Transport-Security: REDACTED x-azure-ref: REDACTED X-Cache: REDACTED Content-Length: 0 at Azure.CodeSigning.CertificateProfileRestClient.SignAsync(String codeSigningAccountName, String certificateProfileName, SignRequest body, String xCorrelationId, String clientVersion, CancellationToken cancellationToken) 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)
-
Thanks for the response. I added the "ExcludeCredentials" after it did not work when I read on SO someone say adding them worked from them. Yes, I am using a batch file. Where I am getting the "CodeSigningAccountName" is the correct location? I removed the "ExcludeCredentials" from the json file and ran it again. Took awhile to complete. The results are much different, same error code: SignerSign() failed." (-2147467259/0x80004005) I see this: "Original exception: AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID,..." Sticks out. I know the secret is correct and it appears it can not be changed in Azure. I assume I will need to generate another cert? Or look for...?
-
OK, got it to at least try and sign the exe. Still not sure about " CodeSigningAccountName" Trusted Signing Version: 1.0.59 "Metadata": { "Endpoint": "https://eus.codesigning.azure.net/", "CodeSigningAccountName": "TheName", "CertificateProfileName": "TheCert", "ExcludeCredentials": [ "ManagedIdentityCredential", "EnvironmentCredential", "WorkloadIdentityCredential", "SharedTokenCacheCredential", "VisualStudioCredential", "VisualStudioCodeCredential", "AzurePowerShellCredential", "AzureDeveloperCliCredential", "InteractiveBrowserCredential" ] } Submitting digest for signing... Unhandled managed exception Azure.Identity.CredentialUnavailableException: Azure CLI not installed at Azure.Identity.DefaultAzureCredential.GetTokenFromSourcesAsync(TokenCredential[] sources, TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken) at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken) at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage, Boolean isCredentialUnavailable) at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken) at Azure.Identity.DefaultAzureCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetHeaderValueFromCredentialAsync(TokenRequestContext context, Boolean async, CancellationToken cancellationToken) at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async) at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async) at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AuthenticateAndAuthorizeRequestAsync(HttpMessage message, TokenRequestContext context) at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async) at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async) at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async) at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async) at Azure.CodeSigning.CertificateProfileRestClient.SignAsync(String codeSigningAccountName, String certificateProfileName, SignRequest body, String xCorrelationId, String clientVersion, CancellationToken cancellationToken) 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) And this: Azure.Identity.CredentialUnavailableException: Azure CLI not installed "not installed"?
-
Hello, Thought I had it all set up but no joy so looking at everything, get this: The following certificates were considered: After EKU filter, 0 certs were left. After expiry filter, 0 certs were left. SignTool Error: No certificates were found that met all the given criteria. "CodeSigningAccountName" The name under the green: Thanks, Mark
-
I did that a few days ago out of curiosity. I did it a function at a time so it needs work to make it workable. procedure FindDesktopFolderView(riid: TGUID; var ppv: Pointer); var spShellWindows: IShellWindows; vtLoc: OleVariant; vtEmpty: OleVariant; lhwnd: LongInt; spdisp: IDispatch; spBrowser: IShellBrowser; spView: IShellView; begin spShellWindows := CoShellWindows.Create; vtLoc := CSIDL_DESKTOP; vtEmpty := VarEmpty; spShellWindows.FindWindowSW(vtLoc, vtEmpty, SWC_DESKTOP, lhwnd, SWFO_NEEDDISPATCH, spdisp); spBrowser := (spdisp as IServiceProvider).QueryService(SID_STopLevelBrowser, IShellBrowser) as IShellBrowser; spBrowser.QueryActiveShellView(spView); spView.QueryInterface(riid, ppv); end; ----------------- program DesktopFolderView; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, ActiveX, ComObj, ShlObj, ShellAPI; // CCoInitialize incorporated by reference function wmain(argc: Integer; argv: PWideChar): Integer; var init: IUnknown; // Equivalent to CCoInitialize spView: IFolderView; spFolder: IShellFolder; spEnum: IEnumIDList; spidl: PItemIDList; str: TStrRet; spszName: PWideChar; pt: TPoint; begin init := CreateComObject(CLSID_CoInitialize); FindDesktopFolderView(IID_IFolderView, spView); spView.GetFolder(IID_IShellFolder, spFolder); spView.Items(SVGIO_ALLVIEW, IID_IEnumIDList, spEnum); while spEnum.Next(1, spidl, nil) = S_OK do begin spFolder.GetDisplayNameOf(spidl, SHGDN_NORMAL, str); StrRetToStr(@str, spidl, spszName); spView.GetItemPosition(spidl, pt); Writeln(Format('At %4d,%4d is %s', [pt.x, pt.y, WideString(spszName)])); CoTaskMemFree(spidl); end; Result := 0; end; begin try CoInitialize(nil); wmain(ParamCount, PWideChar(ParamStr(0))); CoUninitialize; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. --------------------------- program DesktopFolderRandomPosition; {$APPTYPE CONSOLE} uses System.SysUtils, ActiveX, ComObj, ShlObj, ShellAPI, Windows; function wmain(argc: Integer; argv: PWideChar): Integer; var init: IUnknown; // Equivalent to CCoInitialize spView: IFolderView; spEnum: IEnumIDList; spidl: PItemIDList; pt: TPoint; apidl: array[0..0] of PItemIDList; begin init := CreateComObject(CLSID_CoInitialize); FindDesktopFolderView(IID_IFolderView, spView); spView.Items(SVGIO_ALLVIEW, IID_IEnumIDList, spEnum); while spEnum.Next(1, spidl, nil) = S_OK do begin spView.GetItemPosition(spidl, pt); pt.x := pt.x + (Random(5) - 2); pt.y := pt.y + (Random(5) - 2); apidl[0] := spidl; spView.SelectAndPositionItems(1, @apidl[0], @pt, SVSI_POSITIONITEM); CoTaskMemFree(spidl); end; Result := 0; end; begin try CoInitialize(nil); Randomize; // Initialize random number generator wmain(ParamCount, PWideChar(ParamStr(0))); CoUninitialize; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. ------------------------------------ procedure SavePositions(pView: IFolderView; pszFile: PWideChar); var spStream: IStream; spEnum: IEnumIDList; spidl: PItemIDList; pt: TPoint; begin SHCreateStreamOnFileEx(pszFile, STGM_CREATE or STGM_WRITE, FILE_ATTRIBUTE_NORMAL, True, nil, spStream); pView.Items(SVGIO_ALLVIEW, IID_IEnumIDList, spEnum); while spEnum.Next(1, spidl, nil) = S_OK do begin WritePidlToStream(spStream, spidl); // Custom function to write PIDL to stream pView.GetItemPosition(spidl, pt); WritePointToStream(spStream, pt); // Custom function to write POINT to stream ILFree(spidl); // Free the PIDL end; end; ----------------------------------- procedure RestorePositions(pView: IFolderView; pszFile: PWideChar); var spStream: IStream; spidl: PItemIDList; pt: TPoint; apidl: array[0..0] of PItemIDList; begin // Create a file stream SHCreateStreamOnFileEx(pszFile, STGM_READ, FILE_ATTRIBUTE_NORMAL, False, nil, spStream); // Read PIDLs and their positions from the stream and restore them while Succeeded(IStream_ReadPidl(spStream, spidl)) and Succeeded(spStream.Read(@pt, SizeOf(pt), nil)) do begin apidl[0] := spidl; pView.SelectAndPositionItems(1, @apidl[0], @pt, SVSI_POSITIONITEM); CoTaskMemFree(spidl); // Free the PIDL end; end; // Note: IStream_ReadPidl is a placeholder for the actual function you would use to read a PIDL from a stream. // You will need to implement this functionality in Delphi, as it is not provided by Delphi's standard libraries.
-
Hello, Anyone have suggestions for hardware/software for "Controller Area Network" (CAN) bus support for Windows using VCL? Thanks, Mark
-
Writing if statement in the Code Editor
Mark- replied to PeterPanettone's topic in Delphi IDE and APIs
Interesting, works on both monitors, on both computers here. Both computer's monitors, are arranged like this: -
Writing if statement in the Code Editor
Mark- replied to PeterPanettone's topic in Delphi IDE and APIs
SHIFT + Windows key + S, allows to capture a part of the screen via click and drag the mouse. -
Yeah that was the catalyst for posting here and the webpage of "tinyBigGAMES LLC" did not have it listed. I wonder if he sold his work.
-
Writing if statement in the Code Editor
Mark- replied to PeterPanettone's topic in Delphi IDE and APIs
Does it change if you use the dark theme? -
Has this endeavor (CPas) ended?
-
Writing if statement in the Code Editor
Mark- replied to PeterPanettone's topic in Delphi IDE and APIs
Delphi 10.2 Version 25.0.31059.3231 If I turn on hints, this is how the hint is displayed: -
Hello, Delphi Delphi 10.2 Version 25.0.31059.3231 I have never used the IDE macro feature. Recently the three button controls appeared in the lower left of all code editor windows. The controls may have been in the window, not causing an issue. The controls are blocking the line and column values for the caret position. Any idea how to fix or hide the controls. Thanks, Mark
-
Yes, the buttons show up as normal. Something to do with the theme and IDE foremost application I just started with dark and the buttons are not visible. Switch to light, appear, back to dark, still present. Switched to another application, back to IDE and buttons disappear. At least I now know how to get the buttons to the right location.
-
Thanks. That placement was what I recalled. Started the IDE this morning and the macro buttons are not present. Switched from dark to light theme and back to dark, result: Go figure.
-
Confused I am. Now I have one IDE code window with the macro controls visible and one without the controls visible.
-
Thanks
-
Thanks.
-
What is "dragon4"?
-
Thanks for all the replies.
-
24 minutes.
-
Hello, Delphi-ONVIF-master is around, never used it. I wrote some code to use ONVIF for PTZ control. Did not use the video portion of the ONVIF specifiation For video, most cameras our customers use are MJPEG or RTSP and the video portion of ONVIF did not add any value. At the time ONVIF PTZ compliance was...marketed but not 100%. Still made it work. 🙂 Good luck, Mark
- 1 reply
-
- delphi 10.2;
- onvif
-
(and 1 more)
Tagged with: