Jump to content

Search the Community

Showing results for 'Self Signed certificate'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. No, it does'nt work. Self signed certificats are for testing purpose or for local network. If you want to use your domain name from web as secure https://xxxx.domain.com.br the task is hard : you have to export your certificat from your server and communicate it to all your known clients to install it on there PC / Device ! Mmm...Asking ChatGp4 "is it possible to get a free trusted certificate for a public websites ?" Answer: "Yes, it is possible to obtain a free trusted certificate for a public website. There are several certificate authorities (CAs) that offer free SSL/TLS certificates that are trusted by major browsers. Here are a few popular options: Let's Encrypt: Let's Encrypt is a non-profit CA that provides free SSL/TLS certificates. They offer an automated certificate issuance and renewal process, making it easy to obtain and manage certificates for your website. Cloudflare: Cloudflare offers a free SSL/TLS service called "Universal SSL." When you sign up for their service, they provide you with a free SSL certificate that is automatically installed on your website. Cloudflare acts as a reverse proxy, encrypting the traffic between the client and Cloudflare's servers. ZeroSSL: ZeroSSL offers free SSL certificates that are valid for 90 days. They provide both automated and manual certificate generation options. ZeroSSL also offers an ACME client that can be integrated into your server for automated certificate issuance and renewal. SSL.com: SSL.com provides a free SSL certificate option called "SSL.com FREE." Their free certificate is valid for 90 days and supports both domain validation and wildcard certificates. It's worth noting that while these free certificates are trusted by browsers, they may have some limitations compared to paid certificates. For example, they may have a shorter validity period, limited support, or fewer additional features. If your website has specific requirements or needs extended validation, you may need to consider a paid certificate from a trusted CA. Additionally, some hosting providers or content delivery networks (CDNs) also offer integrated SSL/TLS solutions with free certificates. It's worth checking if your hosting provider has any options available for obtaining trusted certificates at no additional cost."
  2. asapltda

    Signature

    Good afternoon, I am capturing a person's signature using unigui for mobile, once the signature is captured I additionally require the date and time of the signature when the person signed, to record it in the database. The signature and time must be created as a single image to be recorded in the database or exported as a png/jpg Could someone give me the code required to do so? . Thank you for your cooperation
  3. I can´t make a Unigui App run with a letsencrypt cert .. i allways become "Could not load root certificate" Has someone a idea why or a How-to ?
  4. PS. to install the certificate into Windows Trusted Root Certificates - i use: // Add the cert.pem on the Windows Trusted Root Certificates cert_pem := Dossier + 'cert.pem'; Chemin := ExtractFilePath( Application.ExeName ) + 'Data\OpenSSL\export.ps1'; // prepare the Script MyText := TStringlist.create; try MyText.Add( '$CertificateName = "UNIGUI_All_OS"' ); MyText.Add( '$Certificate = Get-ChildItem "CERT:\" -Recurse | ' ); MyText.Add( ' Where-Object {$_.FriendlyName -eq "UNIGUI_All_OS"} ' ); MyText.Add( 'Export-Certificate -Cert $Certificate -FilePath "'+ ExtractFilePath( Application.ExeName )+'\exportiertes_zertifikat\your_name.cer'+'" ' ); MyText.SaveToFile( Chemin ); finally MyText.Free end; sleep( 300 ); // Execute the Script ch := '/K powershell.exe -executionpolicy bypass -file "' + Chemin + '"'; Dossier := GetEnvironmentVariable( 'SYSTEMROOT' ) + '\System32'; ShellExecute( Application.Handle, 'runas', 'cmd.exe', PChar( ch ), PChar( Dossier ), SW_HIDE );
  5. Basit ama etkili bir yazdırma sunucusu. Mantık olarak unigui üzerinden lokal ip yi kontrol ettiriyorum daha sonra yazıcı ismini alıyorum daha sonra rest sunucusuna fastreportdan aldığım pdf verisine gönderiyorum. unit PrinterServerMethodsUnit; interface uses System.SysUtils, System.Classes, Datasnap.DSServer, Datasnap.DSAuth, Printers, IdBaseComponent, IdComponent, IdIPWatch, WinSpool, ShellAPI, gtPDFDoc, gtPDFPrinter, Types; type {$METHODINFO ON} PrinterServerMethods = class(TComponent) private { Private declarations } function GetLocalIp: string; public { Public declarations } function Connect(ip: string): Boolean; function GetPrinterName: string; function Print(data: TStream): Boolean; end; {$METHODINFO OFF} implementation uses System.StrUtils; function PrinterServerMethods.Connect(ip: string): Boolean; begin if ip = GetLocalIp then Result := True else Result := False; end; function PrinterServerMethods.GetLocalIp: string; var IPW: TIdIPWatch; begin IPW := TIdIPWatch.Create(nil); try if IPW.LocalIP <> '' then Result := IPW.LocalIP; finally IPW.Free; end; end; function PrinterServerMethods.GetPrinterName: string; begin if (Printer.Printers.Count > 0) then begin Printer.PrinterIndex := -1; Result := Printer.Printers[Printer.PrinterIndex]; end else begin Result := ''; end; end; function PrinterServerMethods.Print(data: TStream): Boolean; var pdf: TgtPDFDocument; pdf_printer: TgtPDFPrinter; begin try try pdf := TgtPDFDocument.Create(Self); pdf_printer := TgtPDFPrinter.Create(Self); pdf.LoadFromStream(data); pdf_printer.PDFDocument := pdf; pdf_printer.SelectPrinterByName(GetPrinterName); pdf_printer.ShowSetupDialog := False; pdf_printer.PrintDoc; Result := True; finally pdf.Free; pdf_printer.Free; end; except on e: exception do begin Result := False; end; end; end; end.
  6. 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
  7. A good news 😅 Incredible ! When opening the same app protected by our Self Signed Certificat, on a Customer iphone , the secure padlock appears. Without importing certificate ! "Wow...the secure warning did'nt appear... ". I said "Well it's an iphone..." He said. It seems that : extensions v3_req' Is a good recipe.
  8. I have been using GoDaddy SSL Certificates without any problems but today after a Renewal the Cert fails claiming the password is wrong when it is not ? My ISP controls the GoDaddy generation interface - any ideas on how to get them to request the correct Cert ? This is my openssl request openssl.exe req -new -newkey rsa:2048 -nodes -keyout key.pem -out req.csr Thanks in advance.
  9. In a previous topic, we saw how to create a Self Signed Certificate with mkCert and trusted it with mmc. That works fine but havy method ! Here we will see an other method much easier : OK, Step by Step : 1. install the latest OPENSSL 2. Prepare a conf file (NotePad) : [req] default_bits = 2048 distinguished_name = req_distinguished_name req_extensions = req_ext x509_extensions = v3_req prompt = no [req_distinguished_name] countryName = XX stateOrProvinceName = N/A localityName = N/A organizationName = Self-signed certificate commonName = 120.0.0.1: Self-signed certificate [req_ext] subjectAltName = @alt_names [v3_req] subjectAltName = @alt_names [alt_names] IP.1 = 192.168.1.11 2. Save it as C:\Program Files\OpenSSL-Win64\bin\san.cnf - Replace IP.1 variable by your IP adress (local machine) - if you want DNS instead of IP, replace the Section [alt_names] by : [alt_names] DNS.1 = mywebsite1.dev DNS.2 = mywebsite2.dev On a local network, without internet, mywebsite1.dev should be defined on C:\Windows\System32\drivers\etc\hosts file : 192.168.1.11 mywebsite1.dev 3. Create your 3 .pem files (like Unigui doc) but with this conf : 3.1. cmd as admin cd C:\Program Files\OpenSSL-Win64\bin openssl genrsa -out root.key 2048 openssl req -x509 -days 3650 -new -nodes -key root.key -out root.pem -config san.cnf openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout key.pem -out cert.pem -config san.cnf 4. Copy the 3 .pem files C:\Program Files\OpenSSL-Win64\bin : root.pem cert.pem Key.pem near your Unigui Project.exe 5. Add the cert.pem on the Windows Trusted Root Certificates (in case of a windows server). The most important step here, wich is not indicated on the Unigui doc : (FmSoft Team, could you please add it ) Copy your cert.pem on a temporary location, example C:\cert.pem Open PowerShell as admin Type these commands : $certPath = "C:\cert.pem" $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certPath) $cert.Import($certPath) $certStore = New-Object System.Security.Cryptography.X509Certificates.X509Store -ArgumentList "Root", "LocalMachine" $certStore.Open("ReadWrite") $certStore.Add($cert) $certStore.Close() This will automatically add the certificat cert.pem on the trusted root certificats zone. If you want to do it in a single ligne (1 command ), just add ; between commands line1; line2; line3;....;line7 You can verify the new certificat, by openin win + R : mmc and go to the trusted root certificates zone 6. Run your Unigui SSL Project, and you will see the black padlock protected site. Have fun
  10. Good Morning! I'm using Delphi 10.3 and uniGUI uniGUI Personal 1.90.0.1549 When I use the SSL demo to study how to use SSL certificate, it gives the error ssl.exe: 00000EAC: 08:17:20 [Indy]:EIdOSSLUnderlyingCryptoError : Error accepting connection with SSL. error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown : Addr: $00790FB7 Does anyone have any idea what could be wrong to help me? Thank you very much!
  11. This code does not work, please advise - Thanks in advance. ////////////////////////////////////////////////////////////////////////////// HtmlMemo.BeginUpdate; HtmlMemo.Lines.Clear; s:= '<!DOCTYPE html><html>'+ ' <head>'+ ' <style>'+ ' @media print'+ ' {'+ ' html, body'+ ' {'+ ' height: auto;'+ ' font-size: 12pt;'+ ' }'+ ' }'+ ' </style>'+ ' </head>'+ ' <body>'; HtmlMemo.Lines.Add(s); ////////////////////////////////////////////////////////////////////////////// // Needed For UnDo/ReDo HtmlMemo.Lines.Add('<div id="content"> '); ... html content ////////////////////////////////////////////////////////////////////////////// // Content Div s:= ' </div>'; HtmlMemo.Lines.Add(s); s:= '<div id="buttons"> '+ ' <button type="button" id="undo_btn">Undo</button> '+ ' <button type="button" id="redo_btn">Redo</button> '+ '</div> '+ '<script type="text/javascript"> '+ ' var StateUndoRedo = function() '+ ' { '+ ' var init = function(opts) '+ ' { '+ ' var self = this; '+ ' self.opts = opts; '+ ' if(typeof(self.opts[''undo_disabled'']) == ''undefined'') '+ ' { '+ ' self.opts[''undo_disabled''] = function() {}; '+ ' } '+ ' if(typeof(self.opts[''undo_enabled'']) == ''undefined'') '+ ' { '+ ' self.opts[''undo_enabled''] = function() {}; '+ ' } '+ ' if(typeof(self.opts[''redo_disabled'']) == ''undefined'') '+ ' { '+ ' self.opts[''redo_disabled''] = function() {}; '+ ' } '+ ' if(typeof(self.opts[''redo_enabled'']) == ''undefined'') '+ ' { '+ ' self.opts[''redo_enabled''] = function() {}; '+ ' } '+ ' if(typeof(self.opts[''restore'']) == ''undefined'') '+ ' { '+ ' self.opts[''restore''] = function() {}; '+ ' } '+ ' self.opts[''undo_disabled''](); '+ ' self.opts[''redo_disabled''](); '+ ' } // init '+ ' var add = function(state) '+ ' { '+ ' var self = this; '+ ' if(typeof(self.states) == ''undefined'') '+ ' { '+ ' self.states = []; '+ ' } '+ ' if(typeof(self.state_index) == ''undefined'') '+ ' { '+ ' self.state_index = -1; '+ ' } '+ ' self.state_index++; '+ ' self.states[self.state_index] = state; '+ ' self.states.length = self.state_index + 1; '+ ' if(self.state_index > 0) '+ ' { '+ ' self.opts[''undo_enabled''](); '+ ' } '+ ' self.opts[''redo_disabled''](); '+ ' } // add '+ ' var undo = function() '+ ' { '+ ' var self = this; '+ ' if(self.state_index > 0) '+ ' { '+ ' self.state_index--; '+ ' if(self.state_index == 0) '+ ' { '+ ' self.opts[''undo_disabled''](); '+ ' } else { '+ ' self.opts[''undo_enabled''](); '+ ' } '+ ' self.opts[''redo_enabled''](); '+ ' self.opts[''restore''](self.states[self.state_index]); '+ ' } '+ ' } // undo '+ ' var redo = function() '+ ' { '+ ' var self = this; '+ ' if(self.state_index < self.states.length) '+ ' { '+ ' self.state_index++; '+ ' if(self.state_index == self.states.length - 1) '+ ' { '+ ' self.opts[''redo_disabled''](); '+ ' } else { '+ ' self.opts[''redo_enabled''](); '+ ' } '+ ' self.opts[''undo_enabled''](); '+ ' self.opts[''restore''](self.states[self.state_index]); '+ ' } '+ ' } // redo '+ ' var restore = function() '+ ' { '+ ' var self = this; '+ ' self.opts[''restore''](self.states[self.state_index]); '+ ' } // restore '+ ' var clear = function() '+ ' { '+ ' var self = this; '+ ' self.state_index = 0; '+ ' //self.states = []; '+ ' } // clear '+ ' return '+ ' { '+ ' init: init, '+ ' add: add, '+ ' undo: undo, '+ ' redo: redo, '+ ' restore: restore, '+ ' clear: clear '+ ' }; // StateUndoRedo '+ ' }; // StateUndoRedo '+ ' //initialize object '+ ' var o = new StateUndoRedo(); '+ ' o.init( '+ ' { '+ ' ''undo_disabled'': function() '+ ' { '+ ' //make the undo button hidden '+ ' document.getElementById("undo_btn").disabled = true; '+ ' }, '+ ' ''undo_enabled'': function() '+ ' { '+ ' //make the undo button visible '+ ' document.getElementById("undo_btn").disabled = false; '+ ' }, '+ ' ''redo_disabled'': function() '+ ' { '+ ' //make the redo button hidden '+ ' document.getElementById("redo_btn").disabled = true; '+ ' }, '+ ' ''redo_enabled'': function() '+ ' { '+ ' //make the redo button visible '+ ' document.getElementById("redo_btn").disabled = false; '+ ' }, '+ ' ''restore'': function(state) '+ ' { '+ ' //replace the current content with the restored state content '+ ' document.getElementById("content").innerHTML = state; '+ ' } '+ ' }); '+ ' //initialize first state '+ ' o.add(document.getElementById("content").innerHTML); '+ ' o.restore(); '+ ' o.clear(); '+ ' //bind click events for undo/redo buttons '+ ' document.getElementById("undo_btn").addEventListener("click", function() '+ ' { '+ ' o.undo(); '+ ' }); '+ ' document.getElementById("redo_btn").addEventListener("click", function() '+ ' { '+ ' o.redo(); '+ ' }); '+ ' //bind change events for content element '+ ' document.getElementById(''content'').addEventListener("change", function(event) '+ ' { '+ ' // the following is required since vanilla JS innerHTML '+ ' // does not capture user-changed values of inputs '+ ' // so we set the attributes explicitly (use jQuery to avoid this) '+ ' var elems = document.querySelectorAll("#content input"); '+ ' for(var i = 0; i < elems.length; i++) '+ ' { '+ ' elems[i].setAttribute("value", elems[i].value); '+ ' } '+ ' //take a snapshot of the current state of the content element '+ ' o.add(document.getElementById("content").innerHTML); '+ ' }); '+ '</script> '; HtmlMemo.Lines.Add(s); ////////////////////////////////////////////////////////////////////////////// // Finalise s:= ' </body>'+ '</html>'; HtmlMemo.Lines.Add(s); HtmlMemo.EndUpdate;
  12. Good afternoon gentlemen, as I can update a tunilabel using the FDEVENTALERT event, in debugging the instructions are executed, but the results are not shown, nor is the showmessage executed, thank you for your collaboration Code of the procedure used procedure TFShowOPStatus.FDEventAlerter1Alert(ASender: TFDCustomEventAlerter; const AEventName: string; const AArgument: Variant); begin LBL_MSG_CAMBIOS.Caption:='** DATOS MODIFICADOS REFRESQUE'; UniLabelXXX.Caption:='** DATOS MODIFICADOS REFRESQUE'; SELF.Refresh ; ShowMessageN('DSDSDS'); end;
  13. Hello, i'm trying to make work SSL with a test unigui application (standalone) I have generated a certificate as explaing in this link: Developer's Guide > Deployment > SSL Configuration > Generate a Self-Signed Certificate (unigui.com) I have created the certificate with a password and have inserted the password in the SSLPassword property in my application. I suppose i have done it right. Of course i have enabled ssl (ssl.enabled=true) The application is correctly executed using https://127.0.0.1:8077 but the browser tell me the the connection is not safe. Does it happens because i'm using a self-generated certificate ? Below you can see the properties of the servermodule. thanks Roberto object UniServerModule: TUniServerModule OldCreateOrder = False TempFolder = 'temp\' Title = 'New Application' SuppressErrors = [] Bindings = <> SSL.Enabled = True SSL.SSLOptions.RootCertFile = 'root.pem' SSL.SSLOptions.CertFile = 'cert.pem' SSL.SSLOptions.KeyFile = 'key.pem' SSL.SSLOptions.Method = sslvTLSv1_2 SSL.SSLOptions.SSLVersions = [sslvTLSv1_2] SSL.SSLOptions.Mode = sslmUnassigned SSL.SSLOptions.VerifyMode = [] SSL.SSLOptions.VerifyDepth = 0 SSL.SSLPassword = '050302' ConnectionFailureRecovery.ErrorMessage = 'Connection Error' ConnectionFailureRecovery.RetryMessage = 'Retrying...' Height = 150 Width = 215 end
  14. Oh...Super ! Many Thx Erich That works fine Just for our friends, when importing the Certificate on Android, depending on your Android ; 1. Go to Parameters 2. Wifi 3. Additional settings 4. Certificates Installation 5. Explore your directory to select your Certificat 5. Using Certificate as : VPN & Application (not Wifi) That' all NB: I will post soon here, the program "Certificate in 3 secondes" updated with your great bring. Thx again Erich
  15. I have a simple case of creating panels at runtime. The creation of the components works perfectly, the problem is in the ordering in which the unigui leaves them. Code: procedure TMainForm.UniButton1Click(Sender: TObject); var PnP: TUniPanel; I: integer; begin for I := 0 to 10 do begin PnP := TUniPanel.Create(self); PnP.Name := 'PnProg_' + I.ToString; PnP.Parent := SBPrincipal; PnP.Width := 232; PnP.Caption := 'Panel_' + I.ToString; PnP.CreateOrder := I; PnP.Align := alRight; PnP.Align := alLeft; end; end; Result: I've already tried to reorder them after they were created but I wasn't successful. Has anyone experienced this problem? PS: I tried the topic below and it didn't work: Attached the unigui project. The same code in a desktop application works normally. PanelsRT_Unigui.rar
  16. When clicking on an ActionClick to open a form, I would like it to display a mask until the form opens. What would be the correct way to do this? procedure TUniFrameCadFornecedor.UniDBGridServicosColumnActionClick(Column: TUniDBGridColumn; ButtonId: Integer); begin case ButtonId of 0: begin with TUniFormCadFornecedorServico.Create(UniApplication) do begin try ShowForm(Self.ADFornecedorServico.Current<TFornecedorServico>, acEdit, Self.Controller); if ModalResult = mrOk then Self.ADFornecedorServico.Refresh; finally Free; end; end; end; 1: begin if TMessageUtils.Question(_MENSAGEM_EXCLUSAO) = mrYes then Self.ADFornecedorServico.Delete; end; end; end;
  17. 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.
  18. Hello, Here is the updated "Certificate in 3 secondes" program, with an embeded Light OpenSSL version. (No need to install on your Customer Server OpenSSL). Thanks to Erich Wanker, with this version, you can use your Mobile with a secure portal. After running the program, you can check the Certificate with : Win + R --> MMC (see the video). Have fun. ice_video_20231114-134145.7z Prg_Certificate_2.7z
  19. Dear Friends, I have been developing with unigui in C++builder Alexandria 11.1 in 64 bit mode using standalone server and when enable SSL it is giving me this exception Exception class EIdOSSLLoadingRootCertError with message First chance exception at $00007FFAC43D4F69. Exception class EIdOSSLLoadingRootCertError with message 'Could not load root certificate. error:00000000:lib(0):func(0):reason(0)'. Process xxxxxx.exe (6852) It won't happen if i compile in 32 bits. I am a registered UNIGUI user and the version that i am using is the 1.90.0.1560. it is happening in both debug and release configuratons. For testing i am using the self signed certificate following UNIGUI documentaton instructions. Also i am using the SSL dll that comes with the 1560 version. SSL config on ServerModule is SSL.Enabled = True SSL.SSLOptions.RootCertFile = 'root.pem' SSL.SSLOptions.CertFile = 'fl.cert.pem' SSL.SSLOptions.KeyFile = 'fl.key.pem' SSL.SSLOptions.Method = sslvTLSv1_2 SSL.SSLOptions.SSLVersions = [sslvTLSv1_2] SSL.SSLOptions.Mode = sslmUnassigned SSL.SSLOptions.VerifyMode = [] SSL.SSLOptions.VerifyDepth = 0 SSL.SSLPassword = 'fmsoft' SSL.SSLPort = 8080 I also tried SSL.Enabled = True SSL.SSLOptions.RootCertFile = 'root.pem' SSL.SSLOptions.CertFile = 'fl.cert.pem' SSL.SSLOptions.KeyFile = 'fl.key.pem' SSL.SSLOptions.Method = sslvSSLv3 SSL.SSLOptions.SSLVersions = [sslvSSLv3] SSL.SSLOptions.Mode = sslmUnassigned SSL.SSLOptions.VerifyMode = [] SSL.SSLOptions.VerifyDepth = 0 SSL.SSLPassword = 'fmsoft' SSL.SSLPort = 8080 The result is identical So i hope that someone can give me some light on this. Thanks in advance
  20. picyka

    TUniTime

    unit uniDBLookupComboBoxObject; interface uses System.SysUtils, System.Classes, Vcl.Controls, Vcl.Forms, Data.DB, uniGUIBaseClasses, uniGUIClasses, uniMultiItem, uniComboBox, uniDBComboBox, uniDBLookupComboBox, Aurelius.Bind.Dataset, System.Variants, devsul.model.search, Aurelius.Criteria.Linq, Aurelius.Criteria.Base; type TUniDBLookupComboBoxObject = class(TUniDBLookupComboBox) private { Private declarations } FRequired: Boolean; FListSource, FDataSet: TAureliusDataset; FCriteriaListSource: TCriteria; FListValues: TStringList; procedure ExecuteSearch; protected { Protected declarations } FOldUniTriggerEvent: TUniTriggerEvent; FSearch: TSearch; procedure DoSetRemoteValue(AIndex: Integer; Value: string); override; procedure MyTriggerEvent(Sender: TUniCustomComboBox; AButtonId: Integer); procedure LoadCompleted; override; procedure _RemoteQuery(const QueryString: string; Result: TStrings); procedure _GetKeyValue(const Value: string; var KeyValue: Variant); public { Public declarations } constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure SetSearch(Search: TSearch); published { Published declarations } property Required: Boolean read FRequired write FRequired default False; end; procedure Register; implementation uses view.search.default, uniGUIApplication, Winapi.Windows; procedure Register; begin RegisterComponents('UniGUI Extension', [TUniDBLookupComboBoxObject]); end; { TUniDBLookupComboBoxObject } constructor TUniDBLookupComboBoxObject.Create(AOwner: TComponent); begin inherited Create(AOwner); end; destructor TUniDBLookupComboBoxObject.Destroy; begin if Assigned(Self.FSearch) then Self.FSearch.Free; if Assigned(Self.FListValues) then Self.FListValues.Free; if Assigned(Self.FCriteriaListSource) then Self.FCriteriaListSource.Free; if Assigned(Self.FListSource)then Self.FListSource.Free; inherited Destroy; end; procedure TUniDBLookupComboBoxObject.DoSetRemoteValue(AIndex: Integer; Value: string); begin inherited; if (VarIsNull(Self.KeyValue)) and (Assigned(Self.FDataSet)) then Self.FDataSet.EntityFieldByName(String(Self.DataField)).AsObject := nil; end; procedure TUniDBLookupComboBoxObject.ExecuteSearch; begin with TuniFormSearch.Create(UniApplication) do begin try ConfigureSearch(Self.FSearch); ShowModal; if ModalResult = mrOk then begin if Assigned(Selected) then begin Self.FListSource.Close; Self.FListSource.SetSourceObject(Selected); Self.FListSource.Open; if Assigned(Self.FDataSet) then Self.FDataSet.EntityFieldByName(Trim(String(Self.DataField))).AsObject := Selected; if Assigned(Self.OnSelect) then Self.OnSelect(Self); end; end; finally Free; end; Self.SetFocus; end; end; procedure TUniDBLookupComboBoxObject.LoadCompleted; begin if Self.Required then Self.ClientEvents.UniEvents.Values['beforeInit'] := 'function beforeInit(sender, config){Ext.apply(sender,{allowBlank:false,msgTarget : ''side''});}'; if Self.Triggers.Count = 0 then begin with Self.Triggers.Add do begin IconCls := 'x-form-search-trigger'; HandleClicks := True; Visible := True; end; end else begin Self.Triggers[0].IconCls := 'x-form-search-trigger'; Self.Triggers[0].HandleClicks := True; Self.Triggers[0].Visible := True; end; Self.FOldUniTriggerEvent := Self.OnTriggerEvent; OnTriggerEvent := Self.MyTriggerEvent; if Self.RemoteQuery then begin FListValues := TStringList.Create; Self.OnRemoteQuery := Self._RemoteQuery; Self.OnGetKeyValue := Self._GetKeyValue; end; inherited; end; procedure TUniDBLookupComboBoxObject.MyTriggerEvent(Sender: TUniCustomComboBox; AButtonId: Integer); begin if AButtonId = 0 then Self.ExecuteSearch; if Assigned(Self.FOldUniTriggerEvent) then Self.FOldUniTriggerEvent(Sender, AButtonId); end; procedure TUniDBLookupComboBoxObject._GetKeyValue(const Value: string; var KeyValue: Variant); var lObj: TObject; lIndex : Integer; begin KeyValue := Null; lObj := nil; if not Value.IsEmpty and not Self.FListSource.IsEmpty then begin if FListValues.Count = 0 then lObj := Self.FListSource.InternalList.Item(0) else begin lIndex := FListValues.IndexOf(Value); if lIndex <> -1 then lObj := Self.FListSource.InternalList.Item(lIndex); end; if Assigned(lObj) then KeyValue := Integer(lObj); end; end; procedure TUniDBLookupComboBoxObject._RemoteQuery(const QueryString: string; Result: TStrings); var lListFields: TStringList; i: Integer; lCriterion: TLinqExpression; lCustomCriteria: TCriteria; lStrListValue: String; begin if (Self.FCriteriaListSource <> nil) and (Trim(Self.Text) <> Trim(QueryString)) then begin lListFields := nil; try lListFields := TStringList.Create; lListFields.Text := Self.ListField.Replace(';', sLineBreak); lCustomCriteria := Self.FCriteriaListSource.Clone; lCriterion := Linq[lListFields[0]].Upper.Like(UpperCase(VarToStr(QueryString)) + '%'); lListFields.Delete(0); for i := 0 to lListFields.Count - 1 do if Self.FListSource.FieldByName(lListFields).Tag = 0 then lCriterion := lCriterion or (Linq[lListFields].Upper.Like('%' + UpperCase(VarToStr(QueryString)) + '%')); lCustomCriteria.Where(lCriterion); Self.FListSource.Close; Self.FListSource.SetSourceCriteria(lCustomCriteria, 25); Self.FListSource.Open; lListFields.Text := Self.ListField.Replace(';', sLineBreak); Self.FListValues.Clear; while not Self.FListSource.Eof do begin lStrListValue := EmptyStr; for i := 0 to lListFields.Count - 1 do begin if i = 0 then begin if Self.FListSource.FieldByName(lListFields).AsString <> '' then lStrListValue := Self.FListSource.FieldByName(lListFields).AsString end else begin if Self.FListSource.FieldByName(lListFields).AsString <> '' then lStrListValue := lStrListValue + ' - ' + Self.FListSource.FieldByName(lListFields).AsString; end; end; if not lStrListValue.IsEmpty then begin Result.Add(lStrListValue); Self.FListValues.Add(lStrListValue); end; Self.FListSource.Next; end; finally lListFields.Free; lCriterion := nil; end; end; end; procedure TUniDBLookupComboBoxObject.SetSearch(Search: TSearch); var lObject: TObject; begin Self.FSearch := Search; Self.FListSource := TAureliusDataset(Self.ListSource.Dataset); Self.FDataSet := TAureliusDataset(Self.DataSource.Dataset); Self.FCriteriaListSource := Search.Criteria.Clone; lObject := Self.FDataSet.EntityFieldByName(String(Self.DataField)).AsObject; if Assigned(lObject) then begin Self.FListSource.Close; Self.FListSource.SetSourceObject(lObject); Self.FListSource.Open; Self.KeyValue := Integer(lObject); Self.UpdateText; end; end; end.
  21. Self.TitleButtons[2].Action.Execute In Code - How ?
  22. hi I have 2 questions 1- after installing SSL certificate on the application, when testing https://localhost/ on standalone setup it is working fine "after the worning message because the name is deferent" but the application don't open if using with hyper-server "I changed the port to 443 in both the server module and the hyper-server configuration file". 2- is there any more setup need to be done on the iis server after installing the certificate on the application to enable https? regards
  23. Yes OnCreate: Self.UniDBGridAtendimentos.JSInterface.JSAddListener('actionclick', 'function(){this.showMask("Aguarde processando...")}'); Event ColumnActionClick try //code finally Self.UniDBGridAtendimentos.JSInterface.JSCall('hideMask', []); end; If you can automate this, I would appreciate it.
  24. // something like this procedure TMainForm.UniBitBtn1Click(Sender: TObject); procedure DisableControls(Ctl: TControl; AEnabled: Boolean); var I: Integer; WC: TWinControl; begin if Ctl is TWinControl then begin WC := TWinControl(Ctl); for I := 0 to WC.ControlCount-1 do DisableControls(WC.Controls[i], AEnabled); end; Ctl.Enabled := AEnabled; end; begin Self.Enabled := not Self.Enabled; DisableControls(Self, Self.Enabled); // end;
  25. Hi. I set UniDBEdit on the form and define the requirement for completion using: UniDBEdit1.JSInterface.JSConfig('allowBlank', [False]); UniButton4.JSInterface.JSAddListener('click', 'function(){return '+ Self.WebForm.JSForm.JSName +'.isValid()}'); Everything works great, but I have a problem when TUniDBEdit is on one of the tabs, e.g. UniPageControl. I wanted to program the SetFocus event but I have no idea how to download UniDBEdit that has not been filled in and is not currently visible to the user?
×
×
  • Create New...