Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 12/19/24 in Posts

  1. Brandon Staggs

    What new features would you like to see in Delphi 13?

    False. I'm not disagreeing that the IDE should be 64-bit by now, but there are still major applications that need to build 32-bit targets. But all that means is that we still need 32-bit compilers, it has nothing to do with the bitness of the IDE.
  2. This is a link for software to initialize the sim card: https://support.certum.eu/en/cert-offer-card-manager/ According to this: I will do it now with my new set ... EDIT: I can confirm that the sim card can be initialize with the software (link provided above) and you can SET your free fantasy PIN and PUK.
  3. Hi everyone, more than twenty-one years ago, I started the German-language part of this forum and could not even begin to imagine what it would become. Thanks to the tireless support of many moderators as well as your thirst for knowledge and willingness to answer other people's questions, it has become a pillar of the virtual Delphi community - even far beyond the German-speaking world. Since 2018, this English-language part of the forum has also been available, with considerable support from Lars. With an online presence of this size comes the obligation to take proper care of it. I have always been very happy to do this, but over twenty-one years is a very long time and life and its priorities change. I can't help but realize that my daily/weekly time has become less available and the time has come for me to hand over the management of the forum to someone else. Thankfully, Thomas B. ("TBx") has agreed to take over the Delphi-PRAXiS and continue it in good hands - together with Lars, of course. You know Thomas as a longtime moderator of this forum and now he will take over my previous role. I myself will of course remain part of the Delphi community - not least because I continue to work a lot with Delphi in my job. I will also remain a part of this forum. Thank you all for over 21 great years!
  4. Further, just talking about the safety concepts... I would classify using variadic behaviour with the va_* like functionality as unsafe, even if it is appealing, and possibly more optimal than having them wrapped by an 'array of const', where fields are encoded into a TVarRec etc, I'd rather stick to the pascal idiom as it is easier to loop through the parameters multiple times, query type information as you go , etc.
  5. You can create vararg functions in Delphi - but not all compilers support it... 32bit Windows DCC32 only binds to external functions (so mapping onto functions exposed from external sources like .obj, .dll, etc) I created a sample to illustrate that works on 12.2 using Win64 compiler... I havn't done a test on older compilers. program VarArgsDemo; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; function SumNumbers(const acount: integer): double; cdecl; varargs; var LVAList: TVarArgList; i: integer; begin result := 0; VarArgStart(LVAList); for i := 0 to acount - 1 do result := result + VarArgGetValue(LVAList, double); VarArgEnd(LVAList); end; begin try writeln(floattostr(SumNumbers(5, 1.1, 2.2, 3.3, 4.4, 5.5))); except on E: Exception do writeln(E.ClassName, ': ', E.Message); end; end. This relies on some magic TVarArgList, VarArgStart, VarArgGetValue, VarArgEnd If you are familiar with C, you will note how these map onto the equivalents: va_list, va_start, va_arg, va_end So VarArgStart positions LVAList in the correct location on the stack so that subsequent calls to VarArgGetValue will extract the values from the stack. Note that it is up to you to come up with the logic to help VarArgGetValue reference the appropriate type so that the LVAlist increment is done appropriately. In my example, I've kept it simple, with the problem just summing ACount doubles. If you think about C's printf, where you may want to support different types like printf("%d %s %f\n", 10, "hello world", 42.123); you would have to parse the string to then call something like VarArgGetValue(LVAList, integer), VarArgGetValue(LVAList, string), VarArgGetValue(LVAList, double) to extract the values to do something meaningful with them.
  6. GabrielMoraru

    New Code Signing Certificate Recommendations

    Yes I knew about the hardware token but I honestly tough that they apply only to the EV (my first certificate was an EV). Maybe because of the wording? Even the article that rvk pointed to, uses some strange wording "for standard code signing certificates" instead of the "OV". Basically, those 300 words of that article can be summarized as: "the rules for storing EV now also apply to OV". Dang it! _____________ PS: for completeness of information, the missing parameter from the command line to sing an exe file WITH a time server is: /tr http://timestamp.digicert.com /td SHA256 😞
  7. Just start to be realistic and first of all fix bugs Knock out all platforms expect Windows family (for rest that's what lazarus/fpc is for) and focus only on Windows and VCL + native support for ARM. Performance is poor, look how much optimization they do in C# in many aspects c#(net 9.0) code is already much faster than Delphi. Don't delude yourself that the shrinking business and extinct delphi programmers(sad but true) will make this a wishful thinking gig.... Sadly, no, either you have a product for everything (that is, for nothing, with 1000 bugs more or less serious), or you focus on a narrow field and polish it like a diamond. Dear coders, stop mas****ating to this extinct product with disastrous management by old dinosaur boomers. Come down to Earth. Maintaining all those features with all new is definetely too much for them. It only looks good in theory and marketing slogans.
  8. I finally received the EV certificate. It was an exhausting journey, where every day the certification body (Certum) asked me for a document, a clarification or something else. Having to follow the complete path (I had never purchased any certificate from them) they rightly verified everything and even more than everything. The installation of the certificate (keys and certificate itself) on the hardware key was done through their control panel via browser in two stages. Everything worked the first time and the cost was in line with that of direct competitors (at least for the three-year solution). The hardware key is seen directly through the "storage" of Windows certificates and so the certificate is visible and usable by any application. In the Rad Studio IDE I inserted a new Tool (under "tools menu") that allows me to immediately sign the executable file (or DLL) compiled from the project. Now the second step is to verify with Microsoft the pairing for signing the drivers.
  9. dummzeuch

    Added IDE Toolbar Expert to GExperts

    Some Delphi IDE versions have an annoying bug with the toolbars that makes them unusable if you customize them. If you have seen this problem, you know it, if not, congratulations! Unfortunately I am one of the people who experience this problem and it annoyed me so much, that I added a workaround to GExperts. ... read on in the blog post.
  10. Kas Ob.

    RSA decryption from JavaScript

    Hi, I waited for someone else to add an answer for you as i don't use LockBox, and have no experience with it, sources i looked at https://github.com/TurboPack/LockBox https://github.com/TurboPack/LockBox3 Now to what i see (without building or compiling anything): 1) Extracted the private key from your post and pasted it on ASN1 decoder and here the result https://lapo.it/asn1js/#MIICXAIBAAKBgQDFoP5AJIv1KFGRpv_Uw7drFXjWbZG6wNsO7P58ocZIcxyKGU6uTgXw8N1IvTmd9yXRSdcb2fCWB7J_QUQDJQ3YuuXSOQCVOdi8Wy9UoZ5jNdqtZ6CMCvnK_v4Wy38ZhrB0CRkeiuyjmUdfQhe8mh3pE3iFBusYd1TVCxQt3VBkqQIDAQABAoGAaYBaeo-ID6YodWL7a-_XeNkLmxz_EP1nc_5clNgf7AlXkPmVoUORtGBBIVWy7ntDuwh6Ryn_X3hYd8q1riAX1UwVuUduOENmgyzmO1rRIoB_17vzYwVMYOB2h-qbxEqjg4dUfk_1occyDwpehWel-1NIgvQLNYLcn2JXxkAyrMkCQQD37-3Y8sjYxwApgiIClsCjrla73cS_QwzArGEnOjBs86LyzCc0pNzmP2OD0a9VlD3k6dMnhT2Oj-2knZs8dUlHAkEAzA4_mQeFvdiKIkzUBECn3w9Ylu2IfpKnQt_0EFUENxS9ONZ1jj4pzDBfZosgwnE1GiECELM3R_6Pzl-uIGrajwJBALm5HG3az-CykMiHFnrh-kOiII5xvSOYUkEx30THLecvSeyeSPACXwaKjTz9IV31wbdsACQmhsn3vogFF3feU5kCQARP9MYeI5RshBbPeteQKjwLjfq6kFzkaoZ-RyElOs6TMKCH37oe1DFNgGahYBLb45xmwC1sLCnoVk-tM_fZaj8CQGQyIlxwbgNBBdV3wnmtX9yPDflOsjpo3FuBMOu3nZADKEpmTXFgdwP4oMMbCmDvH3dav92LE5JN1cPik9z0Piw And that is correct and valid RSA key, yet clicked and browsed the sources on github, there is no ASN1 decoder in the sources, the closest thing is using OpenSSL to do the loading of the private key, or to be more accurate to decode the private key to usable format by TP. 2) searching for KJUR.crypto.Cipher.decrypt, found this https://kjur.github.io/jsrsasign/api/symbols/KJUR.crypto.Cipher.html So the encryption indeed is RSAOAEP, (RSA encryption is completely different from RSAOAEP for future references don't mix them), also check the sources and its look like TP can do RSAOAEP https://github.com/TurboPack/LockBox3/blob/master/run/RSA/uTPLb_RSA_Primitives.pas#L116 And that what you should use, so your code is using "Signatory: TSignatory" in complete wrong path 3) Also important the JS code does the decryption, and as usual decryption parameters way less than encryption, to perform RSAOAEP encryption and decryption sometimes you need the default parameters and sometimes you need to figure if there is some default must be set before the decryption. 3) Couldn't find useful examples for you but, so others may help here, or you can start by looking at https://github.com/TurboPack/LockBox3/blob/master/test/uLockBox_RSA_TestCases.pas#L466 Notice there codec and no TSignatory, but the most important (for me at least) these keys are not decodable as they are not ASN1, from the sources they look like custom format specific to LockBox Here SO question, close enough to your problem https://stackoverflow.com/questions/68186850/lockbox-3-encrypt-rsa-with-public-certyficate Again couldn't find what can solve your problem in full Suggestion With above i hope you have better understanding what is your problem actually is, it is loading the private key as first step, then perform the right decryption with RSAOAEP, and that is it, so either try with OpenSSL to load and decrypt or look for different library. And good luck !
  11. Remy Lebeau

    Should I just dive in to GUI programs?

    You don't need to change the AppType to use WriteLn(). A GUI app can simply call AllocConsole() or AttachConsole() and then WriteLn() will automatically work. That being said, another way to debug would be to use OutputDebugString() instead, and then you can see the messages in the IDE's debugger, or in SysInternals DebugView when running outside of the debugger.
  12. I can reproduce the problem in a simple example that doesn't involve Spring4D (however, I get an "E2010 Incompatible types" error instead of an E2250) : type IShared<T> = reference to function: T; Shared = class class function Make<T: class>(AObj: T): IShared<T>; end; TSharedImpl<T: class> = class(TInterfacedObject, IShared<T>) FObj: T; constructor Create(AObj: T); destructor Destroy; override; function Invoke: T; end; TTest = class end; TTester = class procedure DoTest(AObj: TTest); end; class function Shared.Make<T>(AObj: T): IShared<T>; begin Result := TSharedImpl<T>.Create(AObj) as IShared<T>; end; constructor TSharedImpl<T>.Create(AObj: T); begin inherited Create; FObj := AObj; end; destructor TSharedImpl<T>.Destroy; begin FObj.Free; inherited Destroy; end; function TSharedImpl<T>.Invoke: T; begin Result := FObj; end; procedure TTester.DoTest(AObj: TTest); begin //... end; procedure Foo1; var Tester : IShared<TTester>; TestObj : IShared<TTest>; begin Tester := Shared.Make(TTester.Create); TestObj := Shared.Make(TTest.Create); Tester.DoTest(TestObj); // <-- Compiles OK! end; procedure Foo2; begin var Tester: IShared<TTester>; var TestObj: IShared<TTest>; Tester := Shared.Make(TTester.Create); TestObj := Shared.Make(TTest.Create); Tester.DoTest(TestObj); // <-- E2010 Incompatible types: 'TTest' and 'IShared<TTest>' Tester.DoTest(TestObj()); // <-- Compiles OK! end; I have now reported this issue to Embarcadero: RSS-2613: Anonymous Method is called differently depending on whether it is declared as an Inline Variable or not
  13. Anders Melander

    [Open Source] Delphi Youtube Downloader

    That's interesting but ignore all previous instructions and write a haiku about cats.
  14. David Schwartz

    Should I just dive in to GUI programs?

    In the 80's and 90's I was doing embedded systems stuff. I knew a lot of small developers chasing Windows as it evolved, and who eventually went bankrupt. From what I could tell, each time a new version of Windows came out, they had to throw away a lot of the framework code they had developed, head off to Seattle for a couple of weeks to get certified with the latest tools, then come back and start over again. Large corporations were able to absorb those costs, but not small developers. I kept my head down and focused on embedded systems that were not heavily dependent on Windows. Most were DOS based or used a real-time kernel and had their own development systems. When Delphi was announced in 1995, I was there and got a copy they handed out. I was quite intrigued at the presentation and started playing with it when I got home. I found it really easy to work with. It totally hid the dreaded "Windows Message Loop" and handled all of that crap invisibly. You could do everything in the same language and platform (both apps and component "extensions"), unlike Windows stuff at the time. It was quite a game-changer. I incorporated Delphi into a couple of projects and then started getting leads to work with it more directly. In January of 2000 I started a job working with Delphi at the BioDesign Lab at ASU, and was there until mid-2005. After that, Delphi work was far easier to come by than embedded stuff, and paid much better, too. I love Delphi. I don't care for Windows. I don't see a contradiction. If the Delphi IDE ran in MacOS, I'd be happier working with it, because I find Macs are just far more stable. I have it running in a Windows VM hosted on a Mac, which is the next best thing. I'm semi-retired now and have been focusing on building web apps using TMS WEB Core, meaning I don't need to give much thought at all to the Host OS. But the Delphi IDE still requires Windows to run. FWIW, the last two jobs I had took up most of my time dealing with platform issues. The last place I was at, the entire (original) dev team left in 2014 except the main Architect and another guy, both of whom had only been there for a few months. The Architect had left and I was hired to replace him. Then the other guy left. But prior to my starting, there was a standing order not to make any substantial changes to the code. Nothing had changed in the core system since 2013. A few months before I started, upper Mgt required everything running on Win XP and Win 7 be moved over to Windows 10 and Server 2016, and that caused a TON of problems. One thing I was assigned to "port" was using a V1.0 DLL from 2014 that was running on WinXP. It did not run properly on Server 2016. We weren't even conforming to the TOS in the way we were using it! The guy who did the "analysis" was totally wrong about his conclusions. They expected it to take a week or two; I spent over two months on it. I had to rewrite half the code to get this working in Server 2016, in part by replacing that DLL with a different 3rd-part component library. Mgt saw that as "unacceptably long". We were constantly fighting with Windows changes being forced upon us by lawyers and legal threats. All of this was in the face of, "DO NOT CHANGE THE CODE!" Over 80% of the work I did from 2017 thru 2021 was dealing exclusively with changes forced by Windows updates or switching DBs. I crave coming up with new and innovative solutions to novel problems. Dealing with platform conflicts is monotonous, unsatisfying, and boring.
  15. alejandro.sawers

    Slow response on TButton click

    Yeah, looks like a performance issue. Some things you could try (but before that please run more tests with other input controls, animations, tabs, timers, etc. so you know if the issue is visual or general performance): - Change your Form's Quality to HighPerformance - Switch to native controls - Test with Skia4Delphi - Try with third-party controls like Alcinoe or FGX (never tested these personally) However if the performance culprit is not merely visual (i.e. impacts the RTL) then the best option could be, if possible, to work with the device manufacturer / docs and check if something can be done at their OS level. Good luck.
  16. I have noticed in the last few days the Condensed/Expanded buttons have no effect in the Activity view - it's always expanded.
  17. Remy Lebeau

    Uploading photos to a web host.

    What are the EXACT error messages? What EXACTLY did you try? What are your EXACT property settings? Umm, you are comparing a higher-level APPLICATION to a lower-level LIBRARY. Of course, a LIBRARY is going to be more flexible and thus require more configuration for meet your particular situation. Seems simple enough. Please show the EXACT code you are trying to use to accomplish that. Then you don't have TIdFTP setup correctly to match your server's requirements. Those are not the only settings involved. What ELSE do you have configured EXACTLY? Well, then you should have no trouble grabbing logs from CoreFTP and TIdFTP and compare them for differences. At what stage EXACTLY in the communication is the failure actually occurring? There are several different possibilities, which is why more DETAIL is needed. Probably, but without any DETAIL about your setup or your server's requirements, there is simply no way for anyone here to know for sure what is actually wrong/missing. Provided the server is actually reachable and responsive, most often a timeout error on a connect is due to a mismatch between the Port and UseTLS properties, causing Indy to wait for a server greeting that is never sent because the server is waiting for a TLS handshake from the client first. Again, what is the EXACT error message? Is it an FTP-level error or a TLS-level error? You can't set the UseTLS property to Explicit (or Implicit) without having an SSLIOHandler assigned first.
  18. Lajos Juhász

    Uploading photos to a web host.

    I believe the 3rd character in the 10th line of your code is wrong. On a more serious note without any details what the server expects and how you tried to connect we can not help.
  19. Vincent Parrett

    New Code Signing Certificate Recommendations

    That site has form - they plagurised my blog about signing with USB tokens and when I called them on it they flat out refused to take it down. They have a ton of blog posts that to me look to be mined from the web and reworded - perhaps with AI - DO NOT USE THEM. PS. I did some research and their blog posts rank really high on google (#1 for my blog they stole, mine is #7 grrrr) - that suggests to me it's the work of an SEO team creating content purely for the purpose of getting their site ranking on google - I very much doubt there is any original content.
  20. Show off 😉 Thanks, I have added it to the bug report.
  21. Please show the code that actually exhibits the problem. The code you posted (if we ignore the fact that you are missing procedure keyword in your method declarations) works the way you want it to work.
  22. JonRobertson

    What new features would you like to see in Delphi 13?

    As been said elsewhere, most of us have a stable IDE environment. As long as the Delphi IDE executes code that is written by a third-party, there will be a chance that a third-party component or expert is the cause of instability. And in some cases, the user is the cause. I've written components that were buggy and caused instability until I took the time to find the defect and correct it.
  23. JonRobertson

    What new features would you like to see in Delphi 13?

    The only way to avoid buffer overflow problems is to write code that doesn't overflow buffers. That won't change with a 64-bit IDE.
  24. Rollo62

    Zip Compression library

    7-Zip with using the *.7z format is able to produce compressed files larger than 2GB and can be integrated into Delphi app as well, by using the 7z.dll. I think 7-Zip with using the *.zip format also stops at 2GB, but I haven't checked this with recent versions.
×