Re: [4DTidbits Blog] Epoch & Unix Timestamp Conversion

2017-03-26 Thread Bruno LEGAY via 4D_Tech
Hi, > I worked out an Date and Time to Epoch conversion recently. I’d be interested > if anyone can find a case where it doesn’t work: > > > > C_DATE($1) > C_TIME($2) > C_LONGINT($0) > > C_DATE($vd_Current) > C_TIME($vh_Current) > C_TIME($vh_ISO_GMT) > C_LONGINT($vl_Unix_Timestamp_Offset) >

Re: How to digitally sign an XML document

2017-03-29 Thread Bruno LEGAY via 4D_Tech
Hi, > How to digitally sign an XML document The signature of xml document is pretty well standardized by the xmldisg which is a W3C spec. We have written a v15 component to sign a soap request with xmldsig. To do this I used 4D php fastcgi for openssl commands and xml canonicalization. The

XML or rest services

2017-03-29 Thread Bruno LEGAY via 4D_Tech
Hi, Since v13, you have a native http client, so it is easy to POST or GET some xml data over HTTP. So in essence : post : 1. create dom 2. set values in dom 3. export dom to xml blob 4. free dom 5 HTTP POST xml blob get 1. HTTP Get into a blob 2. Parse blob into a dom 3. read data in

Re: Unique Files Verification Software

2017-03-15 Thread Bruno LEGAY via 4D_Tech
Hi, > I’m not looking to identify all duplicates. I want to know what unique data > might be on a disk labeled “backup"…. To determine this the software (rsync?) > must query an index of ALL specified drives where the original pathname may > be very different for each an every file. Can rsync

Re: Components and custom constants files

2017-04-19 Thread Bruno LEGAY via 4D_Tech
Hi David, > The argument list for the method named "MessageHub_Unsubscribe" in the > component "MesageHub" is incompatible with the database or component > "MesageHubDemo.4DB". I think I had a strange error once similar to this. If I remember (vaguely), I had one he method of the component

Re: Components: How do you reuse utility code? (short)

2017-04-22 Thread Bruno LEGAY via 4D_Tech
Hi David, On your original message (sorry for the late response, been very busy this week). First about, component are not russian dolls. Then about error handling, you need to set up a simple test environment to understand how they work. An error in the component, if not "trapped" will be

Re: Components: How do you reuse utility code? (long)

2017-04-22 Thread Bruno LEGAY via 4D_Tech
Hi, To be honest i am glad there a feeling of curiosity and interest about components. I have seen the light my friends and I am a believer :-) And there is hope for a "born again 4D component lovers" community. I find it sad when I hear 4D developers saying that they tried components and that

Re : Components: How do you reuse utility code? (long)

2017-04-22 Thread Bruno LEGAY via 4D_Tech
Hi, To be honest i am glad there a feeling of curiosity and interest about components. I have seen the light my friends and I am a believer :-) And there is hope for a "born again 4D component lovers" community. I find it sad when I hear 4D developers saying that they tried components and that

Re: Converting Little Endian Byte Representation To a String

2017-04-18 Thread Bruno LEGAY via 4D_Tech
Hi Cannon, Here is a method using LPE on Mac OS X : C_TEXT($vt_64bitLittleEndianHex;$vt_64bitBigEndianHex) $vt_64bitLittleEndianHex:="02ABC877FAFB0200" // => "840003123456770" //convert the little endian hex to big endian hex C_LONGINT($i) For ($i;1;Length($vt_64bitLittleEndianHex);2)

Re: Question about PaySimple http request

2017-08-02 Thread Bruno LEGAY via 4D_Tech
Hi, I haven't done paysimple but I have done similar web service auth in the past. I would advise you not to use php unless you can't avoid it for this purpose (because php fast cgi is not always playing well when running several instances of 4D because of port issues). For the

RE: Encrypted Data at Rest

2017-08-03 Thread Bruno LEGAY via 4D_Tech
Hi, This is an interesting subject... I would say it depends on what you want to protect from and how deep are your pockets... As people said, it is difficult to encrypt the whole 4D database without encryption being supported at the database engine level... At the moment 4D does not support

Re: Wiki software: Confluence

2017-07-14 Thread Bruno LEGAY via 4D_Tech
Hi, We have been using wikis for more than 10 years and we love them. I did write post on the nug about it. We use it internally for everything, information on clients, projects, application version history, meeting reports/minutes, standard procedures, coding practice, naming convention

Re: Getting Computer and OS Info

2017-07-14 Thread Bruno LEGAY via 4D_Tech
Hi, On Windows you can use "wmic" to access this kind of information (LEP). On Mac OS X you can use "system_profiler" (LEP). I'll send you some sample code to do this. HTH Bruno ** 4D Internet Users Group (4D iNUG) FAQ:

