All Activity
This stream auto-updates
- Today
-
TSslCertTools for generate CSR
Eric Winfly replied to Eric Winfly's topic in ICS - Internet Component Suite
Angus could you please find me a solution to Encrypt RSA Text from public key with Ics because i always receive libcrypto-3.dll access violation. I have try your new version 9.5 with deprectec_openssl activate but this not work, i have update openssl dll to the lastest 2.5.2 but always have acces violation ? If i need to use an older version for Ics or OpenSsl for EncryptRsaPublic work, tell me, im very bad and i need to produce this project for the next week Many thanks for all, Eric ! -
TSslCertTools for generate CSR
Eric Winfly replied to Eric Winfly's topic in ICS - Internet Component Suite
Thanks, you know if i can use it with a pem file contening only cert with only public key ? The gouv only returning Cert with public key ? He use X509Certificat to add to Windows Store and after he reload it for calling RSA Encrypt with PublicKey but whatever i search over internet and all openssl pkeyutl cmd i try always tell me openssl pkeyutl -encrypt -inkey CertificatPSI.pem -pubin -in pass.txt -out pass.enc Could not find private key of public key from CertificatPSI.pem pkeyutl: Error loading key Im afraid about all about certificat -
TSslCertTools for generate CSR
Angus Robertson replied to Eric Winfly's topic in ICS - Internet Component Suite
Those ICS encryption functions were written 15 years ago by another developer, I've never used them not aware anyone else has either, so untested. But you may have hit a change in latest version, make sure OverbyteDefs.inc has {$DEFINE OpenSSL_Deprecated} Angus -
Calling a 64 bit DLL from 32 bit code
Brandon Staggs replied to dummzeuch's topic in Delphi IDE and APIs
This is the only viable solution. -
TSslCertTools for generate CSR
Eric Winfly replied to Eric Winfly's topic in ICS - Internet Component Suite
Now i need to Encrypt with RSA public Key but the function StrEncRsa make fault on libcrypto-3.dll with the sample IcsPemTool this is normal i take a look at source code and this function make a first call to EncryptPublicRSA with OutBuf = nil this could be the problem ? i also try to make call directly to EncryptPublicRSA but C++ dont want to find a good declaration of this func ?? -
Thanks for the replies. I appreciate the effort you have all put into answering my question.
-
@Kas Ob. I agree on splitting the devices into separate units, but for sake of the example to a minimum, I didn't show that. Ref 1) - Master in TBaseController is in principle the core factory, but could be separate. Ref 4) - Multiple interfaces is defintively an option. A capability discovery mechanism is a good idea. The main point of my example was to show a method for avoiding passing unsafe pointers to methods. That said, passing objects is only safe as long as you are in full control of the lifespan of, and access to, said objects. Using class types (TMyClassType = class of TMyType) and encapsulation is a good way of handling polymorphic instantiation in a reasonably tidy way. Using libs like f.x. Primož Gabrijelčič's OmniThreadLibrary really helps solving common threading challenges. Gotta love thread safe queues.
-
For me that looks tightly coupled and hard to maintain in the long run, and i am always against such approach "REPLACE CONTROLLER...", if you need to replace then it is too late either get the correct one form the beginning or create new one and dispose them both later, swapping/replacing only will lead to complex design with high error/malfunctioning probability (if not now then modifying the code later). Lars gave a great example, but i would do it a little different, by slicing things into pieces. Look at Lars example, 1) a Factory will be perfect to return an IDeviceController from TSignature (the HardwareID) 2) Devices could have their own units and will register them self if the Unit is included in the project, (Initialization clause) 3) Factory will parse and return from what available (runtime registered) IDevices/IDeviceController ... 4) the Verbs (command/capabilities) could be an interface, each one is an interface, so a device could have 10 interfaces (more or less), each represent small functionality, like IDeviceCapName which will handle the device.. well ..name, IDeviceCapWrite, IDeviceCapRead.... so the the returned Interface cab tested/checked against a specific command/verb by simply call Supports() or with "is" or "as" ... , so when it comes to execute command a simple call like Supports to check if the device can return IDeviceCapOnlineTime then perform the required call on that .. 5) With separated and isolated commands/verbs like that, it is easier to accompany them with extra attached interface that will bring what type of hardware steps or code should be performed, in other words you can have script like (even it is code) in default interfaces specific for each device, so i device like IDeviceDoorController can have IDeviceDoorControllerCloseAndLock and IDeviceDoorControllerUnLock ...IDeviceDoorControllerOpenFroAll.. which are returned by it own smaller factory from the DoorController unit which is also registered and returned by IDeviceDoorController. I am sure i missed many steps here, but i hope the idea is clear to at least entertain, this will be expandable easy to read and maintain, and most importantly (importanter) it is testable, in fact it is the easiest way to develop for such hardware design, were each can have their own commands.
-
I'm not using it with Delphi directly (yet), but still with some HTML, JS, PHP, Python, etc., to see what performance to get. Still in a phase of extended testing of different AI systems, so to speak. I'm using Claude Code and Cursor as well, and both are really impressive, but my experience ist that they worked best, if you design from ground up. Cursor has a really amazing workflow and really good outcome, IMHO, but its a little unclear to me if Claude is behind, or not. If you throw them on a larger, existing projects, it works too, but struggles more often than on new projects. I' going to switch to use it with Delphi too, in the near future, I'm curious what brings the next level of Claude.
-
@JackT - I've attempted an over-simplified draft of how I would envision doing this. It allows multiple communication methods, and multiple controllers, but I've left out the configuration loading and command/result passing. I'd use input/output "mailbox queues" as those are the simplest to make thread safe. program DynamicCommsClass; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, Generics.Defaults, Generics.Collections; type TSignature = string; IDeviceInterface = interface(IInterface) ['{C8D5A4A7-A153-4962-8F89-980825B0E503}'] function FetchSignature: TSignature; function Verb1: integer; function Verb2: integer; end; TDeviceObject = class(TInterfacedObject, IDeviceInterface) // contains relevant comms class (serial, tcp, REST, etc) function FetchSignature: TSignature; virtual; function Verb1: Integer; virtual; function Verb2: Integer; virtual; end; TBaseController = class(TObject) type TBaseControllerType = class of TBaseController; TControllerDictionary = class(TDictionary<TSignature, TBaseControllerType>); class var Master: TControllerDictionary; // a complete master list of known controllers protected Device: IDeviceInterface; public class constructor InitClass; class destructor UnInitClass; class function Signature: TSignature; virtual; class procedure RegisterControllers(const aControllerList: Array of TBaseControllerType); class function FindController(const aSignature: TSignature): TBaseControllerType; function Connect: TBaseController; virtual; constructor Create; virtual; procedure CreateDeviceObject; virtual; procedure LoadConfiguration; virtual; function Verb1: Integer; virtual; function Verb2: Integer; virtual; end; TThisController = class(TBaseController) public constructor Create; override; class function Signature: TSignature; override; end; TThatController = class(TBaseController) constructor Create; override; class function Signature: TSignature; override; end; { TDeviceObject } function TDeviceObject.FetchSignature: TSignature; begin // Get the signature from the device end; function TDeviceObject.Verb1: Integer; begin // exect command 1 on the device end; function TDeviceObject.Verb2: Integer; begin // exect command 2 on the device end; { TBaseController } constructor TBaseController.Create; begin Inherited; CreateDeviceObject; LoadConfiguration; end; procedure TBaseController.CreateDeviceObject; begin Device := TDeviceObject.Create; end; class destructor TBaseController.UnInitClass; begin Master.Free; end; class constructor TBaseController.InitClass; begin Master := TControllerDictionary.Create(11); // or whatever prime size needed end; class procedure TBaseController.RegisterControllers( const aControllerList: Array of TBaseControllerType); begin for var Controller in aControllerList do Master.TryAdd(Controller.Signature, Controller); end; class function TBaseController.FindController( const aSignature: TSignature): TBaseControllerType; begin if not Master.TryGetValue(aSignature, Result) then raise Exception.Create(Format('Signature %s not recognized.', [aSignature])); end; class function TBaseController.Signature: string; begin Result := 'Default'; end; function TBaseController.Connect: TBaseController; var Sig: TSignature; begin Sig := Device.FetchSignature; if Sig = Self.Signature then Result := Self else begin var ControllerType := FindController(Sig); Result := ControllerType.Create; end; end; procedure TBaseController.LoadConfiguration; begin // from somewhere end; function TBaseController.Verb1: Integer; begin Result := Device.Verb1; end; function TBaseController.Verb2: Integer; begin Result := Device.Verb2; end; { TThisController } constructor TThisController.Create; begin inherited; end; class function TThisController.Signature: TSignature; begin Result := 'ThisControllerSign'; end; { TThatController } constructor TThatController.Create; begin inherited; end; class function TThatController.Signature: TSignature; begin Result := 'ThatControllerSign'; end; // ------- procedure ThreadExecute; var InitialController, Controller: TBaseController; begin InitialController := TBaseController.Create; Controller := Controller.Connect; if InitialController <> Controller then InitialController.Free; // while not Terminated // do begin // Overly simplified - but basically fetch from input queue to decide what to process // Controller.Verb1; // Controller.Verb2; // Sleep(1000); // end; end; begin TBaseController.RegisterControllers([TThisController, TThatController]); try ThreadExecute; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
-
If you buy a RAD Studio license, you get a subscription to all major and "minor" updates during your subscription period. Contact the sales team or just check your license to see if your subscription is enabled.
-
I pressed the >> button on the TestInsight menu, with no tests populated in the window. It still ran all the tests, and then populated the window. It took 83 seconds. I am not sure if that is because my project file has the following code {$IFDEF TESTINSIGHT} if IsTestInsightRunning then begin TestInsight.DUnitX.RunRegisteredTests; exit; end; {$ENDIF} so when TESTINSIGHT is defined, it is running all the tests. I am not sure what I need to do in order to get the TestInsight window to populate without running the tests.
-
Refactoring suggestion: Move current procedure to new separate unit
Dave Novo replied to PeterPanettone's topic in MMX Code Explorer
Instead of adding complex features to modelMaker, this is exactly where AI shines. You simply setup Claude.ai and activate the Model Context Protocol that it can access files on your hard drive. Then tell the AI to read your units and tell it to move the relevant methods over. It can do this kind of stuff very easily, and understands much of Delphi and how do the refactorings. When I asked it to do similar things, it even filled in the uses clauses for me (even though I forgot to ask it specifically) and did the relevant initialization and finalization of the unit that was required. -
Thanks all for the prompt response!
-
v13 has not been released yet, and no information about its pricing is available at this time.
-
I tried this, which is similar to what you said, and it seemed to make no difference: procedure SetComboWidth(Combo: TComboBox); var width: integer; begin Combo.Canvas.Font := Combo.Font; //<<<<< width := MaxTextWidth(Combo.Canvas, Combo.Items) + 26; // Include arrow button if Combo.Style = csDropDown then inc(width, 8); Combo.Width := width; end{ SetComboWidth};
-
HI. Is there an upgrade option/price from Rad Studio 12.3 to Rad Studio 13? Thanks
- Yesterday
-
Define conditional symbol in .dpr
DelphiUdIT replied to Vandrovnik's topic in RTL and Delphi Object Pascal
Yes, I know that, I only responded to @HeartWare about his conclusion. I were not able to find any logic behind that. It's sure that if a file is not listed in the project files, that happen more frequently (like in the example I propose: Unit2.inc is not in the Projects Files list). But since I used the RamDisk, I have less issues (tending towards zero) about that. -
Define conditional symbol in .dpr
Uwe Raabe replied to Vandrovnik's topic in RTL and Delphi Object Pascal
The point is not to prove that it works or that it doesn't, but to find out when it works and when not. -
Define conditional symbol in .dpr
DelphiUdIT replied to Vandrovnik's topic in RTL and Delphi Object Pascal
If you want I can make a video ... -
Claude code makes it so much easier. It "lives" in your project, so it can see how everything fits together and adds/edits files in situ. For maximum effectiveness, use it with one of the max claude accounts and do everything with the Opus 4.1 model Des
-
I recently used a combination of Claude and ChatGPT to generate Delphi bindings for a C header file that had over 500 methods. Saved a lot of time. Still testing but no problem so far. Both AIs can process large amounts of material but ChatGPT lets you download the results in one file where as Claude has to chop up the code into sections because it outputs results via a browser window which is limited in length. I also got ChatGPT to create a convenient wrapper to the bindings.
-
Hi All, I get this message "Cannot find style resource for iOS 15" when I try to rightclick an editbox on the application's mainform and select "Edit custom style". My SDK points to iPhoneOS 18.2. No Style editor is opened. When I doubleclick the stylebook component on the mainform, only Default and Android Light are shown in the platform combobox. Any idea where to look or how to fix this? using D12.3 tia, John
-
@Die Holländer That would be my ultimate goal. But this time I actually wanted to "grow" a project with the machine.