Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/31/22 in all areas

  1. Angus Robertson

    ICS V8.69 announced

    ICS V8.69 has been released at: http://wiki.overbyte.eu/wiki/index.php/ICS_Download ICS is a free internet component library for Delphi 7, 2006 to 2010, XE to XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney and 11.0 and C++ Builder 2006 to XE3, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney and 11.0. ICS supports VCL and FMX, Win32, Win64 and MacOS 32-bit targets. The distribution zip includes the latest OpenSSL 3.0.1 win32, with other versions of OpenSSL being available from the download page. Major Changes in ICS V8.69 include: 1 - V8.69 has a lot of minor improvements, more HTTP client and server features, better built-in authentication, and added built in file uploading to the REST client component. Also continuing improving all the HTTP samples so they now hopefully test all the features of the ICS HTTP server, specifically adding POST and PUT file uploading, and a new client login window for interactive authentication with servers. Also added OCSP (Online Certificate Status Protocol) to ICS, which is used to check SSL/TLS certificates are legitimately issued and not revoked. 2 - In the HTTP client, added new methods RequestAsync and RequestSync which start a specified request by parameter, useful to repeat the last request from an event (such as should be trust the certificate and repeat). When using a proxy, make sure Path is not blank which will break proxies, change to / as for non-proxy requests. GetRequestDoneErrorStr now handles TWsocket errors. Fixed NTLM authentication which got broken in V8.61. Added a new THttpAuthType of httpAuthDigest2 for Digest with the modern SHA-256 algorithm instead of MD5 used by httpAuthDigest, only with USE_SSL. Added new property WWWAuthInfos array filled after 401/407 failure by parsing AuthorizationRequest headers for AuthType and Realm that may be presented to select an authentication option, get login and repeat request. Remove # fragment anchor rom the URL unless the new Option httpoAllowAnchor is set. 3 - In the HTTP REST client, added built in file uploading using POST or PUT. The file name is specified in HttpUploadFile using type HttpUploadStrat ofHttpUploadSimple with parameters in the URL or HttpUploadMIME for multipart with parameters in the first MIME part. Note the applications needs to supply parameters like FileName so the server knows what to do with the file. This may be tested against the ICS web server samples. Upon request completion, ReasonPhrase now also has status, so OK becomes 200 OK, etc. Previously the SslRevocation property was only effective when checking the windows certificate store, now it also works with bundle files using the new TOcspHttp component and OCSP stapling if available. 4 - In the HTTP server component, now converting FLastModified to UTC/GMT time for the response header. Added new authentication type atDigestSha2 with a SHA256 hash instead of MD5 with atDigest only supported with USE_SSL. Note: Mozilla Firefox supports Digest SHA-256, Chrome and Edge do not. Added a new client connection OnHttpRespHdr event to allow response headers to be logged, previously only request headers could be logged. Cleaned up AnswerStream functions so separate lines don't go into send buffer. Added OcspSrvStapling property which should be set to enables OCSP checks and stapling only with AUTO_X509_CERTS define since it adds extra HTTP client code. A revoked certificate will be auto ordered. 5 - In TWSocket, added new method SendTB(const Data: TBytes; Len: Integer=-1) where Len is optional, also similar SendToTB and SendToTB6 with TBytes, as an alternative to casting such types to use Send(). Restored the TlsExtension_cb callback for client debugging since ClientHelloCallback only works with servers. 6 - In TSslWSocketServer added OCSP (Online Certificate Status Protocol) support with IcsHosts using the TOcspHttp component to confirm server SSL/TLS certificates are legitimate and not revoked for security reasons. The certificate OCSP response is also stapled to the initial SSL/TLS HELO handshake and sent to the client to avoid it needing to lookup OCSP using HTTP itself. OCSP responses are cached and saved to a file for reloading later, but are refreshed every time the certificate is validated, at least once a day. The new server property OcspSrvStapling enables OCSP checks and stapling only with AUTO_X509_CERTS define since it adds extra HTTP client code. A revoked certificate will be auto ordered. OCSP checking is done in LoadOneCert and the stapled response sent in TriggerSslServerName when checking SNI. The same OCSP support is available in all ICS servers that use IcsHosts, including FTP, HTTP and TIcsIpStrmLog. 7 - All three main HTTP SSL client sample applications FrameBrowserIcs, OverbyteIcsHttpsTst and OverbyteIcsHttpRestTst now support interactive authentication with a new Login window that displays the different methods the server will accept (from the new property WWWAuthInfos array) allowing one to be selected from Basic, Digest MD5, Digest SHA256 and NTLM logins. This window is displayed after an 401 error and the request then repeated. 8 - The OverbyteIcsHttpsTst SSL sample now has all the missing features from the non-SSL samples, Content Encoding Gzip tick box to support compression, persistent cookie support, POST/PUT support to either send simple data or upload files in various ways (from OverbyteIcsHttpPost1 sample), may be tested against the ICS web server samples. 9 - The OverbyteIcsDDWebService SSL web server sample now builds on unicode compilers. Added authentication for POST requests and new 'Password protected page (POST)' button on the demo menu to test authentication using POST. Fixed web logging to log correct multiple listener. Builds on unicode compilers. Added Digest SHA-256 authentication page DemoDigest2Auth.html and DemoDigestsAll.html that does both digests. DemoAuthAll.html no longer does NTLM, use the separate page. Now displays server response headers if box ticked, only displayed request headers before. File Upload Form and Email Form pages now work without exceptions. The OverbyteIcsSslMultiWebServ SSL web sample has similar new authentication features and logging fixes. 10 - Updated OpenSSL to 3.0.3 and ZLIB (HTTP compression) to 1.2.12, sorry for long delay in updating zlib, now including some important bug fixes, although never saw any issues with the minimal use ICS makes of it. Updated the various ICS CA Trusted Stores. 11 - The OverbyteIcsPemtool SSL sample now does OCSP checks when examining certificate files. There is also a new Test Host Certificates tab that tests SSL/TLS handshake and certificates (using TIcsIpStrmLog) for a list of host names and ports, building a list of host and intermediate certificates that may be further checked and saved as files or added to an intermediate bundle. This new tester should prove useful for debugging sites that return SSL or certificate errors. More detailed release notes are at http://wiki.overbyte.eu/wiki/index.php/ICS_V8.69
  2. Remy Lebeau

    icon/bmp

    I'm sorry, but your question is WAY too vague. You need to be much more specific. What kind of .ico do you have? How exactly do you want to use it instead of .bmp? What kind of UI control do you want to display it in?
  3. hansw

    C++Builder 11 - any way of compiling .PAS?

    You can use C++Builder to install Delphi packages with some manual steps. First you compile the package from the command line: "%BDS%\bin\dcc32.exe" -JL -LE<BPL_OUTPUTDIR> -NB<DCP_OUTPUTDIR> -NH<INCLUDEDIR> Package.dpk Afterwards you can use the IDE (Component -> Install Packages -> Add) to register the bpl manually. HTH, Hans
  4. wsian

    Zint barcode studio zint.dll

    Alternately, you can use Zint-Barcode-Generator-for-Delphi by landrix (no dll needed). Just that the last updated version has an issue. The linear barcode (code128 etc) has been squeezed to 1/3 or even 1/5 block height. Not sure when it will be corrected.
  5. wsian

    Zint barcode studio zint.dll

    Download the latest zint.dll (v2.11) from here https://sourceforge.net/projects/zint/ I'm only using ZBarcode_Encode_and_Buffer. If you need to use other function, please adjust the zint.pas accordingly. Sample code as below: procedure ZBarcode_To_Bitmap(symbol: PZint_Symbol; const ABitmap: TBitmap); var SrcRGB: PRGBTriple; Row, RowWidth: Integer; begin ABitmap.PixelFormat := pf24bit; ABitmap.SetSize(symbol.bitmap_width, symbol.bitmap_height); SrcRGB := Pointer(symbol.bitmap); RowWidth := symbol.bitmap_width * 3; for Row := 0 to symbol.bitmap_height - 1 do begin CopyMemory(ABitmap.ScanLine[Row], SrcRGB, RowWidth); Inc(SrcRGB, symbol.bitmap_width); end; SetBitmapBits(ABitmap.Handle, symbol.bitmap_width * symbol.bitmap_height * 3, symbol.bitmap); end; procedure TForm1.Button2Click(Sender: TObject); var lvSymbol : Pzint_symbol; lvErrorNumber: Integer; lvData: UTF8String; lvBitMap: TBitmap; lvErrorText: string; begin lvSymbol := ZBarcode_Create(); if lvSymbol = nil then Exit; lvBitMap := TBitmap.Create; try lvSymbol.symbology:= BARCODE_QRCODE; lvSymbol.input_mode := DATA_MODE ; lvData := utf8string(Edit1.Text); lvErrorNumber := ZBarcode_Encode_and_Buffer(lvSymbol, PAnsiChar(lvData), Length(lvData), 0); if lvErrorNumber = 0 then begin ZBarcode_To_Bitmap(lvSymbol, lvBitMap); ZBarcode_Print(lvSymbol,0) ; Image1.Picture.Bitmap.Width := Image1.Width; Image1.Picture.Bitmap.Height := Image1.Height; Image1.Picture.Bitmap.Canvas.Brush.Color := clWhite; Image1.Picture.Bitmap.Canvas.FillRect(Rect(0, 0, Image1.Width, Image1.Height)); Image1.Picture.Bitmap.Canvas.StretchDraw(Rect(10, 10, Image1.Width - 10, Image1.Height - 10), lvBitMap); end else begin Image1.Picture.Bitmap.Width := Image1.Width; Image1.Picture.Bitmap.Height := Image1.Height; Image1.Picture.Bitmap.Canvas.Brush.Color := clWhite; Image1.Picture.Bitmap.Canvas.FillRect(Rect(0, 0, Image1.Width, Image1.Height)); lvErrorText := String(AnsiString(lvSymbol.errtxt)); ShowMessage('barcode error:' + lvErrorText); end; finally lvBitMap.Free; lvBitMap := nil; ZBarcode_Delete(lvSymbol); end; end; zint.pas
  6. Anders Melander

    ANN: Better Translation Manager released

    Here you go. Version 1.3.8185.25123: https://bitbucket.org/anders_melander/better-translation-manager/downloads/
  7. dummzeuch

    Appreciate the 'extra mile'..

    I think I said this before: The main reason for this was, that I forget about this problem until yet another Windows update breaks my Delphi installation again. Every time I had to remember the solution (that's why I blogged about it, so I could look it up) and then search for these bloody files. One time I have had enough... If it also helps others, that's great. To be fair: It's not Microsoft's fault but Borland's/Codegear's: These files do not belong into a system directory, but since we are stuck with this it's still annoying.
  8. I mean you could just use madExcept and have a proper stack trace for all such occurrences
  9. David Millington

    Parnassus Bookmarks for Delphi 11 Alexandria?

    Glad you find this useful! The stack bookmarks are enormously powerful simply because of toggling... they're a good example of building a feature where the key functionality is less than you envisaged. I thought a stack of bookmarks, so you can go backwards by popping one off the stack would be very useful, but 90% of the value is in a stack of one item 😄 FWIW the shortcut Shift+Esc may be useful to you: it drops a stack/caret bookmark and jumps back, in one go. So you can easily toggle between any two locations (across units, ie over editor tabs) that way. Drop a caret (Ctrl+Shift+B), go somewhere, press Shit+Escape and it'll drop a caret and go back to (picking up) the first, then Shift-Escape again and it'll drop a caret and go back to the other...
  10. David Millington

    Parnassus Bookmarks for Delphi 11 Alexandria?

    An error restarting indicates a bug in the GetIt code, since the plugins are installed via GetIt and aren't active (aren't loaded) until the restart. Not fully. They are part of the standard IDE build, but are still separate DLLs (not BPLs.) Both plugins use a powerful editor API for all their drawing which is located in CoreEditor.bpl, which I built, and which is what allows them to figure out what's onscreen, where, at what line, etc. We're planning to build an API like this into the IDE, and then move the plugins to use our inbuilt API, at which point they'll be fully integrated. Ultimately we would like that API to be public, part of the ToolsAPI. Bookmarks and Navigator obviously benefit from it, but other tools like GExperts and CnPack also draw in the editor. We have to be careful since we don't necessarily want doing this taken lightly, but making an API available is a better choice than plugins writing code to hack in the same functionality.
  11. David Millington

    Parnassus Bookmarks for Delphi 11 Alexandria?

    Bookmarks and Navigator are now here: and https://blogs.embarcadero.com/bookmarks-and-navigator-are-available-for-rad-studio-11/ The blog post has full info but a couple of notes: We have set up systems so this build delay should not happen again They are available for both 11.0 and 11.1 The Debugger plugin is also coming within a few days Many thanks for your patience here, and I hope you find installing these helps your productivity and use of the IDE.
  12. Arnaud Bouchez

    Is Move the fastest way to copy memory?

    L1 cache access time makes a huge difference. http://blog.skoups.com/?p=592 You could retrieve the L1 cache size, then work on buffers of about 90% of this size (always keep some space for stack, tables and such). Then, if you work in the API buffer directly, a non-temporal move to the result buffer may help a little. During your process, if you use lookup tables, ensure they don't pollute the cache. But profiling is the key for sure. Guesses are most of the time wrong...
  13. You should profile your program to find out where the bottleneck is. Human intuition is usually wrong in such matters.
  14. Just found serious bug in 10.4.2 when compiling to Win64 target: int64 value returned by function is truncated to 32 bit. In XE11 the same code works OK. F.e. this will lead to errors when working with files/streams larger that 2 Gb.
×