Re: Need help identifying a crash source

2017-07-23 Thread Bruno LEGAY via 4D_Tech
Hi, Maybe we should report it to 4D (I did not report it must admit)... Would you mind doing it ? Thanks Bruno ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive:

Re: Need help identifying a crash source

2017-07-23 Thread Bruno LEGAY via 4D_Tech
Hi again, It was discussed here : http://forums.4d.fr/Post/FR/19031749/2/19066921#19066921 And there is a fix in 4D v15.4 HF1 ACI0096430 A query on three fields including a composite index could lead to a crash. And Miyako gave further details : the revised

Re: Fastest way to get text into a BLOB?

2017-08-01 Thread Bruno LEGAY via 4D_Tech
Hi David, Try this method : // //@4ddoc-start : en //@name : BLB_appendText //@scope : public //@deprecated : no //@description : This function will append some text to a blob

Re: Compiled componets and different 4D versions

2017-06-22 Thread Bruno LEGAY via 4D_Tech
Hi Chip, > What are the implications of a component compiled for v13 being used in > a database under higher version of 4D? None. This is a great way to re-use code across several versions of 4D without maintaining code in many version of 4D. I write most of my components in v12 and they are

Re: Data mining from Oracle Application using 4D

2017-06-01 Thread Bruno LEGAY via 4D_Tech
Hi Kirk, > I have a large Oracle database from which I need to regularly extract > specific data using a 4D application. Is there a preferred way to connect > the two for data mining? ODBC, or ??? Anyone doing this with success and > willing to share the connection architecture? Many

Re: HTTP Get when a domain name returns multiple IP addresses

2017-06-12 Thread Bruno LEGAY via 4D_Tech
Hi Craig, > On 10 Jun 2017, at 7:00 AM, 4d_tech-requ...@lists.4d.com wrote: >> I would invite you to test the latest nightly build which fixes ACI0096586 >> http://bugs.4d.fr/fixedbugslist?Branch=16 >> "HTTP Get" request fails with certain https web sites > > That didn’t work, but we found (we

Re: v13 - replace string, odd slowness

2017-09-30 Thread Bruno LEGAY via 4D_Tech
Hi Chip, I I have seen this already. 1. You can try to use the * parameter at the end of replace string. 2. the main problem I think is that when you replace cr by crlf you insert characters in the text. I think 4D has tried to improve that in recent versions. It is much faster to do this in a

Re: SOAP Parameter Limit (Sujit Shah)

2018-05-18 Thread Bruno LEGAY via 4D_Tech
Hi, I don't think I have tried to send soap call with that many parameters. Anyway it is not that complicated to create your own soap calls (it is xml over http). Let me know if you want more infos on how to do this. HTH Bruno

Re: Trouble Decoding Base64 Text

2018-06-29 Thread Bruno LEGAY via 4D_Tech
Hi, Base64 encoded data has a length which is multiple of 4. If not, it should be padded with "=" (1 to 3 "=") Your data is not strict base64 as it does not follow this. Looks like 4D does not like when it is not padded. // pad with "=" to make text a multiple of 4 C_LONGINT($vl_padModulo)

Re: STARTTLS - send secure email 4D v15.5

2018-07-02 Thread Bruno LEGAY via 4D_Tech
Hi, Generally (convention) smtp on port 25 is unencrypted. C_LONGINT($vl_error;$vl_ssl;$vl_port;$vl_protocol) $vl_port:=25 $vl_protocol:=2 //2 = SMTP or SMTP with STARTTLS $vl_error:=IT_SetPort ($vl_protocol;$vl_port) $vl_ssl:=0 // sessionParam Longint 0 or omitted = Do not use SSL but

Re: parsing XML - related to Konstants

2018-07-06 Thread Bruno LEGAY via 4D_Tech
Hi, > is it possible to parse XML, in a manner in which you can also access > any comments in the file? Yes, it is possible since 4D v12 with the command DOM GET XML CHILD NODES. Bruno LEGAY A Consulting ** 4D Internet Users

Re: Best way to share large files with web users

2018-06-28 Thread Bruno LEGAY via 4D_Tech
Hi, Have you though of using S3 ? You can push the file to S3 and generate a url with to that file and send the url by mail. The url can contain the credentials (and is "time bombed") Then you could also define life cycle rules to your objects so they can be automatically removed from S3 after

Re: Best way to share large files with web users

