david_navigator
-
Content Count
151 -
Joined
-
Last visited
Posts posted by david_navigator
-
-
After some discussion with a couple of my colleagues about testing I wondered what others do ?
I'm not talking about Unit tests etc, but the tests we developers do whilst writing code to make sure that it's functional in a way the user might expect e.g when I click this button, these controls are hidden and these other controls appear in their place, as per the design
Myself and one of my colleagues test frequently, almost to the extent of write a minor feature, check it compiles, test the UI does what we expect and is useable, verify that the edge cases also work, fix and then once all good, move on to the next (minor) feature.
Whereas one of my other colleagues will write a whole module and not even hit compile until the end and then test, but by which time he's probably forgotten some of the features/specs, so some stuff gets omitted from his test.
I can't understand his way of working, but he can't understand mine. So what's the most common way of doing this ?Cheers
David
-
QuoteI'm assuming you are using OpenSSL, which version? Also, what version of the SSL/TLS protocol are you using?
If you mean the version numbers of libeay32.dll & ssleay32.dll, then they're 1.0.1.3 (1.0.1c) - dated 27/01/2014 !!!
Looking at the code below, it looks like
SSLOptions.Method := sslvTLSv1;
TheImap.UseTLS := utUseImplicitTLSif (ComboUseSSL.EditValue <> -1) or (ComboUseTLS.EditValue <> 0) then begin with IdSSLIOHandlerSocketOpenSSL1 do begin Name := 'IdSSLIOHandlerSocketOpenSSL1'; Destination := format('%s:%s', [EditServerHost.text, EditPort.text]); // 'imap.gmail.com:993'; Host := EditServerHost.text; MaxLineAction := maException; Port := strtoint(EditPort.text); DefaultPort := 0; // TIdSSLVersion = (sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2); if ComboUseSSL.EditValue <> -1 then // if -1 then just use default which is sslvTLSv1 SSLOptions.Method := TIdSSLVersion(ComboUseSSL.EditValue) else SSLOptions.Method := sslvTLSv1; SSLOptions.Mode := sslmUnassigned; SSLOptions.VerifyMode := []; SSLOptions.VerifyDepth := 0; end; TheImap.IOHandler := IdSSLIOHandlerSocketOpenSSL1; end else TheImap.IOHandler := nil; // TIdUseTLS = ( // utNoTLSSupport, // utUseImplicitTLS, // ssl iohandler req, allways tls // utUseRequireTLS, // ssl iohandler req, user command only accepted when in tls // utUseExplicitTLS // < user can choose to use tls // ); TheImap.UseTLS := TIdUseTLS(ComboUseTLS.EditValue);
QuoteFor instance, using Wireshark,....
Thanks. I'll try and set that up and see what I can find.
-
We use Indy for SMTP & IMAP with very few problems, so it could be your issue is elsewhere.
-
One of my customer's has started to get this error connecting my app to outlook.office365.com via IMAP.
He's connecting to port 993 using Implicit TLS.
He says that my app has been working for ages and has just started throwing this error, so I'm assuming that something has changed in the world of Microsoft - yet none of my other customers are reporting the error nor can I find anything online that suggest a change that Microsoft may have rolled out in the past week.
I get the same error if I try on my PC with his Microsoft credential.
I don't really understand what the error means though to then try and diagnose further what might be going on or settings he needs to look for in his account.Any help much appreciated.
David
-
43 minutes ago, shineworld said:Look at this github project on how to embedded FMX form in a VCL application:
https://github.com/vintagedave/firemonkey-container
https://parnassus.co/open-source/tfiremonkeycontainer/
I will try next week to embed a FMX 3D Opengl form in my VCL App...Thanks, but I don't actually need an FMX form in my VCL app, I was just more surprised that it worked !
-
2 hours ago, miab said:As far as I know you could always mix VCL with FMX only FMX.Forms has to come before VCL.Forms:
uses
FMX.Forms,
Vcl.Forms,...
The project file has no mention of FMX in it at all.
This is just a host VCL form in a VCL app where I mistyped a unit name i.e MyFormU rather then MyFormVCL_U and then instantiated the form thus
MyForm := TmyForm.Create(...);
MyForm.Showmodal;It was only after running that I realised that the TmyForm being instantiated was the one from the FMX unit rather than the VCL one.
(If you're wondering why I have two similar units one VCL and one FMX, I'm in the process of converting a third party FMX project to VCL)
-
Have you asked in the UniGUI forums ? That's where the experts hang out.
-
I just accidentally instantiated an FMX form in my VCL app and no errors were thrown (nor warnings at compile time).
It just seems to work. Is this a fluke or does delphi natively now support VCL & FMX forms in the same app ?
-
-
8 minutes ago, corneliusdavid said:So what I would suggest is either try out Uwe's code above
Yup, That seems to do what IO want, well it certainly gives me enough information to be able to do what I want.
Thanks for your help too though. -
QuoteI have hacked together some code that may help here. Create a new VCL Forms Application, drop a button and a memo onto the form and use the following code:
Many Thanks. That's exactly what I was after.
-
11 minutes ago, corneliusdavid said:Or do you want the user to actually use the REST Debugger, click the Copy Components button, and go to your running application and do the paste while it's running? So you want to convert the pasted objects to "create" statements--is that what you're after?
Exactly that.
-
21 minutes ago, corneliusdavid said:Pasting components to the form is essentially creating the components and hooking them to the form. How does this code not do exactly that? What else are you looking for?
Because I have to start at run time with what the RestDebugger produces.
Imagine the end user presses Copy Components in the Rest Debugger, then goes to my app and clicks "Paste Components" - I need the mechanism that effectively goes from
object RESTClient1: TRESTClient BaseURL = 'https://api-eu1.XXXXXXXXXXXXXXX/ORD' Params = <> end
to
RESTClient1 := TRESTClient.Create(Self); RESTClient1.BaseURL := 'https://api-eu1.XXXXXXXXXXXXXXX/ORD';
-
11 minutes ago, corneliusdavid said:Any component can be created in code at runtime. Here's the code for your posted set of components:
Thanks but maybe I didn't explain properly. I know how to create components etc at run time and I use the Gexpert tool frequently, but in this particular scenario I need to go from the code created by the RestDebugger to a working set of components, BUT all done at run time.
So effectively I need to do what delphi does when you click Paste on a delphi form and it streams in the code from my OP.
-
The delphi RESTDebugger has an option "Copy Components", that puts something like this on the clipboard.
object RESTClient1: TRESTClient BaseURL = 'https://api-eu1.XXXXXXXXXXXXXXX/ORD' Params = <> end object RESTRequest1: TRESTRequest AssignedValues = [rvConnectTimeout, rvReadTimeout] Client = RESTClient1 Method = rmPOST Params = < item Kind = pkHTTPHEADER Name = 'x-api-compleat-key' Value = '0aXXXXXXXXXXXXXXXXXXXXXX94' end item Kind = pkREQUESTBODY Name = 'body9BE6CF603159471FB026D7FF6FC3D2DB' Value = '{"master_id":1,"LayoutID":"d967cc4c-5b2b-4474-8cac-a71f9684ee70"' + ',"TransactionStatus":"SAV","Reference":1,"PoNumber":"ORD1","Date' + 'Created":"2008-07-08","SupplierName":"TMB","CurrencyCode":"GBP",' + '"SupplierID":"1234","LineItems":[{"master_id":1,"Description":"G' + 'obo Original","UnitCost":"100.00","Net":"100.00","Quantity":1,"T' + 'ax":0,"Gross":100},{"master_id":1,"Description":"Gobo Copy","Uni' + 'tCost":"50.00","Net":"100.00","Quantity":2,"Tax":0,"Gross":100}]' + '}' ContentType = ctAPPLICATION_JSON end> Response = RESTResponse1 end object RESTResponse1: TRESTResponse end
I can take this and paste it on to a form and Delphi will create all the components etc.
However I don't want to paste it in to a form at design time, I want to store it and then use the data to create a populated form at run time.
I haven't got a problem reading and writing this to an external storage format nor creating the form at run time, but how to I then use this to create the components ?
Google suggest using TReader, but unless I'm looking at the wrong example, that only seem to handle one component, not a whole load that reference each other.Does any one have any code to help or can tell me what key words I need to be searching for ?
Many thanks -
2 hours ago, Dany Marmur said:Sound a bit... confused to me. Could you clarify?
I don't want anyone other than Tom, Dick & Harry to be able to access the data.
So a DBA shouldn't be able to run a query and see the unencrypted data, however I've just noticed a more fundamental flaw in what the customer is proposing, so I need to address that first. -
19 hours ago, Kas Ob. said:so as you assumed the easier way is to encrypt each document with its own asymmetric key, this will keep things fast and small,
after that either send these keys protected in a container locked with a password to each user accordingly or even better, supply each user with a password (may be a key or even credential), and let them only do the encryption online, meaning you need to write a server to authenticate each one then either send him the decryption key or decrypt the document for him online then send it back, the main benefit of having such centralized server is you know who is accessing the data and when, this might be nice feature to have or bad thing to do, i think you got the idea.
By container, i meant what you already mentioned it could be protected with ECIES, PKCS#5, ...
Just food for thoughts.
Thanks. The above sounds the way ahead. Homographic encryption certainly doesn't sound my thing !!!
-
14 hours ago, ioan said:Are you going to keep the documents in a database or a file each?
If you are keeping them in a database, you can give access based on a login/password (call it "encryption key") to anyone you want in any way you want, any combination.
Why not do that?
They will be in a database but the database I'm using doesn't offer record level access rights (do any ?)
It is important that the actual data is encrypted as it must be impossible for the stolen table to be easily read, moreover if the database was stolen by Tom he shouldn't be able to decrypt Dick & Harry's data. -
Hi
I don't really know much about encryption and have been tasked with designing a system where the customer has the following requirements and I've no idea if it's possible and if it is possible, what terms I should be using to search Google for more info.
Simplifying as much as possible, basically the customer wants to store his driving license info and his passport info in an encrypted file.
He then wants to be able to give Tom, Dick and Harry, a key each, such that Tom can only decrypt the driving license, Dick can only decrypt the passport but Harry's key can decrypt either.
Is this possible (In reality there are 1000's of documents and 100's of keys required) ?(My guess is that I probably need to encrypt each document with different keys and then encrypt the appropriate set of public keys for each of Tom, Dick & Harry ?)
Many thanks
David
-
We use (and have used for over 20 years) CopyMinder from Microcosm. This supports 64 bit delphi apps.
-
1 hour ago, Stefan Glienke said:Make the duration column smaller - there seems to be some glitch with it sporadically spanning the entire width making the name column not visible which I have seen occasionally but could not repro yet.
Wonderful. (Easy when you know how 🙂
All Now Working. Many thanks. -
52 minutes ago, Vincent Parrett said:Make sure you are using the latest version of DUnitX and TestInsight.
Version 1.2.0.0. of TestInsight - which is the latest I can find.
DunitX installed from Gettit last night, so I assume it's the latest version.
(DunitX a reinstall as the update to D10.4.2 seemed to remove it)Everything seems to be working from a testing POV - the tests run and report errors correctly and the footer of TestInsight displays what has happened correctly, it's just the tree view of tests that seems to be missing.
It's definitely a drawing issue as if I move my mouse over where the tree view nodes should be drawn then I get the correct popup hint, furthermore double clicking where a node should have been drawn changes the popup hints (and the the right click context menu) in the correct way.
-
Test Insight has stopped drawing correctly and I don't know where to look to find the problem (tried restarting PC etc).
You can see that the tests are running and any errors are displayed, but the details of the test are missing.
Additionally the "form" thinks that the display area is very wide (notice the bottom scrollbar) - first screenshot with scroll bar to the left & second to the right.
I've also tried the form undocked
Help !!
-
Do you need to cast the results to be the same type of the field ?
exception message : Error connecting with SSL. EOF was observed that violates the protocol.
in Indy
Posted
Initial tests show that changing the method thus
fixes the problem. Will do some more testing but looking good 🙂
Will try later versions of the dll's too.