Jump to content

Abaksoft

uniGUI Subscriber
  • Posts

    1558
  • Joined

  • Last visited

  • Days Won

    87

Posts posted by Abaksoft

  1. 1 hour ago, erich.wanker said:

    Has someone a idea why or a How-to ?

    Hello,

    1. Try the update release 2020 of the :

    libeay32.dll

    ssleay32.dll

    in   C:\Program Files (x86)\FMSoft\Framework\uniGUI\SSL\dll

     

    1. Get  right  version  32/64 :

    C:\Program Files (x86)\FMSoft\Framework\uniGUI\SSL\dll\x86   or   dll\x64

     

    3.  Try :   sslvTLSv1_2  

     

    4. Put all your 05 files near your exe file :

    - Project1.exe    (your Start.exe)

    - libeay32.dll

    - ssleay32.dll

    - cert.pem

    - key.pem

    - root.pem 

    and let all by default in SSL Options FilePath (as the fig)

     

    5. Check  your 3 .pem files  bloc :

    -----BEGIN CERTIFICATE-----

    -----END CERTIFICATE-----

     

     

    1.png

  2. 1 hour ago, rencarnacion said:

    @farahad please help us with these message I getting hundred of message 

     

    Today when opening General unigui topics,

    I found all topics hacked:

    something like :

    AMERICAN AIRLINES.....,❤️💕✔️

    and after closing and opening then retored naturally. 

    What's wrong with the site ?

  3. 11 hours ago, andyhill said:

    This is my openssl request 

    openssl.exe req -new -newkey rsa:2048 -nodes -keyout key.pem -out req.csr

    Thanks in advance. 

    SSL-Error.jpg

    How are you Andyhill ?

    Hoping you feel good...

    Did you try 

    http://www.unigui.com/doc/online_help/getting-a-ssl-certificate-from.htm

    Maybe the copy/past of the 2  .pem files is confused or change them :

    root.pem =  gd_bundle-g2-g1.crt 

    cert.pem = 98d81da6dfe2095b.crt

  4. On 5/20/2023 at 8:53 PM, Abaksoft said:

    So, it's not possible to attribute a Domaine Name in intranet

    https://www.mysupermarket.com  
     

    Yes it is possible :)

    Solution :

    1. Edit the host file :

    c:\windows\system32\driver\ets\host

    2. Add this line for example:

    192.168.1.11   mysite.com

    save it

    (192.168.1.11 is your local server)

     

    3. Do the same on all your PC local machines.

     

    4. Create on your server a p12 Certificate for mysite.com (as described above step3 + 4)

    powershell > mkcert -pkcs12  mysite.com

     

    5. Install it on both : your server and client PC

     

    6. Run your app from all local pc :

    https://mysite.com

    is secure :)

    ____

    PS:  don't ask me for mobile device (android). I don't know...

    • Like 2
  5. 47 minutes ago, zqdl8 said:

    Hello everyone, may I ask how to set the value of a single cell in UniDBGrid using code?

    Thank you very much

    Hello,

    At the position on the UniDBGrid;

    1. Not recommended method :

    MyDataSet.Edit;
      MyDataSet.FieldByName('myField_1').AsString:='Hello';
    MyDataSet.Post;

     

    2. Recommended Method 

    Use Transaction (as Unigui is a mult-Users application) :

    var Trans: TIBCTransaction;
        MyQuery:TIBCSQL;
    
    begin
    
      Trans := TIBCTransaction.Create(NIL);
      try
        Trans.DefaultConnection := C_Current;
        Trans.IsolationLevel := iblReadCommitted;
        Trans.StartTransaction;
        Screen.Cursor := crHourGlass;
    
        //========================     
          MyQuery:=TIBCSQL.Create(NIL);
          try
             
             MyQuery.Connection:=C_Current;
             MyQuery.Transaction:=Trans;
    
             txtSQL:='Update MyTable Set ' +
                     ' MyField_1 = :MyField_1' +
                     ' Where (ID = :ID)';
    
              MyQuery.SQL.Clear;
              MyQuery.SQL.Add(txtSQL);
              if not MyQuery.Prepared then MyQuery.Prepare;
    
             With MyQuery do
             begin
               ParamByName('MyField_1').DataType :=ftWideString;
               ParamByName('MyField_1').AsWideString:='Hello';
    
               ParamByName('ID').DataType :=ftinteger;
               ParamByName('ID').AsInteger :=MyDataSet.RecNo;
    
             end;
             MyQuery.Execute;
    
    
          finally
            MyQuery.Free;
          end;
     
    
        //========================
        Trans.Commit;
        Screen.Cursor := crDefault;
    
        Except
          on E: Exception do
          begin
            erreur:=True;
            Trans.Rollback;
            ShowMessage(E.Message);
          end;
        end;
    
    
      finally
        Trans.Free;
      end;
    end;

     

    • Like 1
  6.  

    We win the first half of the match.  Remains the second half :

    Using our SSL on Android via wifi.

    All google topics say that it's enough to import this p12 Certificat on the Mobile (Android device). I tried....But steel the cadet no Secure appears :(

    As i launch the app from my Mobile like :   https://192.168.1.11:8077   and  not  https://localhost:8077

    - So, I created a new p12 Certificat (only on server)  192.168.1.11.p12

    - And test it first, on my others windows PC (local network) : just import it as described on step 4 above : Touche Win + R  key:   mmc )

    Then Open browser with

    https://192.168.1.11:8077

    And....Yes the cadet is Secure.

     

    - But when i did the same on Android....Humm......Not secure

    I saw many google search :   "importing trust certificate on android phone"  No result  :(

    Any help is welcome

    Thx

  7. Dears,

    I was finally able to do something:

    If one day, you will have to develop an Unigui app:
    - Under local network,
    - Without Internet,
    - Which requires an SSL (example Scann Camera)

    Then read the following:

    I thought, wrongly to create  "Self Signed Certificate".  Today, most of browsers reject them.

    So, after 3 days search, I understood that it was necessary to use another technic :   Create  a localhost Certificate by mkcert

    This is inspired by  (thx to the Author) :
    https://technixleo.com/create-locally-trusted-ssl-certificates-with-mkcert-on-windows

     

    OK...Step by Step :

    1. Installing mkcert on Windows

    1.1   mkcert can be installed by Chocolatey
    To install Chocolatey, you must first ensure the Policy AllSigned
    Open PowerShell as Admin
    Get-ExecutionPolicy
    if Restricted then :
     Set-ExecutionPolicy AllSigned

     


    1.2  To install Chocolatey  see   https://chocolatey.org/install 

    In PowerSehlle type (in a single line):
    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

     


    1.3  install  mkcert
    In PowerSehlle type:
    choco install mkcert

    The mkCert Directory (by default) is:
    C:\Users\...\AppData\Local\mkcert


    2. Generate my 2 pem  files

    In PowerSehlle type:
    mkcert -install

    This will generate 2 files in C:\Users\...\AppData\Local\mkcert:
    rootCA.pem
    rootCA-key.pem

     

    3. Generate a  localhost.p12  Certificate

    In PowerSehlle type:
    mkcert -pkcs12 localhost
    This will generate  localhost.p12  certificate which will be in the PowerShell directory, ie: ..\System32

     

     

    4. Import the localhost Certificate

    Touche Win + R  key:   mmc

    File > Add > Certificates > Add
    Computer account
    local computer
    OK

    Right click / on WEB Hosting
    Certificates > All Tasks
    Machine Room
    Select localhost.p12 Certificate Next

    specify the password (default): changeit
    Check: Key Exportable

    Place of the Certificate on :
    Web Hosting    (dépend on your windows langage :    example for french  :  Hébergement Web)

    This will create 2 Certificates (in Web Hosting):
    - localhost
    - mkcert  myDESKTOP-xxx

     

    5.  Project Unigui

    Requires 3 files:
    cert.pem
    key.pem
    root.pem

    Do not use
    root.pem = rootCA.pem ( C:\Users\...\AppData\Local\mkcert )
    key.pem =  rootCA-key.pem ( C:\Users\...\AppData\Local\mkcert )

    wich are generated by mkcert.

    Use instead the new 3 files, obtained online (by converting the p12 file in a new global pem file)

     

    5.1   Split localhost.p12  into  3 Files

    You can obtain the 3 files via a conversion of the Certificate:   localhost.p12

    Use Online:
    https://www.sslshopper.com/ssl-converter.html

    - Upload the Certificate File:   localhost.p12
    - indicate the type: PFX/PCKC#12
    - Convert To: Standard PEM
    - Password:  changeit

    You will get global File, containing  3 blocks   start ...end

    Separate them with Notebook, and save them into 3 files: 
    The first         =  cert.pem
    The second  =  root.pem
    The third        =  key.pem


    5.2  Compile your project and run it :

    https://localhost:8077/

    is Secure :)

    Have fun...

    ___________________

    PS:   if you are interesting by an easy way to scan BareCode via your Android device (wich requires an SSL  url) 

    you can use Falcon Store - Components Delphi from our Friend Marlon. 

    Very fast and light  !

    http://forums.unigui.com/index.php?/topic/11359-falcon-store-components-delphi-httpsstorefalconsistemascombr/#comment-60260

     

    • Like 4
    • Upvote 2
  8. 8 hours ago, Sherzod said:

    Hello,

    Can you please clarify? 

    First of all, were you able to generate a self-signed certificate with an IP address?

    Thank you Sherzod.

    On customer Server, with OpenSSL as describe on unigui developer manual,

    and SSL Demo,   No more.

    In other words, how can we run an SSL unigui app in local network (without internet) ?

    Thx.

     

  9. Dears,

    I am developping an intranet Unigui  application for SuperMarket :

    The purpose is to Scan BarCode from manager Smartphone Camera, in real time for Inventory.

    As the camera requires SSL, the URL will be a classical  local Server IP adress like :   https://192.168.1.5:8077     

    ( Customer  server = 192.168.1.5 )

    OK, we can buy Certificate from authority or get a free one, but in this case, supermarket customers have no internet.

    So, it's not possible to attribute a Domaine Name in intranet
    https://www.mysupermarket.com  

    So, I give up ...

    The solution will be a Self Signed Certificate (with IPAdress).  But all browsers reject this certificate.
    I googled and found how to export / import for accepting Certificate, but not work with the Unigui Farshad DEMO SSL.

    Any idea ?
    Thx.

  10. On 4/4/2023 at 2:44 PM, Abaksoft said:

    "You need a Static IP adress and for this if you want to use your 4g Router, we have an Offer named : M2M"

    Oh Yes, i said....Machine to Machine (M2M)..... and will give you feedback.

    Don't lost your time.

    M2M sim card not work in a classical Modem 4g. There is no signal, no internet !

    M2M Sim Card is only for specific devices like GPS, camera,...

     

    Conclusion : 

    Stay with your classical ADSL line for a home server.

    • Thanks 1
  11. On 4/15/2023 at 8:53 PM, Sherzod said:

    @ThiagoFiorilli @picyka

    Can you please test this approach?

    1. UniCheckComboBox1.ClientEvents.ExtEvents ->

    function afterrender(sender, eOpts) 
    {
        var me = sender;
        var _insertCheckbox = function() {
            var _id = me.getPicker().id;
            Ext.DomHelper.insertFirst(_id, {
                tag: 'label',
                for: _id + '_allCh',
                html: 'AllCheck/AllUnCheck<hr>'
            });
            Ext.DomHelper.insertFirst(_id, {
                tag: 'input',
                type: 'checkbox',
                id: _id + '_allCh'
            });
    
            Ext.get(_id + '_allCh').on('change', function(e, combo) {
                ajaxRequest(me, 'allCheckUnCheck', {
                    checked: combo.checked.toString()
                });
            });
    
            me.on('change', function(combo, b) {
                if (combo.getStore().count() == b.length) {
                    Ext.get(_id + '_allCh').dom.checked = true
                } else {
                    Ext.get(_id + '_allCh').dom.checked = false
                }
            }, {
                delegate: '.x-boundlist-item'
            });
    
            me.getPicker().un('show', _insertCheckbox);
        };
        me.getPicker().on('show', _insertCheckbox);
    }

    2. UniCheckComboBox1.OnAjaxEvent ->

    procedure TMainForm.UniCheckComboBox1AjaxEvent(Sender: TComponent;
      EventName: string; Params: TUniStrings);
    var
      I: Integer;
    begin
      if EventName = 'allCheckUnCheck' then
      begin
        if Params.Values['checked'] = 'true' then
        begin
          for I := 0 to (Sender as TUniCheckComboBox).Items.Count-1 do
            (Sender as TUniCheckComboBox).Selected[I] := True;
    
          (Sender as TUniCheckComboBox).JSInterface.JSCall('fireEvent', ['select', (Sender as TUniCheckComboBox).JSControl]);
        end
        else begin
          (Sender as TUniCheckComboBox).ClearSelection;
        end;
    
      end;
    
    end;

     

    Many Thx Sherzod...

    • Thanks 1
  12. On 12/15/2021 at 9:58 AM, markokas said:

    Hi all,

    Anybody solved problem of SEO optimization.

    The best way with Unigui is to create a welcome web site (referenced optimized) with any tool you know (with wordpress you can create it in one hour).

    and

    Inside this welcome page put a button or menu wich redirect url to your unigui application.

    This is the easiest way i found.

     

  13. 1 hour ago, irigsoft said:

    Sorry for spam but I try to help.

    Here, some devices are presented: https://www.esis.com.au/how-to-remotely-access-your-equipment-via-4g-router/

    Many thx IrigSoft.

    Really appreciate your help :)

    I finally contact my ISP, and they suggest me a solution. 

    "You need a Static IP adress and for this if you want to use your 4g Router, we have an Offer named : M2M"

    Oh Yes, i said....Machine to Machine (M2M).  Today all ISP have this offer.

    The only Cons, is the speed (lower Upload, lower donwload) it's only for communicating with machines over internet (Camera, watering tap, Robots, ...)

    I will buy a SIM Card M2M tomorrow and will give you feedback to communicate with my Unigui App.

     

    Best Regards

  14. 2 hours ago, irigsoft said:

    1. On the server side, I created a server application that checks every 10 minutes (per user settings) what the public Ip address is and .

    Thank you IrigSoft.

    Humm....  I know these technics (even DNS embeded on router, also listning  no-ip company and dynu.net ).

    The problem with the 4g routers sim card is you can get this public ip  but it's not yours. It's a shared ip for 250 users. 

    You can read :

    https://h685.co.uk/port-forwarding-doesnt-work/

×
×
  • Create New...