2018-06-29 Thread Bruno LEGAY via 4D_Tech
Hi John, In the demo, take a look at AWS_S3_uploadFile, which will call AWS_S3__uploadFileMultipart for files which are bigger than 10 Mb... Chunks have a minimal size of 5242880 bytes (5Mb). This is done transparently when calling AWS_S3_uploadFile.. This code is not integrated in the

Re: Using 4D with Git...

2018-10-31 Thread Bruno LEGAY via 4D_Tech
Hi, We use git for projects other than 4D (and we can't wait to use git with 4D). For the git client we use Tower https://www.git-tower.com/mac And for the git platform, we use gitlab (hosted, free offering as in beer) https://about.gitlab.com And for ticketing : redmine

Re: SEND PACKET in a multi-process environment

2018-10-10 Thread Bruno LEGAY via 4D_Tech
Hi, I also write logs into files. I wanted the messages to appear in the log file in chronological order (logs can be confusing otherwise). My approach is the following. I have one process in charge of writing to the file. The "messages" for the log file are written to an interprocess memory

Re: HMAC SHA256 in native 4D code? (Bill Hutten)

2018-10-10 Thread Bruno LEGAY via 4D_Tech
Hi, Yes. HMAC-256 is quite simple (even more since sha256 is native). I can send you some code if you want. HTH Bruno ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options:

http get, error 30 when ran as service (v15 windows)

2018-11-19 Thread Bruno LEGAY via 4D_Tech
Hi, I have a 4D v15.5 build 15.216758, 64 bits, application running on Windows 2008 R2 SP1. (Same problem with 4D v15.6). On the server there is a process used to fetch currency exchange rates from a URL. The data is fetched with a simple HTTP Get (http which redirects to an https). When the

Re: Securing sensitive data in a 4D data file

2019-04-02 Thread Bruno LEGAY via 4D_Tech
Hi, Instead of keychain, which is a good idea but maybe problematic for cross platform and backing-up / restoring. Don't get me wrong, I like and I trust apple iCloud backups but maybe not a good option for your situation. There is the PKCS12 file format which is made to store private keys (a

Re: Securing sensitive data in a 4D data file (Chip Scheide)

2019-03-31 Thread Bruno LEGAY via 4D_Tech
Hi Chip, Interesting subject... You seem to have chosen (if I understand correctly) a good direction in your design : encrypt sensitive data (fields) with ENCRYPT BLOB I guess... This is good, so event when looking at the datafile with an hex editor, a clever hacker won't be able to extract

Re: Re: OAuth

2019-03-11 Thread Bruno LEGAY via 4D_Tech
Hi, > curl -X POST --data \ > 'client_secret=[YOUR-CLIENT-SECRET]_id=[YOUR-CLIENT-ID]_type=authorization_code_uri=[YOUR-REDIRECT-URI]=[AUTHORIZATION-CODE]' > \ > https://test-api.service.hmrc.gov.uk/oauth/token > > > I’ve tried this: > >

Re: HMAC SHA512 Signing

2019-02-17 Thread Bruno LEGAY via 4D_Tech
Hi Peter, I'll send that to you privately... Bruno LEGAY A Consulting ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub:

Re: Error 30 When Using HTTP Get or HTTP Request

2019-02-13 Thread Bruno LEGAY via 4D_Tech
Hi. > You can handle this on the 4D Side by lowering the minimum TLS version (shown > in the tech tip below) but it's not recommended: > https://kb.4d.com/assetid=78102 This is a very good source of information (what TLS version is supported with what version of 4D, how to lower the bar with a

Re: Error 30 When Using HTTP Get or HTTP Request

2019-02-11 Thread Bruno LEGAY via 4D_Tech
Hi, Could be there that the SSL/TLS version of your server is not supported (too old or too new). You can use nmap or online tools to check the configuration of the server... https://www.ssllabs.com/ssltest/ This will give you a list of ciphers HTH Bruno LEGAY signature.asc Description:

Re: Securing sensitive data in a 4D data file

2019-04-18 Thread Bruno LEGAY via 4D_Tech
Hi, Native database level encryption is coming !!! If you need this, it is probably worth waiting for 4D v17 R5 / v18 ! I would be silly to re-invent the wheel... This is a great feature and a good selling point. Thanks 4D. https://blog.4d.com/introduction-to-data-encryption-in-4d/ Bruno

Re: Securing sensitive data in a 4D data file

2019-04-18 Thread Bruno LEGAY via 4D_Tech
Hi, Native database level encryption is coming !!! If you need this, it is probably worth waiting for 4D v17 R5 / v18 ! I would be silly to re-invent the wheel... This is a great feature and a good selling point. Thanks 4D. https://blog.4d.com/introduction-to-data-encryption-in-4d/ Bruno

Re: Sending mail in 4D v11 on Mac

2019-05-13 Thread Bruno LEGAY via 4D_Tech
Hi, Port 587 is smtp with START_TLS. The connexion start in clear (un encrypted) and upon smtp protocol negotiation the connexion will be switched to secured/SSL/TLS. This feature was added in 4D IC v13.2. There is no way port 587 will work with older versions of 4D. You can try explicit

Re: LEP - hide console?

2019-04-09 Thread Bruno LEGAY via 4D_Tech
Hi Pat, Call SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true") before calling LEP HTH Bruno ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options:

Re: Microsoft Azure & 4D

2019-07-23 Thread Bruno LEGAY via 4D_Tech
Hi, > Is this because the client wants the email url to come from the same the > domain ? If so the best option would be to use a nginx proxy this would > split the connections between 4d and S3 but the URLs sent to the end-user > would always be from the same domain. This way you can keep 4D

Re: Microsoft Azure & 4D

2019-07-22 Thread Bruno LEGAY via 4D_Tech
Hi John, > First my apologies to Bruno for mutilating his name. No offence taken :-) For those who may be interested, I have recently used S3 for an online shop. S3 is storing the pictures. I used AWS CDN solution (CloudFront) mostly to have custom url and https (free certificates) on the

Re: 4D Web Server Security

2019-11-26 Thread Bruno LEGAY via 4D_Tech
Hi, > > I get comfort from all the efforts that 4D has made to be very secure, but > when a customer hands you a 644 cyber security audit report and says “Address > these issues”, I need to know where to begin. > > It’s one thing for 4D to be able to say their product can pass all security >

Re: File Decoding: EBCDIC

2019-10-07 Thread Bruno LEGAY via 4D_Tech
Hi, Try this YAGMP* maybe ? * : Yet another great Miyako plugin https://github.com/miyako/4d-plugin-text-convert NOTE : it is pretty big plugin because it contains the icu and libiconv libraries Bruno LEGAY A Consulting

Re: File Decoding: EBCDIC

2019-10-07 Thread Bruno LEGAY via 4D_Tech
Hi, Try this YAGMP* maybe ? * : Yet another great Miyako plugin https://github.com/miyako/4d-plugin-text-convert NOTE : it is pretty big plugin because it contains the icu and libiconv libraries Bruno LEGAY A Consulting signature.asc Description: Message signed with OpenPGP using

Re: HTTP Request and x-www-form-urlencoded

2019-10-13 Thread Bruno LEGAY via 4D_Tech
Hi, Can you post the code you are using ? If you send JSON data, you probably have to send the right content type (content type "application/json"). > > I’ve successfully tested the REST service using Postman and I can copy the > encoded URL from Postman and send it successfully from 4D HTTP

RE: HTTP Upload file size too low

2020-01-09 Thread Bruno LEGAY via 4D_Tech
Hi, S3 is using HTTP to do large upload. I have uploaded files over 6 Gb. 1. call mpUploadInitiate (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) you will get an multipartUploadId (a unique id, could be a uuid if you create your api) 2. Then send the

Re: Old DDE tools plugins replace by a Oracle-SE bridge. (Luc Devar)

2020-01-19 Thread Bruno LEGAY via 4D_Tech
Hi, The code you sumbitted looks like some PL/SQL code which builds and returns some json. Not need to connect to Oracle to do this... Contact me off list if you need some assistance with 4D for OCI. Bruno LEGAY A Consulting

Re: Remote working with 4D networks - what are people using ?

2020-03-19 Thread Bruno LEGAY via 4D_Tech
Hi, Few things here. 1. Apple native remote client ("Apple Remote Desktop" ARD) is very good. We use it remotely connect to machines and servers over a VPN. The key thing is to have a VPN setup to secure your traffic. You can also use VNC protocol. So one remote client (home/Mac) ===

Re: HMAC SHA256 in native 4D code

2020-03-21 Thread Bruno LEGAY via 4D_Tech
Hi Ruby, I sent you a component which does HMAC 256 and JWT object signing. It is all native. Lets us know if it works. Bruno LEGAY A Consulting ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html

Re: HMAC SHA256 in native 4D code (JWT)

2020-03-21 Thread Bruno LEGAY via 4D_Tech
Hi, The component is now on github : https://github.com/blegay/jwt_component Bruno LEGAY A Consulting ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options:

[off-ish]VPNs - free is better

2020-05-31 Thread Bruno LEGAY via 4D_Tech
Hi, We use openvpn. We are very happy with it. We are a full remote operation. Basically we have a VPN server hosted on a Debian Linux machine hosted in a data center (with other services, etc...). The machine accepts all VPNs connexions (using client certificates for authentication). All the